Start pay-as-you-go checkout
A dashboard session gets the Stripe Checkout URL. Any other caller gets { status: "action_required", url, expires_in, what, instruction }: a /go/ link that works once, for 15 minutes, for the signed-in owner.
Requires the billing:write scope — Start a checkout, change spending limits, open the billing portal, cancel or refund.
BetterAuth session cookie. Used by the dashboard / browser clients. When present, the active project is taken from the x-project-id header.
In: cookie
Path Parameters
Project id.
Query Parameters
What sent the reader to the paywall: branding_banner, quick_start, inbox_quota_refusal, direct or unknown. Echoed on the Checkout return URLs as from so the funnel can attribute the purchase; any other value is ignored.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/users/me/projects/string/checkout"{
"url": "http://example.com",
"status": "action_required",
"expires_in": 0,
"what": "string",
"instruction": "string"
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}