Skip to content

Payment Integration Setup (Stripe) (Pair programming) #16

@thaninbew

Description

@thaninbew

Duration: 2 weeks

We're setting up Stripe for the repository, please also take time to look at the documentation!

Tasks:

  1. Read Stripe docs
  2. Install Stripe dependencies: yarn add stripe @nestjs/config
  3. Create apps/backend/src/payments/ directory
  4. Create payments.module.ts with Stripe configuration
  5. Create payments.service.ts with methods: - createPaymentIntent(amount, currency, metadata)
    • createSubscription(customerId, priceId, interval)
    • retrievePaymentIntent(paymentIntentId)
  6. Add environment variables (Use your own key for now):
    • STRIPE_SECRET_KEY
    • STRIPE_WEBHOOK_SECRET
    • STRIPE_PUBLISHABLE_KEY
  7. Add to example.env
  8. Add documentation STRIPE.MD
  9. 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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions