Billing
Purchase Credits
Create a Stripe checkout session to purchase credits
POST
Create a checkout session to purchase credits. Returns a Stripe checkout URL where the user completes payment.
Request Body
Credit amount to purchase. Either a preset value (
small, medium, large) or a number between 10 and 1000.Preset values:small= $20medium= $50large= $100
URL to redirect to after successful payment
URL to redirect to if user cancels checkout
Response
Stripe checkout session ID
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 1,000