Skip to main content
POST
/
v1
/
settings
/
billing
/
checkout
Create a Stripe Checkout session for a plan upgrade
curl --request POST \
  --url https://api.trulayer.ai/v1/settings/billing/checkout \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "plan": "pro",
  "success_url": "<string>",
  "cancel_url": "<string>"
}
'
{
  "url": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.trulayer.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

SDK API key (tl_...) or Clerk session JWT

Body

application/json
plan
enum<string>
required

Target paid plan. Starter is not accepted.

Available options:
pro,
team
success_url
string<uri>
required

Redirect target on successful checkout completion.

cancel_url
string<uri>
required

Redirect target if the user abandons checkout.

Response

Checkout session URL

url
string
required

Stripe-hosted checkout session URL.