TypeScript
import { Autumn } from 'autumn-js';
const autumn = new Autumn();
const { data, error } = await autumn.customers.billingPortal('customer_id');import asyncio
import os
from autumn import Autumn
client = Autumn(
secret_key=os.environ.get("AUTUMN_SECRET_KEY"), # This is the default and can be omitted
)
response = autumn.customers.billing_portal(
customer_id="customer_id",
)
print(response.customer_id)curl --request POST \
--url https://api.useautumn.com/v1/customers/{customer_id}/billing_portal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"return_url": "<string>"
}
'{
"customer_id": "<string>",
"url": "<string>"
}Open Customer Portal
POST
/
customers
/
{customer_id}
/
billing_portal
TypeScript
import { Autumn } from 'autumn-js';
const autumn = new Autumn();
const { data, error } = await autumn.customers.billingPortal('customer_id');import asyncio
import os
from autumn import Autumn
client = Autumn(
secret_key=os.environ.get("AUTUMN_SECRET_KEY"), # This is the default and can be omitted
)
response = autumn.customers.billing_portal(
customer_id="customer_id",
)
print(response.customer_id)curl --request POST \
--url https://api.useautumn.com/v1/customers/{customer_id}/billing_portal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"return_url": "<string>"
}
'{
"customer_id": "<string>",
"url": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
URL to redirect to when back button is clicked in the billing portal.