Billing portal sessions
Create short-lived authenticated sessions for the VINR hosted billing portal.
A billing portal session creates a short-lived, one-time URL that takes a customer to the VINR hosted billing portal. From there they can update their subscription plan, change their payment method, and view past invoices — without you building any of that UI yourself.
Illustrative content. Hand-authored to demonstrate the Standard/Advanced pattern; the production page will be generated from the VINR OpenAPI spec (roadmap item #1). Field names are representative.
The billing portal session objectAsk
idstringUnique identifier for the session, e.g. bps_2Fy6rNxQ.
customerstringExpandableThe customer (cust_) this session was created for. Expand to retrieve the full customer
object.
urlstringThe one-time portal URL to redirect the customer to. This URL expires after 24 hours and can only be visited once.
return_urlstringThe URL the customer is redirected to after they finish in the portal or click the back link.
createdtimestampUnix timestamp of when the session was created.
Create a billing portal sessionAsk
Pass the customer ID and a return_url where VINR should send the customer when they leave the
portal. Redirect the customer to the returned url immediately — it expires after 24 hours.