stripe 17.4.0-beta.2 → 17.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/CHANGELOG.md +124 -954
  2. package/README.md +4 -4
  3. package/VERSION +1 -1
  4. package/cjs/apiVersion.js +1 -1
  5. package/cjs/resources/FinancialConnections/Accounts.js +0 -5
  6. package/cjs/resources/Invoices.js +0 -17
  7. package/cjs/resources/PaymentIntents.js +0 -8
  8. package/cjs/resources/Quotes.js +0 -32
  9. package/cjs/resources/SubscriptionSchedules.js +0 -4
  10. package/cjs/resources/Terminal/Readers.js +0 -12
  11. package/cjs/resources/TestHelpers/Issuing/Authorizations.js +4 -0
  12. package/cjs/resources.js +10 -48
  13. package/cjs/stripe.core.js +1 -1
  14. package/esm/apiVersion.js +1 -1
  15. package/esm/resources/FinancialConnections/Accounts.js +0 -5
  16. package/esm/resources/Invoices.js +0 -17
  17. package/esm/resources/PaymentIntents.js +0 -8
  18. package/esm/resources/Quotes.js +0 -32
  19. package/esm/resources/SubscriptionSchedules.js +0 -4
  20. package/esm/resources/Terminal/Readers.js +0 -12
  21. package/esm/resources/TestHelpers/Issuing/Authorizations.js +4 -0
  22. package/esm/resources.js +0 -33
  23. package/esm/stripe.core.js +1 -1
  24. package/package.json +1 -1
  25. package/types/AccountLinksResource.d.ts +1 -5
  26. package/types/AccountSessions.d.ts +0 -45
  27. package/types/AccountSessionsResource.d.ts +0 -355
  28. package/types/Accounts.d.ts +1 -183
  29. package/types/AccountsResource.d.ts +15 -496
  30. package/types/Charges.d.ts +0 -116
  31. package/types/ChargesResource.d.ts +0 -1294
  32. package/types/Checkout/Sessions.d.ts +5 -311
  33. package/types/Checkout/SessionsResource.d.ts +6 -362
  34. package/types/ConfirmationTokens.d.ts +0 -99
  35. package/types/Coupons.d.ts +1 -1
  36. package/types/CouponsResource.d.ts +1 -1
  37. package/types/CreditNotes.d.ts +0 -21
  38. package/types/CreditNotesResource.d.ts +0 -51
  39. package/types/CustomersResource.d.ts +0 -7
  40. package/types/EventTypes.d.ts +0 -579
  41. package/types/Events.d.ts +0 -92
  42. package/types/FileLinksResource.d.ts +1 -1
  43. package/types/Files.d.ts +1 -0
  44. package/types/FilesResource.d.ts +1 -0
  45. package/types/FinancialConnections/Accounts.d.ts +1 -29
  46. package/types/FinancialConnections/AccountsResource.d.ts +3 -35
  47. package/types/FinancialConnections/Sessions.d.ts +1 -49
  48. package/types/FinancialConnections/SessionsResource.d.ts +1 -38
  49. package/types/InvoiceItems.d.ts +0 -5
  50. package/types/InvoiceItemsResource.d.ts +0 -98
  51. package/types/InvoiceLineItems.d.ts +1 -28
  52. package/types/Invoices.d.ts +2 -137
  53. package/types/InvoicesResource.d.ts +1846 -5531
  54. package/types/Issuing/Authorizations.d.ts +40 -0
  55. package/types/Issuing/Cardholders.d.ts +1 -1
  56. package/types/Issuing/CardholdersResource.d.ts +1 -2
  57. package/types/Issuing/Cards.d.ts +1 -1
  58. package/types/Issuing/Transactions.d.ts +0 -2
  59. package/types/Issuing/TransactionsResource.d.ts +0 -5
  60. package/types/LineItems.d.ts +0 -7
  61. package/types/Mandates.d.ts +0 -77
  62. package/types/PaymentIntents.d.ts +1 -637
  63. package/types/PaymentIntentsResource.d.ts +3693 -7934
  64. package/types/PaymentLinks.d.ts +1 -7
  65. package/types/PaymentLinksResource.d.ts +2 -14
  66. package/types/PaymentMethodConfigurations.d.ts +0 -180
  67. package/types/PaymentMethodConfigurationsResource.d.ts +0 -250
  68. package/types/PaymentMethods.d.ts +0 -99
  69. package/types/PaymentMethodsResource.d.ts +0 -133
  70. package/types/Payouts.d.ts +17 -0
  71. package/types/Persons.d.ts +5 -0
  72. package/types/Prices.d.ts +0 -22
  73. package/types/PricesResource.d.ts +0 -22
  74. package/types/Products.d.ts +0 -39
  75. package/types/ProductsResource.d.ts +0 -36
  76. package/types/Quotes.d.ts +1 -591
  77. package/types/QuotesResource.d.ts +199 -2531
  78. package/types/Refunds.d.ts +10 -14
  79. package/types/SetupAttempts.d.ts +0 -38
  80. package/types/SetupIntents.d.ts +1 -111
  81. package/types/SetupIntentsResource.d.ts +3 -645
  82. package/types/Sources.d.ts +0 -23
  83. package/types/SubscriptionItems.d.ts +0 -21
  84. package/types/SubscriptionItemsResource.d.ts +0 -109
  85. package/types/SubscriptionSchedules.d.ts +0 -200
  86. package/types/SubscriptionSchedulesResource.d.ts +13 -1231
  87. package/types/Subscriptions.d.ts +3 -93
  88. package/types/SubscriptionsResource.d.ts +4 -371
  89. package/types/Terminal/Readers.d.ts +0 -278
  90. package/types/Terminal/ReadersResource.d.ts +0 -215
  91. package/types/TestHelpers/ConfirmationTokensResource.d.ts +0 -104
  92. package/types/TestHelpers/Issuing/AuthorizationsResource.d.ts +23 -0
  93. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
  94. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
  95. package/types/TokensResource.d.ts +5 -0
  96. package/types/Treasury/FinancialAccountFeatures.d.ts +0 -7
  97. package/types/Treasury/FinancialAccounts.d.ts +0 -5
  98. package/types/Treasury/FinancialAccountsResource.d.ts +0 -37
  99. package/types/Treasury/OutboundTransfers.d.ts +0 -26
  100. package/types/Treasury/OutboundTransfersResource.d.ts +0 -26
  101. package/types/Treasury/ReceivedCredits.d.ts +0 -26
  102. package/types/Treasury/ReceivedDebits.d.ts +0 -31
  103. package/types/WebhookEndpointsResource.d.ts +2 -69
  104. package/types/index.d.ts +0 -62
  105. package/types/lib.d.ts +1 -1
  106. package/types/test/typescriptTest.ts +3 -3
  107. package/cjs/resources/AccountNotices.js +0 -21
  108. package/cjs/resources/Capital/FinancingOffers.js +0 -21
  109. package/cjs/resources/Capital/FinancingSummary.js +0 -12
  110. package/cjs/resources/Capital/FinancingTransactions.js +0 -17
  111. package/cjs/resources/FinancialConnections/Institutions.js +0 -17
  112. package/cjs/resources/GiftCards/Cards.js +0 -23
  113. package/cjs/resources/GiftCards/Transactions.js +0 -33
  114. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
  115. package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
  116. package/cjs/resources/Issuing/FraudLiabilityDebits.js +0 -17
  117. package/cjs/resources/Margins.js +0 -22
  118. package/cjs/resources/Orders.js +0 -24
  119. package/cjs/resources/PaymentAttemptRecords.js +0 -17
  120. package/cjs/resources/PaymentRecords.js +0 -29
  121. package/cjs/resources/Tax/Associations.js +0 -9
  122. package/cjs/resources/Tax/Forms.js +0 -20
  123. package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
  124. package/esm/resources/AccountNotices.js +0 -18
  125. package/esm/resources/Capital/FinancingOffers.js +0 -18
  126. package/esm/resources/Capital/FinancingSummary.js +0 -9
  127. package/esm/resources/Capital/FinancingTransactions.js +0 -14
  128. package/esm/resources/FinancialConnections/Institutions.js +0 -14
  129. package/esm/resources/GiftCards/Cards.js +0 -20
  130. package/esm/resources/GiftCards/Transactions.js +0 -30
  131. package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
  132. package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
  133. package/esm/resources/Issuing/FraudLiabilityDebits.js +0 -14
  134. package/esm/resources/Margins.js +0 -19
  135. package/esm/resources/Orders.js +0 -21
  136. package/esm/resources/PaymentAttemptRecords.js +0 -14
  137. package/esm/resources/PaymentRecords.js +0 -26
  138. package/esm/resources/Tax/Associations.js +0 -6
  139. package/esm/resources/Tax/Forms.js +0 -17
  140. package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
  141. package/types/AccountNotices.d.ts +0 -113
  142. package/types/AccountNoticesResource.d.ts +0 -98
  143. package/types/Billing/MeterErrorReports.d.ts +0 -106
  144. package/types/Capital/FinancingOffers.d.ts +0 -188
  145. package/types/Capital/FinancingOffersResource.d.ts +0 -97
  146. package/types/Capital/FinancingSummary.d.ts +0 -106
  147. package/types/Capital/FinancingSummaryResource.d.ts +0 -27
  148. package/types/Capital/FinancingTransactions.d.ts +0 -135
  149. package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
  150. package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
  151. package/types/FinancialConnections/Institutions.d.ts +0 -93
  152. package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
  153. package/types/GiftCards/Cards.d.ts +0 -118
  154. package/types/GiftCards/CardsResource.d.ts +0 -159
  155. package/types/GiftCards/Transactions.d.ts +0 -129
  156. package/types/GiftCards/TransactionsResource.d.ts +0 -201
  157. package/types/InvoicePayments.d.ts +0 -113
  158. package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
  159. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
  160. package/types/Issuing/DisputeSettlementDetails.d.ts +0 -73
  161. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
  162. package/types/Issuing/FraudLiabilityDebits.d.ts +0 -52
  163. package/types/Issuing/FraudLiabilityDebitsResource.d.ts +0 -52
  164. package/types/Issuing/Settlements.d.ts +0 -103
  165. package/types/Margins.d.ts +0 -56
  166. package/types/MarginsResource.d.ts +0 -114
  167. package/types/Orders.d.ts +0 -1155
  168. package/types/OrdersResource.d.ts +0 -2913
  169. package/types/PaymentAttemptRecords.d.ts +0 -242
  170. package/types/PaymentAttemptRecordsResource.d.ts +0 -47
  171. package/types/PaymentRecords.d.ts +0 -259
  172. package/types/PaymentRecordsResource.d.ts +0 -455
  173. package/types/QuoteLines.d.ts +0 -634
  174. package/types/QuotePreviewInvoices.d.ts +0 -1615
  175. package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -814
  176. package/types/Tax/Associations.d.ts +0 -126
  177. package/types/Tax/AssociationsResource.d.ts +0 -29
  178. package/types/Tax/Forms.d.ts +0 -220
  179. package/types/Tax/FormsResource.d.ts +0 -107
  180. package/types/Terminal/ReaderCollectedData.d.ts +0 -51
  181. package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
