Create Checkout session
POST
/billing/checkout
const url = 'https://api.reflexdb.cloud/v1/billing/checkout';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"plan":"pro"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.reflexdb.cloud/v1/billing/checkout \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "plan": "pro" }'Creates a Stripe Checkout session for upgrading to a paid plan. Redirect the user to the returned url. If the account already has an active subscription, redirects to the Billing Portal instead.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
plan
required
string
Responses
Section titled “ Responses ”Default Response
Media type application/json
object
url
required
string format: uri
Example generated
{ "url": "https://example.com"}Default Response
Media type application/json
Error
object
error
required
string
message
string
Example generated
{ "error": "example", "message": "example"}Default Response
Media type application/json
Error
object
error
required
string
message
string
Example generated
{ "error": "example", "message": "example"}Default Response
Media type application/json
Error
object
error
required
string
message
string
Example generated
{ "error": "example", "message": "example"}