Billing
Open the Stripe billing portal
Makes a Stripe Billing Portal session for the account and returns its address.
POST
/user/billing/portalTL;DR
| Question | Answer |
|---|---|
| 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
| Status | Meaning | Body |
|---|---|---|
| 200 | The address of the Stripe page. | BillingUrl |
| 401 | Not signed in. | ErrorResponse |
| 403 | The request came from an origin that may not make changes. | ErrorResponse |
| 409 | The account has no billing details at Stripe yet. | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 502 | Stripe could not complete the request. | ErrorResponse |
| 503 | Billing is not set up on this server. | ErrorResponse |
Response body
A 200 answer has the type BillingUrl.
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | An address on Stripe's own site. Send the browser there; it expires, so do not store it. |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint, and the error envelope |
| Schemas | Every request and response type |
| Tool reference | The operations as callable tools |