package/types/Orders.d.ts DELETED
@@ -1,1155 +0,0 @@
1
- // File generated from our OpenAPI spec
2
-
3
- declare module 'stripe' {
4
- namespace Stripe {
5
- /**
6
- * An Order describes a purchase being made by a customer, including the
7
- * products & quantities being purchased, the order status, the payment information,
8
- * and the billing/shipping details.
9
- *
10
- * Related guide: [Orders overview](https://stripe.com/docs/orders)
11
- */
12
- interface Order {
13
- /**
14
- * Unique identifier for the object.
15
- */
16
- id: string;
17
-
18
- /**
19
- * String representing the object's type. Objects of the same type share the same value.
20
- */
21
- object: 'order';
22
-
23
- amount_remaining?: number;
24
-
25
- /**
26
- * Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency).
27
- */
28
- amount_subtotal: number;
29
-
30
- /**
31
- * Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts).
32
- */
33
- amount_total: number;
34
-
35
- /**
36
- * ID of the Connect application that created the Order, if any.
37
- */
38
- application: string | Stripe.Application | null;
39
-
40
- automatic_tax?: Order.AutomaticTax;
41
-
42
- /**
43
- * Customer billing details associated with the order.
44
- */
45
- billing_details: Order.BillingDetails | null;
46
-
47
- /**
48
- * The client secret of this Order. Used for client-side retrieval using a publishable key.
49
- *
50
- * The client secret can be used to complete a payment for an Order from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
51
- *
52
- * Refer to our docs for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) to learn about how client_secret should be handled.
53
- */
54
- client_secret: string | null;
55
-
56
- /**
57
- * Time at which the object was created. Measured in seconds since the Unix epoch.
58
- */
59
- created: number;
60
-
61
- /**
62
- * The credits applied to the Order. At most 10 credits can be applied to an Order.
63
- */
64
- credits?: Array<Order.Credit>;
65
-
66
- /**
67
- * 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).
68
- */
69
- currency: string;
70
-
71
- /**
72
- * The customer which this orders belongs to.
73
- */
74
- customer: string | Stripe.Customer | Stripe.DeletedCustomer | null;
75
-
76
- /**
77
- * An arbitrary string attached to the object. Often useful for displaying to users.
78
- */
79
- description: string | null;
80
-
81
- /**
82
- * The discounts applied to the order. Use `expand[]=discounts` to expand each discount.
83
- */
84
- discounts: Array<string | Stripe.Discount> | null;
85
-
86
- /**
87
- * A recent IP address of the purchaser used for tax reporting and tax location inference.
88
- */
89
- ip_address: string | null;
90
-
91
- /**
92
- * A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items.
93
- */
94
- line_items?: ApiList<Stripe.LineItem>;
95
-
96
- /**
97
- * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
98
- */
99
- livemode: boolean;
100
-
101
- /**
102
- * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
103
- */
104
- metadata: Stripe.Metadata | null;
105
-
106
- payment: Order.Payment;
107
-
108
- /**
109
- * The details of the customer cost of shipping, including the customer chosen ShippingRate.
110
- */
111
- shipping_cost: Order.ShippingCost | null;
112
-
113
- /**
114
- * Customer shipping information associated with the order.
115
- */
116
- shipping_details: Order.ShippingDetails | null;
117
-
118
- /**
119
- * The overall status of the order.
120
- */
121
- status: Order.Status;
122
-
123
- tax_details?: Order.TaxDetails;
124
-
125
- total_details: Order.TotalDetails;
126
- }
127
-
128
- namespace Order {
129
- interface AutomaticTax {
130
- /**
131
- * Whether Stripe automatically computes tax on this Order.
132
- */
133
- enabled: boolean;
134
-
135
- /**
136
- * The status of the most recent automated tax calculation for this Order.
137
- */
138
- status: AutomaticTax.Status | null;
139
- }
140
-
141
- namespace AutomaticTax {
142
- type Status = 'complete' | 'failed' | 'requires_location_inputs';
143
- }
144
-
145
- interface BillingDetails {
146
- /**
147
- * Billing address for the order.
148
- */
149
- address: Stripe.Address | null;
150
-
151
- /**
152
- * Email address for the order.
153
- */
154
- email: string | null;
155
-
156
- /**
157
- * Full name for the order.
158
- */
159
- name: string | null;
160
-
161
- /**
162
- * Billing phone number for the order (including extension).
163
- */
164
- phone: string | null;
165
- }
166
-
167
- interface Credit {
168
- /**
169
- * The amount of this credit to apply to the order.
170
- */
171
- amount: number;
172
-
173
- /**
174
- * Details for a gift card.
175
- */
176
- gift_card: Credit.GiftCard | null;
177
-
178
- /**
179
- * Line items on this order that are ineligible for this credit
180
- */
181
- ineligible_line_items: Array<string> | null;
182
-
183
- /**
184
- * The type of credit to apply to the order, only `gift_card` currently supported.
185
- */
186
- type: 'gift_card';
187
- }
188
-
189
- namespace Credit {
190
- interface GiftCard {
191
- /**
192
- * The token of the gift card applied to the order
193
- */
194
- card: string;
195
- }
196
- }
197
-
198
- interface Payment {
199
- /**
200
- * ID of the payment intent associated with this order. Null when the order is `open`.
201
- */
202
- payment_intent: string | Stripe.PaymentIntent | null;
203
-
204
- /**
205
- * Settings describing how the order should configure generated PaymentIntents.
206
- */
207
- settings: Payment.Settings | null;
208
-
209
- /**
210
- * The status of the underlying payment associated with this order, if any. Null when the order is `open`.
211
- */
212
- status: Payment.Status | null;
213
- }
214
-
215
- namespace Payment {
216
- interface Settings {
217
- /**
218
- * 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.
219
- */
220
- application_fee_amount: number | null;
221
-
222
- /**
223
- * Indicates whether order has been opted into using [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) to manage payment method types.
224
- */
225
- automatic_payment_methods: Settings.AutomaticPaymentMethods | null;
226
-
227
- /**
228
- * PaymentMethod-specific configuration to provide to the order's PaymentIntent.
229
- */
230
- payment_method_options: Settings.PaymentMethodOptions | null;
231
-
232
- /**
233
- * The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
234
- */
235
- payment_method_types: Array<Settings.PaymentMethodType> | null;
236
-
237
- /**
238
- * The URL to redirect the customer to after they authenticate their payment.
239
- */
240
- return_url: string | null;
241
-
242
- /**
243
- * For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters.
244
- */
245
- statement_descriptor: string | null;
246
-
247
- /**
248
- * Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor.
249
- */
250
- statement_descriptor_suffix: string | null;
251
-
252
- /**
253
- * Provides configuration for completing a transfer for the order after it is paid.
254
- */
255
- transfer_data: Settings.TransferData | null;
256
- }
257
-
258
- namespace Settings {
259
- interface AutomaticPaymentMethods {
260
- /**
261
- * Whether this Order has been opted into managing payment method types via the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
262
- */
263
- enabled: boolean;
264
- }
265
-
266
- interface PaymentMethodOptions {
267
- acss_debit?: PaymentMethodOptions.AcssDebit;
268
-
269
- afterpay_clearpay?: PaymentMethodOptions.AfterpayClearpay;
270
-
271
- alipay?: PaymentMethodOptions.Alipay;
272
-
273
- bancontact?: PaymentMethodOptions.Bancontact;
274
-
275
- card?: PaymentMethodOptions.Card;
276
-
277
- customer_balance?: PaymentMethodOptions.CustomerBalance;
278
-
279
- ideal?: PaymentMethodOptions.Ideal;
280
-
281
- klarna?: PaymentMethodOptions.Klarna;
282
-
283
- link?: PaymentMethodOptions.Link;
284
-
285
- oxxo?: PaymentMethodOptions.Oxxo;
286
-
287
- p24?: PaymentMethodOptions.P24;
288
-
289
- paypal?: PaymentMethodOptions.Paypal;
290
-
291
- sepa_debit?: PaymentMethodOptions.SepaDebit;
292
-
293
- sofort?: PaymentMethodOptions.Sofort;
294
-
295
- wechat_pay?: PaymentMethodOptions.WechatPay;
296
- }
297
-
298
- namespace PaymentMethodOptions {
299
- interface AcssDebit {
300
- mandate_options?: AcssDebit.MandateOptions;
301
-
302
- /**
303
- * Indicates that you intend to make future payments with this PaymentIntent's payment method.
304
- *
305
- * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
306
- *
307
- * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
308
- *
309
- * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
310
- */
311
- setup_future_usage?: AcssDebit.SetupFutureUsage;
312
-
313
- /**
314
- * Bank account verification method.
315
- */
316
- verification_method?: AcssDebit.VerificationMethod;
317
- }
318
-
319
- namespace AcssDebit {
320
- interface MandateOptions {
321
- /**
322
- * A URL for custom mandate text
323
- */
324
- custom_mandate_url?: string;
325
-
326
- /**
327
- * Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'.
328
- */
329
- interval_description: string | null;
330
-
331
- /**
332
- * Payment schedule for the mandate.
333
- */
334
- payment_schedule: MandateOptions.PaymentSchedule | null;
335
-
336
- /**
337
- * Transaction type of the mandate.
338
- */
339
- transaction_type: MandateOptions.TransactionType | null;
340
- }
341
-
342
- namespace MandateOptions {
343
- type PaymentSchedule = 'combined' | 'interval' | 'sporadic';
344
-
345
- type TransactionType = 'business' | 'personal';
346
- }
347
-
348
- type SetupFutureUsage = 'none' | 'off_session' | 'on_session';
349
-
350
- type VerificationMethod =
351
- | 'automatic'
352
- | 'instant'
353
- | 'microdeposits';
354
- }
355
-
356
- interface AfterpayClearpay {
357
- /**
358
- * Controls when the funds will be captured from the customer's account.
359
- */
360
- capture_method?: AfterpayClearpay.CaptureMethod;
361
-
362
- /**
363
- * Order identifier shown to the user in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes.
364
- */
365
- reference: string | null;
366
-
367
- /**
368
- * Indicates that you intend to make future payments with the payment method.
369
- *
370
- * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
371
- *
372
- * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
373
- *
374
- * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
375
- */
376
- setup_future_usage?: 'none';
377
- }
378
-
379
- namespace AfterpayClearpay {
380
- type CaptureMethod = 'automatic' | 'automatic_async' | 'manual';
381
- }
382
-
383
- interface Alipay {
384
- /**
385
- * Indicates that you intend to make future payments with this PaymentIntent's payment method.
386
- *
387
- * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
388
- *
389
- * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
390
- *
391
- * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
392
- */
393
- setup_future_usage?: Alipay.SetupFutureUsage;
394
- }
395
-
396
- namespace Alipay {
397
- type SetupFutureUsage = 'none' | 'off_session';
398
- }
399
-
400
- interface Bancontact {
401
- /**
402
- * Preferred language of the Bancontact authorization page that the customer is redirected to.
403
- */
404
- preferred_language: Bancontact.PreferredLanguage;
405
-
406
- /**
407
- * Indicates that you intend to make future payments with this PaymentIntent's payment method.
408
- *
409
- * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
410
- *
411
- * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
412
- *
413
- * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
414
- */
415
- setup_future_usage?: Bancontact.SetupFutureUsage;
416
- }
417
-
418
- namespace Bancontact {
419
- type PreferredLanguage = 'de' | 'en' | 'fr' | 'nl';
420
-
421
- type SetupFutureUsage = 'none' | 'off_session';
422
- }
423
-
424
- interface Card {
425
- /**
426
- * Controls when the funds will be captured from the customer's account.
427
- */
428
- capture_method: Card.CaptureMethod;
429
-
430
- /**
431
- * Indicates that you intend to make future payments with the payment method.
432
- *
433
- * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes.
434
- *
435
- * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication).
436
- *
437
- * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`.
438
- */
439
- setup_future_usage?: Card.SetupFutureUsage;
440
- }
441
-
442
- namespace Card {
443
- type CaptureMethod = 'automatic' | 'automatic_async' | 'manual';
444
-
445
- type SetupFutureUsage = 'none' | 'off_session' | 'on_session';
446
- }
447
-
448
- interface CustomerBalance {
449
- bank_transfer?: CustomerBalance.BankTransfer;
450
-
451
- /**
452
- * The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`.
453
- */
454
- funding_type: 'bank_transfer' | null;
455
-
456
- /**
457
- * Indicates that you intend to make future payments with this PaymentIntent's payment method.
458
- *
459
- * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
460
- *
461
- * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
462
- *
463
- * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
464
- */
465
- setup_future_usage?: 'none';
466
- }
467
-
468
- namespace CustomerBalance {
469
- interface BankTransfer {
470
- eu_bank_transfer?: BankTransfer.EuBankTransfer;
471
-
472
- /**
473
- * List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
474
- *
475
- * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
476
- */
477
- requested_address_types?: Array<
478
- BankTransfer.RequestedAddressType
479
- >;
480
-
481
- /**
482
- * The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
483
- */
484
- type: BankTransfer.Type | null;
485
- }
486
-
487
- namespace BankTransfer {
488
- interface EuBankTransfer {
489
- /**
490
- * The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
491
- */
492
- country: EuBankTransfer.Country;
493
- }
494
-
495
- namespace EuBankTransfer {
496
- type Country = 'BE' | 'DE' | 'ES' | 'FR' | 'IE' | 'NL';
497
- }
498
-
499
- type RequestedAddressType =
500
- | 'aba'
501
- | 'iban'
502
- | 'sepa'
503
- | 'sort_code'
504
- | 'spei'
505
- | 'swift'
506
- | 'zengin';
507
-
508
- type Type =
509
- | 'eu_bank_transfer'
510
- | 'gb_bank_transfer'
511
- | 'jp_bank_transfer'
512
- | 'mx_bank_transfer'
513
- | 'us_bank_transfer';
514
- }
515
- }
516
-
517
- interface Ideal {
518
- /**
519
- * Indicates that you intend to make future payments with this PaymentIntent's payment method.
520
- *
521
- * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
522
- *
523
- * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
524
- *
525
- * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
526
- */
527
- setup_future_usage?: Ideal.SetupFutureUsage;
528
- }
529
-
530
- namespace Ideal {
531
- type SetupFutureUsage = 'none' | 'off_session';
532
- }
533
-
534
- interface Klarna {
535
- /**
536
- * Controls when the funds will be captured from the customer's account.
537
- */
538
- capture_method?: 'manual';
539
-
540
- /**
541
- * Preferred locale of the Klarna checkout page that the customer is redirected to.
542
- */
543
- preferred_locale: string | null;
544
-
545
- /**
546
- * Indicates that you intend to make future payments with this PaymentIntent's payment method.
547
- *
548
- * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
549
- *
550
- * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
551
- *
552
- * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
553
- */
554
- setup_future_usage?: 'none';
555
- }
556
-
557
- interface Link {
558
- /**
559
- * Controls when the funds will be captured from the customer's account.
560
- */
561
- capture_method?: 'manual';
562
-
563
- /**
564
- * [Deprecated] This is a legacy parameter that no longer has any function.
565
- * @deprecated
566
- */
567
- persistent_token: string | null;
568
-
569
- /**
570
- * Indicates that you intend to make future payments with this PaymentIntent's payment method.
571
- *
572
- * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
573
- *
574
- * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
575
- *
576
- * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
577
- */
578
- setup_future_usage?: Link.SetupFutureUsage;
579
- }
580
-
581
- namespace Link {
582
- type SetupFutureUsage = 'none' | 'off_session';
583
- }
584
-
585
- interface Oxxo {
586
- /**
587
- * The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
588
- */
589
- expires_after_days: number;
590
-
591
- /**
592
- * Indicates that you intend to make future payments with this PaymentIntent's payment method.
593
- *
594
- * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
595
- *
596
- * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
597
- *
598
- * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
599
- */
600
- setup_future_usage?: 'none';
601
- }
602
-
603
- interface P24 {
604
- /**
605
- * Indicates that you intend to make future payments with this PaymentIntent's payment method.
606
- *
607
- * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
608
- *
609
- * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
610
- *
611
- * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
612
- */
613
- setup_future_usage?: 'none';
614
- }
615
-
616
- interface Paypal {
617
- /**
618
- * Controls when the funds will be captured from the customer's account.
619
- */
620
- capture_method?: 'manual';
621
-
622
- /**
623
- * The line items purchased by the customer.
624
- */
625
- line_items?: Array<Paypal.LineItem>;
626
-
627
- /**
628
- * Preferred locale of the PayPal checkout page that the customer is redirected to.
629
- */
630
- preferred_locale: string | null;
631
-
632
- /**
633
- * A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
634
- */
635
- reference: string | null;
636
-
637
- /**
638
- * A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID.
639
- */
640
- reference_id?: string | null;
641
-
642
- /**
643
- * Indicates that you intend to make future payments with this PaymentIntent's payment method.
644
- *
645
- * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
646
- *
647
- * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
648
- *
649
- * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
650
- */
651
- setup_future_usage?: Paypal.SetupFutureUsage;
652
-
653
- /**
654
- * The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used.
655
- */
656
- subsellers?: Array<string>;
657
- }
658
-
659
- namespace Paypal {
660
- interface LineItem {
661
- /**
662
- * Type of the line item.
663
- */
664
- category?: LineItem.Category;
665
-
666
- /**
667
- * Description of the line item.
668
- */
669
- description?: string;
670
-
671
- /**
672
- * Descriptive name of the line item.
673
- */
674
- name: string;
675
-
676
- /**
677
- * Quantity of the line item. Cannot be a negative number.
678
- */
679
- quantity: number;
680
-
681
- /**
682
- * Client facing stock keeping unit, article number or similar.
683
- */
684
- sku?: string;
685
-
686
- /**
687
- * The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers).
688
- */
689
- sold_by?: string;
690
-
691
- tax?: LineItem.Tax;
692
-
693
- /**
694
- * Price for a single unit of the line item in minor units. Cannot be a negative number.
695
- */
696
- unit_amount: number;
697
- }
698
-
699
- namespace LineItem {
700
- type Category = 'digital_goods' | 'donation' | 'physical_goods';
701
-
702
- interface Tax {
703
- /**
704
- * The tax for a single unit of the line item in minor units. Cannot be a negative number.
705
- */
706
- amount: number;
707
-
708
- /**
709
- * The tax behavior for the line item.
710
- */
711
- behavior: Tax.Behavior;
712
- }
713
-
714
- namespace Tax {
715
- type Behavior = 'exclusive' | 'inclusive';
716
- }
717
- }
718
-
719
- type SetupFutureUsage = 'none' | 'off_session';
720
- }
721
-
722
- interface SepaDebit {
723
- mandate_options?: SepaDebit.MandateOptions;
724
-
725
- /**
726
- * Indicates that you intend to make future payments with this PaymentIntent's payment method.
727
- *
728
- * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
729
- *
730
- * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
731
- *
732
- * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
733
- */
734
- setup_future_usage?: SepaDebit.SetupFutureUsage;
735
- }
736
-
737
- namespace SepaDebit {
738
- interface MandateOptions {}
739
-
740
- type SetupFutureUsage = 'none' | 'off_session' | 'on_session';
741
- }
742
-
743
- interface Sofort {
744
- /**
745
- * Preferred language of the SOFORT authorization page that the customer is redirected to.
746
- */
747
- preferred_language: Sofort.PreferredLanguage | null;
748
-
749
- /**
750
- * Indicates that you intend to make future payments with this PaymentIntent's payment method.
751
- *
752
- * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
753
- *
754
- * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
755
- *
756
- * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
757
- */
758
- setup_future_usage?: Sofort.SetupFutureUsage;
759
- }
760
-
761
- namespace Sofort {
762
- type PreferredLanguage =
763
- | 'de'
764
- | 'en'
765
- | 'es'
766
- | 'fr'
767
- | 'it'
768
- | 'nl'
769
- | 'pl';
770
-
771
- type SetupFutureUsage = 'none' | 'off_session';
772
- }
773
-
774
- interface WechatPay {
775
- /**
776
- * The app ID registered with WeChat Pay. Only required when client is ios or android.
777
- */
778
- app_id: string | null;
779
-
780
- /**
781
- * The client type that the end customer will pay from
782
- */
783
- client: WechatPay.Client | null;
784
-
785
- /**
786
- * Indicates that you intend to make future payments with this PaymentIntent's payment method.
787
- *
788
- * If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
789
- *
790
- * If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
791
- *
792
- * When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://stripe.com/strong-customer-authentication).
793
- */
794
- setup_future_usage?: 'none';
795
- }
796
-
797
- namespace WechatPay {
798
- type Client = 'android' | 'ios' | 'web';
799
- }
800
- }
801
-
802
- type PaymentMethodType =
803
- | 'acss_debit'
804
- | 'afterpay_clearpay'
805
- | 'alipay'
806
- | 'au_becs_debit'
807
- | 'bacs_debit'
808
- | 'bancontact'
809
- | 'card'
810
- | 'customer_balance'
811
- | 'eps'
812
- | 'fpx'
813
- | 'giropay'
814
- | 'grabpay'
815
- | 'ideal'
816
- | 'klarna'
817
- | 'link'
818
- | 'oxxo'
819
- | 'p24'
820
- | 'paypal'
821
- | 'sepa_debit'
822
- | 'sofort'
823
- | 'wechat_pay';
824
-
825
- interface TransferData {
826
- /**
827
- * The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.
828
- */
829
- amount: number | null;
830
-
831
- /**
832
- * ID of the Connected account receiving the transfer.
833
- */
834
- destination: string | Stripe.Account;
835
- }
836
- }
837
-
838
- type Status =
839
- | 'canceled'
840
- | 'complete'
841
- | 'not_required'
842
- | 'processing'
843
- | 'requires_action'
844
- | 'requires_capture'
845
- | 'requires_confirmation'
846
- | 'requires_payment_method';
847
- }
848
-
849
- interface ShippingCost {
850
- /**
851
- * Total shipping cost before any discounts or taxes are applied.
852
- */
853
- amount_subtotal: number;
854
-
855
- /**
856
- * Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
857
- */
858
- amount_tax: number;
859
-
860
- /**
861
- * Total shipping cost after discounts and taxes are applied.
862
- */
863
- amount_total: number;
864
-
865
- /**
866
- * The ID of the ShippingRate for this order.
867
- */
868
- shipping_rate: string | Stripe.ShippingRate | null;
869
-
870
- /**
871
- * The taxes applied to the shipping rate.
872
- */
873
- taxes?: Array<ShippingCost.Tax>;
874
- }
875
-
876
- namespace ShippingCost {
877
- interface Tax {
878
- /**
879
- * Amount of tax applied for this rate.
880
- */
881
- amount: number;
882
-
883
- /**
884
- * Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
885
- *
886
- * Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
887
- */
888
- rate: Stripe.TaxRate;
889
-
890
- /**
891
- * The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
892
- */
893
- taxability_reason: Tax.TaxabilityReason | null;
894
-
895
- /**
896
- * The amount on which tax is calculated, in cents (or local equivalent).
897
- */
898
- taxable_amount: number | null;
899
- }
900
-
901
- namespace Tax {
902
- type TaxabilityReason =
903
- | 'customer_exempt'
904
- | 'not_collecting'
905
- | 'not_subject_to_tax'
906
- | 'not_supported'
907
- | 'portion_product_exempt'
908
- | 'portion_reduced_rated'
909
- | 'portion_standard_rated'
910
- | 'product_exempt'
911
- | 'product_exempt_holiday'
912
- | 'proportionally_rated'
913
- | 'reduced_rated'
914
- | 'reverse_charge'
915
- | 'standard_rated'
916
- | 'taxable_basis_reduced'
917
- | 'zero_rated';
918
- }
919
- }
920
-
921
- interface ShippingDetails {
922
- /**
923
- * Recipient shipping address. Required if the order includes products that are shippable.
924
- */
925
- address: Stripe.Address | null;
926
-
927
- /**
928
- * Recipient name.
929
- */
930
- name: string | null;
931
-
932
- /**
933
- * Recipient phone (including extension).
934
- */
935
- phone: string | null;
936
- }
937
-
938
- type Status =
939
- | 'canceled'
940
- | 'complete'
941
- | 'open'
942
- | 'processing'
943
- | 'submitted';
944
-
945
- interface TaxDetails {
946
- /**
947
- * Describes the purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`.
948
- */
949
- tax_exempt: TaxDetails.TaxExempt;
950
-
951
- /**
952
- * The purchaser's tax IDs to be used in calculation of tax for this Order.
953
- */
954
- tax_ids: Array<TaxDetails.TaxId>;
955
- }
956
-
957
- namespace TaxDetails {
958
- type TaxExempt = 'exempt' | 'none' | 'reverse';
959
-
960
- interface TaxId {
961
- /**
962
- * The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, or `unknown`
963
- */
964
- type: TaxId.Type;
965
-
966
- /**
967
- * The value of the tax ID.
968
- */
969
- value: string | null;
970
- }
971
-
972
- namespace TaxId {
973
- type Type =
974
- | 'ad_nrt'
975
- | 'ae_trn'
976
- | 'ar_cuit'
977
- | 'au_abn'
978
- | 'au_arn'
979
- | 'bg_uic'
980
- | 'bh_vat'
981
- | 'bo_tin'
982
- | 'br_cnpj'
983
- | 'br_cpf'
984
- | 'by_tin'
985
- | 'ca_bn'
986
- | 'ca_gst_hst'
987
- | 'ca_pst_bc'
988
- | 'ca_pst_mb'
989
- | 'ca_pst_sk'
990
- | 'ca_qst'
991
- | 'ch_uid'
992
- | 'ch_vat'
993
- | 'cl_tin'
994
- | 'cn_tin'
995
- | 'co_nit'
996
- | 'cr_tin'
997
- | 'de_stn'
998
- | 'do_rcn'
999
- | 'ec_ruc'
1000
- | 'eg_tin'
1001
- | 'es_cif'
1002
- | 'eu_oss_vat'
1003
- | 'eu_vat'
1004
- | 'gb_vat'
1005
- | 'ge_vat'
1006
- | 'hk_br'
1007
- | 'hr_oib'
1008
- | 'hu_tin'
1009
- | 'id_npwp'
1010
- | 'il_vat'
1011
- | 'in_gst'
1012
- | 'is_vat'
1013
- | 'jp_cn'
1014
- | 'jp_rn'
1015
- | 'jp_trn'
1016
- | 'ke_pin'
1017
- | 'kr_brn'
1018
- | 'kz_bin'
1019
- | 'li_uid'
1020
- | 'li_vat'
1021
- | 'ma_vat'
1022
- | 'md_vat'
1023
- | 'mx_rfc'
1024
- | 'my_frp'
1025
- | 'my_itn'
1026
- | 'my_sst'
1027
- | 'ng_tin'
1028
- | 'no_vat'
1029
- | 'no_voec'
1030
- | 'nz_gst'
1031
- | 'om_vat'
1032
- | 'pe_ruc'
1033
- | 'ph_tin'
1034
- | 'ro_tin'
1035
- | 'rs_pib'
1036
- | 'ru_inn'
1037
- | 'ru_kpp'
1038
- | 'sa_vat'
1039
- | 'sg_gst'
1040
- | 'sg_uen'
1041
- | 'si_tin'
1042
- | 'sv_nit'
1043
- | 'th_vat'
1044
- | 'tr_tin'
1045
- | 'tw_vat'
1046
- | 'tz_vat'
1047
- | 'ua_vat'
1048
- | 'unknown'
1049
- | 'us_ein'
1050
- | 'uy_ruc'
1051
- | 'uz_tin'
1052
- | 'uz_vat'
1053
- | 've_rif'
1054
- | 'vn_tin'
1055
- | 'za_vat';
1056
- }
1057
- }
1058
-
1059
- interface TotalDetails {
1060
- amount_credit?: number;
1061
-
1062
- /**
1063
- * This is the sum of all the discounts.
1064
- */
1065
- amount_discount: number;
1066
-
1067
- /**
1068
- * This is the sum of all the shipping amounts.
1069
- */
1070
- amount_shipping: number | null;
1071
-
1072
- /**
1073
- * This is the sum of all the tax amounts.
1074
- */
1075
- amount_tax: number;
1076
-
1077
- breakdown?: TotalDetails.Breakdown;
1078
- }
1079
-
1080
- namespace TotalDetails {
1081
- interface Breakdown {
1082
- /**
1083
- * The aggregated discounts.
1084
- */
1085
- discounts: Array<Breakdown.Discount>;
1086
-
1087
- /**
1088
- * The aggregated tax amounts by rate.
1089
- */
1090
- taxes: Array<Breakdown.Tax>;
1091
- }
1092
-
1093
- namespace Breakdown {
1094
- interface Discount {
1095
- /**
1096
- * The amount discounted.
1097
- */
1098
- amount: number;
1099
-
1100
- /**
1101
- * A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
1102
- * It contains information about when the discount began, when it will end, and what it is applied to.
1103
- *
1104
- * Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
1105
- */
1106
- discount: Stripe.Discount;
1107
- }
1108
-
1109
- interface Tax {
1110
- /**
1111
- * Amount of tax applied for this rate.
1112
- */
1113
- amount: number;
1114
-
1115
- /**
1116
- * Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
1117
- *
1118
- * Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
1119
- */
1120
- rate: Stripe.TaxRate;
1121
-
1122
- /**
1123
- * The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
1124
- */
1125
- taxability_reason: Tax.TaxabilityReason | null;
1126
-
1127
- /**
1128
- * The amount on which tax is calculated, in cents (or local equivalent).
1129
- */
1130
- taxable_amount: number | null;
1131
- }
1132
-
1133
- namespace Tax {
1134
- type TaxabilityReason =
1135
- | 'customer_exempt'
1136
- | 'not_collecting'
1137
- | 'not_subject_to_tax'
1138
- | 'not_supported'
1139
- | 'portion_product_exempt'
1140
- | 'portion_reduced_rated'
1141
- | 'portion_standard_rated'
1142
- | 'product_exempt'
1143
- | 'product_exempt_holiday'
1144
- | 'proportionally_rated'
1145
- | 'reduced_rated'
1146
- | 'reverse_charge'
1147
- | 'standard_rated'
1148
- | 'taxable_basis_reduced'
1149
- | 'zero_rated';
1150
- }
1151
- }
1152
- }
1153
- }
1154
- }
1155
- }