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

Authorizations

Authorization
string
header
required

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

Body

application/json

Request body for generating a Stripe customer portal link

returnUrl
string<uri>

URL to redirect to when the user exits the billing portal

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