API referenceBilling
Start a card checkout
POST
Creates a hosted Polar checkout for a paid plan and returns its URL; the caller redirects the browser there. Polar is the merchant of record and files applicable sales tax/VAT.
Plan changes are applied only by the provider webhook, never by this call: a checkout that is never paid changes nothing.
CognitoUserPoolheader
AuthorizationBearer <token>Cognito user pool ID token. API Gateway validates the token (identity
token: no OAuth scopes are configured on the authorizer) and forwards
its claims; the sub claim is the tenant key.
application/json- body
plan*stringPaid tier to check out.
Value in
"lite""pro"Hosted checkout URL.
application/json- response
checkout_url*stringHosted checkout or customer-portal URL to redirect to.
Format
uricurl -X POST "https://example.com/billing/checkout" \ -H "Content-Type: application/json" \ -d '{ "plan": "lite" }'{ "checkout_url": "http://example.com"}