Duration: 2 weeks
We're setting up Stripe for the repository, please also take time to look at the documentation!
Tasks:
- Read Stripe docs
- Install Stripe dependencies:
yarn add stripe @nestjs/config
- Create
apps/backend/src/payments/ directory
- Create
payments.module.ts with Stripe configuration
- Create
payments.service.ts with methods: - createPaymentIntent(amount, currency, metadata)
createSubscription(customerId, priceId, interval)
retrievePaymentIntent(paymentIntentId)
- Add environment variables (Use your own key for now):
STRIPE_SECRET_KEY
STRIPE_WEBHOOK_SECRET
STRIPE_PUBLISHABLE_KEY
- Add to
example.env
- Add documentation
STRIPE.MD
- Write unit tests with Stripe mock
Acceptance Criteria:
- Stripe SDK configured and working
- PaymentsService can create test payment intents
- Environment variables + implementation is well-documented
- Tests pass with mocked Stripe client
Duration: 2 weeks
We're setting up Stripe for the repository, please also take time to look at the documentation!
Tasks:
yarn add stripe @nestjs/configapps/backend/src/payments/directorypayments.module.tswith Stripe configurationpayments.service.tswith methods: -createPaymentIntent(amount, currency, metadata)createSubscription(customerId, priceId, interval)retrievePaymentIntent(paymentIntentId)STRIPE_SECRET_KEYSTRIPE_WEBHOOK_SECRETSTRIPE_PUBLISHABLE_KEYexample.envSTRIPE.MDAcceptance Criteria: