Debian Codegraph @

stripe/params/_payment_intent_increment_authorization_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, Union
5 from typing_extensions import Literal, NotRequired, TypedDict
6
7
8 class PaymentIntentIncrementAuthorizationParams(RequestOptions):
9 amount: int
10 """
11 The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount.
12 """
13 amount_details: NotRequired[
14 "PaymentIntentIncrementAuthorizationParamsAmountDetails"
15 ]
16 """
17 Provides industry-specific information about the amount.
18 """
19 application_fee_amount: NotRequired[int]
20 """
21 The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://docs.stripe.com/payments/connected-accounts).
22 """
23 description: NotRequired[str]
24 """
25 An arbitrary string attached to the object. Often useful for displaying to users.
26 """
27 expand: NotRequired[List[str]]
28 """
29 Specifies which fields in the response should be expanded.
30 """
31 hooks: NotRequired["PaymentIntentIncrementAuthorizationParamsHooks"]
32 """
33 Automations to be run during the PaymentIntent lifecycle
34 """
35 metadata: NotRequired[Dict[str, str]]
36 """
37 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`.
38 """
39 payment_details: NotRequired[
40 "PaymentIntentIncrementAuthorizationParamsPaymentDetails"
41 ]
42 """
43 Provides industry-specific information about the charge.
44 """
45 statement_descriptor: NotRequired[str]
46 """
47 Text that appears on the customer's statement as the statement descriptor for a non-card or card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors).
48 """
49 transfer_data: NotRequired[
50 "PaymentIntentIncrementAuthorizationParamsTransferData"
51 ]
52 """
53 The parameters used to automatically create a transfer after the payment is captured.
54 Learn more about the [use case for connected accounts](https://docs.stripe.com/payments/connected-accounts).
55 """
56
57
58 class PaymentIntentIncrementAuthorizationParamsAmountDetails(TypedDict):
59 discount_amount: NotRequired["Literal['']|int"]
60 """
61 The total discount applied on the transaction represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). An integer greater than 0.
62
63 This field is mutually exclusive with the `amount_details[line_items][#][discount_amount]` field.
64 """
65 enforce_arithmetic_validation: NotRequired[bool]
66 """
67 Set to `false` to return arithmetic validation errors in the response without failing the request. Use this when you want the operation to proceed regardless of arithmetic errors in the line item data.
68
69 Omit or set to `true` to immediately return a 400 error when arithmetic validation fails. Use this for strict validation that prevents processing with line item data that has arithmetic inconsistencies.
70
71 For card payments, Stripe doesn't send line item data to card networks if there's an arithmetic validation error.
72 """
73 line_items: NotRequired[
74 "Literal['']|List[PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItem]"
75 ]
76 """
77 A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 200 line items.
78 """
79 shipping: NotRequired[
80 "Literal['']|PaymentIntentIncrementAuthorizationParamsAmountDetailsShipping"
81 ]
82 """
83 Contains information about the shipping portion of the amount.
84 """
85 tax: NotRequired[
86 "Literal['']|PaymentIntentIncrementAuthorizationParamsAmountDetailsTax"
87 ]
88 """
89 Contains information about the tax portion of the amount.
90 """
91
92
93 class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItem(
94 TypedDict
95 ):
96 discount_amount: NotRequired[int]
97 """
98 The discount applied on this line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). An integer greater than 0.
99
100 This field is mutually exclusive with the `amount_details[discount_amount]` field.
101 """
102 payment_method_options: NotRequired[
103 "PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptions"
104 ]
105 """
106 Payment method-specific information for line items.
107 """
108 product_code: NotRequired[str]
109 """
110 The product code of the line item, such as an SKU. Required for L3 rates. At most 12 characters long.
111 """
112 product_name: str
113 """
114 The product name of the line item. Required for L3 rates. At most 1024 characters long.
115
116 For Cards, this field is truncated to 26 alphanumeric characters before being sent to the card networks. For PayPal, this field is truncated to 127 characters.
117 """
118 quantity: int
119 """
120 The quantity of items. Required for L3 rates. An integer greater than 0.
121 """
122 tax: NotRequired[
123 "PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemTax"
124 ]
125 """
126 Contains information about the tax on the item.
127 """
128 unit_cost: int
129 """
130 The unit cost of the line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.
131 """
132 unit_of_measure: NotRequired[str]
133 """
134 A unit of measure for the line item, such as gallons, feet, meters, etc.
135 """
136
137
138 class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptions(
139 TypedDict,
140 ):
141 card: NotRequired[
142 "PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCard"
143 ]
144 """
145 This sub-hash contains line item details that are specific to the `card` payment method.
146 """
147 card_present: NotRequired[
148 "PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent"
149 ]
150 """
151 This sub-hash contains line item details that are specific to the `card_present` payment method.
152 """
153 klarna: NotRequired[
154 "PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsKlarna"
155 ]
156 """
157 This sub-hash contains line item details that are specific to the `klarna` payment method.
158 """
159 paypal: NotRequired[
160 "PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsPaypal"
161 ]
162 """
163 This sub-hash contains line item details that are specific to the `paypal` payment method.
164 """
165
166
167 class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCard(
168 TypedDict,
169 ):
170 commodity_code: NotRequired[str]
171 """
172 Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, and so on.
173 """
174
175
176 class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent(
177 TypedDict,
178 ):
179 commodity_code: NotRequired[str]
180 """
181 Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, and so on.
182 """
183
184
185 class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsKlarna(
186 TypedDict,
187 ):
188 image_url: NotRequired[str]
189 """
190 URL to an image for the product. Max length, 4096 characters.
191 """
192 product_url: NotRequired[str]
193 """
194 URL to the product page. Max length, 4096 characters.
195 """
196 reference: NotRequired[str]
197 """
198 Unique reference for this line item to correlate it with your system's internal records. The field is displayed in the Klarna Consumer App if passed.
199 """
200 subscription_reference: NotRequired[str]
201 """
202 Reference for the subscription this line item is for.
203 """
204
205
206 class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsPaypal(
207 TypedDict,
208 ):
209 category: NotRequired[
210 Literal["digital_goods", "donation", "physical_goods"]
211 ]
212 """
213 Type of the line item.
214 """
215 description: NotRequired[str]
216 """
217 Description of the line item.
218 """
219 sold_by: NotRequired[str]
220 """
221 The Stripe account ID of the connected account that sells the item.
222 """
223
224
225 class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemTax(
226 TypedDict,
227 ):
228 total_tax_amount: int
229 """
230 The total amount of tax on a single line item represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L3 rates. An integer greater than or equal to 0.
231
232 This field is mutually exclusive with the `amount_details[tax][total_tax_amount]` field.
233 """
234
235
236 class PaymentIntentIncrementAuthorizationParamsAmountDetailsShipping(
237 TypedDict
238 ):
239 amount: NotRequired["Literal['']|int"]
240 """
241 If a physical good is being shipped, the cost of shipping represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). An integer greater than or equal to 0.
242 """
243 from_postal_code: NotRequired["Literal['']|str"]
244 """
245 If a physical good is being shipped, the postal code of where it is being shipped from. At most 10 alphanumeric characters long, hyphens are allowed.
246 """
247 to_postal_code: NotRequired["Literal['']|str"]
248 """
249 If a physical good is being shipped, the postal code of where it is being shipped to. At most 10 alphanumeric characters long, hyphens are allowed.
250 """
251
252
253 class PaymentIntentIncrementAuthorizationParamsAmountDetailsTax(TypedDict):
254 total_tax_amount: int
255 """
256 The total amount of tax on the transaction represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). Required for L2 rates. An integer greater than or equal to 0.
257
258 This field is mutually exclusive with the `amount_details[line_items][#][tax][total_tax_amount]` field.
259 """
260
261
262 class PaymentIntentIncrementAuthorizationParamsHooks(TypedDict):
263 inputs: NotRequired["PaymentIntentIncrementAuthorizationParamsHooksInputs"]
264 """
265 Arguments passed in automations
266 """
267
268
269 class PaymentIntentIncrementAuthorizationParamsHooksInputs(TypedDict):
270 tax: NotRequired["PaymentIntentIncrementAuthorizationParamsHooksInputsTax"]
271 """
272 Tax arguments for automations
273 """
274
275
276 class PaymentIntentIncrementAuthorizationParamsHooksInputsTax(TypedDict):
277 calculation: Union[Literal[""], str]
278 """
279 The [TaxCalculation](https://docs.stripe.com/api/tax/calculations) id
280 """
281
282
283 class PaymentIntentIncrementAuthorizationParamsPaymentDetails(TypedDict):
284 customer_reference: NotRequired["Literal['']|str"]
285 """
286 A unique value to identify the customer. This field is available only for card payments.
287
288 This field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks.
289 """
290 order_reference: NotRequired["Literal['']|str"]
291 """
292 A unique value assigned by the business to identify the transaction. Required for L2 and L3 rates.
293
294 Required when the Payment Method Types array contains `card`, including when [automatic_payment_methods.enabled](https://docs.stripe.com/api/payment_intents/create#create_payment_intent-automatic_payment_methods-enabled) is set to `true`.
295
296 For Cards, this field is truncated to 25 alphanumeric characters, excluding spaces, before being sent to card networks. For Klarna, this field is truncated to 255 characters and is visible to customers when they view the order in the Klarna app.
297 """
298
299
300 class PaymentIntentIncrementAuthorizationParamsTransferData(TypedDict):
301 amount: NotRequired[int]
302 """
303 The amount that will be transferred automatically when a charge succeeds.
304 """