Billing Portal

Create billing portal session

Creates a short-lived link to a customer's hosted billing page on billing.crevio.co, where they can update their payment method and billing address, download invoices and manage subscriptions. Redirect the customer to url right away: it must be opened before expires_at, then keeps working for an hour in the browser that opened it. Do not store it or put it in emails.

post/billing_portal/sessions

Request

  • Base URL: https://api.crevio.co/v1
  • URL: https://api.crevio.co/v1/billing_portal/sessions
  • Auth: API key in header Authorization

Headers

Idempotency-Keystring

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Request body

customerstring

ID of the customer (cus_...) the billing page is for. Required.

return_urlstring nullable

Where the billing page Return link sends the customer. Defaults to your site.

Response

Billing portal session created

objectstring required
customerstring required
urlstring required
return_urlstring nullable required
expires_atstring required

Changes

No recorded changes to this operation across all 2 revisions of this API.