Skip to main content

Start a payment for a plan

POST /v1/billing/checkout

Returns a URL to send the customer to. Opening it changes nothing: the plan moves only when Stripe confirms a subscription over the webhook.

Credential. A dashboard session token belonging to an owner of the organisation.

curl --fail-with-body -X POST "https://api-833252724876.us-central1.run.app/v1/billing/checkout" \
-H "Authorization: Bearer $JEAN_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"plan": "dev"
}'

Body

FieldTypeRequiredNotes
plan"dev", "team"yesThe plan to buy. free is not bought.

Response · 201

{
"url": "https://checkout.stripe.com/c/pay/cs_test_..."
}

Errors

StatusMeaning
400The plan is not one this deployment sells.
401Unauthenticated, invalid token or revoked key.
403Forbidden, session required or org required.
422Validation failed.
429Quota or rate limit exceeded; error.details says which, and when.
500Internal error; quote error.request_id when reporting it.
503Billing is not configured in this environment.

Every one carries the same envelope.

API overview · Full contract