13 KiB
13 KiB
AttachParams
Fields
| Field | Type | Required | Description |
|---|---|---|---|
customer_id |
str | ✔️ | The ID of the customer to attach the plan to. |
entity_id |
Optional[str] | ➖ | The ID of the entity to attach the plan to. |
plan_id |
str | ✔️ | The ID of the plan. |
feature_quantities |
List[models.BillingAttachFeatureQuantity] | ➖ | If this plan contains prepaid features, use this field to specify the quantity of each prepaid feature. This quantity includes the included amount and billing units defined when setting up the plan. |
version |
Optional[float] | ➖ | The version of the plan to attach. |
free_trial |
OptionalNullable[models.BillingAttachFreeTrial] | ➖ | Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely. |
customize |
Optional[models.BillingAttachCustomize] | ➖ | Customize the plan to attach. Can either override the price of the plan, the items in the plan, or both. |
invoice_mode |
Optional[models.BillingAttachInvoiceMode] | ➖ | Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. This uses Stripe's send_invoice collection method. |
billing_behavior |
Optional[models.BillingAttachBillingBehavior] | ➖ | How to handle billing when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'next_cycle_only' skips creating any charges and applies the change at the next billing cycle. |
discounts |
List[models.BillingAttachDiscountUnion] | ➖ | List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. |
success_url |
Optional[str] | ➖ | URL to redirect to after successful checkout. |
new_billing_subscription |
Optional[bool] | ➖ | Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one. |
plan_schedule |
Optional[models.BillingAttachPlanSchedule] | ➖ | When the plan change should take effect. 'immediate' applies now, 'end_of_cycle' schedules for the end of the current billing cycle. By default, upgrades are immediate and downgrades are scheduled. |