stripe 17.2.1 → 17.3.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 +925 -114
- 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/Margins.js +22 -0
- package/cjs/resources/Orders.js +24 -0
- package/cjs/resources/PaymentIntents.js +4 -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/TestHelpers/Issuing/Cards.js +4 -0
- package/cjs/resources.js +42 -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/Margins.js +19 -0
- package/esm/resources/Orders.js +21 -0
- package/esm/resources/PaymentIntents.js +4 -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/TestHelpers/Issuing/Cards.js +4 -0
- package/esm/resources.js +29 -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 +75 -5
- package/types/AccountSessionsResource.d.ts +354 -5
- package/types/Accounts.d.ts +211 -3
- package/types/AccountsResource.d.ts +584 -2
- package/types/Billing/CreditBalanceSummary.d.ts +4 -4
- package/types/Billing/CreditBalanceSummaryResource.d.ts +2 -2
- package/types/Billing/CreditBalanceTransactions.d.ts +10 -10
- package/types/Billing/CreditGrants.d.ts +11 -8
- package/types/Billing/CreditGrantsResource.d.ts +6 -6
- package/types/Billing/MeterErrorReports.d.ts +106 -0
- package/types/Billing/Meters.d.ts +2 -0
- package/types/BillingPortal/Configurations.d.ts +22 -0
- package/types/BillingPortal/ConfigurationsResource.d.ts +56 -4
- 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 +168 -0
- package/types/ChargesResource.d.ts +1294 -0
- package/types/Checkout/Sessions.d.ts +309 -5
- package/types/Checkout/SessionsResource.d.ts +360 -5
- package/types/ConfirmationTokens.d.ts +157 -0
- package/types/Coupons.d.ts +1 -1
- package/types/CouponsResource.d.ts +1 -1
- package/types/CreditNoteLineItems.d.ts +3 -0
- package/types/CreditNotes.d.ts +24 -0
- package/types/CreditNotesResource.d.ts +54 -3
- package/types/CustomersResource.d.ts +27 -3
- package/types/Disputes.d.ts +152 -0
- package/types/DisputesResource.d.ts +120 -0
- package/types/EventTypes.d.ts +564 -2
- package/types/Events.d.ts +91 -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/Forwarding/Requests.d.ts +5 -0
- package/types/Forwarding/RequestsResource.d.ts +5 -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 +31 -1
- package/types/InvoicePayments.d.ts +138 -0
- package/types/Invoices.d.ts +139 -3
- package/types/InvoicesResource.d.ts +5488 -1799
- package/types/Issuing/CardholdersResource.d.ts +2 -1
- package/types/Issuing/CardsResource.d.ts +1 -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/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 +7 -0
- package/types/Mandates.d.ts +85 -0
- package/types/Margins.d.ts +56 -0
- package/types/MarginsResource.d.ts +114 -0
- package/types/Orders.d.ts +1154 -0
- package/types/OrdersResource.d.ts +2911 -0
- package/types/PaymentIntents.d.ts +697 -1
- package/types/PaymentIntentsResource.d.ts +7977 -3377
- package/types/PaymentLinks.d.ts +7 -0
- package/types/PaymentLinksResource.d.ts +14 -0
- package/types/PaymentMethodConfigurations.d.ts +72 -0
- package/types/PaymentMethodConfigurationsResource.d.ts +102 -2
- package/types/PaymentMethodDomains.d.ts +28 -0
- package/types/PaymentMethods.d.ts +157 -0
- package/types/PaymentMethodsResource.d.ts +195 -1
- package/types/Persons.d.ts +1 -1
- 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 +1601 -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 +4 -0
- package/types/SetupAttempts.d.ts +19 -0
- package/types/SetupIntents.d.ts +112 -1
- package/types/SetupIntentsResource.d.ts +768 -6
- 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 +87 -1
- package/types/SubscriptionsResource.d.ts +359 -4
- package/types/Tax/Associations.d.ts +126 -0
- package/types/Tax/AssociationsResource.d.ts +29 -0
- package/types/Tax/CalculationLineItems.d.ts +1 -0
- package/types/Tax/Calculations.d.ts +33 -1
- package/types/Tax/CalculationsResource.d.ts +7 -1
- package/types/Tax/Forms.d.ts +220 -0
- package/types/Tax/FormsResource.d.ts +107 -0
- package/types/Tax/Registrations.d.ts +82 -0
- package/types/Tax/RegistrationsResource.d.ts +109 -0
- package/types/Tax/Transactions.d.ts +8 -1
- package/types/TaxIds.d.ts +7 -1
- package/types/TaxIdsResource.d.ts +7 -1
- package/types/TaxRates.d.ts +25 -0
- package/types/TaxRatesResource.d.ts +2 -0
- package/types/Terminal/Configurations.d.ts +19 -0
- package/types/Terminal/ConfigurationsResource.d.ts +44 -0
- 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 +145 -1
- package/types/TestHelpers/Issuing/CardsResource.d.ts +22 -0
- package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +26 -0
- package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +26 -0
- package/types/TokensResource.d.ts +2 -2
- package/types/Treasury/FinancialAccountFeatures.d.ts +7 -0
- package/types/Treasury/FinancialAccounts.d.ts +6 -1
- 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/UsageRecordSummaries.d.ts +1 -1
- package/types/WebhookEndpointsResource.d.ts +66 -0
- package/types/index.d.ts +53 -0
|
@@ -25,7 +25,7 @@ declare module 'stripe' {
|
|
|
25
25
|
billing_address_collection?: SessionCreateParams.BillingAddressCollection;
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* 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`.
|
|
28
|
+
* 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`.
|
|
29
29
|
*/
|
|
30
30
|
cancel_url?: string;
|
|
31
31
|
|
|
@@ -187,6 +187,13 @@ declare module 'stripe' {
|
|
|
187
187
|
*/
|
|
188
188
|
payment_method_types?: Array<SessionCreateParams.PaymentMethodType>;
|
|
189
189
|
|
|
190
|
+
/**
|
|
191
|
+
* This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
|
|
192
|
+
*
|
|
193
|
+
* For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`.
|
|
194
|
+
*/
|
|
195
|
+
permissions?: SessionCreateParams.Permissions;
|
|
196
|
+
|
|
190
197
|
/**
|
|
191
198
|
* Controls phone number collection settings for the session.
|
|
192
199
|
*
|
|
@@ -202,7 +209,7 @@ declare module 'stripe' {
|
|
|
202
209
|
|
|
203
210
|
/**
|
|
204
211
|
* The URL to redirect your customer back to after they authenticate or cancel their payment on the
|
|
205
|
-
* payment method's app or site. This parameter is required if ui_mode is `embedded`
|
|
212
|
+
* payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom`
|
|
206
213
|
* and redirect-based payment methods are enabled on the session.
|
|
207
214
|
*/
|
|
208
215
|
return_url?: string;
|
|
@@ -242,7 +249,7 @@ declare module 'stripe' {
|
|
|
242
249
|
/**
|
|
243
250
|
* The URL to which Stripe should send customers when payment or setup
|
|
244
251
|
* is complete.
|
|
245
|
-
* This parameter is not allowed if ui_mode is `embedded`. If you'd like to use
|
|
252
|
+
* This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use
|
|
246
253
|
* information from the successful Checkout Session on your page, read the
|
|
247
254
|
* guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page).
|
|
248
255
|
*/
|
|
@@ -1113,6 +1120,11 @@ declare module 'stripe' {
|
|
|
1113
1120
|
*/
|
|
1114
1121
|
paypal?: PaymentMethodOptions.Paypal;
|
|
1115
1122
|
|
|
1123
|
+
/**
|
|
1124
|
+
* contains details about the PayTo payment method options.
|
|
1125
|
+
*/
|
|
1126
|
+
payto?: PaymentMethodOptions.Payto;
|
|
1127
|
+
|
|
1116
1128
|
/**
|
|
1117
1129
|
* contains details about the Pix payment method options.
|
|
1118
1130
|
*/
|
|
@@ -1683,6 +1695,11 @@ declare module 'stripe' {
|
|
|
1683
1695
|
*/
|
|
1684
1696
|
reference?: string;
|
|
1685
1697
|
|
|
1698
|
+
/**
|
|
1699
|
+
* 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.
|
|
1700
|
+
*/
|
|
1701
|
+
reference_id?: string;
|
|
1702
|
+
|
|
1686
1703
|
/**
|
|
1687
1704
|
* The risk correlation ID for an on-session payment using a saved PayPal payment method.
|
|
1688
1705
|
*/
|
|
@@ -1700,6 +1717,11 @@ declare module 'stripe' {
|
|
|
1700
1717
|
* 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`.
|
|
1701
1718
|
*/
|
|
1702
1719
|
setup_future_usage?: Stripe.Emptyable<Paypal.SetupFutureUsage>;
|
|
1720
|
+
|
|
1721
|
+
/**
|
|
1722
|
+
* 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.
|
|
1723
|
+
*/
|
|
1724
|
+
subsellers?: Array<string>;
|
|
1703
1725
|
}
|
|
1704
1726
|
|
|
1705
1727
|
namespace Paypal {
|
|
@@ -1729,6 +1751,92 @@ declare module 'stripe' {
|
|
|
1729
1751
|
type SetupFutureUsage = 'none' | 'off_session';
|
|
1730
1752
|
}
|
|
1731
1753
|
|
|
1754
|
+
interface Payto {
|
|
1755
|
+
/**
|
|
1756
|
+
* Additional fields for Mandate creation
|
|
1757
|
+
*/
|
|
1758
|
+
mandate_options?: Payto.MandateOptions;
|
|
1759
|
+
|
|
1760
|
+
/**
|
|
1761
|
+
* Indicates that you intend to make future payments with this PaymentIntent's payment method.
|
|
1762
|
+
*
|
|
1763
|
+
* 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.
|
|
1764
|
+
*
|
|
1765
|
+
* 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.
|
|
1766
|
+
*
|
|
1767
|
+
* 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).
|
|
1768
|
+
*/
|
|
1769
|
+
setup_future_usage?: Payto.SetupFutureUsage;
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
namespace Payto {
|
|
1773
|
+
interface MandateOptions {
|
|
1774
|
+
/**
|
|
1775
|
+
* Amount that will be collected. It is required when `amount_type` is `fixed`.
|
|
1776
|
+
*/
|
|
1777
|
+
amount?: number;
|
|
1778
|
+
|
|
1779
|
+
/**
|
|
1780
|
+
* 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.
|
|
1781
|
+
*/
|
|
1782
|
+
amount_type?: MandateOptions.AmountType;
|
|
1783
|
+
|
|
1784
|
+
/**
|
|
1785
|
+
* Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date.
|
|
1786
|
+
*/
|
|
1787
|
+
end_date?: string;
|
|
1788
|
+
|
|
1789
|
+
/**
|
|
1790
|
+
* The periodicity at which payments will be collected.
|
|
1791
|
+
*/
|
|
1792
|
+
payment_schedule?: MandateOptions.PaymentSchedule;
|
|
1793
|
+
|
|
1794
|
+
/**
|
|
1795
|
+
* 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.
|
|
1796
|
+
*/
|
|
1797
|
+
payments_per_period?: number;
|
|
1798
|
+
|
|
1799
|
+
/**
|
|
1800
|
+
* The purpose for which payments are made. Defaults to retail.
|
|
1801
|
+
*/
|
|
1802
|
+
purpose?: MandateOptions.Purpose;
|
|
1803
|
+
|
|
1804
|
+
/**
|
|
1805
|
+
* Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time.
|
|
1806
|
+
*/
|
|
1807
|
+
start_date?: string;
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
namespace MandateOptions {
|
|
1811
|
+
type AmountType = 'fixed' | 'maximum';
|
|
1812
|
+
|
|
1813
|
+
type PaymentSchedule =
|
|
1814
|
+
| 'adhoc'
|
|
1815
|
+
| 'annual'
|
|
1816
|
+
| 'daily'
|
|
1817
|
+
| 'fortnightly'
|
|
1818
|
+
| 'monthly'
|
|
1819
|
+
| 'quarterly'
|
|
1820
|
+
| 'semi_annual'
|
|
1821
|
+
| 'weekly';
|
|
1822
|
+
|
|
1823
|
+
type Purpose =
|
|
1824
|
+
| 'dependant_support'
|
|
1825
|
+
| 'government'
|
|
1826
|
+
| 'loan'
|
|
1827
|
+
| 'mortgage'
|
|
1828
|
+
| 'other'
|
|
1829
|
+
| 'pension'
|
|
1830
|
+
| 'personal'
|
|
1831
|
+
| 'retail'
|
|
1832
|
+
| 'salary'
|
|
1833
|
+
| 'tax'
|
|
1834
|
+
| 'utility';
|
|
1835
|
+
}
|
|
1836
|
+
|
|
1837
|
+
type SetupFutureUsage = 'none' | 'off_session';
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1732
1840
|
interface Pix {
|
|
1733
1841
|
/**
|
|
1734
1842
|
* The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds.
|
|
@@ -1833,7 +1941,11 @@ declare module 'stripe' {
|
|
|
1833
1941
|
| 'payment_method'
|
|
1834
1942
|
| 'transactions';
|
|
1835
1943
|
|
|
1836
|
-
type Prefetch =
|
|
1944
|
+
type Prefetch =
|
|
1945
|
+
| 'balances'
|
|
1946
|
+
| 'inferred_balances'
|
|
1947
|
+
| 'ownership'
|
|
1948
|
+
| 'transactions';
|
|
1837
1949
|
}
|
|
1838
1950
|
|
|
1839
1951
|
type SetupFutureUsage = 'none' | 'off_session' | 'on_session';
|
|
@@ -1874,6 +1986,7 @@ declare module 'stripe' {
|
|
|
1874
1986
|
| 'affirm'
|
|
1875
1987
|
| 'afterpay_clearpay'
|
|
1876
1988
|
| 'alipay'
|
|
1989
|
+
| 'alma'
|
|
1877
1990
|
| 'amazon_pay'
|
|
1878
1991
|
| 'au_becs_debit'
|
|
1879
1992
|
| 'bacs_debit'
|
|
@@ -1886,21 +1999,32 @@ declare module 'stripe' {
|
|
|
1886
1999
|
| 'eps'
|
|
1887
2000
|
| 'fpx'
|
|
1888
2001
|
| 'giropay'
|
|
2002
|
+
| 'gopay'
|
|
1889
2003
|
| 'grabpay'
|
|
1890
2004
|
| 'ideal'
|
|
2005
|
+
| 'kakao_pay'
|
|
1891
2006
|
| 'klarna'
|
|
1892
2007
|
| 'konbini'
|
|
2008
|
+
| 'kr_card'
|
|
1893
2009
|
| 'link'
|
|
2010
|
+
| 'mb_way'
|
|
1894
2011
|
| 'mobilepay'
|
|
1895
2012
|
| 'multibanco'
|
|
2013
|
+
| 'naver_pay'
|
|
1896
2014
|
| 'oxxo'
|
|
1897
2015
|
| 'p24'
|
|
2016
|
+
| 'payco'
|
|
1898
2017
|
| 'paynow'
|
|
1899
2018
|
| 'paypal'
|
|
2019
|
+
| 'payto'
|
|
1900
2020
|
| 'pix'
|
|
1901
2021
|
| 'promptpay'
|
|
2022
|
+
| 'qris'
|
|
2023
|
+
| 'rechnung'
|
|
1902
2024
|
| 'revolut_pay'
|
|
2025
|
+
| 'samsung_pay'
|
|
1903
2026
|
| 'sepa_debit'
|
|
2027
|
+
| 'shopeepay'
|
|
1904
2028
|
| 'sofort'
|
|
1905
2029
|
| 'swish'
|
|
1906
2030
|
| 'twint'
|
|
@@ -1908,6 +2032,30 @@ declare module 'stripe' {
|
|
|
1908
2032
|
| 'wechat_pay'
|
|
1909
2033
|
| 'zip';
|
|
1910
2034
|
|
|
2035
|
+
interface Permissions {
|
|
2036
|
+
/**
|
|
2037
|
+
* Permissions for updating the Checkout Session.
|
|
2038
|
+
*/
|
|
2039
|
+
update?: Permissions.Update;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
namespace Permissions {
|
|
2043
|
+
interface Update {
|
|
2044
|
+
/**
|
|
2045
|
+
* Determines which entity is allowed to update the shipping details.
|
|
2046
|
+
*
|
|
2047
|
+
* 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.
|
|
2048
|
+
*
|
|
2049
|
+
* 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.
|
|
2050
|
+
*/
|
|
2051
|
+
shipping_details?: Update.ShippingDetails;
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
namespace Update {
|
|
2055
|
+
type ShippingDetails = 'client_only' | 'server_only';
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
|
|
1911
2059
|
interface PhoneNumberCollection {
|
|
1912
2060
|
/**
|
|
1913
2061
|
* Set to `true` to enable phone number collection.
|
|
@@ -2489,7 +2637,7 @@ declare module 'stripe' {
|
|
|
2489
2637
|
type Required = 'if_supported' | 'never';
|
|
2490
2638
|
}
|
|
2491
2639
|
|
|
2492
|
-
type UiMode = 'embedded' | 'hosted';
|
|
2640
|
+
type UiMode = 'custom' | 'embedded' | 'hosted';
|
|
2493
2641
|
}
|
|
2494
2642
|
|
|
2495
2643
|
interface SessionRetrieveParams {
|
|
@@ -2500,6 +2648,11 @@ declare module 'stripe' {
|
|
|
2500
2648
|
}
|
|
2501
2649
|
|
|
2502
2650
|
interface SessionUpdateParams {
|
|
2651
|
+
/**
|
|
2652
|
+
* Information about the customer collected within the Checkout Session.
|
|
2653
|
+
*/
|
|
2654
|
+
collected_information?: SessionUpdateParams.CollectedInformation;
|
|
2655
|
+
|
|
2503
2656
|
/**
|
|
2504
2657
|
* Specifies which fields in the response should be expanded.
|
|
2505
2658
|
*/
|
|
@@ -2509,6 +2662,208 @@ declare module 'stripe' {
|
|
|
2509
2662
|
* 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`.
|
|
2510
2663
|
*/
|
|
2511
2664
|
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
2665
|
+
|
|
2666
|
+
/**
|
|
2667
|
+
* The shipping rate options to apply to this Session. Up to a maximum of 5.
|
|
2668
|
+
*/
|
|
2669
|
+
shipping_options?: Stripe.Emptyable<
|
|
2670
|
+
Array<SessionUpdateParams.ShippingOption>
|
|
2671
|
+
>;
|
|
2672
|
+
}
|
|
2673
|
+
|
|
2674
|
+
namespace SessionUpdateParams {
|
|
2675
|
+
interface CollectedInformation {
|
|
2676
|
+
/**
|
|
2677
|
+
* The shipping details to apply to this Session.
|
|
2678
|
+
*/
|
|
2679
|
+
shipping_details?: CollectedInformation.ShippingDetails;
|
|
2680
|
+
}
|
|
2681
|
+
|
|
2682
|
+
namespace CollectedInformation {
|
|
2683
|
+
interface ShippingDetails {
|
|
2684
|
+
/**
|
|
2685
|
+
* The address of the customer
|
|
2686
|
+
*/
|
|
2687
|
+
address: ShippingDetails.Address;
|
|
2688
|
+
|
|
2689
|
+
/**
|
|
2690
|
+
* The name of customer
|
|
2691
|
+
*/
|
|
2692
|
+
name: string;
|
|
2693
|
+
}
|
|
2694
|
+
|
|
2695
|
+
namespace ShippingDetails {
|
|
2696
|
+
interface Address {
|
|
2697
|
+
/**
|
|
2698
|
+
* City, district, suburb, town, or village.
|
|
2699
|
+
*/
|
|
2700
|
+
city?: string;
|
|
2701
|
+
|
|
2702
|
+
/**
|
|
2703
|
+
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
2704
|
+
*/
|
|
2705
|
+
country: string;
|
|
2706
|
+
|
|
2707
|
+
/**
|
|
2708
|
+
* Address line 1 (e.g., street, PO Box, or company name).
|
|
2709
|
+
*/
|
|
2710
|
+
line1: string;
|
|
2711
|
+
|
|
2712
|
+
/**
|
|
2713
|
+
* Address line 2 (e.g., apartment, suite, unit, or building).
|
|
2714
|
+
*/
|
|
2715
|
+
line2?: string;
|
|
2716
|
+
|
|
2717
|
+
/**
|
|
2718
|
+
* ZIP or postal code.
|
|
2719
|
+
*/
|
|
2720
|
+
postal_code?: string;
|
|
2721
|
+
|
|
2722
|
+
/**
|
|
2723
|
+
* State, county, province, or region.
|
|
2724
|
+
*/
|
|
2725
|
+
state?: string;
|
|
2726
|
+
}
|
|
2727
|
+
}
|
|
2728
|
+
}
|
|
2729
|
+
|
|
2730
|
+
interface ShippingOption {
|
|
2731
|
+
/**
|
|
2732
|
+
* The ID of the Shipping Rate to use for this shipping option.
|
|
2733
|
+
*/
|
|
2734
|
+
shipping_rate?: string;
|
|
2735
|
+
|
|
2736
|
+
/**
|
|
2737
|
+
* Parameters to be passed to Shipping Rate creation for this shipping option.
|
|
2738
|
+
*/
|
|
2739
|
+
shipping_rate_data?: ShippingOption.ShippingRateData;
|
|
2740
|
+
}
|
|
2741
|
+
|
|
2742
|
+
namespace ShippingOption {
|
|
2743
|
+
interface ShippingRateData {
|
|
2744
|
+
/**
|
|
2745
|
+
* The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions.
|
|
2746
|
+
*/
|
|
2747
|
+
delivery_estimate?: ShippingRateData.DeliveryEstimate;
|
|
2748
|
+
|
|
2749
|
+
/**
|
|
2750
|
+
* The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions.
|
|
2751
|
+
*/
|
|
2752
|
+
display_name: string;
|
|
2753
|
+
|
|
2754
|
+
/**
|
|
2755
|
+
* Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`.
|
|
2756
|
+
*/
|
|
2757
|
+
fixed_amount?: ShippingRateData.FixedAmount;
|
|
2758
|
+
|
|
2759
|
+
/**
|
|
2760
|
+
* 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`.
|
|
2761
|
+
*/
|
|
2762
|
+
metadata?: Stripe.MetadataParam;
|
|
2763
|
+
|
|
2764
|
+
/**
|
|
2765
|
+
* Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
|
|
2766
|
+
*/
|
|
2767
|
+
tax_behavior?: ShippingRateData.TaxBehavior;
|
|
2768
|
+
|
|
2769
|
+
/**
|
|
2770
|
+
* A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`.
|
|
2771
|
+
*/
|
|
2772
|
+
tax_code?: string;
|
|
2773
|
+
|
|
2774
|
+
/**
|
|
2775
|
+
* The type of calculation to use on the shipping rate.
|
|
2776
|
+
*/
|
|
2777
|
+
type?: 'fixed_amount';
|
|
2778
|
+
}
|
|
2779
|
+
|
|
2780
|
+
namespace ShippingRateData {
|
|
2781
|
+
interface DeliveryEstimate {
|
|
2782
|
+
/**
|
|
2783
|
+
* The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite.
|
|
2784
|
+
*/
|
|
2785
|
+
maximum?: DeliveryEstimate.Maximum;
|
|
2786
|
+
|
|
2787
|
+
/**
|
|
2788
|
+
* The lower bound of the estimated range. If empty, represents no lower bound.
|
|
2789
|
+
*/
|
|
2790
|
+
minimum?: DeliveryEstimate.Minimum;
|
|
2791
|
+
}
|
|
2792
|
+
|
|
2793
|
+
namespace DeliveryEstimate {
|
|
2794
|
+
interface Maximum {
|
|
2795
|
+
/**
|
|
2796
|
+
* A unit of time.
|
|
2797
|
+
*/
|
|
2798
|
+
unit: Maximum.Unit;
|
|
2799
|
+
|
|
2800
|
+
/**
|
|
2801
|
+
* Must be greater than 0.
|
|
2802
|
+
*/
|
|
2803
|
+
value: number;
|
|
2804
|
+
}
|
|
2805
|
+
|
|
2806
|
+
namespace Maximum {
|
|
2807
|
+
type Unit = 'business_day' | 'day' | 'hour' | 'month' | 'week';
|
|
2808
|
+
}
|
|
2809
|
+
|
|
2810
|
+
interface Minimum {
|
|
2811
|
+
/**
|
|
2812
|
+
* A unit of time.
|
|
2813
|
+
*/
|
|
2814
|
+
unit: Minimum.Unit;
|
|
2815
|
+
|
|
2816
|
+
/**
|
|
2817
|
+
* Must be greater than 0.
|
|
2818
|
+
*/
|
|
2819
|
+
value: number;
|
|
2820
|
+
}
|
|
2821
|
+
|
|
2822
|
+
namespace Minimum {
|
|
2823
|
+
type Unit = 'business_day' | 'day' | 'hour' | 'month' | 'week';
|
|
2824
|
+
}
|
|
2825
|
+
}
|
|
2826
|
+
|
|
2827
|
+
interface FixedAmount {
|
|
2828
|
+
/**
|
|
2829
|
+
* A non-negative integer in cents representing how much to charge.
|
|
2830
|
+
*/
|
|
2831
|
+
amount: number;
|
|
2832
|
+
|
|
2833
|
+
/**
|
|
2834
|
+
* 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).
|
|
2835
|
+
*/
|
|
2836
|
+
currency: string;
|
|
2837
|
+
|
|
2838
|
+
/**
|
|
2839
|
+
* 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).
|
|
2840
|
+
*/
|
|
2841
|
+
currency_options?: {
|
|
2842
|
+
[key: string]: FixedAmount.CurrencyOptions;
|
|
2843
|
+
};
|
|
2844
|
+
}
|
|
2845
|
+
|
|
2846
|
+
namespace FixedAmount {
|
|
2847
|
+
interface CurrencyOptions {
|
|
2848
|
+
/**
|
|
2849
|
+
* A non-negative integer in cents representing how much to charge.
|
|
2850
|
+
*/
|
|
2851
|
+
amount: number;
|
|
2852
|
+
|
|
2853
|
+
/**
|
|
2854
|
+
* Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`.
|
|
2855
|
+
*/
|
|
2856
|
+
tax_behavior?: CurrencyOptions.TaxBehavior;
|
|
2857
|
+
}
|
|
2858
|
+
|
|
2859
|
+
namespace CurrencyOptions {
|
|
2860
|
+
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
2861
|
+
}
|
|
2862
|
+
}
|
|
2863
|
+
|
|
2864
|
+
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
2865
|
+
}
|
|
2866
|
+
}
|
|
2512
2867
|
}
|
|
2513
2868
|
|
|
2514
2869
|
interface SessionListParams extends PaginationParams {
|