Skip to content

Create a Stripe Billing Portal session

POST
/stripe/portal
curl --request POST \
--url https://example.com/api/stripe/portal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "returnUrl": "https://example.com" }'
Media type application/json
object
returnUrl
string format: uri

Portal session URL

Media type application/json
object
url
required
string format: uri

Not authenticated

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number
reconnect

True if re-linking GitHub may fix the issue

boolean

No Stripe customer on file

Media type application/json
object
error
required

Human-readable error message

string
code

Stable machine-readable error code for client branching

string
fieldErrors

First validation message per field path

object
key
additional properties
string
issues

Structured validation issues (Zod)

Array<object>
object
path
required
string
message
required
string
retryAfter

Seconds until rate limit resets (429 responses)

number