stripe 9.0.0 → 9.3.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.
- package/CHANGELOG.md +35 -0
- package/VERSION +1 -1
- package/lib/resources/Apps/Secrets.js +31 -0
- package/lib/resources/Customers.js +5 -0
- package/lib/resources/FinancialConnections/Accounts.js +12 -0
- package/lib/resources/TestHelpers/Treasury/InboundTransfers.js +25 -0
- package/lib/resources/TestHelpers/Treasury/OutboundPayments.js +25 -0
- package/lib/resources/TestHelpers/Treasury/OutboundTransfers.js +25 -0
- package/lib/resources/TestHelpers/Treasury/ReceivedCredits.js +15 -0
- package/lib/resources/TestHelpers/Treasury/ReceivedDebits.js +15 -0
- package/lib/resources/Treasury/CreditReversals.js +26 -0
- package/lib/resources/Treasury/DebitReversals.js +26 -0
- package/lib/resources/Treasury/FinancialAccounts.js +41 -0
- package/lib/resources/Treasury/InboundTransfers.js +31 -0
- package/lib/resources/Treasury/OutboundPayments.js +31 -0
- package/lib/resources/Treasury/OutboundTransfers.js +31 -0
- package/lib/resources/Treasury/ReceivedCredits.js +21 -0
- package/lib/resources/Treasury/ReceivedDebits.js +21 -0
- package/lib/resources/Treasury/TransactionEntries.js +21 -0
- package/lib/resources/Treasury/Transactions.js +21 -0
- package/lib/resources.js +22 -0
- package/package.json +1 -1
- package/types/2020-08-27/Accounts.d.ts +5 -5
- package/types/2020-08-27/Apps/Secrets.d.ts +241 -0
- package/types/2020-08-27/BillingPortal/Configurations.d.ts +1 -1
- package/types/2020-08-27/BillingPortal/Sessions.d.ts +1 -1
- package/types/2020-08-27/Charges.d.ts +8 -0
- package/types/2020-08-27/Checkout/Sessions.d.ts +51 -3
- package/types/2020-08-27/Customers.d.ts +24 -0
- package/types/2020-08-27/Discounts.d.ts +4 -4
- package/types/2020-08-27/FinancialConnections/Accounts.d.ts +63 -0
- package/types/2020-08-27/Invoices.d.ts +3 -0
- package/types/2020-08-27/Issuing/Authorizations.d.ts +22 -0
- package/types/2020-08-27/Issuing/Cards.d.ts +7 -0
- package/types/2020-08-27/Issuing/Disputes.d.ts +29 -0
- package/types/2020-08-27/Issuing/Transactions.d.ts +17 -0
- package/types/2020-08-27/LineItems.d.ts +2 -3
- package/types/2020-08-27/Mandates.d.ts +4 -0
- package/types/2020-08-27/Orders.d.ts +84 -4
- package/types/2020-08-27/PaymentIntents.d.ts +332 -2
- package/types/2020-08-27/PaymentLinks.d.ts +167 -0
- package/types/2020-08-27/PaymentMethods.d.ts +73 -0
- package/types/2020-08-27/PromotionCodes.d.ts +2 -2
- package/types/2020-08-27/Quotes.d.ts +6 -9
- package/types/2020-08-27/Refunds.d.ts +1 -1
- package/types/2020-08-27/SetupAttempts.d.ts +4 -0
- package/types/2020-08-27/SetupIntents.d.ts +157 -0
- package/types/2020-08-27/SubscriptionSchedules.d.ts +15 -0
- package/types/2020-08-27/Subscriptions.d.ts +41 -2
- package/types/2020-08-27/Terminal/Configurations.d.ts +63 -0
- package/types/2020-08-27/TestHelpers/Treasury/InboundTransfers.d.ts +108 -0
- package/types/2020-08-27/TestHelpers/Treasury/OutboundPayments.d.ts +105 -0
- package/types/2020-08-27/TestHelpers/Treasury/OutboundTransfers.d.ts +105 -0
- package/types/2020-08-27/TestHelpers/Treasury/ReceivedCredits.d.ts +93 -0
- package/types/2020-08-27/TestHelpers/Treasury/ReceivedDebits.d.ts +91 -0
- package/types/2020-08-27/Tokens.d.ts +2 -2
- package/types/2020-08-27/Treasury/CreditReversals.d.ts +168 -0
- package/types/2020-08-27/Treasury/DebitReversals.d.ts +187 -0
- package/types/2020-08-27/Treasury/FinancialAccountFeatures.d.ts +622 -0
- package/types/2020-08-27/Treasury/FinancialAccounts.d.ts +833 -0
- package/types/2020-08-27/Treasury/InboundTransfers.d.ts +349 -0
- package/types/2020-08-27/Treasury/OutboundPayments.d.ts +550 -0
- package/types/2020-08-27/Treasury/OutboundTransfers.d.ts +385 -0
- package/types/2020-08-27/Treasury/ReceivedCredits.d.ts +303 -0
- package/types/2020-08-27/Treasury/ReceivedDebits.d.ts +231 -0
- package/types/2020-08-27/Treasury/TransactionEntries.d.ts +257 -0
- package/types/2020-08-27/Treasury/Transactions.d.ts +268 -0
- package/types/2020-08-27/WebhookEndpoints.d.ts +62 -2
- package/types/2020-08-27/index.d.ts +39 -0
|
@@ -58,6 +58,11 @@ declare module 'stripe' {
|
|
|
58
58
|
* The transaction being disputed.
|
|
59
59
|
*/
|
|
60
60
|
transaction: string | Stripe.Issuing.Transaction;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
|
|
64
|
+
*/
|
|
65
|
+
treasury?: Dispute.Treasury | null;
|
|
61
66
|
}
|
|
62
67
|
|
|
63
68
|
namespace Dispute {
|
|
@@ -316,6 +321,18 @@ declare module 'stripe' {
|
|
|
316
321
|
}
|
|
317
322
|
|
|
318
323
|
type Status = 'expired' | 'lost' | 'submitted' | 'unsubmitted' | 'won';
|
|
324
|
+
|
|
325
|
+
interface Treasury {
|
|
326
|
+
/**
|
|
327
|
+
* The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute
|
|
328
|
+
*/
|
|
329
|
+
debit_reversal: string | null;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed.
|
|
333
|
+
*/
|
|
334
|
+
received_debit: string;
|
|
335
|
+
}
|
|
319
336
|
}
|
|
320
337
|
|
|
321
338
|
interface DisputeCreateParams {
|
|
@@ -338,6 +355,11 @@ declare module 'stripe' {
|
|
|
338
355
|
* The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`.
|
|
339
356
|
*/
|
|
340
357
|
transaction?: string;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Params for disputes related to Treasury FinancialAccounts
|
|
361
|
+
*/
|
|
362
|
+
treasury?: DisputeCreateParams.Treasury;
|
|
341
363
|
}
|
|
342
364
|
|
|
343
365
|
namespace DisputeCreateParams {
|
|
@@ -621,6 +643,13 @@ declare module 'stripe' {
|
|
|
621
643
|
received_at?: Stripe.Emptyable<number>;
|
|
622
644
|
}
|
|
623
645
|
}
|
|
646
|
+
|
|
647
|
+
interface Treasury {
|
|
648
|
+
/**
|
|
649
|
+
* The ID of the ReceivedDebit to initiate an Issuings dispute for.
|
|
650
|
+
*/
|
|
651
|
+
received_debit: string;
|
|
652
|
+
}
|
|
624
653
|
}
|
|
625
654
|
|
|
626
655
|
interface DisputeRetrieveParams {
|
|
@@ -89,6 +89,11 @@ declare module 'stripe' {
|
|
|
89
89
|
*/
|
|
90
90
|
purchase_details: Transaction.PurchaseDetails | null;
|
|
91
91
|
|
|
92
|
+
/**
|
|
93
|
+
* [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
|
|
94
|
+
*/
|
|
95
|
+
treasury?: Transaction.Treasury | null;
|
|
96
|
+
|
|
92
97
|
/**
|
|
93
98
|
* The nature of the transaction.
|
|
94
99
|
*/
|
|
@@ -296,6 +301,18 @@ declare module 'stripe' {
|
|
|
296
301
|
}
|
|
297
302
|
}
|
|
298
303
|
|
|
304
|
+
interface Treasury {
|
|
305
|
+
/**
|
|
306
|
+
* The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a refund
|
|
307
|
+
*/
|
|
308
|
+
received_credit: string | null;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a capture
|
|
312
|
+
*/
|
|
313
|
+
received_debit: string | null;
|
|
314
|
+
}
|
|
315
|
+
|
|
299
316
|
type Type = 'capture' | 'refund';
|
|
300
317
|
|
|
301
318
|
type Wallet = 'apple_pay' | 'google_pay' | 'samsung_pay';
|
|
@@ -82,9 +82,8 @@ declare module 'stripe' {
|
|
|
82
82
|
amount: number;
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
|
-
* A discount represents the actual application of a coupon
|
|
86
|
-
*
|
|
87
|
-
* will end.
|
|
85
|
+
* 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).
|
|
86
|
+
* It contains information about when the discount began, when it will end, and what it is applied to.
|
|
88
87
|
*
|
|
89
88
|
* Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).
|
|
90
89
|
*/
|
|
@@ -91,6 +91,8 @@ declare module 'stripe' {
|
|
|
91
91
|
|
|
92
92
|
card?: PaymentMethodDetails.Card;
|
|
93
93
|
|
|
94
|
+
link?: PaymentMethodDetails.Link;
|
|
95
|
+
|
|
94
96
|
sepa_debit?: PaymentMethodDetails.SepaDebit;
|
|
95
97
|
|
|
96
98
|
/**
|
|
@@ -162,6 +164,8 @@ declare module 'stripe' {
|
|
|
162
164
|
|
|
163
165
|
interface Card {}
|
|
164
166
|
|
|
167
|
+
interface Link {}
|
|
168
|
+
|
|
165
169
|
interface SepaDebit {
|
|
166
170
|
/**
|
|
167
171
|
* The unique reference of the mandate.
|
|
@@ -38,6 +38,15 @@ declare module 'stripe' {
|
|
|
38
38
|
*/
|
|
39
39
|
billing_details: Order.BillingDetails | null;
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* The client secret of this Order. Used for client-side retrieval using a publishable key.
|
|
43
|
+
*
|
|
44
|
+
* 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.
|
|
45
|
+
*
|
|
46
|
+
* 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.
|
|
47
|
+
*/
|
|
48
|
+
client_secret: string | null;
|
|
49
|
+
|
|
41
50
|
/**
|
|
42
51
|
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
43
52
|
*/
|
|
@@ -833,9 +842,8 @@ declare module 'stripe' {
|
|
|
833
842
|
amount: number;
|
|
834
843
|
|
|
835
844
|
/**
|
|
836
|
-
* A discount represents the actual application of a coupon
|
|
837
|
-
*
|
|
838
|
-
* will end.
|
|
845
|
+
* 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).
|
|
846
|
+
* It contains information about when the discount began, when it will end, and what it is applied to.
|
|
839
847
|
*
|
|
840
848
|
* Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts).
|
|
841
849
|
*/
|
|
@@ -1153,6 +1161,11 @@ declare module 'stripe' {
|
|
|
1153
1161
|
*/
|
|
1154
1162
|
klarna?: PaymentMethodOptions.Klarna;
|
|
1155
1163
|
|
|
1164
|
+
/**
|
|
1165
|
+
* If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent.
|
|
1166
|
+
*/
|
|
1167
|
+
link?: PaymentMethodOptions.Link;
|
|
1168
|
+
|
|
1156
1169
|
/**
|
|
1157
1170
|
* If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent.
|
|
1158
1171
|
*/
|
|
@@ -1456,6 +1469,37 @@ declare module 'stripe' {
|
|
|
1456
1469
|
| 'sv-SE';
|
|
1457
1470
|
}
|
|
1458
1471
|
|
|
1472
|
+
interface Link {
|
|
1473
|
+
/**
|
|
1474
|
+
* Controls when the funds will be captured from the customer's account.
|
|
1475
|
+
*
|
|
1476
|
+
* If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
|
|
1477
|
+
*
|
|
1478
|
+
* If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
|
|
1479
|
+
*/
|
|
1480
|
+
capture_method?: Stripe.Emptyable<'manual'>;
|
|
1481
|
+
|
|
1482
|
+
/**
|
|
1483
|
+
* Token used for persistent Link logins.
|
|
1484
|
+
*/
|
|
1485
|
+
persistent_token?: string;
|
|
1486
|
+
|
|
1487
|
+
/**
|
|
1488
|
+
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
|
1489
|
+
*
|
|
1490
|
+
* Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the 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.
|
|
1491
|
+
*
|
|
1492
|
+
* 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).
|
|
1493
|
+
*
|
|
1494
|
+
* 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`.
|
|
1495
|
+
*/
|
|
1496
|
+
setup_future_usage?: Stripe.Emptyable<Link.SetupFutureUsage>;
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
namespace Link {
|
|
1500
|
+
type SetupFutureUsage = 'none' | 'off_session';
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1459
1503
|
interface Oxxo {
|
|
1460
1504
|
/**
|
|
1461
1505
|
* The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
|
|
@@ -2137,6 +2181,11 @@ declare module 'stripe' {
|
|
|
2137
2181
|
*/
|
|
2138
2182
|
klarna?: Stripe.Emptyable<PaymentMethodOptions.Klarna>;
|
|
2139
2183
|
|
|
2184
|
+
/**
|
|
2185
|
+
* If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent.
|
|
2186
|
+
*/
|
|
2187
|
+
link?: Stripe.Emptyable<PaymentMethodOptions.Link>;
|
|
2188
|
+
|
|
2140
2189
|
/**
|
|
2141
2190
|
* If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent.
|
|
2142
2191
|
*/
|
|
@@ -2440,6 +2489,37 @@ declare module 'stripe' {
|
|
|
2440
2489
|
| 'sv-SE';
|
|
2441
2490
|
}
|
|
2442
2491
|
|
|
2492
|
+
interface Link {
|
|
2493
|
+
/**
|
|
2494
|
+
* Controls when the funds will be captured from the customer's account.
|
|
2495
|
+
*
|
|
2496
|
+
* If provided, this parameter will override the top-level `capture_method` when finalizing the payment with this payment method type.
|
|
2497
|
+
*
|
|
2498
|
+
* If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter will unset the stored value for this payment method type.
|
|
2499
|
+
*/
|
|
2500
|
+
capture_method?: Stripe.Emptyable<'manual'>;
|
|
2501
|
+
|
|
2502
|
+
/**
|
|
2503
|
+
* Token used for persistent Link logins.
|
|
2504
|
+
*/
|
|
2505
|
+
persistent_token?: string;
|
|
2506
|
+
|
|
2507
|
+
/**
|
|
2508
|
+
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
|
2509
|
+
*
|
|
2510
|
+
* Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the 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.
|
|
2511
|
+
*
|
|
2512
|
+
* 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).
|
|
2513
|
+
*
|
|
2514
|
+
* 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`.
|
|
2515
|
+
*/
|
|
2516
|
+
setup_future_usage?: Stripe.Emptyable<Link.SetupFutureUsage>;
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
namespace Link {
|
|
2520
|
+
type SetupFutureUsage = 'none' | 'off_session';
|
|
2521
|
+
}
|
|
2522
|
+
|
|
2443
2523
|
interface Oxxo {
|
|
2444
2524
|
/**
|
|
2445
2525
|
* The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
|
|
@@ -2923,7 +3003,7 @@ declare module 'stripe' {
|
|
|
2923
3003
|
): ApiListPromise<Stripe.LineItem>;
|
|
2924
3004
|
|
|
2925
3005
|
/**
|
|
2926
|
-
* Reopens a
|
|
3006
|
+
* Reopens a submitted order.
|
|
2927
3007
|
*/
|
|
2928
3008
|
reopen(
|
|
2929
3009
|
id: string,
|