Skip to main content

Stripe

Stripe integration endpoints for subscription management.

Webhook

Handle Stripe webhooks to keep the local database in sync with Stripe events.

  • URL: /api/stripe/webhook
  • Method: POST
  • Auth Required: No (Stripe Signature)

Headers

HeaderValueDescription
stripe-signaturestringSignature for webhook verification

Response

{
"received": true
}

Checkout Session

Create a Stripe Checkout session for a subscription plan.

  • URL: /api/stripe/checkout-session
  • Method: POST
  • Auth Required: Yes

Request Body

FieldTypeDescription
planstringPlan name (growth or pro)
billingCyclestringBilling cycle (monthly or annually)

Response

{
"clientSecret": "cs_..."
}

Update Invoice

Process invoice/payment status updates (often called via client-side after checkout).

  • URL: /api/stripe/invoice
  • Method: POST
  • Auth Required: No

Request Body

FieldTypeDescription
emailstringUser's email
stripeIdstringStripe Session ID
statusstringstatus (optional, default: pending)

Response

{
"success": true
}