Skip to content

Open the Stripe Customer Portal

POST
/billing/portal
curl --request POST \
--url https://api.sloose.com/billing/portal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "returnUrl": "example" }'

Where a customer changes their card, downloads invoices, or cancels. Everything the portal does reaches us back through the webhook.

Media typeapplication/json
object
returnUrl

Where Stripe sends the browser afterwards.

string | null
key
additional properties
Examplegenerated
{
"returnUrl": "example"
}

Send the browser here.

Media typeapplication/json
object
url
required
string
key
additional properties
Examplegenerated
{
"url": "example"
}

No bearer, or one that is expired, revoked or no longer resolves to a member.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

The bearer’s role is too low, or it was issued for a different org.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

This org is a sandbox. Billing is managed on its production org.

Media typeapplication/json
object
error
required
string
code
required
string
Allowed values: SANDBOX_ORG
key
additional properties
Example
{
"code": "SANDBOX_ORG"
}

Stripe is not configured, or the org has no Stripe customer yet.

Media typeapplication/json
object
error
required
string
key
additional properties
Examplegenerated
{
"error": "example"
}