stripe 17.5.0 → 17.6.0-beta.1
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 +1032 -109
- package/README.md +1 -0
- package/VERSION +1 -1
- package/cjs/resources/AccountNotices.js +21 -0
- package/cjs/resources/Capital/FinancingOffers.js +21 -0
- package/cjs/resources/Capital/FinancingSummary.js +12 -0
- package/cjs/resources/Capital/FinancingTransactions.js +17 -0
- package/cjs/resources/FinancialConnections/Accounts.js +5 -0
- package/cjs/resources/FinancialConnections/Institutions.js +17 -0
- package/cjs/resources/GiftCards/Cards.js +23 -0
- package/cjs/resources/GiftCards/Transactions.js +33 -0
- package/cjs/resources/Invoices.js +17 -0
- package/cjs/resources/Issuing/CreditUnderwritingRecords.js +33 -0
- package/cjs/resources/Issuing/DisputeSettlementDetails.js +17 -0
- package/cjs/resources/Issuing/FraudLiabilityDebits.js +17 -0
- package/cjs/resources/Margins.js +22 -0
- package/cjs/resources/Orders.js +24 -0
- package/cjs/resources/PaymentAttemptRecords.js +17 -0
- package/cjs/resources/PaymentIntents.js +8 -0
- package/cjs/resources/PaymentRecords.js +29 -0
- package/cjs/resources/Quotes.js +32 -0
- package/cjs/resources/SubscriptionSchedules.js +4 -0
- package/cjs/resources/Tax/Associations.js +9 -0
- package/cjs/resources/Tax/Forms.js +20 -0
- package/cjs/resources/Terminal/ReaderCollectedData.js +12 -0
- package/cjs/resources/Terminal/Readers.js +12 -0
- package/cjs/resources/Treasury/FinancialAccounts.js +4 -0
- package/cjs/resources.js +48 -10
- package/cjs/stripe.core.js +1 -1
- package/esm/resources/AccountNotices.js +18 -0
- package/esm/resources/Capital/FinancingOffers.js +18 -0
- package/esm/resources/Capital/FinancingSummary.js +9 -0
- package/esm/resources/Capital/FinancingTransactions.js +14 -0
- package/esm/resources/FinancialConnections/Accounts.js +5 -0
- package/esm/resources/FinancialConnections/Institutions.js +14 -0
- package/esm/resources/GiftCards/Cards.js +20 -0
- package/esm/resources/GiftCards/Transactions.js +30 -0
- package/esm/resources/Invoices.js +17 -0
- package/esm/resources/Issuing/CreditUnderwritingRecords.js +30 -0
- package/esm/resources/Issuing/DisputeSettlementDetails.js +14 -0
- package/esm/resources/Issuing/FraudLiabilityDebits.js +14 -0
- package/esm/resources/Margins.js +19 -0
- package/esm/resources/Orders.js +21 -0
- package/esm/resources/PaymentAttemptRecords.js +14 -0
- package/esm/resources/PaymentIntents.js +8 -0
- package/esm/resources/PaymentRecords.js +26 -0
- package/esm/resources/Quotes.js +32 -0
- package/esm/resources/SubscriptionSchedules.js +4 -0
- package/esm/resources/Tax/Associations.js +6 -0
- package/esm/resources/Tax/Forms.js +17 -0
- package/esm/resources/Terminal/ReaderCollectedData.js +9 -0
- package/esm/resources/Terminal/Readers.js +12 -0
- package/esm/resources/Treasury/FinancialAccounts.js +4 -0
- package/esm/resources.js +33 -0
- package/esm/stripe.core.js +1 -1
- package/package.json +1 -1
- package/types/AccountLinksResource.d.ts +5 -1
- package/types/AccountNotices.d.ts +113 -0
- package/types/AccountNoticesResource.d.ts +98 -0
- package/types/AccountSessions.d.ts +45 -0
- package/types/AccountSessionsResource.d.ts +355 -0
- package/types/Accounts.d.ts +218 -1
- package/types/AccountsResource.d.ts +536 -0
- package/types/Billing/MeterErrorReports.d.ts +106 -0
- package/types/BillingPortal/Configurations.d.ts +1 -4
- package/types/BillingPortal/ConfigurationsResource.d.ts +2 -8
- package/types/Capital/FinancingOffers.d.ts +188 -0
- package/types/Capital/FinancingOffersResource.d.ts +97 -0
- package/types/Capital/FinancingSummary.d.ts +106 -0
- package/types/Capital/FinancingSummaryResource.d.ts +27 -0
- package/types/Capital/FinancingTransactions.d.ts +135 -0
- package/types/Capital/FinancingTransactionsResource.d.ts +68 -0
- package/types/Cards.d.ts +6 -1
- package/types/Charges.d.ts +155 -2
- package/types/ChargesResource.d.ts +1294 -0
- package/types/Checkout/Sessions.d.ts +340 -4
- package/types/Checkout/SessionsResource.d.ts +447 -5
- package/types/ConfirmationTokens.d.ts +105 -1
- package/types/Coupons.d.ts +1 -1
- package/types/CouponsResource.d.ts +1 -1
- package/types/CreditNoteLineItems.d.ts +1 -1
- package/types/CreditNotes.d.ts +22 -1
- package/types/CreditNotesResource.d.ts +51 -0
- package/types/CustomersResource.d.ts +7 -0
- package/types/EventTypes.d.ts +596 -0
- package/types/Events.d.ts +93 -0
- package/types/FinancialConnections/AccountInferredBalances.d.ts +38 -0
- package/types/FinancialConnections/Accounts.d.ts +29 -1
- package/types/FinancialConnections/AccountsResource.d.ts +35 -3
- package/types/FinancialConnections/Institutions.d.ts +93 -0
- package/types/FinancialConnections/InstitutionsResource.d.ts +47 -0
- package/types/FinancialConnections/Sessions.d.ts +49 -1
- package/types/FinancialConnections/SessionsResource.d.ts +38 -1
- package/types/GiftCards/Cards.d.ts +118 -0
- package/types/GiftCards/CardsResource.d.ts +159 -0
- package/types/GiftCards/Transactions.d.ts +129 -0
- package/types/GiftCards/TransactionsResource.d.ts +201 -0
- package/types/InvoiceItems.d.ts +5 -0
- package/types/InvoiceItemsResource.d.ts +98 -0
- package/types/InvoiceLineItems.d.ts +29 -2
- package/types/InvoicePayments.d.ts +113 -0
- package/types/Invoices.d.ts +143 -3
- package/types/InvoicesResource.d.ts +4618 -933
- package/types/Issuing/Authorizations.d.ts +2 -1
- package/types/Issuing/CardholdersResource.d.ts +2 -1
- package/types/Issuing/CreditUnderwritingRecords.d.ts +451 -0
- package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +1032 -0
- package/types/Issuing/DisputeSettlementDetails.d.ts +73 -0
- package/types/Issuing/DisputeSettlementDetailsResource.d.ts +52 -0
- package/types/Issuing/FraudLiabilityDebits.d.ts +52 -0
- package/types/Issuing/FraudLiabilityDebitsResource.d.ts +52 -0
- package/types/Issuing/Settlements.d.ts +103 -0
- package/types/Issuing/Transactions.d.ts +3 -1
- package/types/Issuing/TransactionsResource.d.ts +5 -0
- package/types/LineItems.d.ts +32 -0
- package/types/Mandates.d.ts +77 -0
- package/types/Margins.d.ts +56 -0
- package/types/MarginsResource.d.ts +114 -0
- package/types/Orders.d.ts +1179 -0
- package/types/OrdersResource.d.ts +2961 -0
- package/types/PaymentAttemptRecords.d.ts +242 -0
- package/types/PaymentAttemptRecordsResource.d.ts +47 -0
- package/types/PaymentIntents.d.ts +649 -1
- package/types/PaymentIntentsResource.d.ts +8052 -3765
- package/types/PaymentLinks.d.ts +6 -0
- package/types/PaymentLinksResource.d.ts +26 -0
- package/types/PaymentMethodConfigurations.d.ts +180 -0
- package/types/PaymentMethodConfigurationsResource.d.ts +250 -0
- package/types/PaymentMethods.d.ts +105 -1
- package/types/PaymentMethodsResource.d.ts +133 -0
- package/types/PaymentRecords.d.ts +242 -0
- package/types/PaymentRecordsResource.d.ts +455 -0
- package/types/Prices.d.ts +22 -0
- package/types/PricesResource.d.ts +22 -0
- package/types/Products.d.ts +39 -0
- package/types/ProductsResource.d.ts +36 -0
- package/types/QuoteLines.d.ts +634 -0
- package/types/QuotePreviewInvoices.d.ts +1658 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +824 -0
- package/types/Quotes.d.ts +591 -1
- package/types/QuotesResource.d.ts +2526 -194
- package/types/Refunds.d.ts +14 -0
- package/types/SetupAttempts.d.ts +43 -0
- package/types/SetupIntents.d.ts +116 -1
- package/types/SetupIntentsResource.d.ts +645 -3
- package/types/Sources.d.ts +29 -0
- package/types/SubscriptionItems.d.ts +21 -0
- package/types/SubscriptionItemsResource.d.ts +109 -0
- package/types/SubscriptionSchedules.d.ts +200 -0
- package/types/SubscriptionSchedulesResource.d.ts +1234 -16
- package/types/Subscriptions.d.ts +91 -1
- package/types/SubscriptionsResource.d.ts +369 -2
- package/types/Tax/Associations.d.ts +126 -0
- package/types/Tax/AssociationsResource.d.ts +29 -0
- package/types/Tax/Forms.d.ts +220 -0
- package/types/Tax/FormsResource.d.ts +107 -0
- package/types/Terminal/ReaderCollectedData.d.ts +51 -0
- package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
- package/types/Terminal/Readers.d.ts +310 -0
- package/types/Terminal/ReadersResource.d.ts +215 -0
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +104 -0
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
- package/types/TokensResource.d.ts +8 -0
- package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
- package/types/Treasury/FinancialAccounts.d.ts +12 -0
- package/types/Treasury/FinancialAccountsResource.d.ts +121 -0
- package/types/Treasury/OutboundTransfers.d.ts +43 -1
- package/types/Treasury/OutboundTransfersResource.d.ts +43 -0
- package/types/Treasury/ReceivedCredits.d.ts +36 -0
- package/types/Treasury/ReceivedCreditsResource.d.ts +1 -0
- package/types/Treasury/ReceivedDebits.d.ts +31 -0
- package/types/WebhookEndpointsResource.d.ts +70 -0
- package/types/index.d.ts +62 -0
|
@@ -30,7 +30,7 @@ declare module 'stripe' {
|
|
|
30
30
|
billing_address_collection?: SessionCreateParams.BillingAddressCollection;
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded`.
|
|
33
|
+
* If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded` or `custom`.
|
|
34
34
|
*/
|
|
35
35
|
cancel_url?: string;
|
|
36
36
|
|
|
@@ -192,6 +192,13 @@ declare module 'stripe' {
|
|
|
192
192
|
*/
|
|
193
193
|
payment_method_types?: Array<SessionCreateParams.PaymentMethodType>;
|
|
194
194
|
|
|
195
|
+
/**
|
|
196
|
+
* This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
|
|
197
|
+
*
|
|
198
|
+
* For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`.
|
|
199
|
+
*/
|
|
200
|
+
permissions?: SessionCreateParams.Permissions;
|
|
201
|
+
|
|
195
202
|
/**
|
|
196
203
|
* Controls phone number collection settings for the session.
|
|
197
204
|
*
|
|
@@ -207,7 +214,7 @@ declare module 'stripe' {
|
|
|
207
214
|
|
|
208
215
|
/**
|
|
209
216
|
* The URL to redirect your customer back to after they authenticate or cancel their payment on the
|
|
210
|
-
* payment method's app or site. This parameter is required if ui_mode is `embedded`
|
|
217
|
+
* payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom`
|
|
211
218
|
* and redirect-based payment methods are enabled on the session.
|
|
212
219
|
*/
|
|
213
220
|
return_url?: string;
|
|
@@ -247,7 +254,7 @@ declare module 'stripe' {
|
|
|
247
254
|
/**
|
|
248
255
|
* The URL to which Stripe should send customers when payment or setup
|
|
249
256
|
* is complete.
|
|
250
|
-
* This parameter is not allowed if ui_mode is `embedded`. If you'd like to use
|
|
257
|
+
* This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use
|
|
251
258
|
* information from the successful Checkout Session on your page, read the
|
|
252
259
|
* guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).
|
|
253
260
|
*/
|
|
@@ -680,6 +687,11 @@ declare module 'stripe' {
|
|
|
680
687
|
*/
|
|
681
688
|
dynamic_tax_rates?: Array<string>;
|
|
682
689
|
|
|
690
|
+
/**
|
|
691
|
+
* 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
692
|
+
*/
|
|
693
|
+
metadata?: Stripe.MetadataParam;
|
|
694
|
+
|
|
683
695
|
/**
|
|
684
696
|
* The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required.
|
|
685
697
|
*/
|
|
@@ -1147,6 +1159,11 @@ declare module 'stripe' {
|
|
|
1147
1159
|
*/
|
|
1148
1160
|
paypal?: PaymentMethodOptions.Paypal;
|
|
1149
1161
|
|
|
1162
|
+
/**
|
|
1163
|
+
* contains details about the PayTo payment method options.
|
|
1164
|
+
*/
|
|
1165
|
+
payto?: PaymentMethodOptions.Payto;
|
|
1166
|
+
|
|
1150
1167
|
/**
|
|
1151
1168
|
* contains details about the Pix payment method options.
|
|
1152
1169
|
*/
|
|
@@ -1401,6 +1418,11 @@ declare module 'stripe' {
|
|
|
1401
1418
|
*/
|
|
1402
1419
|
installments?: Card.Installments;
|
|
1403
1420
|
|
|
1421
|
+
/**
|
|
1422
|
+
* Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession.
|
|
1423
|
+
*/
|
|
1424
|
+
request_decremental_authorization?: Card.RequestDecrementalAuthorization;
|
|
1425
|
+
|
|
1404
1426
|
/**
|
|
1405
1427
|
* Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession.
|
|
1406
1428
|
*/
|
|
@@ -1457,6 +1479,8 @@ declare module 'stripe' {
|
|
|
1457
1479
|
enabled?: boolean;
|
|
1458
1480
|
}
|
|
1459
1481
|
|
|
1482
|
+
type RequestDecrementalAuthorization = 'if_available' | 'never';
|
|
1483
|
+
|
|
1460
1484
|
type RequestExtendedAuthorization = 'if_available' | 'never';
|
|
1461
1485
|
|
|
1462
1486
|
type RequestIncrementalAuthorization = 'if_available' | 'never';
|
|
@@ -1835,6 +1859,11 @@ declare module 'stripe' {
|
|
|
1835
1859
|
*/
|
|
1836
1860
|
reference?: string;
|
|
1837
1861
|
|
|
1862
|
+
/**
|
|
1863
|
+
* 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.
|
|
1864
|
+
*/
|
|
1865
|
+
reference_id?: string;
|
|
1866
|
+
|
|
1838
1867
|
/**
|
|
1839
1868
|
* The risk correlation ID for an on-session payment using a saved PayPal payment method.
|
|
1840
1869
|
*/
|
|
@@ -1852,6 +1881,11 @@ declare module 'stripe' {
|
|
|
1852
1881
|
* If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
|
|
1853
1882
|
*/
|
|
1854
1883
|
setup_future_usage?: Stripe.Emptyable<Paypal.SetupFutureUsage>;
|
|
1884
|
+
|
|
1885
|
+
/**
|
|
1886
|
+
* 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.
|
|
1887
|
+
*/
|
|
1888
|
+
subsellers?: Array<string>;
|
|
1855
1889
|
}
|
|
1856
1890
|
|
|
1857
1891
|
namespace Paypal {
|
|
@@ -1881,6 +1915,92 @@ declare module 'stripe' {
|
|
|
1881
1915
|
type SetupFutureUsage = 'none' | 'off_session';
|
|
1882
1916
|
}
|
|
1883
1917
|
|
|
1918
|
+
interface Payto {
|
|
1919
|
+
/**
|
|
1920
|
+
* Additional fields for Mandate creation
|
|
1921
|
+
*/
|
|
1922
|
+
mandate_options?: Payto.MandateOptions;
|
|
1923
|
+
|
|
1924
|
+
/**
|
|
1925
|
+
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
|
1926
|
+
*
|
|
1927
|
+
* 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.
|
|
1928
|
+
*
|
|
1929
|
+
* 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.
|
|
1930
|
+
*
|
|
1931
|
+
* 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).
|
|
1932
|
+
*/
|
|
1933
|
+
setup_future_usage?: Payto.SetupFutureUsage;
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
namespace Payto {
|
|
1937
|
+
interface MandateOptions {
|
|
1938
|
+
/**
|
|
1939
|
+
* Amount that will be collected. It is required when `amount_type` is `fixed`.
|
|
1940
|
+
*/
|
|
1941
|
+
amount?: number;
|
|
1942
|
+
|
|
1943
|
+
/**
|
|
1944
|
+
* The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively.
|
|
1945
|
+
*/
|
|
1946
|
+
amount_type?: MandateOptions.AmountType;
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.
|
|
1950
|
+
*/
|
|
1951
|
+
end_date?: string;
|
|
1952
|
+
|
|
1953
|
+
/**
|
|
1954
|
+
* The periodicity at which payments will be collected.
|
|
1955
|
+
*/
|
|
1956
|
+
payment_schedule?: MandateOptions.PaymentSchedule;
|
|
1957
|
+
|
|
1958
|
+
/**
|
|
1959
|
+
* The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit.
|
|
1960
|
+
*/
|
|
1961
|
+
payments_per_period?: number;
|
|
1962
|
+
|
|
1963
|
+
/**
|
|
1964
|
+
* The purpose for which payments are made. Defaults to retail.
|
|
1965
|
+
*/
|
|
1966
|
+
purpose?: MandateOptions.Purpose;
|
|
1967
|
+
|
|
1968
|
+
/**
|
|
1969
|
+
* Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.
|
|
1970
|
+
*/
|
|
1971
|
+
start_date?: string;
|
|
1972
|
+
}
|
|
1973
|
+
|
|
1974
|
+
namespace MandateOptions {
|
|
1975
|
+
type AmountType = 'fixed' | 'maximum';
|
|
1976
|
+
|
|
1977
|
+
type PaymentSchedule =
|
|
1978
|
+
| 'adhoc'
|
|
1979
|
+
| 'annual'
|
|
1980
|
+
| 'daily'
|
|
1981
|
+
| 'fortnightly'
|
|
1982
|
+
| 'monthly'
|
|
1983
|
+
| 'quarterly'
|
|
1984
|
+
| 'semi_annual'
|
|
1985
|
+
| 'weekly';
|
|
1986
|
+
|
|
1987
|
+
type Purpose =
|
|
1988
|
+
| 'dependant_support'
|
|
1989
|
+
| 'government'
|
|
1990
|
+
| 'loan'
|
|
1991
|
+
| 'mortgage'
|
|
1992
|
+
| 'other'
|
|
1993
|
+
| 'pension'
|
|
1994
|
+
| 'personal'
|
|
1995
|
+
| 'retail'
|
|
1996
|
+
| 'salary'
|
|
1997
|
+
| 'tax'
|
|
1998
|
+
| 'utility';
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
type SetupFutureUsage = 'none' | 'off_session';
|
|
2002
|
+
}
|
|
2003
|
+
|
|
1884
2004
|
interface Pix {
|
|
1885
2005
|
/**
|
|
1886
2006
|
* The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
|
|
@@ -2004,7 +2124,11 @@ declare module 'stripe' {
|
|
|
2004
2124
|
| 'payment_method'
|
|
2005
2125
|
| 'transactions';
|
|
2006
2126
|
|
|
2007
|
-
type Prefetch =
|
|
2127
|
+
type Prefetch =
|
|
2128
|
+
| 'balances'
|
|
2129
|
+
| 'inferred_balances'
|
|
2130
|
+
| 'ownership'
|
|
2131
|
+
| 'transactions';
|
|
2008
2132
|
}
|
|
2009
2133
|
|
|
2010
2134
|
type SetupFutureUsage = 'none' | 'off_session' | 'on_session';
|
|
@@ -2058,6 +2182,7 @@ declare module 'stripe' {
|
|
|
2058
2182
|
| 'eps'
|
|
2059
2183
|
| 'fpx'
|
|
2060
2184
|
| 'giropay'
|
|
2185
|
+
| 'gopay'
|
|
2061
2186
|
| 'grabpay'
|
|
2062
2187
|
| 'ideal'
|
|
2063
2188
|
| 'kakao_pay'
|
|
@@ -2065,6 +2190,7 @@ declare module 'stripe' {
|
|
|
2065
2190
|
| 'konbini'
|
|
2066
2191
|
| 'kr_card'
|
|
2067
2192
|
| 'link'
|
|
2193
|
+
| 'mb_way'
|
|
2068
2194
|
| 'mobilepay'
|
|
2069
2195
|
| 'multibanco'
|
|
2070
2196
|
| 'naver_pay'
|
|
@@ -2073,11 +2199,15 @@ declare module 'stripe' {
|
|
|
2073
2199
|
| 'payco'
|
|
2074
2200
|
| 'paynow'
|
|
2075
2201
|
| 'paypal'
|
|
2202
|
+
| 'payto'
|
|
2076
2203
|
| 'pix'
|
|
2077
2204
|
| 'promptpay'
|
|
2205
|
+
| 'qris'
|
|
2206
|
+
| 'rechnung'
|
|
2078
2207
|
| 'revolut_pay'
|
|
2079
2208
|
| 'samsung_pay'
|
|
2080
2209
|
| 'sepa_debit'
|
|
2210
|
+
| 'shopeepay'
|
|
2081
2211
|
| 'sofort'
|
|
2082
2212
|
| 'swish'
|
|
2083
2213
|
| 'twint'
|
|
@@ -2085,9 +2215,46 @@ declare module 'stripe' {
|
|
|
2085
2215
|
| 'wechat_pay'
|
|
2086
2216
|
| 'zip';
|
|
2087
2217
|
|
|
2218
|
+
interface Permissions {
|
|
2219
|
+
/**
|
|
2220
|
+
* Permissions for updating the Checkout Session.
|
|
2221
|
+
*/
|
|
2222
|
+
update?: Permissions.Update;
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2225
|
+
namespace Permissions {
|
|
2226
|
+
interface Update {
|
|
2227
|
+
/**
|
|
2228
|
+
* Determines which entity is allowed to update the line items.
|
|
2229
|
+
*
|
|
2230
|
+
* Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items.
|
|
2231
|
+
*
|
|
2232
|
+
* When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API.
|
|
2233
|
+
*/
|
|
2234
|
+
line_items?: Update.LineItems;
|
|
2235
|
+
|
|
2236
|
+
/**
|
|
2237
|
+
* Determines which entity is allowed to update the shipping details.
|
|
2238
|
+
*
|
|
2239
|
+
* Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details.
|
|
2240
|
+
*
|
|
2241
|
+
* When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API.
|
|
2242
|
+
*/
|
|
2243
|
+
shipping_details?: Update.ShippingDetails;
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
namespace Update {
|
|
2247
|
+
type LineItems = 'client_only' | 'server_only';
|
|
2248
|
+
|
|
2249
|
+
type ShippingDetails = 'client_only' | 'server_only';
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2088
2253
|
interface PhoneNumberCollection {
|
|
2089
2254
|
/**
|
|
2090
2255
|
* Set to `true` to enable phone number collection.
|
|
2256
|
+
*
|
|
2257
|
+
* Can only be set in `payment` and `subscription` mode.
|
|
2091
2258
|
*/
|
|
2092
2259
|
enabled: boolean;
|
|
2093
2260
|
}
|
|
@@ -2666,7 +2833,7 @@ declare module 'stripe' {
|
|
|
2666
2833
|
type Required = 'if_supported' | 'never';
|
|
2667
2834
|
}
|
|
2668
2835
|
|
|
2669
|
-
type UiMode = 'embedded' | 'hosted';
|
|
2836
|
+
type UiMode = 'custom' | 'embedded' | 'hosted';
|
|
2670
2837
|
}
|
|
2671
2838
|
|
|
2672
2839
|
interface SessionRetrieveParams {
|
|
@@ -2677,15 +2844,290 @@ declare module 'stripe' {
|
|
|
2677
2844
|
}
|
|
2678
2845
|
|
|
2679
2846
|
interface SessionUpdateParams {
|
|
2847
|
+
/**
|
|
2848
|
+
* Information about the customer collected within the Checkout Session.
|
|
2849
|
+
*/
|
|
2850
|
+
collected_information?: SessionUpdateParams.CollectedInformation;
|
|
2851
|
+
|
|
2680
2852
|
/**
|
|
2681
2853
|
* Specifies which fields in the response should be expanded.
|
|
2682
2854
|
*/
|
|
2683
2855
|
expand?: Array<string>;
|
|
2684
2856
|
|
|
2857
|
+
/**
|
|
2858
|
+
* A list of items the customer is purchasing.
|
|
2859
|
+
*
|
|
2860
|
+
* When updating line items, you must retransmit the entire array of line items.
|
|
2861
|
+
*
|
|
2862
|
+
* To retain an existing line item, specify its `id`.
|
|
2863
|
+
*
|
|
2864
|
+
* To update an existing line item, specify its `id` along with the new values of the fields to update.
|
|
2865
|
+
*
|
|
2866
|
+
* To add a new line item, specify a `price` and `quantity`. We don't currently support recurring prices.
|
|
2867
|
+
*
|
|
2868
|
+
* To remove an existing line item, omit the line item's ID from the retransmitted array.
|
|
2869
|
+
*
|
|
2870
|
+
* To reorder a line item, specify it at the desired position in the retransmitted array.
|
|
2871
|
+
*/
|
|
2872
|
+
line_items?: Array<SessionUpdateParams.LineItem>;
|
|
2873
|
+
|
|
2685
2874
|
/**
|
|
2686
2875
|
* 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
2687
2876
|
*/
|
|
2688
2877
|
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
2878
|
+
|
|
2879
|
+
/**
|
|
2880
|
+
* The shipping rate options to apply to this Session. Up to a maximum of 5.
|
|
2881
|
+
*/
|
|
2882
|
+
shipping_options?: Stripe.Emptyable<
|
|
2883
|
+
Array<SessionUpdateParams.ShippingOption>
|
|
2884
|
+
>;
|
|
2885
|
+
}
|
|
2886
|
+
|
|
2887
|
+
namespace SessionUpdateParams {
|
|
2888
|
+
interface CollectedInformation {
|
|
2889
|
+
/**
|
|
2890
|
+
* The shipping details to apply to this Session.
|
|
2891
|
+
*/
|
|
2892
|
+
shipping_details?: CollectedInformation.ShippingDetails;
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
namespace CollectedInformation {
|
|
2896
|
+
interface ShippingDetails {
|
|
2897
|
+
/**
|
|
2898
|
+
* The address of the customer
|
|
2899
|
+
*/
|
|
2900
|
+
address: ShippingDetails.Address;
|
|
2901
|
+
|
|
2902
|
+
/**
|
|
2903
|
+
* The name of customer
|
|
2904
|
+
*/
|
|
2905
|
+
name: string;
|
|
2906
|
+
}
|
|
2907
|
+
|
|
2908
|
+
namespace ShippingDetails {
|
|
2909
|
+
interface Address {
|
|
2910
|
+
/**
|
|
2911
|
+
* City, district, suburb, town, or village.
|
|
2912
|
+
*/
|
|
2913
|
+
city?: string;
|
|
2914
|
+
|
|
2915
|
+
/**
|
|
2916
|
+
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
2917
|
+
*/
|
|
2918
|
+
country: string;
|
|
2919
|
+
|
|
2920
|
+
/**
|
|
2921
|
+
* Address line 1 (e.g., street, PO Box, or company name).
|
|
2922
|
+
*/
|
|
2923
|
+
line1: string;
|
|
2924
|
+
|
|
2925
|
+
/**
|
|
2926
|
+
* Address line 2 (e.g., apartment, suite, unit, or building).
|
|
2927
|
+
*/
|
|
2928
|
+
line2?: string;
|
|
2929
|
+
|
|
2930
|
+
/**
|
|
2931
|
+
* ZIP or postal code.
|
|
2932
|
+
*/
|
|
2933
|
+
postal_code?: string;
|
|
2934
|
+
|
|
2935
|
+
/**
|
|
2936
|
+
* State, county, province, or region.
|
|
2937
|
+
*/
|
|
2938
|
+
state?: string;
|
|
2939
|
+
}
|
|
2940
|
+
}
|
|
2941
|
+
}
|
|
2942
|
+
|
|
2943
|
+
interface LineItem {
|
|
2944
|
+
/**
|
|
2945
|
+
* When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout.
|
|
2946
|
+
*/
|
|
2947
|
+
adjustable_quantity?: LineItem.AdjustableQuantity;
|
|
2948
|
+
|
|
2949
|
+
/**
|
|
2950
|
+
* ID of an existing line item.
|
|
2951
|
+
*/
|
|
2952
|
+
id?: string;
|
|
2953
|
+
|
|
2954
|
+
/**
|
|
2955
|
+
* 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
2956
|
+
*/
|
|
2957
|
+
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
2958
|
+
|
|
2959
|
+
/**
|
|
2960
|
+
* The ID of the [Price](https://stripe.com/docs/api/prices).
|
|
2961
|
+
*/
|
|
2962
|
+
price?: string;
|
|
2963
|
+
|
|
2964
|
+
/**
|
|
2965
|
+
* The quantity of the line item being purchased.
|
|
2966
|
+
*/
|
|
2967
|
+
quantity?: number;
|
|
2968
|
+
|
|
2969
|
+
/**
|
|
2970
|
+
* The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
|
|
2971
|
+
*/
|
|
2972
|
+
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
2973
|
+
}
|
|
2974
|
+
|
|
2975
|
+
namespace LineItem {
|
|
2976
|
+
interface AdjustableQuantity {
|
|
2977
|
+
/**
|
|
2978
|
+
* Set to true if the quantity can be adjusted to any positive integer. Setting to false will remove any previously specified constraints on quantity.
|
|
2979
|
+
*/
|
|
2980
|
+
enabled: boolean;
|
|
2981
|
+
|
|
2982
|
+
/**
|
|
2983
|
+
* The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999.
|
|
2984
|
+
*/
|
|
2985
|
+
maximum?: number;
|
|
2986
|
+
|
|
2987
|
+
/**
|
|
2988
|
+
* The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0.
|
|
2989
|
+
*/
|
|
2990
|
+
minimum?: number;
|
|
2991
|
+
}
|
|
2992
|
+
}
|
|
2993
|
+
|
|
2994
|
+
interface ShippingOption {
|
|
2995
|
+
/**
|
|
2996
|
+
* The ID of the Shipping Rate to use for this shipping option.
|
|
2997
|
+
*/
|
|
2998
|
+
shipping_rate?: string;
|
|
2999
|
+
|
|
3000
|
+
/**
|
|
3001
|
+
* Parameters to be passed to Shipping Rate creation for this shipping option.
|
|
3002
|
+
*/
|
|
3003
|
+
shipping_rate_data?: ShippingOption.ShippingRateData;
|
|
3004
|
+
}
|
|
3005
|
+
|
|
3006
|
+
namespace ShippingOption {
|
|
3007
|
+
interface ShippingRateData {
|
|
3008
|
+
/**
|
|
3009
|
+
* The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
|
|
3010
|
+
*/
|
|
3011
|
+
delivery_estimate?: ShippingRateData.DeliveryEstimate;
|
|
3012
|
+
|
|
3013
|
+
/**
|
|
3014
|
+
* The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
|
|
3015
|
+
*/
|
|
3016
|
+
display_name: string;
|
|
3017
|
+
|
|
3018
|
+
/**
|
|
3019
|
+
* Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
|
|
3020
|
+
*/
|
|
3021
|
+
fixed_amount?: ShippingRateData.FixedAmount;
|
|
3022
|
+
|
|
3023
|
+
/**
|
|
3024
|
+
* 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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
|
3025
|
+
*/
|
|
3026
|
+
metadata?: Stripe.MetadataParam;
|
|
3027
|
+
|
|
3028
|
+
/**
|
|
3029
|
+
* Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
|
|
3030
|
+
*/
|
|
3031
|
+
tax_behavior?: ShippingRateData.TaxBehavior;
|
|
3032
|
+
|
|
3033
|
+
/**
|
|
3034
|
+
* A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
|
|
3035
|
+
*/
|
|
3036
|
+
tax_code?: string;
|
|
3037
|
+
|
|
3038
|
+
/**
|
|
3039
|
+
* The type of calculation to use on the shipping rate.
|
|
3040
|
+
*/
|
|
3041
|
+
type?: 'fixed_amount';
|
|
3042
|
+
}
|
|
3043
|
+
|
|
3044
|
+
namespace ShippingRateData {
|
|
3045
|
+
interface DeliveryEstimate {
|
|
3046
|
+
/**
|
|
3047
|
+
* The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
|
|
3048
|
+
*/
|
|
3049
|
+
maximum?: DeliveryEstimate.Maximum;
|
|
3050
|
+
|
|
3051
|
+
/**
|
|
3052
|
+
* The lower bound of the estimated range. If empty, represents no lower bound.
|
|
3053
|
+
*/
|
|
3054
|
+
minimum?: DeliveryEstimate.Minimum;
|
|
3055
|
+
}
|
|
3056
|
+
|
|
3057
|
+
namespace DeliveryEstimate {
|
|
3058
|
+
interface Maximum {
|
|
3059
|
+
/**
|
|
3060
|
+
* A unit of time.
|
|
3061
|
+
*/
|
|
3062
|
+
unit: Maximum.Unit;
|
|
3063
|
+
|
|
3064
|
+
/**
|
|
3065
|
+
* Must be greater than 0.
|
|
3066
|
+
*/
|
|
3067
|
+
value: number;
|
|
3068
|
+
}
|
|
3069
|
+
|
|
3070
|
+
namespace Maximum {
|
|
3071
|
+
type Unit = 'business_day' | 'day' | 'hour' | 'month' | 'week';
|
|
3072
|
+
}
|
|
3073
|
+
|
|
3074
|
+
interface Minimum {
|
|
3075
|
+
/**
|
|
3076
|
+
* A unit of time.
|
|
3077
|
+
*/
|
|
3078
|
+
unit: Minimum.Unit;
|
|
3079
|
+
|
|
3080
|
+
/**
|
|
3081
|
+
* Must be greater than 0.
|
|
3082
|
+
*/
|
|
3083
|
+
value: number;
|
|
3084
|
+
}
|
|
3085
|
+
|
|
3086
|
+
namespace Minimum {
|
|
3087
|
+
type Unit = 'business_day' | 'day' | 'hour' | 'month' | 'week';
|
|
3088
|
+
}
|
|
3089
|
+
}
|
|
3090
|
+
|
|
3091
|
+
interface FixedAmount {
|
|
3092
|
+
/**
|
|
3093
|
+
* A non-negative integer in cents representing how much to charge.
|
|
3094
|
+
*/
|
|
3095
|
+
amount: number;
|
|
3096
|
+
|
|
3097
|
+
/**
|
|
3098
|
+
* 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).
|
|
3099
|
+
*/
|
|
3100
|
+
currency: string;
|
|
3101
|
+
|
|
3102
|
+
/**
|
|
3103
|
+
* Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
|
|
3104
|
+
*/
|
|
3105
|
+
currency_options?: {
|
|
3106
|
+
[key: string]: FixedAmount.CurrencyOptions;
|
|
3107
|
+
};
|
|
3108
|
+
}
|
|
3109
|
+
|
|
3110
|
+
namespace FixedAmount {
|
|
3111
|
+
interface CurrencyOptions {
|
|
3112
|
+
/**
|
|
3113
|
+
* A non-negative integer in cents representing how much to charge.
|
|
3114
|
+
*/
|
|
3115
|
+
amount: number;
|
|
3116
|
+
|
|
3117
|
+
/**
|
|
3118
|
+
* Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
|
|
3119
|
+
*/
|
|
3120
|
+
tax_behavior?: CurrencyOptions.TaxBehavior;
|
|
3121
|
+
}
|
|
3122
|
+
|
|
3123
|
+
namespace CurrencyOptions {
|
|
3124
|
+
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
3125
|
+
}
|
|
3126
|
+
}
|
|
3127
|
+
|
|
3128
|
+
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
3129
|
+
}
|
|
3130
|
+
}
|
|
2689
3131
|
}
|
|
2690
3132
|
|
|
2691
3133
|
interface SessionListParams extends PaginationParams {
|