Docs
Docs
/v1/billing · Billing
Billing API
Open the Stripe billing portal to change plan, update a payment method, download invoices or cancel. The same action is available in the app under
/premium.Create a portal session
POST
/api/v1/billing/portalcurl -X POST "https://xbeast.io/api/v1/billing/portal" \
-H "Authorization: Bearer xb_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{}'Response:
{ data: { url, fallback, reason?, instructions? } }. Open the URL in a browser where the user is signed in. When Stripe is unavailable, fallback is true and the URL points to the in-app /premium page instead.The portal session grants plan-management access, so it requires a full-access key. Read-only keys receive
403 read_only_key.