API ReferenceBilling
Open the Stripe billing portal
A dashboard session gets the Stripe billing portal URL. Any other caller gets a single-use /go/ link. A person whose Sendly Pro was bought through a mobile store gets a link to that store's subscription page.
Requires the billing:write scope — Start a checkout, change spending limits, open the billing portal, cancel or refund.
better-auth.session_token<token>
BetterAuth session cookie. Used by the dashboard / browser clients. When present, the active project is taken from the x-project-id header.
In: cookie
Path Parameters
id*string
Project id.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/users/me/projects/string/billing-portal"{
"url": "http://example.com",
"status": "action_required",
"expires_in": 0,
"what": "string",
"instruction": "string"
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}