POST /credits/checkout
This endpoint creates a Stripe checkout session to allow a user to purchase a credit package. Requires session-based authentication (JWT access token from login).This endpoint uses session authentication, not API key authentication. You need to be logged in via the dashboard or use a JWT access token.
Request Body
The ID of the credit package to purchase. Get available packages from
/credits/packages.The URL to redirect to after a successful purchase. Defaults to dashboard with success indicator.
The URL to redirect to if the purchase is canceled. Defaults to dashboard with canceled indicator.
Response
The ID of the Stripe checkout session.
The URL of the Stripe checkout page. Redirect the user here to complete purchase.
Details of the selected package.