Skip to main content

The self-service surface

Once a customer has a portal session (magic link), these /portal/api/* actions are available — all authenticated by the portal_session cookie. This is the real, shipped surface; which of these you expose is configured in the dashboard under Settings → Portal.

View & pay invoices

To pay, send the customer to the hosted checkout for the open invoice (/checkout/{invoice_id}) — see Payments.

Update the card on file (Stripe)

Card updates use a Stripe SetupIntent so the card never touches your servers. Start it, collect the card with Stripe Elements using the returned client_secret, then confirm:
The confirm call returns status: "saved" with the new card’s brand and last four, or status: "processing" for methods that settle asynchronously. For US customers, the payment-method page also offers a bank account (ACH): start with POST /portal/api/payment-method/bank-setup-intent, run Stripe Financial Connections in the browser for instant verification, then finalize with the same confirm call — the saved method shows the bank name and last four. See Set up ACH bank debits.
If the deployment isn’t configured for self-serve card updates, these endpoints return a clear “not available on this deployment” error rather than failing silently.

Re-authorize a UPI AutoPay mandate

For Indian customers on UPI AutoPay, the portal issues a fresh mandate and returns a hosted authorization URL to redirect to:
Redirect the customer to auth_url to approve the mandate in their UPI app.

Raise a dispute

A customer can query or dispute one of their own invoices:
Open disputes are listed at GET /portal/api/disputes.

Redeem a gift code

See Gifts for how codes are purchased.

Cancellation

Subscription cancellation runs through the dedicated cancellation flow — surveys, retention offers, and confirmation — rather than a single portal endpoint.

Log out