Debian Codegraph @

stripe/params/_subscription_schedule_create_params.py

raw
1 # -*- coding: utf-8 -*-
2 # File generated from our OpenAPI spec
3 from stripe._request_options import RequestOptions
4 from typing import Dict, List
5 from typing_extensions import Literal, NotRequired, TypedDict
6
7
8 class SubscriptionScheduleCreateParams(RequestOptions):
9 billing_mode: NotRequired["SubscriptionScheduleCreateParamsBillingMode"]
10 """
11 Controls how prorations and invoices for subscriptions are calculated and orchestrated.
12 """
13 customer: NotRequired[str]
14 """
15 The identifier of the customer to create the subscription schedule for.
16 """
17 customer_account: NotRequired[str]
18 """
19 The identifier of the account to create the subscription schedule for.
20 """
21 default_settings: NotRequired[
22 "SubscriptionScheduleCreateParamsDefaultSettings"
23 ]
24 """
25 Object representing the subscription schedule's default settings.
26 """
27 end_behavior: NotRequired[Literal["cancel", "none", "release", "renew"]]
28 """
29 Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
30 """
31 expand: NotRequired[List[str]]
32 """
33 Specifies which fields in the response should be expanded.
34 """
35 from_subscription: NotRequired[str]
36 """
37 Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls.
38 """
39 metadata: NotRequired["Literal['']|Dict[str, str]"]
40 """
41 Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
42 """
43 phases: NotRequired[List["SubscriptionScheduleCreateParamsPhase"]]
44 """
45 List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
46 """
47 start_date: NotRequired["int|Literal['now']"]
48 """
49 When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.
50 """
51
52
53 class SubscriptionScheduleCreateParamsBillingMode(TypedDict):
54 flexible: NotRequired[
55 "SubscriptionScheduleCreateParamsBillingModeFlexible"
56 ]
57 """
58 Configure behavior for flexible billing mode.
59 """
60 type: Literal["classic", "flexible"]
61 """
62 Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`.
63 """
64
65
66 class SubscriptionScheduleCreateParamsBillingModeFlexible(TypedDict):
67 proration_discounts: NotRequired[Literal["included", "itemized"]]
68 """
69 Controls how invoices and invoice items display proration amounts and discount amounts.
70 """
71
72
73 class SubscriptionScheduleCreateParamsDefaultSettings(TypedDict):
74 application_fee_percent: NotRequired[float]
75 """
76 A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
77 """
78 automatic_tax: NotRequired[
79 "SubscriptionScheduleCreateParamsDefaultSettingsAutomaticTax"
80 ]
81 """
82 Default settings for automatic tax computation.
83 """
84 billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]]
85 """
86 Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle).
87 """
88 billing_thresholds: NotRequired[
89 "Literal['']|SubscriptionScheduleCreateParamsDefaultSettingsBillingThresholds"
90 ]
91 """
92 Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
93 """
94 collection_method: NotRequired[
95 Literal["charge_automatically", "send_invoice"]
96 ]
97 """
98 Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
99 """
100 default_payment_method: NotRequired[str]
101 """
102 ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
103 """
104 description: NotRequired["Literal['']|str"]
105 """
106 Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
107 """
108 invoice_settings: NotRequired[
109 "SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettings"
110 ]
111 """
112 All invoices will be billed using the specified settings.
113 """
114 on_behalf_of: NotRequired["Literal['']|str"]
115 """
116 The account on behalf of which to charge, for each of the associated subscription's invoices.
117 """
118 transfer_data: NotRequired[
119 "Literal['']|SubscriptionScheduleCreateParamsDefaultSettingsTransferData"
120 ]
121 """
122 The data with which to automatically create a Transfer for each of the associated subscription's invoices.
123 """
124
125
126 class SubscriptionScheduleCreateParamsDefaultSettingsAutomaticTax(TypedDict):
127 enabled: bool
128 """
129 Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
130 """
131 liability: NotRequired[
132 "SubscriptionScheduleCreateParamsDefaultSettingsAutomaticTaxLiability"
133 ]
134 """
135 The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
136 """
137
138
139 class SubscriptionScheduleCreateParamsDefaultSettingsAutomaticTaxLiability(
140 TypedDict,
141 ):
142 account: NotRequired[str]
143 """
144 The connected account being referenced when `type` is `account`.
145 """
146 type: Literal["account", "self"]
147 """
148 Type of the account referenced in the request.
149 """
150
151
152 class SubscriptionScheduleCreateParamsDefaultSettingsBillingThresholds(
153 TypedDict,
154 ):
155 amount_gte: NotRequired[int]
156 """
157 Monetary threshold that triggers the subscription to advance to a new billing period
158 """
159 reset_billing_cycle_anchor: NotRequired[bool]
160 """
161 Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
162 """
163
164
165 class SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettings(
166 TypedDict
167 ):
168 account_tax_ids: NotRequired["Literal['']|List[str]"]
169 """
170 The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule.
171 """
172 days_until_due: NotRequired[int]
173 """
174 Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`.
175 """
176 issuer: NotRequired[
177 "SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsIssuer"
178 ]
179 """
180 The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
181 """
182
183
184 class SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsIssuer(
185 TypedDict,
186 ):
187 account: NotRequired[str]
188 """
189 The connected account being referenced when `type` is `account`.
190 """
191 type: Literal["account", "self"]
192 """
193 Type of the account referenced in the request.
194 """
195
196
197 class SubscriptionScheduleCreateParamsDefaultSettingsTransferData(TypedDict):
198 amount_percent: NotRequired[float]
199 """
200 A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
201 """
202 destination: str
203 """
204 ID of an existing, connected Stripe account.
205 """
206
207
208 class SubscriptionScheduleCreateParamsPhase(TypedDict):
209 add_invoice_items: NotRequired[
210 List["SubscriptionScheduleCreateParamsPhaseAddInvoiceItem"]
211 ]
212 """
213 A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
214 """
215 application_fee_percent: NotRequired[float]
216 """
217 A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
218 """
219 automatic_tax: NotRequired[
220 "SubscriptionScheduleCreateParamsPhaseAutomaticTax"
221 ]
222 """
223 Automatic tax settings for this phase.
224 """
225 billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]]
226 """
227 Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle).
228 """
229 billing_thresholds: NotRequired[
230 "Literal['']|SubscriptionScheduleCreateParamsPhaseBillingThresholds"
231 ]
232 """
233 Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
234 """
235 collection_method: NotRequired[
236 Literal["charge_automatically", "send_invoice"]
237 ]
238 """
239 Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation.
240 """
241 currency: NotRequired[str]
242 """
243 Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
244 """
245 default_payment_method: NotRequired[str]
246 """
247 ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
248 """
249 default_tax_rates: NotRequired["Literal['']|List[str]"]
250 """
251 A list of [Tax Rate](https://docs.stripe.com/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://docs.stripe.com/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
252 """
253 description: NotRequired["Literal['']|str"]
254 """
255 Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
256 """
257 discounts: NotRequired[
258 "Literal['']|List[SubscriptionScheduleCreateParamsPhaseDiscount]"
259 ]
260 """
261 The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
262 """
263 duration: NotRequired["SubscriptionScheduleCreateParamsPhaseDuration"]
264 """
265 The number of intervals the phase should last. If set, `end_date` must not be set.
266 """
267 end_date: NotRequired[int]
268 """
269 The date at which this phase of the subscription schedule ends. If set, `duration` must not be set.
270 """
271 invoice_settings: NotRequired[
272 "SubscriptionScheduleCreateParamsPhaseInvoiceSettings"
273 ]
274 """
275 All invoices will be billed using the specified settings.
276 """
277 items: List["SubscriptionScheduleCreateParamsPhaseItem"]
278 """
279 List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
280 """
281 metadata: NotRequired[Dict[str, str]]
282 """
283 Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
284 """
285 on_behalf_of: NotRequired[str]
286 """
287 The account on behalf of which to charge, for each of the associated subscription's invoices.
288 """
289 proration_behavior: NotRequired[
290 Literal["always_invoice", "create_prorations", "none"]
291 ]
292 """
293 Controls whether the subscription schedule should create [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase.
294 """
295 transfer_data: NotRequired[
296 "SubscriptionScheduleCreateParamsPhaseTransferData"
297 ]
298 """
299 The data with which to automatically create a Transfer for each of the associated subscription's invoices.
300 """
301 trial: NotRequired[bool]
302 """
303 If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
304 """
305 trial_end: NotRequired[int]
306 """
307 Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
308 """
309
310
311 class SubscriptionScheduleCreateParamsPhaseAddInvoiceItem(TypedDict):
312 discounts: NotRequired[
313 List["SubscriptionScheduleCreateParamsPhaseAddInvoiceItemDiscount"]
314 ]
315 """
316 The coupons to redeem into discounts for the item.
317 """
318 metadata: NotRequired[Dict[str, str]]
319 """
320 Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
321 """
322 period: NotRequired[
323 "SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPeriod"
324 ]
325 """
326 The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`.
327 """
328 price: NotRequired[str]
329 """
330 The ID of the price object. One of `price` or `price_data` is required.
331 """
332 price_data: NotRequired[
333 "SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPriceData"
334 ]
335 """
336 Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
337 """
338 quantity: NotRequired[int]
339 """
340 Quantity for this item. Defaults to 1.
341 """
342 tax_rates: NotRequired["Literal['']|List[str]"]
343 """
344 The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
345 """
346
347
348 class SubscriptionScheduleCreateParamsPhaseAddInvoiceItemDiscount(TypedDict):
349 coupon: NotRequired[str]
350 """
351 ID of the coupon to create a new discount for.
352 """
353 discount: NotRequired[str]
354 """
355 ID of an existing discount on the object (or one of its ancestors) to reuse.
356 """
357 promotion_code: NotRequired[str]
358 """
359 ID of the promotion code to create a new discount for.
360 """
361
362
363 class SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPeriod(TypedDict):
364 end: "SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPeriodEnd"
365 """
366 End of the invoice item period.
367 """
368 start: "SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPeriodStart"
369 """
370 Start of the invoice item period.
371 """
372
373
374 class SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPeriodEnd(TypedDict):
375 timestamp: NotRequired[int]
376 """
377 A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
378 """
379 type: Literal["min_item_period_end", "phase_end", "timestamp"]
380 """
381 Select how to calculate the end of the invoice item period.
382 """
383
384
385 class SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPeriodStart(
386 TypedDict
387 ):
388 timestamp: NotRequired[int]
389 """
390 A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
391 """
392 type: Literal["max_item_period_start", "phase_start", "timestamp"]
393 """
394 Select how to calculate the start of the invoice item period.
395 """
396
397
398 class SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPriceData(TypedDict):
399 currency: str
400 """
401 Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
402 """
403 product: str
404 """
405 The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
406 """
407 tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]]
408 """
409 Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
410 """
411 unit_amount: NotRequired[int]
412 """
413 A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
414 """
415 unit_amount_decimal: NotRequired[str]
416 """
417 Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
418 """
419
420
421 class SubscriptionScheduleCreateParamsPhaseAutomaticTax(TypedDict):
422 enabled: bool
423 """
424 Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
425 """
426 liability: NotRequired[
427 "SubscriptionScheduleCreateParamsPhaseAutomaticTaxLiability"
428 ]
429 """
430 The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
431 """
432
433
434 class SubscriptionScheduleCreateParamsPhaseAutomaticTaxLiability(TypedDict):
435 account: NotRequired[str]
436 """
437 The connected account being referenced when `type` is `account`.
438 """
439 type: Literal["account", "self"]
440 """
441 Type of the account referenced in the request.
442 """
443
444
445 class SubscriptionScheduleCreateParamsPhaseBillingThresholds(TypedDict):
446 amount_gte: NotRequired[int]
447 """
448 Monetary threshold that triggers the subscription to advance to a new billing period
449 """
450 reset_billing_cycle_anchor: NotRequired[bool]
451 """
452 Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged.
453 """
454
455
456 class SubscriptionScheduleCreateParamsPhaseDiscount(TypedDict):
457 coupon: NotRequired[str]
458 """
459 ID of the coupon to create a new discount for.
460 """
461 discount: NotRequired[str]
462 """
463 ID of an existing discount on the object (or one of its ancestors) to reuse.
464 """
465 promotion_code: NotRequired[str]
466 """
467 ID of the promotion code to create a new discount for.
468 """
469
470
471 class SubscriptionScheduleCreateParamsPhaseDuration(TypedDict):
472 interval: Literal["day", "month", "week", "year"]
473 """
474 Specifies phase duration. Either `day`, `week`, `month` or `year`.
475 """
476 interval_count: NotRequired[int]
477 """
478 The multiplier applied to the interval.
479 """
480
481
482 class SubscriptionScheduleCreateParamsPhaseInvoiceSettings(TypedDict):
483 account_tax_ids: NotRequired["Literal['']|List[str]"]
484 """
485 The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
486 """
487 days_until_due: NotRequired[int]
488 """
489 Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
490 """
491 issuer: NotRequired[
492 "SubscriptionScheduleCreateParamsPhaseInvoiceSettingsIssuer"
493 ]
494 """
495 The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
496 """
497
498
499 class SubscriptionScheduleCreateParamsPhaseInvoiceSettingsIssuer(TypedDict):
500 account: NotRequired[str]
501 """
502 The connected account being referenced when `type` is `account`.
503 """
504 type: Literal["account", "self"]
505 """
506 Type of the account referenced in the request.
507 """
508
509
510 class SubscriptionScheduleCreateParamsPhaseItem(TypedDict):
511 billing_thresholds: NotRequired[
512 "Literal['']|SubscriptionScheduleCreateParamsPhaseItemBillingThresholds"
513 ]
514 """
515 Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
516 """
517 discounts: NotRequired[
518 "Literal['']|List[SubscriptionScheduleCreateParamsPhaseItemDiscount]"
519 ]
520 """
521 The coupons to redeem into discounts for the subscription item.
522 """
523 metadata: NotRequired[Dict[str, str]]
524 """
525 Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
526 """
527 plan: NotRequired[str]
528 """
529 The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
530 """
531 price: NotRequired[str]
532 """
533 The ID of the price object.
534 """
535 price_data: NotRequired[
536 "SubscriptionScheduleCreateParamsPhaseItemPriceData"
537 ]
538 """
539 Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline.
540 """
541 quantity: NotRequired[int]
542 """
543 Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
544 """
545 tax_rates: NotRequired["Literal['']|List[str]"]
546 """
547 A list of [Tax Rate](https://docs.stripe.com/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://docs.stripe.com/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
548 """
549
550
551 class SubscriptionScheduleCreateParamsPhaseItemBillingThresholds(TypedDict):
552 usage_gte: int
553 """
554 Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
555 """
556
557
558 class SubscriptionScheduleCreateParamsPhaseItemDiscount(TypedDict):
559 coupon: NotRequired[str]
560 """
561 ID of the coupon to create a new discount for.
562 """
563 discount: NotRequired[str]
564 """
565 ID of an existing discount on the object (or one of its ancestors) to reuse.
566 """
567 promotion_code: NotRequired[str]
568 """
569 ID of the promotion code to create a new discount for.
570 """
571
572
573 class SubscriptionScheduleCreateParamsPhaseItemPriceData(TypedDict):
574 currency: str
575 """
576 Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
577 """
578 product: str
579 """
580 The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
581 """
582 recurring: "SubscriptionScheduleCreateParamsPhaseItemPriceDataRecurring"
583 """
584 The recurring components of a price such as `interval` and `interval_count`.
585 """
586 tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]]
587 """
588 Only required if a [default tax behavior](https://docs.stripe.com/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
589 """
590 unit_amount: NotRequired[int]
591 """
592 A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
593 """
594 unit_amount_decimal: NotRequired[str]
595 """
596 Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
597 """
598
599
600 class SubscriptionScheduleCreateParamsPhaseItemPriceDataRecurring(TypedDict):
601 interval: Literal["day", "month", "week", "year"]
602 """
603 Specifies billing frequency. Either `day`, `week`, `month` or `year`.
604 """
605 interval_count: NotRequired[int]
606 """
607 The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
608 """
609
610
611 class SubscriptionScheduleCreateParamsPhaseTransferData(TypedDict):
612 amount_percent: NotRequired[float]
613 """
614 A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
615 """
616 destination: str
617 """
618 ID of an existing, connected Stripe account.
619 """