curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/billing/portal' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"return_url": "https://example.com/webhooks/stateset"
}'
{
"portal_url": "string"
}
Create a portal handler
Creates a Stripe Billing Portal session for self-service subscription management (upgrade, cancel, payment methods, invoices). Required scope: billing:write
POST
/
api
/
v1
/
billing
/
portal
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/billing/portal' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"return_url": "https://example.com/webhooks/stateset"
}'
{
"portal_url": "string"
}
Creates a Stripe Billing Portal session for self-service subscription
management (upgrade, cancel, payment methods, invoices).
Required scope:
billing:write
Request body
CreatePortalRequest
string
required
URL to return to after the customer finishes in the portal
Response
CreatePortalResponse
string
required
Full Stripe Billing Portal URL
Status codes
| Code | Meaning |
|---|---|
200 | Portal session created |
401 | Unauthorized — missing or invalid credentials |
403 | Forbidden — the key/token lacks the required scope |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
503 | Billing not configured |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/billing/portal' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"return_url": "https://example.com/webhooks/stateset"
}'
{
"portal_url": "string"
}
Last modified on August 31, 2026