stripe 17.4.0 → 17.5.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 +991 -109
- package/README.md +4 -4
- 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.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.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 +50 -5
- package/types/AccountSessionsResource.d.ts +360 -5
- package/types/Accounts.d.ts +184 -2
- package/types/AccountsResource.d.ts +496 -0
- package/types/Billing/MeterErrorReports.d.ts +106 -0
- package/types/BillingPortal/Configurations.d.ts +1 -1
- package/types/Capabilities.d.ts +1 -1
- 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/Charges.d.ts +244 -2
- package/types/ChargesResource.d.ts +1294 -0
- package/types/Checkout/Sessions.d.ts +321 -4
- package/types/Checkout/SessionsResource.d.ts +448 -6
- package/types/ConfirmationTokens.d.ts +99 -0
- package/types/Coupons.d.ts +1 -1
- package/types/CouponsResource.d.ts +1 -1
- package/types/CreditNotes.d.ts +21 -0
- 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/FundingInstructions.d.ts +21 -0
- 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 +28 -1
- package/types/InvoicePayments.d.ts +113 -0
- package/types/Invoices.d.ts +147 -2
- package/types/InvoicesResource.d.ts +5534 -1849
- 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 +2 -0
- package/types/Issuing/TransactionsResource.d.ts +5 -0
- package/types/LineItems.d.ts +33 -1
- 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 +1155 -0
- package/types/OrdersResource.d.ts +2913 -0
- package/types/PaymentAttemptRecords.d.ts +242 -0
- package/types/PaymentAttemptRecordsResource.d.ts +47 -0
- package/types/PaymentIntents.d.ts +676 -2
- package/types/PaymentIntentsResource.d.ts +8054 -3767
- package/types/PaymentLinks.d.ts +6 -0
- package/types/PaymentLinksResource.d.ts +18 -2
- package/types/PaymentMethodConfigurations.d.ts +180 -0
- package/types/PaymentMethodConfigurationsResource.d.ts +250 -0
- package/types/PaymentMethods.d.ts +99 -0
- package/types/PaymentMethodsResource.d.ts +133 -0
- package/types/PaymentRecords.d.ts +259 -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 +1625 -0
- package/types/QuotePreviewSubscriptionSchedules.d.ts +814 -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 +48 -0
- package/types/SetupIntents.d.ts +121 -1
- package/types/SetupIntentsResource.d.ts +645 -3
- package/types/Sources.d.ts +23 -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/LocationsResource.d.ts +1 -1
- package/types/Terminal/ReaderCollectedData.d.ts +51 -0
- package/types/Terminal/ReaderCollectedDataResource.d.ts +29 -0
- package/types/Terminal/Readers.d.ts +278 -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/Treasury/FinancialAccountFeatures.d.ts +7 -0
- package/types/Treasury/FinancialAccounts.d.ts +5 -0
- package/types/Treasury/FinancialAccountsResource.d.ts +37 -0
- package/types/Treasury/OutboundTransfers.d.ts +26 -0
- package/types/Treasury/OutboundTransfersResource.d.ts +26 -0
- package/types/Treasury/ReceivedCredits.d.ts +26 -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
|
*/
|
|
@@ -297,7 +304,9 @@ declare module 'stripe' {
|
|
|
297
304
|
|
|
298
305
|
interface AutomaticTax {
|
|
299
306
|
/**
|
|
300
|
-
* Set to true to
|
|
307
|
+
* Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location.
|
|
308
|
+
*
|
|
309
|
+
* Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation.
|
|
301
310
|
*/
|
|
302
311
|
enabled: boolean;
|
|
303
312
|
|
|
@@ -678,6 +687,11 @@ declare module 'stripe' {
|
|
|
678
687
|
*/
|
|
679
688
|
dynamic_tax_rates?: Array<string>;
|
|
680
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
|
+
|
|
681
695
|
/**
|
|
682
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.
|
|
683
697
|
*/
|
|
@@ -1145,6 +1159,11 @@ declare module 'stripe' {
|
|
|
1145
1159
|
*/
|
|
1146
1160
|
paypal?: PaymentMethodOptions.Paypal;
|
|
1147
1161
|
|
|
1162
|
+
/**
|
|
1163
|
+
* contains details about the PayTo payment method options.
|
|
1164
|
+
*/
|
|
1165
|
+
payto?: PaymentMethodOptions.Payto;
|
|
1166
|
+
|
|
1148
1167
|
/**
|
|
1149
1168
|
* contains details about the Pix payment method options.
|
|
1150
1169
|
*/
|
|
@@ -1394,6 +1413,11 @@ declare module 'stripe' {
|
|
|
1394
1413
|
*/
|
|
1395
1414
|
installments?: Card.Installments;
|
|
1396
1415
|
|
|
1416
|
+
/**
|
|
1417
|
+
* Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession.
|
|
1418
|
+
*/
|
|
1419
|
+
request_decremental_authorization?: Card.RequestDecrementalAuthorization;
|
|
1420
|
+
|
|
1397
1421
|
/**
|
|
1398
1422
|
* Request ability to [capture beyond the standard authorization validity window](https://stripe.com/payments/extended-authorization) for this CheckoutSession.
|
|
1399
1423
|
*/
|
|
@@ -1450,6 +1474,8 @@ declare module 'stripe' {
|
|
|
1450
1474
|
enabled?: boolean;
|
|
1451
1475
|
}
|
|
1452
1476
|
|
|
1477
|
+
type RequestDecrementalAuthorization = 'if_available' | 'never';
|
|
1478
|
+
|
|
1453
1479
|
type RequestExtendedAuthorization = 'if_available' | 'never';
|
|
1454
1480
|
|
|
1455
1481
|
type RequestIncrementalAuthorization = 'if_available' | 'never';
|
|
@@ -1828,6 +1854,11 @@ declare module 'stripe' {
|
|
|
1828
1854
|
*/
|
|
1829
1855
|
reference?: string;
|
|
1830
1856
|
|
|
1857
|
+
/**
|
|
1858
|
+
* 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.
|
|
1859
|
+
*/
|
|
1860
|
+
reference_id?: string;
|
|
1861
|
+
|
|
1831
1862
|
/**
|
|
1832
1863
|
* The risk correlation ID for an on-session payment using a saved PayPal payment method.
|
|
1833
1864
|
*/
|
|
@@ -1845,6 +1876,11 @@ declare module 'stripe' {
|
|
|
1845
1876
|
* 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`.
|
|
1846
1877
|
*/
|
|
1847
1878
|
setup_future_usage?: Stripe.Emptyable<Paypal.SetupFutureUsage>;
|
|
1879
|
+
|
|
1880
|
+
/**
|
|
1881
|
+
* 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.
|
|
1882
|
+
*/
|
|
1883
|
+
subsellers?: Array<string>;
|
|
1848
1884
|
}
|
|
1849
1885
|
|
|
1850
1886
|
namespace Paypal {
|
|
@@ -1874,6 +1910,92 @@ declare module 'stripe' {
|
|
|
1874
1910
|
type SetupFutureUsage = 'none' | 'off_session';
|
|
1875
1911
|
}
|
|
1876
1912
|
|
|
1913
|
+
interface Payto {
|
|
1914
|
+
/**
|
|
1915
|
+
* Additional fields for Mandate creation
|
|
1916
|
+
*/
|
|
1917
|
+
mandate_options?: Payto.MandateOptions;
|
|
1918
|
+
|
|
1919
|
+
/**
|
|
1920
|
+
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
|
1921
|
+
*
|
|
1922
|
+
* 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.
|
|
1923
|
+
*
|
|
1924
|
+
* 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.
|
|
1925
|
+
*
|
|
1926
|
+
* 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).
|
|
1927
|
+
*/
|
|
1928
|
+
setup_future_usage?: Payto.SetupFutureUsage;
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
namespace Payto {
|
|
1932
|
+
interface MandateOptions {
|
|
1933
|
+
/**
|
|
1934
|
+
* Amount that will be collected. It is required when `amount_type` is `fixed`.
|
|
1935
|
+
*/
|
|
1936
|
+
amount?: number;
|
|
1937
|
+
|
|
1938
|
+
/**
|
|
1939
|
+
* 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.
|
|
1940
|
+
*/
|
|
1941
|
+
amount_type?: MandateOptions.AmountType;
|
|
1942
|
+
|
|
1943
|
+
/**
|
|
1944
|
+
* Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.
|
|
1945
|
+
*/
|
|
1946
|
+
end_date?: string;
|
|
1947
|
+
|
|
1948
|
+
/**
|
|
1949
|
+
* The periodicity at which payments will be collected.
|
|
1950
|
+
*/
|
|
1951
|
+
payment_schedule?: MandateOptions.PaymentSchedule;
|
|
1952
|
+
|
|
1953
|
+
/**
|
|
1954
|
+
* 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.
|
|
1955
|
+
*/
|
|
1956
|
+
payments_per_period?: number;
|
|
1957
|
+
|
|
1958
|
+
/**
|
|
1959
|
+
* The purpose for which payments are made. Defaults to retail.
|
|
1960
|
+
*/
|
|
1961
|
+
purpose?: MandateOptions.Purpose;
|
|
1962
|
+
|
|
1963
|
+
/**
|
|
1964
|
+
* Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.
|
|
1965
|
+
*/
|
|
1966
|
+
start_date?: string;
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
namespace MandateOptions {
|
|
1970
|
+
type AmountType = 'fixed' | 'maximum';
|
|
1971
|
+
|
|
1972
|
+
type PaymentSchedule =
|
|
1973
|
+
| 'adhoc'
|
|
1974
|
+
| 'annual'
|
|
1975
|
+
| 'daily'
|
|
1976
|
+
| 'fortnightly'
|
|
1977
|
+
| 'monthly'
|
|
1978
|
+
| 'quarterly'
|
|
1979
|
+
| 'semi_annual'
|
|
1980
|
+
| 'weekly';
|
|
1981
|
+
|
|
1982
|
+
type Purpose =
|
|
1983
|
+
| 'dependant_support'
|
|
1984
|
+
| 'government'
|
|
1985
|
+
| 'loan'
|
|
1986
|
+
| 'mortgage'
|
|
1987
|
+
| 'other'
|
|
1988
|
+
| 'pension'
|
|
1989
|
+
| 'personal'
|
|
1990
|
+
| 'retail'
|
|
1991
|
+
| 'salary'
|
|
1992
|
+
| 'tax'
|
|
1993
|
+
| 'utility';
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
type SetupFutureUsage = 'none' | 'off_session';
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1877
1999
|
interface Pix {
|
|
1878
2000
|
/**
|
|
1879
2001
|
* The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
|
|
@@ -1992,7 +2114,11 @@ declare module 'stripe' {
|
|
|
1992
2114
|
| 'payment_method'
|
|
1993
2115
|
| 'transactions';
|
|
1994
2116
|
|
|
1995
|
-
type Prefetch =
|
|
2117
|
+
type Prefetch =
|
|
2118
|
+
| 'balances'
|
|
2119
|
+
| 'inferred_balances'
|
|
2120
|
+
| 'ownership'
|
|
2121
|
+
| 'transactions';
|
|
1996
2122
|
}
|
|
1997
2123
|
|
|
1998
2124
|
type SetupFutureUsage = 'none' | 'off_session' | 'on_session';
|
|
@@ -2046,6 +2172,7 @@ declare module 'stripe' {
|
|
|
2046
2172
|
| 'eps'
|
|
2047
2173
|
| 'fpx'
|
|
2048
2174
|
| 'giropay'
|
|
2175
|
+
| 'gopay'
|
|
2049
2176
|
| 'grabpay'
|
|
2050
2177
|
| 'ideal'
|
|
2051
2178
|
| 'kakao_pay'
|
|
@@ -2053,6 +2180,7 @@ declare module 'stripe' {
|
|
|
2053
2180
|
| 'konbini'
|
|
2054
2181
|
| 'kr_card'
|
|
2055
2182
|
| 'link'
|
|
2183
|
+
| 'mb_way'
|
|
2056
2184
|
| 'mobilepay'
|
|
2057
2185
|
| 'multibanco'
|
|
2058
2186
|
| 'naver_pay'
|
|
@@ -2061,11 +2189,15 @@ declare module 'stripe' {
|
|
|
2061
2189
|
| 'payco'
|
|
2062
2190
|
| 'paynow'
|
|
2063
2191
|
| 'paypal'
|
|
2192
|
+
| 'payto'
|
|
2064
2193
|
| 'pix'
|
|
2065
2194
|
| 'promptpay'
|
|
2195
|
+
| 'qris'
|
|
2196
|
+
| 'rechnung'
|
|
2066
2197
|
| 'revolut_pay'
|
|
2067
2198
|
| 'samsung_pay'
|
|
2068
2199
|
| 'sepa_debit'
|
|
2200
|
+
| 'shopeepay'
|
|
2069
2201
|
| 'sofort'
|
|
2070
2202
|
| 'swish'
|
|
2071
2203
|
| 'twint'
|
|
@@ -2073,6 +2205,41 @@ declare module 'stripe' {
|
|
|
2073
2205
|
| 'wechat_pay'
|
|
2074
2206
|
| 'zip';
|
|
2075
2207
|
|
|
2208
|
+
interface Permissions {
|
|
2209
|
+
/**
|
|
2210
|
+
* Permissions for updating the Checkout Session.
|
|
2211
|
+
*/
|
|
2212
|
+
update?: Permissions.Update;
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
namespace Permissions {
|
|
2216
|
+
interface Update {
|
|
2217
|
+
/**
|
|
2218
|
+
* Determines which entity is allowed to update the line items.
|
|
2219
|
+
*
|
|
2220
|
+
* 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.
|
|
2221
|
+
*
|
|
2222
|
+
* 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.
|
|
2223
|
+
*/
|
|
2224
|
+
line_items?: Update.LineItems;
|
|
2225
|
+
|
|
2226
|
+
/**
|
|
2227
|
+
* Determines which entity is allowed to update the shipping details.
|
|
2228
|
+
*
|
|
2229
|
+
* 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.
|
|
2230
|
+
*
|
|
2231
|
+
* 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.
|
|
2232
|
+
*/
|
|
2233
|
+
shipping_details?: Update.ShippingDetails;
|
|
2234
|
+
}
|
|
2235
|
+
|
|
2236
|
+
namespace Update {
|
|
2237
|
+
type LineItems = 'client_only' | 'server_only';
|
|
2238
|
+
|
|
2239
|
+
type ShippingDetails = 'client_only' | 'server_only';
|
|
2240
|
+
}
|
|
2241
|
+
}
|
|
2242
|
+
|
|
2076
2243
|
interface PhoneNumberCollection {
|
|
2077
2244
|
/**
|
|
2078
2245
|
* Set to `true` to enable phone number collection.
|
|
@@ -2654,7 +2821,7 @@ declare module 'stripe' {
|
|
|
2654
2821
|
type Required = 'if_supported' | 'never';
|
|
2655
2822
|
}
|
|
2656
2823
|
|
|
2657
|
-
type UiMode = 'embedded' | 'hosted';
|
|
2824
|
+
type UiMode = 'custom' | 'embedded' | 'hosted';
|
|
2658
2825
|
}
|
|
2659
2826
|
|
|
2660
2827
|
interface SessionRetrieveParams {
|
|
@@ -2665,15 +2832,290 @@ declare module 'stripe' {
|
|
|
2665
2832
|
}
|
|
2666
2833
|
|
|
2667
2834
|
interface SessionUpdateParams {
|
|
2835
|
+
/**
|
|
2836
|
+
* Information about the customer collected within the Checkout Session.
|
|
2837
|
+
*/
|
|
2838
|
+
collected_information?: SessionUpdateParams.CollectedInformation;
|
|
2839
|
+
|
|
2668
2840
|
/**
|
|
2669
2841
|
* Specifies which fields in the response should be expanded.
|
|
2670
2842
|
*/
|
|
2671
2843
|
expand?: Array<string>;
|
|
2672
2844
|
|
|
2845
|
+
/**
|
|
2846
|
+
* A list of items the customer is purchasing.
|
|
2847
|
+
*
|
|
2848
|
+
* When updating line items, the entire array of line items must be retransmitted.
|
|
2849
|
+
*
|
|
2850
|
+
* To retain an existing line item, specify its `id`.
|
|
2851
|
+
*
|
|
2852
|
+
* To update an existing line item, specify its `id` along with the new values of the fields to be updated.
|
|
2853
|
+
*
|
|
2854
|
+
* To add a new line item, specify a `price` and `quantity`. Recurring prices are not supported yet.
|
|
2855
|
+
*
|
|
2856
|
+
* To remove an existing line item, omit the line item's ID from the retransmitted array.
|
|
2857
|
+
*
|
|
2858
|
+
* To reorder a line item, specify it at the desired position in the retransmitted array.
|
|
2859
|
+
*/
|
|
2860
|
+
line_items?: Array<SessionUpdateParams.LineItem>;
|
|
2861
|
+
|
|
2673
2862
|
/**
|
|
2674
2863
|
* 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`.
|
|
2675
2864
|
*/
|
|
2676
2865
|
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
2866
|
+
|
|
2867
|
+
/**
|
|
2868
|
+
* The shipping rate options to apply to this Session. Up to a maximum of 5.
|
|
2869
|
+
*/
|
|
2870
|
+
shipping_options?: Stripe.Emptyable<
|
|
2871
|
+
Array<SessionUpdateParams.ShippingOption>
|
|
2872
|
+
>;
|
|
2873
|
+
}
|
|
2874
|
+
|
|
2875
|
+
namespace SessionUpdateParams {
|
|
2876
|
+
interface CollectedInformation {
|
|
2877
|
+
/**
|
|
2878
|
+
* The shipping details to apply to this Session.
|
|
2879
|
+
*/
|
|
2880
|
+
shipping_details?: CollectedInformation.ShippingDetails;
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2883
|
+
namespace CollectedInformation {
|
|
2884
|
+
interface ShippingDetails {
|
|
2885
|
+
/**
|
|
2886
|
+
* The address of the customer
|
|
2887
|
+
*/
|
|
2888
|
+
address: ShippingDetails.Address;
|
|
2889
|
+
|
|
2890
|
+
/**
|
|
2891
|
+
* The name of customer
|
|
2892
|
+
*/
|
|
2893
|
+
name: string;
|
|
2894
|
+
}
|
|
2895
|
+
|
|
2896
|
+
namespace ShippingDetails {
|
|
2897
|
+
interface Address {
|
|
2898
|
+
/**
|
|
2899
|
+
* City, district, suburb, town, or village.
|
|
2900
|
+
*/
|
|
2901
|
+
city?: string;
|
|
2902
|
+
|
|
2903
|
+
/**
|
|
2904
|
+
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
2905
|
+
*/
|
|
2906
|
+
country: string;
|
|
2907
|
+
|
|
2908
|
+
/**
|
|
2909
|
+
* Address line 1 (e.g., street, PO Box, or company name).
|
|
2910
|
+
*/
|
|
2911
|
+
line1: string;
|
|
2912
|
+
|
|
2913
|
+
/**
|
|
2914
|
+
* Address line 2 (e.g., apartment, suite, unit, or building).
|
|
2915
|
+
*/
|
|
2916
|
+
line2?: string;
|
|
2917
|
+
|
|
2918
|
+
/**
|
|
2919
|
+
* ZIP or postal code.
|
|
2920
|
+
*/
|
|
2921
|
+
postal_code?: string;
|
|
2922
|
+
|
|
2923
|
+
/**
|
|
2924
|
+
* State, county, province, or region.
|
|
2925
|
+
*/
|
|
2926
|
+
state?: string;
|
|
2927
|
+
}
|
|
2928
|
+
}
|
|
2929
|
+
}
|
|
2930
|
+
|
|
2931
|
+
interface LineItem {
|
|
2932
|
+
/**
|
|
2933
|
+
* When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout.
|
|
2934
|
+
*/
|
|
2935
|
+
adjustable_quantity?: LineItem.AdjustableQuantity;
|
|
2936
|
+
|
|
2937
|
+
/**
|
|
2938
|
+
* ID of an existing line item.
|
|
2939
|
+
*/
|
|
2940
|
+
id?: string;
|
|
2941
|
+
|
|
2942
|
+
/**
|
|
2943
|
+
* 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`.
|
|
2944
|
+
*/
|
|
2945
|
+
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
2946
|
+
|
|
2947
|
+
/**
|
|
2948
|
+
* The ID of the [Price](https://stripe.com/docs/api/prices).
|
|
2949
|
+
*/
|
|
2950
|
+
price?: string;
|
|
2951
|
+
|
|
2952
|
+
/**
|
|
2953
|
+
* The quantity of the line item being purchased.
|
|
2954
|
+
*/
|
|
2955
|
+
quantity?: number;
|
|
2956
|
+
|
|
2957
|
+
/**
|
|
2958
|
+
* The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
|
|
2959
|
+
*/
|
|
2960
|
+
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
2961
|
+
}
|
|
2962
|
+
|
|
2963
|
+
namespace LineItem {
|
|
2964
|
+
interface AdjustableQuantity {
|
|
2965
|
+
/**
|
|
2966
|
+
* Set to true if the quantity can be adjusted to any positive integer. Setting to false will remove any previously specified constraints on quantity.
|
|
2967
|
+
*/
|
|
2968
|
+
enabled: boolean;
|
|
2969
|
+
|
|
2970
|
+
/**
|
|
2971
|
+
* 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.
|
|
2972
|
+
*/
|
|
2973
|
+
maximum?: number;
|
|
2974
|
+
|
|
2975
|
+
/**
|
|
2976
|
+
* The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0.
|
|
2977
|
+
*/
|
|
2978
|
+
minimum?: number;
|
|
2979
|
+
}
|
|
2980
|
+
}
|
|
2981
|
+
|
|
2982
|
+
interface ShippingOption {
|
|
2983
|
+
/**
|
|
2984
|
+
* The ID of the Shipping Rate to use for this shipping option.
|
|
2985
|
+
*/
|
|
2986
|
+
shipping_rate?: string;
|
|
2987
|
+
|
|
2988
|
+
/**
|
|
2989
|
+
* Parameters to be passed to Shipping Rate creation for this shipping option.
|
|
2990
|
+
*/
|
|
2991
|
+
shipping_rate_data?: ShippingOption.ShippingRateData;
|
|
2992
|
+
}
|
|
2993
|
+
|
|
2994
|
+
namespace ShippingOption {
|
|
2995
|
+
interface ShippingRateData {
|
|
2996
|
+
/**
|
|
2997
|
+
* The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
|
|
2998
|
+
*/
|
|
2999
|
+
delivery_estimate?: ShippingRateData.DeliveryEstimate;
|
|
3000
|
+
|
|
3001
|
+
/**
|
|
3002
|
+
* The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
|
|
3003
|
+
*/
|
|
3004
|
+
display_name: string;
|
|
3005
|
+
|
|
3006
|
+
/**
|
|
3007
|
+
* Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
|
|
3008
|
+
*/
|
|
3009
|
+
fixed_amount?: ShippingRateData.FixedAmount;
|
|
3010
|
+
|
|
3011
|
+
/**
|
|
3012
|
+
* 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`.
|
|
3013
|
+
*/
|
|
3014
|
+
metadata?: Stripe.MetadataParam;
|
|
3015
|
+
|
|
3016
|
+
/**
|
|
3017
|
+
* Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
|
|
3018
|
+
*/
|
|
3019
|
+
tax_behavior?: ShippingRateData.TaxBehavior;
|
|
3020
|
+
|
|
3021
|
+
/**
|
|
3022
|
+
* A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
|
|
3023
|
+
*/
|
|
3024
|
+
tax_code?: string;
|
|
3025
|
+
|
|
3026
|
+
/**
|
|
3027
|
+
* The type of calculation to use on the shipping rate.
|
|
3028
|
+
*/
|
|
3029
|
+
type?: 'fixed_amount';
|
|
3030
|
+
}
|
|
3031
|
+
|
|
3032
|
+
namespace ShippingRateData {
|
|
3033
|
+
interface DeliveryEstimate {
|
|
3034
|
+
/**
|
|
3035
|
+
* The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
|
|
3036
|
+
*/
|
|
3037
|
+
maximum?: DeliveryEstimate.Maximum;
|
|
3038
|
+
|
|
3039
|
+
/**
|
|
3040
|
+
* The lower bound of the estimated range. If empty, represents no lower bound.
|
|
3041
|
+
*/
|
|
3042
|
+
minimum?: DeliveryEstimate.Minimum;
|
|
3043
|
+
}
|
|
3044
|
+
|
|
3045
|
+
namespace DeliveryEstimate {
|
|
3046
|
+
interface Maximum {
|
|
3047
|
+
/**
|
|
3048
|
+
* A unit of time.
|
|
3049
|
+
*/
|
|
3050
|
+
unit: Maximum.Unit;
|
|
3051
|
+
|
|
3052
|
+
/**
|
|
3053
|
+
* Must be greater than 0.
|
|
3054
|
+
*/
|
|
3055
|
+
value: number;
|
|
3056
|
+
}
|
|
3057
|
+
|
|
3058
|
+
namespace Maximum {
|
|
3059
|
+
type Unit = 'business_day' | 'day' | 'hour' | 'month' | 'week';
|
|
3060
|
+
}
|
|
3061
|
+
|
|
3062
|
+
interface Minimum {
|
|
3063
|
+
/**
|
|
3064
|
+
* A unit of time.
|
|
3065
|
+
*/
|
|
3066
|
+
unit: Minimum.Unit;
|
|
3067
|
+
|
|
3068
|
+
/**
|
|
3069
|
+
* Must be greater than 0.
|
|
3070
|
+
*/
|
|
3071
|
+
value: number;
|
|
3072
|
+
}
|
|
3073
|
+
|
|
3074
|
+
namespace Minimum {
|
|
3075
|
+
type Unit = 'business_day' | 'day' | 'hour' | 'month' | 'week';
|
|
3076
|
+
}
|
|
3077
|
+
}
|
|
3078
|
+
|
|
3079
|
+
interface FixedAmount {
|
|
3080
|
+
/**
|
|
3081
|
+
* A non-negative integer in cents representing how much to charge.
|
|
3082
|
+
*/
|
|
3083
|
+
amount: number;
|
|
3084
|
+
|
|
3085
|
+
/**
|
|
3086
|
+
* 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).
|
|
3087
|
+
*/
|
|
3088
|
+
currency: string;
|
|
3089
|
+
|
|
3090
|
+
/**
|
|
3091
|
+
* 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).
|
|
3092
|
+
*/
|
|
3093
|
+
currency_options?: {
|
|
3094
|
+
[key: string]: FixedAmount.CurrencyOptions;
|
|
3095
|
+
};
|
|
3096
|
+
}
|
|
3097
|
+
|
|
3098
|
+
namespace FixedAmount {
|
|
3099
|
+
interface CurrencyOptions {
|
|
3100
|
+
/**
|
|
3101
|
+
* A non-negative integer in cents representing how much to charge.
|
|
3102
|
+
*/
|
|
3103
|
+
amount: number;
|
|
3104
|
+
|
|
3105
|
+
/**
|
|
3106
|
+
* Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
|
|
3107
|
+
*/
|
|
3108
|
+
tax_behavior?: CurrencyOptions.TaxBehavior;
|
|
3109
|
+
}
|
|
3110
|
+
|
|
3111
|
+
namespace CurrencyOptions {
|
|
3112
|
+
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
3113
|
+
}
|
|
3114
|
+
}
|
|
3115
|
+
|
|
3116
|
+
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
3117
|
+
}
|
|
3118
|
+
}
|
|
2677
3119
|
}
|
|
2678
3120
|
|
|
2679
3121
|
interface SessionListParams extends PaginationParams {
|