Skip to main content
POST
/
billing
/
checkout
cURL
curl --request POST \
  --url https://api.useanima.sh/v1/billing/checkout \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "successUrl": "<string>",
  "cancelUrl": "<string>"
}
'
{
  "url": "<string>"
}

Authorizations

Authorization
string
header
required

JWT Bearer token obtained from authentication. Pass as: Authorization: Bearer

Body

application/json

Request body for initiating a Stripe checkout session

tier
enum<string>
required

Target subscription tier to upgrade or switch to

Available options:
starter,
growth,
scale,
enterprise
successUrl
string<uri>

URL to redirect to after successful checkout

cancelUrl
string<uri>

URL to redirect to if the user cancels checkout

Response

200 - application/json

OK

Response containing a Stripe checkout or portal session URL

url
string<uri> | null
required

Stripe-hosted session URL, null if session creation failed