billing
POST /v1/billing.attach
Attaches a plan to a customer. Handles new subscriptions, upgrades and downgrades.
Use this endpoint to subscribe a customer to a plan, upgrade/downgrade between plans, or add an add-on product.
Request
- Base URLhttps://api.useautumn.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
x-api-versionstring required
Request body
Example request
{
"customer_id": "cus_123",
"plan_id": "pro_plan"
}Response
OK
Example response
{
"customer_id": "cus_123",
"payment_url": "https://checkout.stripe.com/..."
}Changes
No recorded changes to this operation across all 1 revision of this API.