stripe 17.7.0 → 18.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +139 -0
- package/OPENAPI_VERSION +1 -1
- package/VERSION +1 -1
- package/cjs/apiVersion.js +1 -1
- package/cjs/resources/InvoicePayments.js +17 -0
- package/cjs/resources/Invoices.js +0 -9
- package/cjs/resources/SubscriptionItems.js +0 -9
- package/cjs/resources.js +4 -2
- package/cjs/stripe.core.js +3 -14
- package/esm/apiVersion.js +1 -1
- package/esm/resources/InvoicePayments.js +14 -0
- package/esm/resources/Invoices.js +0 -9
- package/esm/resources/SubscriptionItems.js +0 -9
- package/esm/resources.js +1 -0
- package/esm/stripe.core.js +3 -14
- package/package.json +1 -1
- package/types/Accounts.d.ts +47 -6
- package/types/AccountsResource.d.ts +110 -3
- package/types/ApplicationFees.d.ts +1 -1
- package/types/BalanceTransactions.d.ts +3 -1
- package/types/BalanceTransactionsResource.d.ts +1 -1
- package/types/BankAccounts.d.ts +9 -1
- package/types/Billing/CreditBalanceSummaryResource.d.ts +2 -2
- package/types/Billing/CreditGrants.d.ts +2 -2
- package/types/Billing/CreditGrantsResource.d.ts +2 -2
- package/types/Billing/Meters.d.ts +1 -1
- package/types/Billing/MetersResource.d.ts +2 -2
- package/types/Capabilities.d.ts +8 -0
- package/types/Cards.d.ts +1 -4
- package/types/Charges.d.ts +56 -5
- package/types/ChargesResource.d.ts +1 -1
- package/types/Checkout/Sessions.d.ts +77 -53
- package/types/Checkout/SessionsResource.d.ts +232 -15
- package/types/ConfirmationTokens.d.ts +50 -0
- package/types/CreditNoteLineItems.d.ts +24 -22
- package/types/CreditNotes.d.ts +39 -15
- package/types/CreditNotesResource.d.ts +48 -12
- package/types/CustomerBalanceTransactions.d.ts +8 -1
- package/types/Customers.d.ts +3 -3
- package/types/CustomersResource.d.ts +3 -14
- package/types/EventTypes.d.ts +138 -2
- package/types/Events.d.ts +9 -1
- package/types/Identity/VerificationSessions.d.ts +1 -1
- package/types/Identity/VerificationSessionsResource.d.ts +1 -1
- package/types/InvoiceItems.d.ts +60 -26
- package/types/InvoiceItemsResource.d.ts +26 -22
- package/types/InvoiceLineItems.d.ts +160 -70
- package/types/InvoicePayments.d.ts +99 -0
- package/types/InvoicePaymentsResource.d.ts +74 -0
- package/types/Invoices.d.ts +97 -83
- package/types/InvoicesResource.d.ts +239 -2846
- package/types/Issuing/Authorizations.d.ts +2 -1
- package/types/Issuing/AuthorizationsResource.d.ts +1 -1
- package/types/Mandates.d.ts +8 -0
- package/types/PaymentIntents.d.ts +59 -8
- package/types/PaymentIntentsResource.d.ts +293 -8
- package/types/PaymentLinks.d.ts +49 -0
- package/types/PaymentLinksResource.d.ts +77 -0
- package/types/PaymentMethodConfigurations.d.ts +108 -0
- package/types/PaymentMethodConfigurationsResource.d.ts +150 -0
- package/types/PaymentMethodDomainsResource.d.ts +6 -6
- package/types/PaymentMethods.d.ts +50 -0
- package/types/PaymentMethodsResource.d.ts +54 -16
- package/types/Persons.d.ts +17 -9
- package/types/Plans.d.ts +0 -7
- package/types/PlansResource.d.ts +0 -7
- package/types/Prices.d.ts +0 -11
- package/types/PricesResource.d.ts +2 -13
- package/types/QuotesResource.d.ts +2 -2
- package/types/Refunds.d.ts +18 -0
- package/types/Reviews.d.ts +3 -2
- package/types/SetupAttempts.d.ts +15 -0
- package/types/SetupIntents.d.ts +2 -0
- package/types/SetupIntentsResource.d.ts +155 -0
- package/types/SubscriptionItems.d.ts +9 -13
- package/types/SubscriptionItemsResource.d.ts +2 -94
- package/types/SubscriptionSchedules.d.ts +0 -51
- package/types/SubscriptionSchedulesResource.d.ts +4 -110
- package/types/Subscriptions.d.ts +3 -33
- package/types/SubscriptionsResource.d.ts +8 -86
- package/types/Tax/Calculations.d.ts +1 -1
- package/types/Tax/RegistrationsResource.d.ts +1 -1
- package/types/TaxRates.d.ts +1 -1
- package/types/Terminal/Configurations.d.ts +86 -3
- package/types/Terminal/ConfigurationsResource.d.ts +192 -2
- package/types/TestHelpers/ConfirmationTokensResource.d.ts +51 -0
- package/types/TokensResource.d.ts +6 -1
- package/types/Treasury/FinancialAccountsResource.d.ts +1 -1
- package/types/V2/Core/EventDestinationsResource.d.ts +0 -5
- package/types/V2/Core/EventsResource.d.ts +0 -5
- package/types/V2/EventDestinations.d.ts +1 -1
- package/types/V2/Events.d.ts +1 -1
- package/types/WebhookEndpointsResource.d.ts +21 -3
- package/types/index.d.ts +3 -3
- package/types/lib.d.ts +1 -1
- package/types/test/typescriptTest.ts +3 -6
- package/types/Deprecations.d.ts +0 -215
- package/types/UsageRecordSummaries.d.ts +0 -56
- package/types/UsageRecords.d.ts +0 -45
|
@@ -99,6 +99,8 @@ declare module 'stripe' {
|
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion.
|
|
102
|
+
*
|
|
103
|
+
* Single-use mandates are only valid for the following payment methods: `acss_debit`, `alipay`, `au_becs_debit`, `bacs_debit`, `bancontact`, `boleto`, `ideal`, `link`, `sepa_debit`, and `us_bank_account`.
|
|
102
104
|
*/
|
|
103
105
|
single_use?: SetupIntentCreateParams.SingleUse;
|
|
104
106
|
|
|
@@ -234,6 +236,11 @@ declare module 'stripe' {
|
|
|
234
236
|
*/
|
|
235
237
|
bancontact?: PaymentMethodData.Bancontact;
|
|
236
238
|
|
|
239
|
+
/**
|
|
240
|
+
* If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
|
|
241
|
+
*/
|
|
242
|
+
billie?: PaymentMethodData.Billie;
|
|
243
|
+
|
|
237
244
|
/**
|
|
238
245
|
* Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
|
|
239
246
|
*/
|
|
@@ -334,6 +341,11 @@ declare module 'stripe' {
|
|
|
334
341
|
*/
|
|
335
342
|
naver_pay?: PaymentMethodData.NaverPay;
|
|
336
343
|
|
|
344
|
+
/**
|
|
345
|
+
* If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
|
|
346
|
+
*/
|
|
347
|
+
nz_bank_account?: PaymentMethodData.NzBankAccount;
|
|
348
|
+
|
|
337
349
|
/**
|
|
338
350
|
* If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
|
|
339
351
|
*/
|
|
@@ -389,6 +401,11 @@ declare module 'stripe' {
|
|
|
389
401
|
*/
|
|
390
402
|
samsung_pay?: PaymentMethodData.SamsungPay;
|
|
391
403
|
|
|
404
|
+
/**
|
|
405
|
+
* If this is a `satispay` PaymentMethod, this hash contains details about the satispay payment method.
|
|
406
|
+
*/
|
|
407
|
+
satispay?: PaymentMethodData.Satispay;
|
|
408
|
+
|
|
392
409
|
/**
|
|
393
410
|
* If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
|
|
394
411
|
*/
|
|
@@ -486,6 +503,8 @@ declare module 'stripe' {
|
|
|
486
503
|
|
|
487
504
|
interface Bancontact {}
|
|
488
505
|
|
|
506
|
+
interface Billie {}
|
|
507
|
+
|
|
489
508
|
interface BillingDetails {
|
|
490
509
|
/**
|
|
491
510
|
* Billing address.
|
|
@@ -682,6 +701,35 @@ declare module 'stripe' {
|
|
|
682
701
|
type Funding = 'card' | 'points';
|
|
683
702
|
}
|
|
684
703
|
|
|
704
|
+
interface NzBankAccount {
|
|
705
|
+
/**
|
|
706
|
+
* The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details.
|
|
707
|
+
*/
|
|
708
|
+
account_holder_name?: string;
|
|
709
|
+
|
|
710
|
+
/**
|
|
711
|
+
* The account number for the bank account.
|
|
712
|
+
*/
|
|
713
|
+
account_number: string;
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* The numeric code for the bank account's bank.
|
|
717
|
+
*/
|
|
718
|
+
bank_code: string;
|
|
719
|
+
|
|
720
|
+
/**
|
|
721
|
+
* The numeric code for the bank account's bank branch.
|
|
722
|
+
*/
|
|
723
|
+
branch_code: string;
|
|
724
|
+
|
|
725
|
+
reference?: string;
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* The suffix of the bank account number.
|
|
729
|
+
*/
|
|
730
|
+
suffix: string;
|
|
731
|
+
}
|
|
732
|
+
|
|
685
733
|
interface Oxxo {}
|
|
686
734
|
|
|
687
735
|
interface P24 {
|
|
@@ -744,6 +792,8 @@ declare module 'stripe' {
|
|
|
744
792
|
|
|
745
793
|
interface SamsungPay {}
|
|
746
794
|
|
|
795
|
+
interface Satispay {}
|
|
796
|
+
|
|
747
797
|
interface SepaDebit {
|
|
748
798
|
/**
|
|
749
799
|
* IBAN of the bank account.
|
|
@@ -776,6 +826,7 @@ declare module 'stripe' {
|
|
|
776
826
|
| 'au_becs_debit'
|
|
777
827
|
| 'bacs_debit'
|
|
778
828
|
| 'bancontact'
|
|
829
|
+
| 'billie'
|
|
779
830
|
| 'blik'
|
|
780
831
|
| 'boleto'
|
|
781
832
|
| 'cashapp'
|
|
@@ -793,6 +844,7 @@ declare module 'stripe' {
|
|
|
793
844
|
| 'mobilepay'
|
|
794
845
|
| 'multibanco'
|
|
795
846
|
| 'naver_pay'
|
|
847
|
+
| 'nz_bank_account'
|
|
796
848
|
| 'oxxo'
|
|
797
849
|
| 'p24'
|
|
798
850
|
| 'pay_by_bank'
|
|
@@ -803,6 +855,7 @@ declare module 'stripe' {
|
|
|
803
855
|
| 'promptpay'
|
|
804
856
|
| 'revolut_pay'
|
|
805
857
|
| 'samsung_pay'
|
|
858
|
+
| 'satispay'
|
|
806
859
|
| 'sepa_debit'
|
|
807
860
|
| 'sofort'
|
|
808
861
|
| 'swish'
|
|
@@ -1437,6 +1490,11 @@ declare module 'stripe' {
|
|
|
1437
1490
|
*/
|
|
1438
1491
|
bancontact?: PaymentMethodData.Bancontact;
|
|
1439
1492
|
|
|
1493
|
+
/**
|
|
1494
|
+
* If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
|
|
1495
|
+
*/
|
|
1496
|
+
billie?: PaymentMethodData.Billie;
|
|
1497
|
+
|
|
1440
1498
|
/**
|
|
1441
1499
|
* Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
|
|
1442
1500
|
*/
|
|
@@ -1537,6 +1595,11 @@ declare module 'stripe' {
|
|
|
1537
1595
|
*/
|
|
1538
1596
|
naver_pay?: PaymentMethodData.NaverPay;
|
|
1539
1597
|
|
|
1598
|
+
/**
|
|
1599
|
+
* If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
|
|
1600
|
+
*/
|
|
1601
|
+
nz_bank_account?: PaymentMethodData.NzBankAccount;
|
|
1602
|
+
|
|
1540
1603
|
/**
|
|
1541
1604
|
* If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
|
|
1542
1605
|
*/
|
|
@@ -1592,6 +1655,11 @@ declare module 'stripe' {
|
|
|
1592
1655
|
*/
|
|
1593
1656
|
samsung_pay?: PaymentMethodData.SamsungPay;
|
|
1594
1657
|
|
|
1658
|
+
/**
|
|
1659
|
+
* If this is a `satispay` PaymentMethod, this hash contains details about the satispay payment method.
|
|
1660
|
+
*/
|
|
1661
|
+
satispay?: PaymentMethodData.Satispay;
|
|
1662
|
+
|
|
1595
1663
|
/**
|
|
1596
1664
|
* If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
|
|
1597
1665
|
*/
|
|
@@ -1689,6 +1757,8 @@ declare module 'stripe' {
|
|
|
1689
1757
|
|
|
1690
1758
|
interface Bancontact {}
|
|
1691
1759
|
|
|
1760
|
+
interface Billie {}
|
|
1761
|
+
|
|
1692
1762
|
interface BillingDetails {
|
|
1693
1763
|
/**
|
|
1694
1764
|
* Billing address.
|
|
@@ -1885,6 +1955,35 @@ declare module 'stripe' {
|
|
|
1885
1955
|
type Funding = 'card' | 'points';
|
|
1886
1956
|
}
|
|
1887
1957
|
|
|
1958
|
+
interface NzBankAccount {
|
|
1959
|
+
/**
|
|
1960
|
+
* The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details.
|
|
1961
|
+
*/
|
|
1962
|
+
account_holder_name?: string;
|
|
1963
|
+
|
|
1964
|
+
/**
|
|
1965
|
+
* The account number for the bank account.
|
|
1966
|
+
*/
|
|
1967
|
+
account_number: string;
|
|
1968
|
+
|
|
1969
|
+
/**
|
|
1970
|
+
* The numeric code for the bank account's bank.
|
|
1971
|
+
*/
|
|
1972
|
+
bank_code: string;
|
|
1973
|
+
|
|
1974
|
+
/**
|
|
1975
|
+
* The numeric code for the bank account's bank branch.
|
|
1976
|
+
*/
|
|
1977
|
+
branch_code: string;
|
|
1978
|
+
|
|
1979
|
+
reference?: string;
|
|
1980
|
+
|
|
1981
|
+
/**
|
|
1982
|
+
* The suffix of the bank account number.
|
|
1983
|
+
*/
|
|
1984
|
+
suffix: string;
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1888
1987
|
interface Oxxo {}
|
|
1889
1988
|
|
|
1890
1989
|
interface P24 {
|
|
@@ -1947,6 +2046,8 @@ declare module 'stripe' {
|
|
|
1947
2046
|
|
|
1948
2047
|
interface SamsungPay {}
|
|
1949
2048
|
|
|
2049
|
+
interface Satispay {}
|
|
2050
|
+
|
|
1950
2051
|
interface SepaDebit {
|
|
1951
2052
|
/**
|
|
1952
2053
|
* IBAN of the bank account.
|
|
@@ -1979,6 +2080,7 @@ declare module 'stripe' {
|
|
|
1979
2080
|
| 'au_becs_debit'
|
|
1980
2081
|
| 'bacs_debit'
|
|
1981
2082
|
| 'bancontact'
|
|
2083
|
+
| 'billie'
|
|
1982
2084
|
| 'blik'
|
|
1983
2085
|
| 'boleto'
|
|
1984
2086
|
| 'cashapp'
|
|
@@ -1996,6 +2098,7 @@ declare module 'stripe' {
|
|
|
1996
2098
|
| 'mobilepay'
|
|
1997
2099
|
| 'multibanco'
|
|
1998
2100
|
| 'naver_pay'
|
|
2101
|
+
| 'nz_bank_account'
|
|
1999
2102
|
| 'oxxo'
|
|
2000
2103
|
| 'p24'
|
|
2001
2104
|
| 'pay_by_bank'
|
|
@@ -2006,6 +2109,7 @@ declare module 'stripe' {
|
|
|
2006
2109
|
| 'promptpay'
|
|
2007
2110
|
| 'revolut_pay'
|
|
2008
2111
|
| 'samsung_pay'
|
|
2112
|
+
| 'satispay'
|
|
2009
2113
|
| 'sepa_debit'
|
|
2010
2114
|
| 'sofort'
|
|
2011
2115
|
| 'swish'
|
|
@@ -2689,6 +2793,11 @@ declare module 'stripe' {
|
|
|
2689
2793
|
*/
|
|
2690
2794
|
bancontact?: PaymentMethodData.Bancontact;
|
|
2691
2795
|
|
|
2796
|
+
/**
|
|
2797
|
+
* If this is a `billie` PaymentMethod, this hash contains details about the billie payment method.
|
|
2798
|
+
*/
|
|
2799
|
+
billie?: PaymentMethodData.Billie;
|
|
2800
|
+
|
|
2692
2801
|
/**
|
|
2693
2802
|
* Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
|
|
2694
2803
|
*/
|
|
@@ -2789,6 +2898,11 @@ declare module 'stripe' {
|
|
|
2789
2898
|
*/
|
|
2790
2899
|
naver_pay?: PaymentMethodData.NaverPay;
|
|
2791
2900
|
|
|
2901
|
+
/**
|
|
2902
|
+
* If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
|
|
2903
|
+
*/
|
|
2904
|
+
nz_bank_account?: PaymentMethodData.NzBankAccount;
|
|
2905
|
+
|
|
2792
2906
|
/**
|
|
2793
2907
|
* If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
|
|
2794
2908
|
*/
|
|
@@ -2844,6 +2958,11 @@ declare module 'stripe' {
|
|
|
2844
2958
|
*/
|
|
2845
2959
|
samsung_pay?: PaymentMethodData.SamsungPay;
|
|
2846
2960
|
|
|
2961
|
+
/**
|
|
2962
|
+
* If this is a `satispay` PaymentMethod, this hash contains details about the satispay payment method.
|
|
2963
|
+
*/
|
|
2964
|
+
satispay?: PaymentMethodData.Satispay;
|
|
2965
|
+
|
|
2847
2966
|
/**
|
|
2848
2967
|
* If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
|
|
2849
2968
|
*/
|
|
@@ -2941,6 +3060,8 @@ declare module 'stripe' {
|
|
|
2941
3060
|
|
|
2942
3061
|
interface Bancontact {}
|
|
2943
3062
|
|
|
3063
|
+
interface Billie {}
|
|
3064
|
+
|
|
2944
3065
|
interface BillingDetails {
|
|
2945
3066
|
/**
|
|
2946
3067
|
* Billing address.
|
|
@@ -3137,6 +3258,35 @@ declare module 'stripe' {
|
|
|
3137
3258
|
type Funding = 'card' | 'points';
|
|
3138
3259
|
}
|
|
3139
3260
|
|
|
3261
|
+
interface NzBankAccount {
|
|
3262
|
+
/**
|
|
3263
|
+
* The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details.
|
|
3264
|
+
*/
|
|
3265
|
+
account_holder_name?: string;
|
|
3266
|
+
|
|
3267
|
+
/**
|
|
3268
|
+
* The account number for the bank account.
|
|
3269
|
+
*/
|
|
3270
|
+
account_number: string;
|
|
3271
|
+
|
|
3272
|
+
/**
|
|
3273
|
+
* The numeric code for the bank account's bank.
|
|
3274
|
+
*/
|
|
3275
|
+
bank_code: string;
|
|
3276
|
+
|
|
3277
|
+
/**
|
|
3278
|
+
* The numeric code for the bank account's bank branch.
|
|
3279
|
+
*/
|
|
3280
|
+
branch_code: string;
|
|
3281
|
+
|
|
3282
|
+
reference?: string;
|
|
3283
|
+
|
|
3284
|
+
/**
|
|
3285
|
+
* The suffix of the bank account number.
|
|
3286
|
+
*/
|
|
3287
|
+
suffix: string;
|
|
3288
|
+
}
|
|
3289
|
+
|
|
3140
3290
|
interface Oxxo {}
|
|
3141
3291
|
|
|
3142
3292
|
interface P24 {
|
|
@@ -3199,6 +3349,8 @@ declare module 'stripe' {
|
|
|
3199
3349
|
|
|
3200
3350
|
interface SamsungPay {}
|
|
3201
3351
|
|
|
3352
|
+
interface Satispay {}
|
|
3353
|
+
|
|
3202
3354
|
interface SepaDebit {
|
|
3203
3355
|
/**
|
|
3204
3356
|
* IBAN of the bank account.
|
|
@@ -3231,6 +3383,7 @@ declare module 'stripe' {
|
|
|
3231
3383
|
| 'au_becs_debit'
|
|
3232
3384
|
| 'bacs_debit'
|
|
3233
3385
|
| 'bancontact'
|
|
3386
|
+
| 'billie'
|
|
3234
3387
|
| 'blik'
|
|
3235
3388
|
| 'boleto'
|
|
3236
3389
|
| 'cashapp'
|
|
@@ -3248,6 +3401,7 @@ declare module 'stripe' {
|
|
|
3248
3401
|
| 'mobilepay'
|
|
3249
3402
|
| 'multibanco'
|
|
3250
3403
|
| 'naver_pay'
|
|
3404
|
+
| 'nz_bank_account'
|
|
3251
3405
|
| 'oxxo'
|
|
3252
3406
|
| 'p24'
|
|
3253
3407
|
| 'pay_by_bank'
|
|
@@ -3258,6 +3412,7 @@ declare module 'stripe' {
|
|
|
3258
3412
|
| 'promptpay'
|
|
3259
3413
|
| 'revolut_pay'
|
|
3260
3414
|
| 'samsung_pay'
|
|
3415
|
+
| 'satispay'
|
|
3261
3416
|
| 'sepa_debit'
|
|
3262
3417
|
| 'sofort'
|
|
3263
3418
|
| 'swish'
|
|
@@ -38,14 +38,19 @@ declare module 'stripe' {
|
|
|
38
38
|
object: 'subscription_item';
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
created: number;
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* The end time of this subscription item's current billing period.
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
current_period_end: number;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The start time of this subscription item's current billing period.
|
|
52
|
+
*/
|
|
53
|
+
current_period_start: number;
|
|
49
54
|
|
|
50
55
|
/**
|
|
51
56
|
* Always true for a deleted object
|
|
@@ -99,14 +104,5 @@ declare module 'stripe' {
|
|
|
99
104
|
*/
|
|
100
105
|
tax_rates: Array<Stripe.TaxRate> | null;
|
|
101
106
|
}
|
|
102
|
-
|
|
103
|
-
namespace SubscriptionItem {
|
|
104
|
-
interface BillingThresholds {
|
|
105
|
-
/**
|
|
106
|
-
* Usage threshold that triggers the subscription to create an invoice
|
|
107
|
-
*/
|
|
108
|
-
usage_gte: number | null;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
107
|
}
|
|
112
108
|
}
|
|
@@ -8,13 +8,6 @@ declare module 'stripe' {
|
|
|
8
8
|
*/
|
|
9
9
|
subscription: string;
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
|
|
13
|
-
*/
|
|
14
|
-
billing_thresholds?: Stripe.Emptyable<
|
|
15
|
-
SubscriptionItemCreateParams.BillingThresholds
|
|
16
|
-
>;
|
|
17
|
-
|
|
18
11
|
/**
|
|
19
12
|
* The coupons to redeem into discounts for the subscription item.
|
|
20
13
|
*/
|
|
@@ -80,13 +73,6 @@ declare module 'stripe' {
|
|
|
80
73
|
}
|
|
81
74
|
|
|
82
75
|
namespace SubscriptionItemCreateParams {
|
|
83
|
-
interface BillingThresholds {
|
|
84
|
-
/**
|
|
85
|
-
* Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
|
|
86
|
-
*/
|
|
87
|
-
usage_gte: number;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
76
|
interface Discount {
|
|
91
77
|
/**
|
|
92
78
|
* ID of the coupon to create a new discount for.
|
|
@@ -117,7 +103,7 @@ declare module 'stripe' {
|
|
|
117
103
|
currency: string;
|
|
118
104
|
|
|
119
105
|
/**
|
|
120
|
-
* The ID of the
|
|
106
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
121
107
|
*/
|
|
122
108
|
product: string;
|
|
123
109
|
|
|
@@ -173,13 +159,6 @@ declare module 'stripe' {
|
|
|
173
159
|
}
|
|
174
160
|
|
|
175
161
|
interface SubscriptionItemUpdateParams {
|
|
176
|
-
/**
|
|
177
|
-
* Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
|
|
178
|
-
*/
|
|
179
|
-
billing_thresholds?: Stripe.Emptyable<
|
|
180
|
-
SubscriptionItemUpdateParams.BillingThresholds
|
|
181
|
-
>;
|
|
182
|
-
|
|
183
162
|
/**
|
|
184
163
|
* The coupons to redeem into discounts for the subscription item.
|
|
185
164
|
*/
|
|
@@ -250,13 +229,6 @@ declare module 'stripe' {
|
|
|
250
229
|
}
|
|
251
230
|
|
|
252
231
|
namespace SubscriptionItemUpdateParams {
|
|
253
|
-
interface BillingThresholds {
|
|
254
|
-
/**
|
|
255
|
-
* Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
|
|
256
|
-
*/
|
|
257
|
-
usage_gte: number;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
232
|
interface Discount {
|
|
261
233
|
/**
|
|
262
234
|
* ID of the coupon to create a new discount for.
|
|
@@ -287,7 +259,7 @@ declare module 'stripe' {
|
|
|
287
259
|
currency: string;
|
|
288
260
|
|
|
289
261
|
/**
|
|
290
|
-
* The ID of the
|
|
262
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
291
263
|
*/
|
|
292
264
|
product: string;
|
|
293
265
|
|
|
@@ -368,40 +340,6 @@ declare module 'stripe' {
|
|
|
368
340
|
type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
|
|
369
341
|
}
|
|
370
342
|
|
|
371
|
-
interface SubscriptionItemCreateUsageRecordParams {
|
|
372
|
-
/**
|
|
373
|
-
* The usage quantity for the specified timestamp.
|
|
374
|
-
*/
|
|
375
|
-
quantity: number;
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value.
|
|
379
|
-
*/
|
|
380
|
-
action?: SubscriptionItemCreateUsageRecordParams.Action;
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Specifies which fields in the response should be expanded.
|
|
384
|
-
*/
|
|
385
|
-
expand?: Array<string>;
|
|
386
|
-
|
|
387
|
-
/**
|
|
388
|
-
* The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided.
|
|
389
|
-
*/
|
|
390
|
-
timestamp?: 'now' | number;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
namespace SubscriptionItemCreateUsageRecordParams {
|
|
394
|
-
type Action = 'increment' | 'set';
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
interface SubscriptionItemListUsageRecordSummariesParams
|
|
398
|
-
extends PaginationParams {
|
|
399
|
-
/**
|
|
400
|
-
* Specifies which fields in the response should be expanded.
|
|
401
|
-
*/
|
|
402
|
-
expand?: Array<string>;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
343
|
class SubscriptionItemsResource {
|
|
406
344
|
/**
|
|
407
345
|
* Adds a new item to an existing subscription. No existing items will be changed or replaced.
|
|
@@ -453,36 +391,6 @@ declare module 'stripe' {
|
|
|
453
391
|
id: string,
|
|
454
392
|
options?: RequestOptions
|
|
455
393
|
): Promise<Stripe.Response<Stripe.DeletedSubscriptionItem>>;
|
|
456
|
-
|
|
457
|
-
/**
|
|
458
|
-
* Creates a usage record for a specified subscription item and date, and fills it with a quantity.
|
|
459
|
-
*
|
|
460
|
-
* Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the [metered billing](https://stripe.com/docs/billing/subscriptions/metered-billing) plan, Stripe helps you send accurate invoices to your customers.
|
|
461
|
-
*
|
|
462
|
-
* The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan's aggregate_usage [parameter](https://stripe.com/docs/api/plans/create#create_plan-aggregate_usage). When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.
|
|
463
|
-
*
|
|
464
|
-
* The default pricing model for metered billing is [per-unit pricing. For finer granularity, you can configure metered billing to have a <a href="https://stripe.com/docs/billing/subscriptions/tiers">tiered pricing](https://stripe.com/docs/api/plans/object#plan_object-billing_scheme) model.
|
|
465
|
-
*/
|
|
466
|
-
createUsageRecord(
|
|
467
|
-
id: string,
|
|
468
|
-
params: SubscriptionItemCreateUsageRecordParams,
|
|
469
|
-
options?: RequestOptions
|
|
470
|
-
): Promise<Stripe.Response<Stripe.UsageRecord>>;
|
|
471
|
-
|
|
472
|
-
/**
|
|
473
|
-
* For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that's been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).
|
|
474
|
-
*
|
|
475
|
-
* The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn't ended yet. Since new usage records can still be added, the returned summary information for the subscription item's ID should be seen as unstable until the subscription billing period ends.
|
|
476
|
-
*/
|
|
477
|
-
listUsageRecordSummaries(
|
|
478
|
-
id: string,
|
|
479
|
-
params?: SubscriptionItemListUsageRecordSummariesParams,
|
|
480
|
-
options?: RequestOptions
|
|
481
|
-
): ApiListPromise<Stripe.UsageRecordSummary>;
|
|
482
|
-
listUsageRecordSummaries(
|
|
483
|
-
id: string,
|
|
484
|
-
options?: RequestOptions
|
|
485
|
-
): ApiListPromise<Stripe.UsageRecordSummary>;
|
|
486
394
|
}
|
|
487
395
|
}
|
|
488
396
|
}
|
|
@@ -126,11 +126,6 @@ declare module 'stripe' {
|
|
|
126
126
|
*/
|
|
127
127
|
billing_cycle_anchor: DefaultSettings.BillingCycleAnchor;
|
|
128
128
|
|
|
129
|
-
/**
|
|
130
|
-
* Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
|
|
131
|
-
*/
|
|
132
|
-
billing_thresholds: DefaultSettings.BillingThresholds | null;
|
|
133
|
-
|
|
134
129
|
/**
|
|
135
130
|
* Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
|
|
136
131
|
*/
|
|
@@ -197,18 +192,6 @@ declare module 'stripe' {
|
|
|
197
192
|
|
|
198
193
|
type BillingCycleAnchor = 'automatic' | 'phase_start';
|
|
199
194
|
|
|
200
|
-
interface BillingThresholds {
|
|
201
|
-
/**
|
|
202
|
-
* Monetary threshold that triggers the subscription to create an invoice
|
|
203
|
-
*/
|
|
204
|
-
amount_gte: number | null;
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
|
|
208
|
-
*/
|
|
209
|
-
reset_billing_cycle_anchor: boolean | null;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
195
|
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
213
196
|
|
|
214
197
|
interface InvoiceSettings {
|
|
@@ -278,21 +261,11 @@ declare module 'stripe' {
|
|
|
278
261
|
*/
|
|
279
262
|
billing_cycle_anchor: Phase.BillingCycleAnchor | null;
|
|
280
263
|
|
|
281
|
-
/**
|
|
282
|
-
* Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
|
|
283
|
-
*/
|
|
284
|
-
billing_thresholds: Phase.BillingThresholds | null;
|
|
285
|
-
|
|
286
264
|
/**
|
|
287
265
|
* Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
|
|
288
266
|
*/
|
|
289
267
|
collection_method: Phase.CollectionMethod | null;
|
|
290
268
|
|
|
291
|
-
/**
|
|
292
|
-
* ID of the coupon to use during this phase of the subscription schedule.
|
|
293
|
-
*/
|
|
294
|
-
coupon: string | Stripe.Coupon | Stripe.DeletedCoupon | null;
|
|
295
|
-
|
|
296
269
|
/**
|
|
297
270
|
* 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).
|
|
298
271
|
*/
|
|
@@ -443,18 +416,6 @@ declare module 'stripe' {
|
|
|
443
416
|
|
|
444
417
|
type BillingCycleAnchor = 'automatic' | 'phase_start';
|
|
445
418
|
|
|
446
|
-
interface BillingThresholds {
|
|
447
|
-
/**
|
|
448
|
-
* Monetary threshold that triggers the subscription to create an invoice
|
|
449
|
-
*/
|
|
450
|
-
amount_gte: number | null;
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`.
|
|
454
|
-
*/
|
|
455
|
-
reset_billing_cycle_anchor: boolean | null;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
419
|
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
459
420
|
|
|
460
421
|
interface Discount {
|
|
@@ -512,11 +473,6 @@ declare module 'stripe' {
|
|
|
512
473
|
}
|
|
513
474
|
|
|
514
475
|
interface Item {
|
|
515
|
-
/**
|
|
516
|
-
* Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period
|
|
517
|
-
*/
|
|
518
|
-
billing_thresholds: Item.BillingThresholds | null;
|
|
519
|
-
|
|
520
476
|
/**
|
|
521
477
|
* The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount.
|
|
522
478
|
*/
|
|
@@ -549,13 +505,6 @@ declare module 'stripe' {
|
|
|
549
505
|
}
|
|
550
506
|
|
|
551
507
|
namespace Item {
|
|
552
|
-
interface BillingThresholds {
|
|
553
|
-
/**
|
|
554
|
-
* Usage threshold that triggers the subscription to create an invoice
|
|
555
|
-
*/
|
|
556
|
-
usage_gte: number | null;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
508
|
interface Discount {
|
|
560
509
|
/**
|
|
561
510
|
* ID of the coupon to create a new discount for.
|