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
/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 returnedclient_secret, then confirm:
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:auth_url to approve the mandate in their UPI app.
Raise a dispute
A customer can query or dispute one of their own invoices:GET /portal/api/disputes.