Skip to main content
POST
Create a checkout session to purchase credits. Returns a Stripe checkout URL where the user completes payment.

Request Body

string
required
Credit amount to purchase. Either a preset value (small, medium, large) or a number between 10 and 1000.Preset values:
  • small = $20
  • medium = $50
  • large = $100
string
required
URL to redirect to after successful payment
string
required
URL to redirect to if user cancels checkout

Response

string
Stripe checkout session ID
string
Stripe checkout URL - redirect user here to complete payment

Notes

  • Credits are added to the account immediately after successful payment
  • The Stripe webhook handles the fulfillment automatically
  • Use presets (small, medium, large) for common amounts
  • Custom amounts must be between 10and10 and 1,000