Skip to content
Connect an agent
Billing

Open the Stripe billing portal

Makes a Stripe Billing Portal session for the account and returns its address.

POST/user/billing/portal

TL;DR

QuestionAnswer
What does it do?Open the Stripe billing portal.
What does it take?Nothing.
What does it return?Status 200 with a body of type BillingUrl.
What can go wrong?401 not signed in; 403 the request came from an origin that may not make changes; 409 the account has no billing details at stripe yet; 429 too many requests; 502 stripe could not complete the request; 503 billing is not set up on this server. Every failure uses the one error envelope.

What it does

Makes a Stripe Billing Portal session for the account and returns its address. An account that never started a checkout has no billing details yet and gets 409.

Responses

StatusMeaningBody
200The address of the Stripe page.BillingUrl
401Not signed in.ErrorResponse
403The request came from an origin that may not make changes.ErrorResponse
409The account has no billing details at Stripe yet.ErrorResponse
429Too many requests.ErrorResponse
502Stripe could not complete the request.ErrorResponse
503Billing is not set up on this server.ErrorResponse

Response body

A 200 answer has the type BillingUrl.

FieldTypeRequiredDescription
urlstringyesAn address on Stripe's own site. Send the browser there; it expires, so do not store it.

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools