Skip to main content

Regular plan checkout

  1. User clicks “Choose Plan” on a pricing card
  2. Cuprice calls POST /api/stripe/checkout with the plan ID
  3. Stripe creates a checkout session with the plan’s price
  4. User completes payment on Stripe’s hosted page
  5. Stripe redirects to your success URL with session_id

Custom plan checkout

  1. User clicks “Create Now” on the custom plan card
  2. User selects individual features and quantities
  3. Cuprice calculates the total price automatically
  4. Cuprice calls POST /api/stripe/checkout/custom with selected features
  5. Same Stripe checkout flow as above

After payment

After successful payment, Stripe redirects the user to your Success URL. The URL contains a session_id parameter that you use to look up what was purchased.
https://yoursite.com/?payment=success&session_id=cs_live_a1b2c3...
See Redirect URLs for setup and Feature Gating for how to check what was purchased.