Skip to main content
POST
Typescript (SDK)

Body Parameters

Response

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-api-version
string
default:2.3.0
required

Body

application/json
customer_id
string
required

The ID of the customer to attach the plans to.

plans
object[]
required

The list of plans to attach to the customer.

Minimum array length: 1
entity_id
string

The ID of the entity to attach the plans to.

free_trial
FreeTrialParams · object | null

Free trial configuration applied to all plans. Pass an object to set a custom trial, or null to remove any trial.

currency
string

Currency to bill this multi-attach in (e.g. usd, eur). Must match the customer's currency if they are already locked to one, and every plan must offer a paid price in it. Defaults to the customer's currency, then the org default.

invoice_mode
object

Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately.

discounts
AttachDiscount · object[]

List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.

success_url
string

URL to redirect to after successful checkout.

checkout_session_params
object

Additional parameters to pass into the creation of the Stripe checkout session.

redirect_mode
enum<string>
default:if_required

Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.

Available options:
always,
if_required,
never
new_billing_subscription
boolean

Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one.

enable_plan_immediately
boolean

If true, the cusProducts are activated immediately even when payment is pending via Stripe checkout.

customer_data
CustomerData · object

Customer details to set when creating a customer

entity_data
object

Response

200 - application/json

OK

customer_id
string
required

The ID of the customer.

line_items
object[]
required
subtotal
number
required

The total amount in cents before discounts and tax for the current billing period.

total
number
required

The final amount in cents after discounts and tax for the current billing period.

currency
string
required

The three-letter ISO currency code (e.g., 'usd').

incoming
object[]
required

Products or subscription changes being added or updated.

outgoing
object[]
required

Products or subscription changes being removed or ended.

redirect_to_checkout
boolean
required

Whether the customer will be redirected to a checkout page if attach is called.

checkout_type
enum<string> | null
required

The type of checkout that will be used if the customer is redirected to a checkout page.

Available options:
stripe_checkout,
autumn_checkout
next_cycle
object

Preview of the next billing cycle, if applicable. This shows what the customer will be charged in subsequent cycles.

expand
string[]

Expand the response with additional data.

tax
object

Tax preview for the immediate charge. Contact us to enable the tax flag on your organisation. Shows only with flag enabled, a Stripe customer exists and has a location.

invoice_credits
object

Stripe customer invoice credits preview.