Skip to main content

Create Portal Session

POST/portal-sessions
Creates a billing portal session for a customer. The portal allows customers to view their subscriptions, update payment methods, cancel subscriptions, and change plans — all without requiring you to build a subscription management UI.

Authentication

Headers

Request Body

You must provide either customer.id (to reference an existing customer) or customer.country_code + customer.phone (to look up the customer by phone).

Example Request (By Phone)

Example Request (By Customer ID)

Success Response

Response Fields

Portal Capabilities

The customer billing portal allows customers to:

Authentication Flow

The portal uses OTP (one-time password) verification to authenticate the customer:
  1. Your server creates a portal session via this endpoint
  2. Redirect the customer to the url
  3. The customer verifies their identity via OTP sent to their phone
  4. After verification, the customer can manage their subscriptions
  5. When done, the customer is redirected to your return_url
Portal session URLs are single-use and expire based on the expires_in parameter (default: 1 hour). Generate a new session each time the customer needs to access the portal.
The portal is fully hosted by RMZ and styled to match your store theme. You do not need to build any subscription management UI on your end.

Error Responses