Debian Codegraph @

stripe/params/_subscription_modify_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 SubscriptionModifyParams(RequestOptions):
9 add_invoice_items: NotRequired[
10 List["SubscriptionModifyParamsAddInvoiceItem"]
11 ]
12 """
13 A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items.
14 """
15 application_fee_percent: NotRequired["Literal['']|float"]
16 """
17 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).
18 """
19 automatic_tax: NotRequired["SubscriptionModifyParamsAutomaticTax"]
20 """
21 Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
22 """
23 billing_cycle_anchor: NotRequired[Literal["now", "unchanged"]]
24 """
25 Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://docs.stripe.com/billing/subscriptions/billing-cycle).
26 """
27 billing_thresholds: NotRequired[
28 "Literal['']|SubscriptionModifyParamsBillingThresholds"
29 ]
30 """
31 Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
32 """
33 cancel_at: NotRequired[
34 "Literal['']|int|Literal['max_period_end', 'min_period_end']"
35 ]
36 """
37 A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
38 """
39 cancel_at_period_end: NotRequired[bool]
40 """
41 Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
42 """
43 cancellation_details: NotRequired[
44 "SubscriptionModifyParamsCancellationDetails"
45 ]
46 """
47 Details about why this subscription was cancelled
48 """
49 collection_method: NotRequired[
50 Literal["charge_automatically", "send_invoice"]
51 ]
52 """
53 Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the 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`.
54 """
55 days_until_due: NotRequired[int]
56 """
57 Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`.
58 """
59 default_payment_method: NotRequired[str]
60 """
61 ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source).
62 """
63 default_source: NotRequired["Literal['']|str"]
64 """
65 ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://docs.stripe.com/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://docs.stripe.com/api/customers/object#customer_object-default_source).
66 """
67 default_tax_rates: NotRequired["Literal['']|List[str]"]
68 """
69 The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates.
70 """
71 description: NotRequired["Literal['']|str"]
72 """
73 The subscription's 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.
74 """
75 discounts: NotRequired[
76 "Literal['']|List[SubscriptionModifyParamsDiscount]"
77 ]
78 """
79 The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer.
80 """
81 expand: NotRequired[List[str]]
82 """
83 Specifies which fields in the response should be expanded.
84 """
85 invoice_settings: NotRequired["SubscriptionModifyParamsInvoiceSettings"]
86 """
87 All invoices will be billed using the specified settings.
88 """
89 items: NotRequired[List["SubscriptionModifyParamsItem"]]
90 """
91 A list of up to 20 subscription items, each with an attached price.
92 """
93 metadata: NotRequired["Literal['']|Dict[str, str]"]
94 """
95 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`.
96 """
97 off_session: NotRequired[bool]
98 """
99 Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session).
100 """
101 on_behalf_of: NotRequired["Literal['']|str"]
102 """
103 The account on behalf of which to charge, for each of the subscription's invoices.
104 """
105 pause_collection: NotRequired[
106 "Literal['']|SubscriptionModifyParamsPauseCollection"
107 ]
108 """
109 If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://docs.stripe.com/billing/subscriptions/pause-payment).
110 """
111 payment_behavior: NotRequired[
112 Literal[
113 "allow_incomplete",
114 "default_incomplete",
115 "error_if_incomplete",
116 "pending_if_incomplete",
117 ]
118 ]
119 """
120 Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://docs.stripe.com/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
121
122 Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://docs.stripe.com/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method.
123
124 Use `pending_if_incomplete` to update the subscription using [pending updates](https://docs.stripe.com/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://docs.stripe.com/billing/pending-updates-reference#supported-attributes).
125
126 Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more.
127 """
128 payment_settings: NotRequired["SubscriptionModifyParamsPaymentSettings"]
129 """
130 Payment settings to pass to invoices created by the subscription.
131 """
132 pending_invoice_item_interval: NotRequired[
133 "Literal['']|SubscriptionModifyParamsPendingInvoiceItemInterval"
134 ]
135 """
136 Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://docs.stripe.com/api#create_invoice) for the given subscription at the specified interval.
137 """
138 proration_behavior: NotRequired[
139 Literal["always_invoice", "create_prorations", "none"]
140 ]
141 """
142 Determines how to handle [prorations](https://docs.stripe.com/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
143 """
144 proration_date: NotRequired[int]
145 """
146 If set, prorations will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same prorations that were previewed with the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint. `proration_date` can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations.
147 """
148 transfer_data: NotRequired[
149 "Literal['']|SubscriptionModifyParamsTransferData"
150 ]
151 """
152 If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value.
153 """
154 trial_end: NotRequired["Literal['now']|int"]
155 """
156 Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, `trial_end` will override the default trial period of the plan the customer is being subscribed to. The `billing_cycle_anchor` will be updated to the `trial_end` value. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`.
157 """
158 trial_from_plan: NotRequired[bool]
159 """
160 Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://docs.stripe.com/billing/subscriptions/trials) to learn more.
161 """
162 trial_settings: NotRequired["SubscriptionModifyParamsTrialSettings"]
163 """
164 Settings related to subscription trials.
165 """
166
167
168 class SubscriptionModifyParamsAddInvoiceItem(TypedDict):
169 discounts: NotRequired[
170 List["SubscriptionModifyParamsAddInvoiceItemDiscount"]
171 ]
172 """
173 The coupons to redeem into discounts for the item.
174 """
175 metadata: NotRequired[Dict[str, str]]
176 """
177 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`.
178 """
179 period: NotRequired["SubscriptionModifyParamsAddInvoiceItemPeriod"]
180 """
181 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`.
182 """
183 price: NotRequired[str]
184 """
185 The ID of the price object. One of `price` or `price_data` is required.
186 """
187 price_data: NotRequired["SubscriptionModifyParamsAddInvoiceItemPriceData"]
188 """
189 Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
190 """
191 quantity: NotRequired[int]
192 """
193 Quantity for this item. Defaults to 1.
194 """
195 tax_rates: NotRequired["Literal['']|List[str]"]
196 """
197 The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
198 """
199
200
201 class SubscriptionModifyParamsAddInvoiceItemDiscount(TypedDict):
202 coupon: NotRequired[str]
203 """
204 ID of the coupon to create a new discount for.
205 """
206 discount: NotRequired[str]
207 """
208 ID of an existing discount on the object (or one of its ancestors) to reuse.
209 """
210 promotion_code: NotRequired[str]
211 """
212 ID of the promotion code to create a new discount for.
213 """
214
215
216 class SubscriptionModifyParamsAddInvoiceItemPeriod(TypedDict):
217 end: "SubscriptionModifyParamsAddInvoiceItemPeriodEnd"
218 """
219 End of the invoice item period.
220 """
221 start: "SubscriptionModifyParamsAddInvoiceItemPeriodStart"
222 """
223 Start of the invoice item period.
224 """
225
226
227 class SubscriptionModifyParamsAddInvoiceItemPeriodEnd(TypedDict):
228 timestamp: NotRequired[int]
229 """
230 A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
231 """
232 type: Literal["min_item_period_end", "timestamp"]
233 """
234 Select how to calculate the end of the invoice item period.
235 """
236
237
238 class SubscriptionModifyParamsAddInvoiceItemPeriodStart(TypedDict):
239 timestamp: NotRequired[int]
240 """
241 A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
242 """
243 type: Literal["max_item_period_start", "now", "timestamp"]
244 """
245 Select how to calculate the start of the invoice item period.
246 """
247
248
249 class SubscriptionModifyParamsAddInvoiceItemPriceData(TypedDict):
250 currency: str
251 """
252 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).
253 """
254 product: str
255 """
256 The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
257 """
258 tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]]
259 """
260 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.
261 """
262 unit_amount: NotRequired[int]
263 """
264 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.
265 """
266 unit_amount_decimal: NotRequired[str]
267 """
268 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.
269 """
270
271
272 class SubscriptionModifyParamsAutomaticTax(TypedDict):
273 enabled: bool
274 """
275 Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
276 """
277 liability: NotRequired["SubscriptionModifyParamsAutomaticTaxLiability"]
278 """
279 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.
280 """
281
282
283 class SubscriptionModifyParamsAutomaticTaxLiability(TypedDict):
284 account: NotRequired[str]
285 """
286 The connected account being referenced when `type` is `account`.
287 """
288 type: Literal["account", "self"]
289 """
290 Type of the account referenced in the request.
291 """
292
293
294 class SubscriptionModifyParamsBillingThresholds(TypedDict):
295 amount_gte: NotRequired[int]
296 """
297 Monetary threshold that triggers the subscription to advance to a new billing period
298 """
299 reset_billing_cycle_anchor: NotRequired[bool]
300 """
301 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.
302 """
303
304
305 class SubscriptionModifyParamsCancellationDetails(TypedDict):
306 comment: NotRequired["Literal['']|str"]
307 """
308 Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user.
309 """
310 feedback: NotRequired[
311 "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']"
312 ]
313 """
314 The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user.
315 """
316
317
318 class SubscriptionModifyParamsDiscount(TypedDict):
319 coupon: NotRequired[str]
320 """
321 ID of the coupon to create a new discount for.
322 """
323 discount: NotRequired[str]
324 """
325 ID of an existing discount on the object (or one of its ancestors) to reuse.
326 """
327 promotion_code: NotRequired[str]
328 """
329 ID of the promotion code to create a new discount for.
330 """
331
332
333 class SubscriptionModifyParamsInvoiceSettings(TypedDict):
334 account_tax_ids: NotRequired["Literal['']|List[str]"]
335 """
336 The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription.
337 """
338 issuer: NotRequired["SubscriptionModifyParamsInvoiceSettingsIssuer"]
339 """
340 The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
341 """
342
343
344 class SubscriptionModifyParamsInvoiceSettingsIssuer(TypedDict):
345 account: NotRequired[str]
346 """
347 The connected account being referenced when `type` is `account`.
348 """
349 type: Literal["account", "self"]
350 """
351 Type of the account referenced in the request.
352 """
353
354
355 class SubscriptionModifyParamsItem(TypedDict):
356 billing_thresholds: NotRequired[
357 "Literal['']|SubscriptionModifyParamsItemBillingThresholds"
358 ]
359 """
360 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.
361 """
362 clear_usage: NotRequired[bool]
363 """
364 Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
365 """
366 deleted: NotRequired[bool]
367 """
368 A flag that, if set to `true`, will delete the specified item.
369 """
370 discounts: NotRequired[
371 "Literal['']|List[SubscriptionModifyParamsItemDiscount]"
372 ]
373 """
374 The coupons to redeem into discounts for the subscription item.
375 """
376 id: NotRequired[str]
377 """
378 Subscription item to update.
379 """
380 metadata: NotRequired["Literal['']|Dict[str, str]"]
381 """
382 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`.
383 """
384 plan: NotRequired[str]
385 """
386 Plan ID for this item, as a string.
387 """
388 price: NotRequired[str]
389 """
390 The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
391 """
392 price_data: NotRequired["SubscriptionModifyParamsItemPriceData"]
393 """
394 Data used to generate a new [Price](https://docs.stripe.com/api/prices) object inline. One of `price` or `price_data` is required.
395 """
396 quantity: NotRequired[int]
397 """
398 Quantity for this item.
399 """
400 tax_rates: NotRequired["Literal['']|List[str]"]
401 """
402 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.
403 """
404
405
406 class SubscriptionModifyParamsItemBillingThresholds(TypedDict):
407 usage_gte: int
408 """
409 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))
410 """
411
412
413 class SubscriptionModifyParamsItemDiscount(TypedDict):
414 coupon: NotRequired[str]
415 """
416 ID of the coupon to create a new discount for.
417 """
418 discount: NotRequired[str]
419 """
420 ID of an existing discount on the object (or one of its ancestors) to reuse.
421 """
422 promotion_code: NotRequired[str]
423 """
424 ID of the promotion code to create a new discount for.
425 """
426
427
428 class SubscriptionModifyParamsItemPriceData(TypedDict):
429 currency: str
430 """
431 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).
432 """
433 product: str
434 """
435 The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
436 """
437 recurring: "SubscriptionModifyParamsItemPriceDataRecurring"
438 """
439 The recurring components of a price such as `interval` and `interval_count`.
440 """
441 tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]]
442 """
443 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.
444 """
445 unit_amount: NotRequired[int]
446 """
447 A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
448 """
449 unit_amount_decimal: NotRequired[str]
450 """
451 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.
452 """
453
454
455 class SubscriptionModifyParamsItemPriceDataRecurring(TypedDict):
456 interval: Literal["day", "month", "week", "year"]
457 """
458 Specifies billing frequency. Either `day`, `week`, `month` or `year`.
459 """
460 interval_count: NotRequired[int]
461 """
462 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).
463 """
464
465
466 class SubscriptionModifyParamsPauseCollection(TypedDict):
467 behavior: Literal["keep_as_draft", "mark_uncollectible", "void"]
468 """
469 The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`.
470 """
471 resumes_at: NotRequired[int]
472 """
473 The time after which the subscription will resume collecting payments.
474 """
475
476
477 class SubscriptionModifyParamsPaymentSettings(TypedDict):
478 payment_method_options: NotRequired[
479 "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptions"
480 ]
481 """
482 Payment-method-specific configuration to provide to invoices created by the subscription.
483 """
484 payment_method_types: NotRequired[
485 "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'payto', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'swish', 'us_bank_account', 'wechat_pay']]"
486 ]
487 """
488 The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration
489 """
490 save_default_payment_method: NotRequired[Literal["off", "on_subscription"]]
491 """
492 Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified.
493 """
494
495
496 class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict):
497 acss_debit: NotRequired[
498 "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit"
499 ]
500 """
501 This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent.
502 """
503 bancontact: NotRequired[
504 "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBancontact"
505 ]
506 """
507 This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent.
508 """
509 card: NotRequired[
510 "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCard"
511 ]
512 """
513 This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent.
514 """
515 customer_balance: NotRequired[
516 "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance"
517 ]
518 """
519 This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent.
520 """
521 konbini: NotRequired[
522 "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsKonbini"
523 ]
524 """
525 This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent.
526 """
527 payto: NotRequired[
528 "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPayto"
529 ]
530 """
531 This sub-hash contains details about the PayTo payment method options to pass to the invoice's PaymentIntent.
532 """
533 sepa_debit: NotRequired[
534 "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit"
535 ]
536 """
537 This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent.
538 """
539 us_bank_account: NotRequired[
540 "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount"
541 ]
542 """
543 This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
544 """
545
546
547 class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit(
548 TypedDict,
549 ):
550 mandate_options: NotRequired[
551 "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions"
552 ]
553 """
554 Additional fields for Mandate creation
555 """
556 verification_method: NotRequired[
557 Literal["automatic", "instant", "microdeposits"]
558 ]
559 """
560 Verification method for the intent
561 """
562
563
564 class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions(
565 TypedDict,
566 ):
567 transaction_type: NotRequired[Literal["business", "personal"]]
568 """
569 Transaction type of the mandate.
570 """
571
572
573 class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBancontact(
574 TypedDict,
575 ):
576 preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]]
577 """
578 Preferred language of the Bancontact authorization page that the customer is redirected to.
579 """
580
581
582 class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCard(
583 TypedDict,
584 ):
585 mandate_options: NotRequired[
586 "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions"
587 ]
588 """
589 Configuration options for setting up an eMandate for cards issued in India.
590 """
591 network: NotRequired[
592 Literal[
593 "amex",
594 "cartes_bancaires",
595 "diners",
596 "discover",
597 "eftpos_au",
598 "girocard",
599 "interac",
600 "jcb",
601 "link",
602 "mastercard",
603 "unionpay",
604 "unknown",
605 "visa",
606 ]
607 ]
608 """
609 Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time.
610 """
611 request_three_d_secure: NotRequired[
612 Literal["any", "automatic", "challenge"]
613 ]
614 """
615 We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://docs.stripe.com/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://docs.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine.
616 """
617
618
619 class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions(
620 TypedDict,
621 ):
622 amount: NotRequired[int]
623 """
624 Amount to be charged for future payments.
625 """
626 amount_type: NotRequired[Literal["fixed", "maximum"]]
627 """
628 One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
629 """
630 description: NotRequired[str]
631 """
632 A description of the mandate or subscription that is meant to be displayed to the customer.
633 """
634
635
636 class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance(
637 TypedDict,
638 ):
639 bank_transfer: NotRequired[
640 "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer"
641 ]
642 """
643 Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`.
644 """
645 funding_type: NotRequired[str]
646 """
647 The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
648 """
649
650
651 class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer(
652 TypedDict,
653 ):
654 eu_bank_transfer: NotRequired[
655 "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer"
656 ]
657 """
658 Configuration for eu_bank_transfer funding type.
659 """
660 type: NotRequired[str]
661 """
662 The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
663 """
664
665
666 class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer(
667 TypedDict,
668 ):
669 country: str
670 """
671 The desired country code of the bank account information. Permitted values include: `DE`, `FR`, `IE`, or `NL`.
672 """
673
674
675 class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsKonbini(
676 TypedDict,
677 ):
678 pass
679
680
681 class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPayto(
682 TypedDict,
683 ):
684 mandate_options: NotRequired[
685 "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions"
686 ]
687 """
688 Additional fields for Mandate creation.
689 """
690
691
692 class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPaytoMandateOptions(
693 TypedDict,
694 ):
695 amount: NotRequired[int]
696 """
697 The maximum amount that can be collected in a single invoice. If you don't specify a maximum, then there is no limit.
698 """
699 purpose: NotRequired[
700 Literal[
701 "dependant_support",
702 "government",
703 "loan",
704 "mortgage",
705 "other",
706 "pension",
707 "personal",
708 "retail",
709 "salary",
710 "tax",
711 "utility",
712 ]
713 ]
714 """
715 The purpose for which payments are made. Has a default value based on your merchant category code.
716 """
717
718
719 class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit(
720 TypedDict,
721 ):
722 pass
723
724
725 class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount(
726 TypedDict,
727 ):
728 financial_connections: NotRequired[
729 "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections"
730 ]
731 """
732 Additional fields for Financial Connections Session creation
733 """
734 verification_method: NotRequired[
735 Literal["automatic", "instant", "microdeposits"]
736 ]
737 """
738 Verification method for the intent
739 """
740
741
742 class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections(
743 TypedDict,
744 ):
745 filters: NotRequired[
746 "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters"
747 ]
748 """
749 Provide filters for the linked accounts that the customer can select for the payment method.
750 """
751 permissions: NotRequired[
752 List[
753 Literal["balances", "ownership", "payment_method", "transactions"]
754 ]
755 ]
756 """
757 The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`.
758 """
759 prefetch: NotRequired[
760 List[Literal["balances", "ownership", "transactions"]]
761 ]
762 """
763 List of data features that you would like to retrieve upon account creation.
764 """
765
766
767 class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters(
768 TypedDict,
769 ):
770 account_subcategories: NotRequired[List[Literal["checking", "savings"]]]
771 """
772 The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`.
773 """
774
775
776 class SubscriptionModifyParamsPendingInvoiceItemInterval(TypedDict):
777 interval: Literal["day", "month", "week", "year"]
778 """
779 Specifies invoicing frequency. Either `day`, `week`, `month` or `year`.
780 """
781 interval_count: NotRequired[int]
782 """
783 The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks).
784 """
785
786
787 class SubscriptionModifyParamsTransferData(TypedDict):
788 amount_percent: NotRequired[float]
789 """
790 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.
791 """
792 destination: str
793 """
794 ID of an existing, connected Stripe account.
795 """
796
797
798 class SubscriptionModifyParamsTrialSettings(TypedDict):
799 end_behavior: "SubscriptionModifyParamsTrialSettingsEndBehavior"
800 """
801 Defines how the subscription should behave when the user's free trial ends.
802 """
803
804
805 class SubscriptionModifyParamsTrialSettingsEndBehavior(TypedDict):
806 missing_payment_method: Literal["cancel", "create_invoice", "pause"]
807 """
808 Indicates how the subscription should change when the trial ends if the user did not provide a payment method.
809 """