TypeScript
import { Autumn } from 'autumn-js' const autumn = new Autumn() const result = await autumn.billing.openCustomerPortal({ customerId: "cus_123", returnUrl: "https://useautumn.com", });
{ "customer_id": "cus_123", "url": "https://billing.stripe.com/session/..." }
Create a billing portal session for a customer to manage their subscription.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
The ID of the customer to open the billing portal for.
Stripe billing portal configuration ID. Create configurations in your Stripe dashboard.
URL to redirect to when back button is clicked in the billing portal
OK
The ID of the billing portal session
URL to the billing portal