Billing Portal

Create billing portal session

Changed on

Creates a short-lived link to a contact'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 contact 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
  • Auth
    API key in header Authorization

Headers

Idempotency-Key, string

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

BillingPortalSessionRequest required
contact, string

ID of the contact (con_...) the billing page is for. Required.

return_url, string nullable

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

Response

Billing portal session created

BillingPortalSession required
object, string required
contact, string required
url, string required
return_url, string nullable required
expires_at, string required

Changes

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    4 more changes in this revision