Create Portal Session
POST
/api/v1/billing/portal
const url = 'https://example.com/api/v1/billing/portal';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"return_url":"http://localhost:3000/dashboard"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/billing/portal \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "return_url": "http://localhost:3000/dashboard" }'Create a Stripe Billing Portal session.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
PortalRequest
object
return_url
Return Url
string
Responses
Section titled “ Responses ”Successful Response
Media type application/json
PortalResponse
object
url
required
Url
string
Example generated
{ "url": "example"}Validation Error
Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}