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
|
@@ -518,11 +518,13 @@ declare module 'stripe' {
|
|
|
518
518
|
| 'ideal'
|
|
519
519
|
| 'jp_credit_transfer'
|
|
520
520
|
| 'kakao_pay'
|
|
521
|
+
| 'klarna'
|
|
521
522
|
| 'konbini'
|
|
522
523
|
| 'kr_card'
|
|
523
524
|
| 'link'
|
|
524
525
|
| 'multibanco'
|
|
525
526
|
| 'naver_pay'
|
|
527
|
+
| 'nz_bank_account'
|
|
526
528
|
| 'p24'
|
|
527
529
|
| 'payco'
|
|
528
530
|
| 'paynow'
|
|
@@ -1232,11 +1234,13 @@ declare module 'stripe' {
|
|
|
1232
1234
|
| 'ideal'
|
|
1233
1235
|
| 'jp_credit_transfer'
|
|
1234
1236
|
| 'kakao_pay'
|
|
1237
|
+
| 'klarna'
|
|
1235
1238
|
| 'konbini'
|
|
1236
1239
|
| 'kr_card'
|
|
1237
1240
|
| 'link'
|
|
1238
1241
|
| 'multibanco'
|
|
1239
1242
|
| 'naver_pay'
|
|
1243
|
+
| 'nz_bank_account'
|
|
1240
1244
|
| 'p24'
|
|
1241
1245
|
| 'payco'
|
|
1242
1246
|
| 'paynow'
|
|
@@ -1557,14 +1561,14 @@ declare module 'stripe' {
|
|
|
1557
1561
|
period?: Line.Period;
|
|
1558
1562
|
|
|
1559
1563
|
/**
|
|
1560
|
-
*
|
|
1564
|
+
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
|
|
1561
1565
|
*/
|
|
1562
|
-
|
|
1566
|
+
price_data?: Line.PriceData;
|
|
1563
1567
|
|
|
1564
1568
|
/**
|
|
1565
|
-
*
|
|
1569
|
+
* The pricing information for the invoice item.
|
|
1566
1570
|
*/
|
|
1567
|
-
|
|
1571
|
+
pricing?: Line.Pricing;
|
|
1568
1572
|
|
|
1569
1573
|
/**
|
|
1570
1574
|
* Non-negative integer. The quantity of units for the line item.
|
|
@@ -1619,12 +1623,12 @@ declare module 'stripe' {
|
|
|
1619
1623
|
currency: string;
|
|
1620
1624
|
|
|
1621
1625
|
/**
|
|
1622
|
-
* The ID of the
|
|
1626
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
|
|
1623
1627
|
*/
|
|
1624
1628
|
product?: string;
|
|
1625
1629
|
|
|
1626
1630
|
/**
|
|
1627
|
-
* Data used to generate a new
|
|
1631
|
+
* Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
|
|
1628
1632
|
*/
|
|
1629
1633
|
product_data?: PriceData.ProductData;
|
|
1630
1634
|
|
|
@@ -1675,6 +1679,13 @@ declare module 'stripe' {
|
|
|
1675
1679
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
1676
1680
|
}
|
|
1677
1681
|
|
|
1682
|
+
interface Pricing {
|
|
1683
|
+
/**
|
|
1684
|
+
* The ID of the price object.
|
|
1685
|
+
*/
|
|
1686
|
+
price?: string;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1678
1689
|
interface TaxAmount {
|
|
1679
1690
|
/**
|
|
1680
1691
|
* The amount, in cents (or local equivalent), of the tax.
|
|
@@ -1688,6 +1699,11 @@ declare module 'stripe' {
|
|
|
1688
1699
|
*/
|
|
1689
1700
|
tax_rate_data: TaxAmount.TaxRateData;
|
|
1690
1701
|
|
|
1702
|
+
/**
|
|
1703
|
+
* The reasoning behind this tax, for example, if the product is tax exempt.
|
|
1704
|
+
*/
|
|
1705
|
+
taxability_reason?: TaxAmount.TaxabilityReason;
|
|
1706
|
+
|
|
1691
1707
|
/**
|
|
1692
1708
|
* The amount on which tax is calculated, in cents (or local equivalent).
|
|
1693
1709
|
*/
|
|
@@ -1695,6 +1711,23 @@ declare module 'stripe' {
|
|
|
1695
1711
|
}
|
|
1696
1712
|
|
|
1697
1713
|
namespace TaxAmount {
|
|
1714
|
+
type TaxabilityReason =
|
|
1715
|
+
| 'customer_exempt'
|
|
1716
|
+
| 'not_collecting'
|
|
1717
|
+
| 'not_subject_to_tax'
|
|
1718
|
+
| 'not_supported'
|
|
1719
|
+
| 'portion_product_exempt'
|
|
1720
|
+
| 'portion_reduced_rated'
|
|
1721
|
+
| 'portion_standard_rated'
|
|
1722
|
+
| 'product_exempt'
|
|
1723
|
+
| 'product_exempt_holiday'
|
|
1724
|
+
| 'proportionally_rated'
|
|
1725
|
+
| 'reduced_rated'
|
|
1726
|
+
| 'reverse_charge'
|
|
1727
|
+
| 'standard_rated'
|
|
1728
|
+
| 'taxable_basis_reduced'
|
|
1729
|
+
| 'zero_rated';
|
|
1730
|
+
|
|
1698
1731
|
interface TaxRateData {
|
|
1699
1732
|
/**
|
|
1700
1733
|
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
@@ -1721,6 +1754,11 @@ declare module 'stripe' {
|
|
|
1721
1754
|
*/
|
|
1722
1755
|
jurisdiction?: string;
|
|
1723
1756
|
|
|
1757
|
+
/**
|
|
1758
|
+
* The level of the jurisdiction that imposes this tax rate.
|
|
1759
|
+
*/
|
|
1760
|
+
jurisdiction_level?: TaxRateData.JurisdictionLevel;
|
|
1761
|
+
|
|
1724
1762
|
/**
|
|
1725
1763
|
* The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
|
|
1726
1764
|
*/
|
|
@@ -1738,6 +1776,14 @@ declare module 'stripe' {
|
|
|
1738
1776
|
}
|
|
1739
1777
|
|
|
1740
1778
|
namespace TaxRateData {
|
|
1779
|
+
type JurisdictionLevel =
|
|
1780
|
+
| 'city'
|
|
1781
|
+
| 'country'
|
|
1782
|
+
| 'county'
|
|
1783
|
+
| 'district'
|
|
1784
|
+
| 'multiple'
|
|
1785
|
+
| 'state';
|
|
1786
|
+
|
|
1741
1787
|
type TaxType =
|
|
1742
1788
|
| 'amusement_tax'
|
|
1743
1789
|
| 'communications_tax'
|
|
@@ -1764,11 +1810,6 @@ declare module 'stripe' {
|
|
|
1764
1810
|
*/
|
|
1765
1811
|
automatic_tax?: InvoiceCreatePreviewParams.AutomaticTax;
|
|
1766
1812
|
|
|
1767
|
-
/**
|
|
1768
|
-
* The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
|
|
1769
|
-
*/
|
|
1770
|
-
coupon?: string;
|
|
1771
|
-
|
|
1772
1813
|
/**
|
|
1773
1814
|
* The currency to preview this invoice in. Defaults to that of `customer` if not specified.
|
|
1774
1815
|
*/
|
|
@@ -1830,2628 +1871,12 @@ declare module 'stripe' {
|
|
|
1830
1871
|
subscription?: string;
|
|
1831
1872
|
|
|
1832
1873
|
/**
|
|
1833
|
-
* The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.
|
|
1834
|
-
*/
|
|
1835
|
-
subscription_details?: InvoiceCreatePreviewParams.SubscriptionDetails;
|
|
1836
|
-
}
|
|
1837
|
-
|
|
1838
|
-
namespace InvoiceCreatePreviewParams {
|
|
1839
|
-
interface AutomaticTax {
|
|
1840
|
-
/**
|
|
1841
|
-
* Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
|
|
1842
|
-
*/
|
|
1843
|
-
enabled: boolean;
|
|
1844
|
-
|
|
1845
|
-
/**
|
|
1846
|
-
* The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
|
1847
|
-
*/
|
|
1848
|
-
liability?: AutomaticTax.Liability;
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
namespace AutomaticTax {
|
|
1852
|
-
interface Liability {
|
|
1853
|
-
/**
|
|
1854
|
-
* The connected account being referenced when `type` is `account`.
|
|
1855
|
-
*/
|
|
1856
|
-
account?: string;
|
|
1857
|
-
|
|
1858
|
-
/**
|
|
1859
|
-
* Type of the account referenced in the request.
|
|
1860
|
-
*/
|
|
1861
|
-
type: Liability.Type;
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
namespace Liability {
|
|
1865
|
-
type Type = 'account' | 'self';
|
|
1866
|
-
}
|
|
1867
|
-
}
|
|
1868
|
-
|
|
1869
|
-
interface CustomerDetails {
|
|
1870
|
-
/**
|
|
1871
|
-
* The customer's address.
|
|
1872
|
-
*/
|
|
1873
|
-
address?: Stripe.Emptyable<Stripe.AddressParam>;
|
|
1874
|
-
|
|
1875
|
-
/**
|
|
1876
|
-
* The customer's shipping information. Appears on invoices emailed to this customer.
|
|
1877
|
-
*/
|
|
1878
|
-
shipping?: Stripe.Emptyable<CustomerDetails.Shipping>;
|
|
1879
|
-
|
|
1880
|
-
/**
|
|
1881
|
-
* Tax details about the customer.
|
|
1882
|
-
*/
|
|
1883
|
-
tax?: CustomerDetails.Tax;
|
|
1884
|
-
|
|
1885
|
-
/**
|
|
1886
|
-
* The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
|
|
1887
|
-
*/
|
|
1888
|
-
tax_exempt?: Stripe.Emptyable<CustomerDetails.TaxExempt>;
|
|
1889
|
-
|
|
1890
|
-
/**
|
|
1891
|
-
* The customer's tax IDs.
|
|
1892
|
-
*/
|
|
1893
|
-
tax_ids?: Array<CustomerDetails.TaxId>;
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
namespace CustomerDetails {
|
|
1897
|
-
interface Shipping {
|
|
1898
|
-
/**
|
|
1899
|
-
* Customer shipping address.
|
|
1900
|
-
*/
|
|
1901
|
-
address: Stripe.AddressParam;
|
|
1902
|
-
|
|
1903
|
-
/**
|
|
1904
|
-
* Customer name.
|
|
1905
|
-
*/
|
|
1906
|
-
name: string;
|
|
1907
|
-
|
|
1908
|
-
/**
|
|
1909
|
-
* Customer phone (including extension).
|
|
1910
|
-
*/
|
|
1911
|
-
phone?: string;
|
|
1912
|
-
}
|
|
1913
|
-
|
|
1914
|
-
interface Tax {
|
|
1915
|
-
/**
|
|
1916
|
-
* A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
|
|
1917
|
-
*/
|
|
1918
|
-
ip_address?: Stripe.Emptyable<string>;
|
|
1919
|
-
}
|
|
1920
|
-
|
|
1921
|
-
type TaxExempt = 'exempt' | 'none' | 'reverse';
|
|
1922
|
-
|
|
1923
|
-
interface TaxId {
|
|
1924
|
-
/**
|
|
1925
|
-
* Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
|
|
1926
|
-
*/
|
|
1927
|
-
type: TaxId.Type;
|
|
1928
|
-
|
|
1929
|
-
/**
|
|
1930
|
-
* Value of the tax ID.
|
|
1931
|
-
*/
|
|
1932
|
-
value: string;
|
|
1933
|
-
}
|
|
1934
|
-
|
|
1935
|
-
namespace TaxId {
|
|
1936
|
-
type Type =
|
|
1937
|
-
| 'ad_nrt'
|
|
1938
|
-
| 'ae_trn'
|
|
1939
|
-
| 'al_tin'
|
|
1940
|
-
| 'am_tin'
|
|
1941
|
-
| 'ao_tin'
|
|
1942
|
-
| 'ar_cuit'
|
|
1943
|
-
| 'au_abn'
|
|
1944
|
-
| 'au_arn'
|
|
1945
|
-
| 'ba_tin'
|
|
1946
|
-
| 'bb_tin'
|
|
1947
|
-
| 'bg_uic'
|
|
1948
|
-
| 'bh_vat'
|
|
1949
|
-
| 'bo_tin'
|
|
1950
|
-
| 'br_cnpj'
|
|
1951
|
-
| 'br_cpf'
|
|
1952
|
-
| 'bs_tin'
|
|
1953
|
-
| 'by_tin'
|
|
1954
|
-
| 'ca_bn'
|
|
1955
|
-
| 'ca_gst_hst'
|
|
1956
|
-
| 'ca_pst_bc'
|
|
1957
|
-
| 'ca_pst_mb'
|
|
1958
|
-
| 'ca_pst_sk'
|
|
1959
|
-
| 'ca_qst'
|
|
1960
|
-
| 'cd_nif'
|
|
1961
|
-
| 'ch_uid'
|
|
1962
|
-
| 'ch_vat'
|
|
1963
|
-
| 'cl_tin'
|
|
1964
|
-
| 'cn_tin'
|
|
1965
|
-
| 'co_nit'
|
|
1966
|
-
| 'cr_tin'
|
|
1967
|
-
| 'de_stn'
|
|
1968
|
-
| 'do_rcn'
|
|
1969
|
-
| 'ec_ruc'
|
|
1970
|
-
| 'eg_tin'
|
|
1971
|
-
| 'es_cif'
|
|
1972
|
-
| 'eu_oss_vat'
|
|
1973
|
-
| 'eu_vat'
|
|
1974
|
-
| 'gb_vat'
|
|
1975
|
-
| 'ge_vat'
|
|
1976
|
-
| 'gn_nif'
|
|
1977
|
-
| 'hk_br'
|
|
1978
|
-
| 'hr_oib'
|
|
1979
|
-
| 'hu_tin'
|
|
1980
|
-
| 'id_npwp'
|
|
1981
|
-
| 'il_vat'
|
|
1982
|
-
| 'in_gst'
|
|
1983
|
-
| 'is_vat'
|
|
1984
|
-
| 'jp_cn'
|
|
1985
|
-
| 'jp_rn'
|
|
1986
|
-
| 'jp_trn'
|
|
1987
|
-
| 'ke_pin'
|
|
1988
|
-
| 'kh_tin'
|
|
1989
|
-
| 'kr_brn'
|
|
1990
|
-
| 'kz_bin'
|
|
1991
|
-
| 'li_uid'
|
|
1992
|
-
| 'li_vat'
|
|
1993
|
-
| 'ma_vat'
|
|
1994
|
-
| 'md_vat'
|
|
1995
|
-
| 'me_pib'
|
|
1996
|
-
| 'mk_vat'
|
|
1997
|
-
| 'mr_nif'
|
|
1998
|
-
| 'mx_rfc'
|
|
1999
|
-
| 'my_frp'
|
|
2000
|
-
| 'my_itn'
|
|
2001
|
-
| 'my_sst'
|
|
2002
|
-
| 'ng_tin'
|
|
2003
|
-
| 'no_vat'
|
|
2004
|
-
| 'no_voec'
|
|
2005
|
-
| 'np_pan'
|
|
2006
|
-
| 'nz_gst'
|
|
2007
|
-
| 'om_vat'
|
|
2008
|
-
| 'pe_ruc'
|
|
2009
|
-
| 'ph_tin'
|
|
2010
|
-
| 'ro_tin'
|
|
2011
|
-
| 'rs_pib'
|
|
2012
|
-
| 'ru_inn'
|
|
2013
|
-
| 'ru_kpp'
|
|
2014
|
-
| 'sa_vat'
|
|
2015
|
-
| 'sg_gst'
|
|
2016
|
-
| 'sg_uen'
|
|
2017
|
-
| 'si_tin'
|
|
2018
|
-
| 'sn_ninea'
|
|
2019
|
-
| 'sr_fin'
|
|
2020
|
-
| 'sv_nit'
|
|
2021
|
-
| 'th_vat'
|
|
2022
|
-
| 'tj_tin'
|
|
2023
|
-
| 'tr_tin'
|
|
2024
|
-
| 'tw_vat'
|
|
2025
|
-
| 'tz_vat'
|
|
2026
|
-
| 'ua_vat'
|
|
2027
|
-
| 'ug_tin'
|
|
2028
|
-
| 'us_ein'
|
|
2029
|
-
| 'uy_ruc'
|
|
2030
|
-
| 'uz_tin'
|
|
2031
|
-
| 'uz_vat'
|
|
2032
|
-
| 've_rif'
|
|
2033
|
-
| 'vn_tin'
|
|
2034
|
-
| 'za_vat'
|
|
2035
|
-
| 'zm_tin'
|
|
2036
|
-
| 'zw_tin';
|
|
2037
|
-
}
|
|
2038
|
-
}
|
|
2039
|
-
|
|
2040
|
-
interface Discount {
|
|
2041
|
-
/**
|
|
2042
|
-
* ID of the coupon to create a new discount for.
|
|
2043
|
-
*/
|
|
2044
|
-
coupon?: string;
|
|
2045
|
-
|
|
2046
|
-
/**
|
|
2047
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2048
|
-
*/
|
|
2049
|
-
discount?: string;
|
|
2050
|
-
|
|
2051
|
-
/**
|
|
2052
|
-
* ID of the promotion code to create a new discount for.
|
|
2053
|
-
*/
|
|
2054
|
-
promotion_code?: string;
|
|
2055
|
-
}
|
|
2056
|
-
|
|
2057
|
-
interface InvoiceItem {
|
|
2058
|
-
/**
|
|
2059
|
-
* The integer amount in cents (or local equivalent) of previewed invoice item.
|
|
2060
|
-
*/
|
|
2061
|
-
amount?: number;
|
|
2062
|
-
|
|
2063
|
-
/**
|
|
2064
|
-
* 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). Only applicable to new invoice items.
|
|
2065
|
-
*/
|
|
2066
|
-
currency?: string;
|
|
2067
|
-
|
|
2068
|
-
/**
|
|
2069
|
-
* An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
|
|
2070
|
-
*/
|
|
2071
|
-
description?: string;
|
|
2072
|
-
|
|
2073
|
-
/**
|
|
2074
|
-
* Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items.
|
|
2075
|
-
*/
|
|
2076
|
-
discountable?: boolean;
|
|
2077
|
-
|
|
2078
|
-
/**
|
|
2079
|
-
* The coupons to redeem into discounts for the invoice item in the preview.
|
|
2080
|
-
*/
|
|
2081
|
-
discounts?: Stripe.Emptyable<Array<InvoiceItem.Discount>>;
|
|
2082
|
-
|
|
2083
|
-
/**
|
|
2084
|
-
* The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice.
|
|
2085
|
-
*/
|
|
2086
|
-
invoiceitem?: string;
|
|
2087
|
-
|
|
2088
|
-
/**
|
|
2089
|
-
* 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`.
|
|
2090
|
-
*/
|
|
2091
|
-
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
2092
|
-
|
|
2093
|
-
/**
|
|
2094
|
-
* The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
|
|
2095
|
-
*/
|
|
2096
|
-
period?: InvoiceItem.Period;
|
|
2097
|
-
|
|
2098
|
-
/**
|
|
2099
|
-
* The ID of the price object. One of `price` or `price_data` is required.
|
|
2100
|
-
*/
|
|
2101
|
-
price?: string;
|
|
2102
|
-
|
|
2103
|
-
/**
|
|
2104
|
-
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
|
2105
|
-
*/
|
|
2106
|
-
price_data?: InvoiceItem.PriceData;
|
|
2107
|
-
|
|
2108
|
-
/**
|
|
2109
|
-
* Non-negative integer. The quantity of units for the invoice item.
|
|
2110
|
-
*/
|
|
2111
|
-
quantity?: number;
|
|
2112
|
-
|
|
2113
|
-
/**
|
|
2114
|
-
* Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
2115
|
-
*/
|
|
2116
|
-
tax_behavior?: InvoiceItem.TaxBehavior;
|
|
2117
|
-
|
|
2118
|
-
/**
|
|
2119
|
-
* A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
|
|
2120
|
-
*/
|
|
2121
|
-
tax_code?: Stripe.Emptyable<string>;
|
|
2122
|
-
|
|
2123
|
-
/**
|
|
2124
|
-
* The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item.
|
|
2125
|
-
*/
|
|
2126
|
-
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
2127
|
-
|
|
2128
|
-
/**
|
|
2129
|
-
* The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
|
|
2130
|
-
*/
|
|
2131
|
-
unit_amount?: number;
|
|
2132
|
-
|
|
2133
|
-
/**
|
|
2134
|
-
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
2135
|
-
*/
|
|
2136
|
-
unit_amount_decimal?: string;
|
|
2137
|
-
}
|
|
2138
|
-
|
|
2139
|
-
namespace InvoiceItem {
|
|
2140
|
-
interface Discount {
|
|
2141
|
-
/**
|
|
2142
|
-
* ID of the coupon to create a new discount for.
|
|
2143
|
-
*/
|
|
2144
|
-
coupon?: string;
|
|
2145
|
-
|
|
2146
|
-
/**
|
|
2147
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2148
|
-
*/
|
|
2149
|
-
discount?: string;
|
|
2150
|
-
|
|
2151
|
-
/**
|
|
2152
|
-
* ID of the promotion code to create a new discount for.
|
|
2153
|
-
*/
|
|
2154
|
-
promotion_code?: string;
|
|
2155
|
-
}
|
|
2156
|
-
|
|
2157
|
-
interface Period {
|
|
2158
|
-
/**
|
|
2159
|
-
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
2160
|
-
*/
|
|
2161
|
-
end: number;
|
|
2162
|
-
|
|
2163
|
-
/**
|
|
2164
|
-
* The start of the period. This value is inclusive.
|
|
2165
|
-
*/
|
|
2166
|
-
start: number;
|
|
2167
|
-
}
|
|
2168
|
-
|
|
2169
|
-
interface PriceData {
|
|
2170
|
-
/**
|
|
2171
|
-
* 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).
|
|
2172
|
-
*/
|
|
2173
|
-
currency: string;
|
|
2174
|
-
|
|
2175
|
-
/**
|
|
2176
|
-
* The ID of the product that this price will belong to.
|
|
2177
|
-
*/
|
|
2178
|
-
product: string;
|
|
2179
|
-
|
|
2180
|
-
/**
|
|
2181
|
-
* Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
2182
|
-
*/
|
|
2183
|
-
tax_behavior?: PriceData.TaxBehavior;
|
|
2184
|
-
|
|
2185
|
-
/**
|
|
2186
|
-
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
|
2187
|
-
*/
|
|
2188
|
-
unit_amount?: number;
|
|
2189
|
-
|
|
2190
|
-
/**
|
|
2191
|
-
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
2192
|
-
*/
|
|
2193
|
-
unit_amount_decimal?: string;
|
|
2194
|
-
}
|
|
2195
|
-
|
|
2196
|
-
namespace PriceData {
|
|
2197
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
2198
|
-
}
|
|
2199
|
-
|
|
2200
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
2201
|
-
}
|
|
2202
|
-
|
|
2203
|
-
interface Issuer {
|
|
2204
|
-
/**
|
|
2205
|
-
* The connected account being referenced when `type` is `account`.
|
|
2206
|
-
*/
|
|
2207
|
-
account?: string;
|
|
2208
|
-
|
|
2209
|
-
/**
|
|
2210
|
-
* Type of the account referenced in the request.
|
|
2211
|
-
*/
|
|
2212
|
-
type: Issuer.Type;
|
|
2213
|
-
}
|
|
2214
|
-
|
|
2215
|
-
namespace Issuer {
|
|
2216
|
-
type Type = 'account' | 'self';
|
|
2217
|
-
}
|
|
2218
|
-
|
|
2219
|
-
type PreviewMode = 'next' | 'recurring';
|
|
2220
|
-
|
|
2221
|
-
interface ScheduleDetails {
|
|
2222
|
-
/**
|
|
2223
|
-
* Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
|
|
2224
|
-
*/
|
|
2225
|
-
end_behavior?: ScheduleDetails.EndBehavior;
|
|
2226
|
-
|
|
2227
|
-
/**
|
|
2228
|
-
* List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
|
|
2229
|
-
*/
|
|
2230
|
-
phases?: Array<ScheduleDetails.Phase>;
|
|
2231
|
-
|
|
2232
|
-
/**
|
|
2233
|
-
* In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
|
2234
|
-
*/
|
|
2235
|
-
proration_behavior?: ScheduleDetails.ProrationBehavior;
|
|
2236
|
-
}
|
|
2237
|
-
|
|
2238
|
-
namespace ScheduleDetails {
|
|
2239
|
-
type EndBehavior = 'cancel' | 'release';
|
|
2240
|
-
|
|
2241
|
-
interface Phase {
|
|
2242
|
-
/**
|
|
2243
|
-
* A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
|
|
2244
|
-
*/
|
|
2245
|
-
add_invoice_items?: Array<Phase.AddInvoiceItem>;
|
|
2246
|
-
|
|
2247
|
-
/**
|
|
2248
|
-
* A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
|
|
2249
|
-
*/
|
|
2250
|
-
application_fee_percent?: number;
|
|
2251
|
-
|
|
2252
|
-
/**
|
|
2253
|
-
* Automatic tax settings for this phase.
|
|
2254
|
-
*/
|
|
2255
|
-
automatic_tax?: Phase.AutomaticTax;
|
|
2256
|
-
|
|
2257
|
-
/**
|
|
2258
|
-
* Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
|
2259
|
-
*/
|
|
2260
|
-
billing_cycle_anchor?: Phase.BillingCycleAnchor;
|
|
2261
|
-
|
|
2262
|
-
/**
|
|
2263
|
-
* Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
|
2264
|
-
*/
|
|
2265
|
-
billing_thresholds?: Stripe.Emptyable<Phase.BillingThresholds>;
|
|
2266
|
-
|
|
2267
|
-
/**
|
|
2268
|
-
* 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`. Defaults to `charge_automatically` on creation.
|
|
2269
|
-
*/
|
|
2270
|
-
collection_method?: Phase.CollectionMethod;
|
|
2271
|
-
|
|
2272
|
-
/**
|
|
2273
|
-
* The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
|
|
2274
|
-
*/
|
|
2275
|
-
coupon?: string;
|
|
2276
|
-
|
|
2277
|
-
/**
|
|
2278
|
-
* 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).
|
|
2279
|
-
*/
|
|
2280
|
-
currency?: string;
|
|
2281
|
-
|
|
2282
|
-
/**
|
|
2283
|
-
* ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
|
|
2284
|
-
*/
|
|
2285
|
-
default_payment_method?: string;
|
|
2286
|
-
|
|
2287
|
-
/**
|
|
2288
|
-
* A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
|
|
2289
|
-
*/
|
|
2290
|
-
default_tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
2291
|
-
|
|
2292
|
-
/**
|
|
2293
|
-
* Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
|
2294
|
-
*/
|
|
2295
|
-
description?: Stripe.Emptyable<string>;
|
|
2296
|
-
|
|
2297
|
-
/**
|
|
2298
|
-
* The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
|
|
2299
|
-
*/
|
|
2300
|
-
discounts?: Stripe.Emptyable<Array<Phase.Discount>>;
|
|
2301
|
-
|
|
2302
|
-
/**
|
|
2303
|
-
* The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
|
|
2304
|
-
*/
|
|
2305
|
-
end_date?: number | 'now';
|
|
2306
|
-
|
|
2307
|
-
/**
|
|
2308
|
-
* All invoices will be billed using the specified settings.
|
|
2309
|
-
*/
|
|
2310
|
-
invoice_settings?: Phase.InvoiceSettings;
|
|
2311
|
-
|
|
2312
|
-
/**
|
|
2313
|
-
* List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
|
|
2314
|
-
*/
|
|
2315
|
-
items: Array<Phase.Item>;
|
|
2316
|
-
|
|
2317
|
-
/**
|
|
2318
|
-
* Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
|
|
2319
|
-
*/
|
|
2320
|
-
iterations?: number;
|
|
2321
|
-
|
|
2322
|
-
/**
|
|
2323
|
-
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
|
|
2324
|
-
*/
|
|
2325
|
-
metadata?: Stripe.MetadataParam;
|
|
2326
|
-
|
|
2327
|
-
/**
|
|
2328
|
-
* The account on behalf of which to charge, for each of the associated subscription's invoices.
|
|
2329
|
-
*/
|
|
2330
|
-
on_behalf_of?: string;
|
|
2331
|
-
|
|
2332
|
-
/**
|
|
2333
|
-
* Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
|
|
2334
|
-
*/
|
|
2335
|
-
proration_behavior?: Phase.ProrationBehavior;
|
|
2336
|
-
|
|
2337
|
-
/**
|
|
2338
|
-
* The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
|
2339
|
-
*/
|
|
2340
|
-
start_date?: number | 'now';
|
|
2341
|
-
|
|
2342
|
-
/**
|
|
2343
|
-
* The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
|
2344
|
-
*/
|
|
2345
|
-
transfer_data?: Phase.TransferData;
|
|
2346
|
-
|
|
2347
|
-
/**
|
|
2348
|
-
* If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
|
2349
|
-
*/
|
|
2350
|
-
trial?: boolean;
|
|
2351
|
-
|
|
2352
|
-
/**
|
|
2353
|
-
* Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
|
|
2354
|
-
*/
|
|
2355
|
-
trial_end?: number | 'now';
|
|
2356
|
-
}
|
|
2357
|
-
|
|
2358
|
-
namespace Phase {
|
|
2359
|
-
interface AddInvoiceItem {
|
|
2360
|
-
/**
|
|
2361
|
-
* The coupons to redeem into discounts for the item.
|
|
2362
|
-
*/
|
|
2363
|
-
discounts?: Array<AddInvoiceItem.Discount>;
|
|
2364
|
-
|
|
2365
|
-
/**
|
|
2366
|
-
* The ID of the price object. One of `price` or `price_data` is required.
|
|
2367
|
-
*/
|
|
2368
|
-
price?: string;
|
|
2369
|
-
|
|
2370
|
-
/**
|
|
2371
|
-
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
|
2372
|
-
*/
|
|
2373
|
-
price_data?: AddInvoiceItem.PriceData;
|
|
2374
|
-
|
|
2375
|
-
/**
|
|
2376
|
-
* Quantity for this item. Defaults to 1.
|
|
2377
|
-
*/
|
|
2378
|
-
quantity?: number;
|
|
2379
|
-
|
|
2380
|
-
/**
|
|
2381
|
-
* The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
|
2382
|
-
*/
|
|
2383
|
-
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
2384
|
-
}
|
|
2385
|
-
|
|
2386
|
-
namespace AddInvoiceItem {
|
|
2387
|
-
interface Discount {
|
|
2388
|
-
/**
|
|
2389
|
-
* ID of the coupon to create a new discount for.
|
|
2390
|
-
*/
|
|
2391
|
-
coupon?: string;
|
|
2392
|
-
|
|
2393
|
-
/**
|
|
2394
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2395
|
-
*/
|
|
2396
|
-
discount?: string;
|
|
2397
|
-
|
|
2398
|
-
/**
|
|
2399
|
-
* ID of the promotion code to create a new discount for.
|
|
2400
|
-
*/
|
|
2401
|
-
promotion_code?: string;
|
|
2402
|
-
}
|
|
2403
|
-
|
|
2404
|
-
interface PriceData {
|
|
2405
|
-
/**
|
|
2406
|
-
* 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).
|
|
2407
|
-
*/
|
|
2408
|
-
currency: string;
|
|
2409
|
-
|
|
2410
|
-
/**
|
|
2411
|
-
* The ID of the product that this price will belong to.
|
|
2412
|
-
*/
|
|
2413
|
-
product: string;
|
|
2414
|
-
|
|
2415
|
-
/**
|
|
2416
|
-
* Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
2417
|
-
*/
|
|
2418
|
-
tax_behavior?: PriceData.TaxBehavior;
|
|
2419
|
-
|
|
2420
|
-
/**
|
|
2421
|
-
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
|
|
2422
|
-
*/
|
|
2423
|
-
unit_amount?: number;
|
|
2424
|
-
|
|
2425
|
-
/**
|
|
2426
|
-
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
2427
|
-
*/
|
|
2428
|
-
unit_amount_decimal?: string;
|
|
2429
|
-
}
|
|
2430
|
-
|
|
2431
|
-
namespace PriceData {
|
|
2432
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
2433
|
-
}
|
|
2434
|
-
}
|
|
2435
|
-
|
|
2436
|
-
interface AutomaticTax {
|
|
2437
|
-
/**
|
|
2438
|
-
* Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
|
|
2439
|
-
*/
|
|
2440
|
-
enabled: boolean;
|
|
2441
|
-
|
|
2442
|
-
/**
|
|
2443
|
-
* The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
|
2444
|
-
*/
|
|
2445
|
-
liability?: AutomaticTax.Liability;
|
|
2446
|
-
}
|
|
2447
|
-
|
|
2448
|
-
namespace AutomaticTax {
|
|
2449
|
-
interface Liability {
|
|
2450
|
-
/**
|
|
2451
|
-
* The connected account being referenced when `type` is `account`.
|
|
2452
|
-
*/
|
|
2453
|
-
account?: string;
|
|
2454
|
-
|
|
2455
|
-
/**
|
|
2456
|
-
* Type of the account referenced in the request.
|
|
2457
|
-
*/
|
|
2458
|
-
type: Liability.Type;
|
|
2459
|
-
}
|
|
2460
|
-
|
|
2461
|
-
namespace Liability {
|
|
2462
|
-
type Type = 'account' | 'self';
|
|
2463
|
-
}
|
|
2464
|
-
}
|
|
2465
|
-
|
|
2466
|
-
type BillingCycleAnchor = 'automatic' | 'phase_start';
|
|
2467
|
-
|
|
2468
|
-
interface BillingThresholds {
|
|
2469
|
-
/**
|
|
2470
|
-
* Monetary threshold that triggers the subscription to advance to a new billing period
|
|
2471
|
-
*/
|
|
2472
|
-
amount_gte?: number;
|
|
2473
|
-
|
|
2474
|
-
/**
|
|
2475
|
-
* 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.
|
|
2476
|
-
*/
|
|
2477
|
-
reset_billing_cycle_anchor?: boolean;
|
|
2478
|
-
}
|
|
2479
|
-
|
|
2480
|
-
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
2481
|
-
|
|
2482
|
-
interface Discount {
|
|
2483
|
-
/**
|
|
2484
|
-
* ID of the coupon to create a new discount for.
|
|
2485
|
-
*/
|
|
2486
|
-
coupon?: string;
|
|
2487
|
-
|
|
2488
|
-
/**
|
|
2489
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2490
|
-
*/
|
|
2491
|
-
discount?: string;
|
|
2492
|
-
|
|
2493
|
-
/**
|
|
2494
|
-
* ID of the promotion code to create a new discount for.
|
|
2495
|
-
*/
|
|
2496
|
-
promotion_code?: string;
|
|
2497
|
-
}
|
|
2498
|
-
|
|
2499
|
-
interface InvoiceSettings {
|
|
2500
|
-
/**
|
|
2501
|
-
* The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
|
|
2502
|
-
*/
|
|
2503
|
-
account_tax_ids?: Stripe.Emptyable<Array<string>>;
|
|
2504
|
-
|
|
2505
|
-
/**
|
|
2506
|
-
* Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
|
|
2507
|
-
*/
|
|
2508
|
-
days_until_due?: number;
|
|
2509
|
-
|
|
2510
|
-
/**
|
|
2511
|
-
* The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
|
2512
|
-
*/
|
|
2513
|
-
issuer?: InvoiceSettings.Issuer;
|
|
2514
|
-
}
|
|
2515
|
-
|
|
2516
|
-
namespace InvoiceSettings {
|
|
2517
|
-
interface Issuer {
|
|
2518
|
-
/**
|
|
2519
|
-
* The connected account being referenced when `type` is `account`.
|
|
2520
|
-
*/
|
|
2521
|
-
account?: string;
|
|
2522
|
-
|
|
2523
|
-
/**
|
|
2524
|
-
* Type of the account referenced in the request.
|
|
2525
|
-
*/
|
|
2526
|
-
type: Issuer.Type;
|
|
2527
|
-
}
|
|
2528
|
-
|
|
2529
|
-
namespace Issuer {
|
|
2530
|
-
type Type = 'account' | 'self';
|
|
2531
|
-
}
|
|
2532
|
-
}
|
|
2533
|
-
|
|
2534
|
-
interface Item {
|
|
2535
|
-
/**
|
|
2536
|
-
* 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.
|
|
2537
|
-
*/
|
|
2538
|
-
billing_thresholds?: Stripe.Emptyable<Item.BillingThresholds>;
|
|
2539
|
-
|
|
2540
|
-
/**
|
|
2541
|
-
* The coupons to redeem into discounts for the subscription item.
|
|
2542
|
-
*/
|
|
2543
|
-
discounts?: Stripe.Emptyable<Array<Item.Discount>>;
|
|
2544
|
-
|
|
2545
|
-
/**
|
|
2546
|
-
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
|
|
2547
|
-
*/
|
|
2548
|
-
metadata?: Stripe.MetadataParam;
|
|
2549
|
-
|
|
2550
|
-
/**
|
|
2551
|
-
* The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
|
|
2552
|
-
*/
|
|
2553
|
-
plan?: string;
|
|
2554
|
-
|
|
2555
|
-
/**
|
|
2556
|
-
* The ID of the price object.
|
|
2557
|
-
*/
|
|
2558
|
-
price?: string;
|
|
2559
|
-
|
|
2560
|
-
/**
|
|
2561
|
-
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
|
|
2562
|
-
*/
|
|
2563
|
-
price_data?: Item.PriceData;
|
|
2564
|
-
|
|
2565
|
-
/**
|
|
2566
|
-
* Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
|
|
2567
|
-
*/
|
|
2568
|
-
quantity?: number;
|
|
2569
|
-
|
|
2570
|
-
/**
|
|
2571
|
-
* A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
|
2572
|
-
*/
|
|
2573
|
-
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
2574
|
-
}
|
|
2575
|
-
|
|
2576
|
-
namespace Item {
|
|
2577
|
-
interface BillingThresholds {
|
|
2578
|
-
/**
|
|
2579
|
-
* 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))
|
|
2580
|
-
*/
|
|
2581
|
-
usage_gte: number;
|
|
2582
|
-
}
|
|
2583
|
-
|
|
2584
|
-
interface Discount {
|
|
2585
|
-
/**
|
|
2586
|
-
* ID of the coupon to create a new discount for.
|
|
2587
|
-
*/
|
|
2588
|
-
coupon?: string;
|
|
2589
|
-
|
|
2590
|
-
/**
|
|
2591
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2592
|
-
*/
|
|
2593
|
-
discount?: string;
|
|
2594
|
-
|
|
2595
|
-
/**
|
|
2596
|
-
* ID of the promotion code to create a new discount for.
|
|
2597
|
-
*/
|
|
2598
|
-
promotion_code?: string;
|
|
2599
|
-
}
|
|
2600
|
-
|
|
2601
|
-
interface PriceData {
|
|
2602
|
-
/**
|
|
2603
|
-
* 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).
|
|
2604
|
-
*/
|
|
2605
|
-
currency: string;
|
|
2606
|
-
|
|
2607
|
-
/**
|
|
2608
|
-
* The ID of the product that this price will belong to.
|
|
2609
|
-
*/
|
|
2610
|
-
product: string;
|
|
2611
|
-
|
|
2612
|
-
/**
|
|
2613
|
-
* The recurring components of a price such as `interval` and `interval_count`.
|
|
2614
|
-
*/
|
|
2615
|
-
recurring: PriceData.Recurring;
|
|
2616
|
-
|
|
2617
|
-
/**
|
|
2618
|
-
* Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
2619
|
-
*/
|
|
2620
|
-
tax_behavior?: PriceData.TaxBehavior;
|
|
2621
|
-
|
|
2622
|
-
/**
|
|
2623
|
-
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
|
2624
|
-
*/
|
|
2625
|
-
unit_amount?: number;
|
|
2626
|
-
|
|
2627
|
-
/**
|
|
2628
|
-
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
2629
|
-
*/
|
|
2630
|
-
unit_amount_decimal?: string;
|
|
2631
|
-
}
|
|
2632
|
-
|
|
2633
|
-
namespace PriceData {
|
|
2634
|
-
interface Recurring {
|
|
2635
|
-
/**
|
|
2636
|
-
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
2637
|
-
*/
|
|
2638
|
-
interval: Recurring.Interval;
|
|
2639
|
-
|
|
2640
|
-
/**
|
|
2641
|
-
* The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
|
2642
|
-
*/
|
|
2643
|
-
interval_count?: number;
|
|
2644
|
-
}
|
|
2645
|
-
|
|
2646
|
-
namespace Recurring {
|
|
2647
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2648
|
-
}
|
|
2649
|
-
|
|
2650
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
2651
|
-
}
|
|
2652
|
-
}
|
|
2653
|
-
|
|
2654
|
-
type ProrationBehavior =
|
|
2655
|
-
| 'always_invoice'
|
|
2656
|
-
| 'create_prorations'
|
|
2657
|
-
| 'none';
|
|
2658
|
-
|
|
2659
|
-
interface TransferData {
|
|
2660
|
-
/**
|
|
2661
|
-
* A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
|
|
2662
|
-
*/
|
|
2663
|
-
amount_percent?: number;
|
|
2664
|
-
|
|
2665
|
-
/**
|
|
2666
|
-
* ID of an existing, connected Stripe account.
|
|
2667
|
-
*/
|
|
2668
|
-
destination: string;
|
|
2669
|
-
}
|
|
2670
|
-
}
|
|
2671
|
-
|
|
2672
|
-
type ProrationBehavior =
|
|
2673
|
-
| 'always_invoice'
|
|
2674
|
-
| 'create_prorations'
|
|
2675
|
-
| 'none';
|
|
2676
|
-
}
|
|
2677
|
-
|
|
2678
|
-
interface SubscriptionDetails {
|
|
2679
|
-
/**
|
|
2680
|
-
* For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
|
|
2681
|
-
*/
|
|
2682
|
-
billing_cycle_anchor?: SubscriptionDetails.BillingCycleAnchor | number;
|
|
2683
|
-
|
|
2684
|
-
/**
|
|
2685
|
-
* A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
|
|
2686
|
-
*/
|
|
2687
|
-
cancel_at?: Stripe.Emptyable<number>;
|
|
2688
|
-
|
|
2689
|
-
/**
|
|
2690
|
-
* Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
|
2691
|
-
*/
|
|
2692
|
-
cancel_at_period_end?: boolean;
|
|
2693
|
-
|
|
2694
|
-
/**
|
|
2695
|
-
* This simulates the subscription being canceled or expired immediately.
|
|
2696
|
-
*/
|
|
2697
|
-
cancel_now?: boolean;
|
|
2698
|
-
|
|
2699
|
-
/**
|
|
2700
|
-
* If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set.
|
|
2701
|
-
*/
|
|
2702
|
-
default_tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
2703
|
-
|
|
2704
|
-
/**
|
|
2705
|
-
* A list of up to 20 subscription items, each with an attached price.
|
|
2706
|
-
*/
|
|
2707
|
-
items?: Array<SubscriptionDetails.Item>;
|
|
2708
|
-
|
|
2709
|
-
/**
|
|
2710
|
-
* Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
|
|
2711
|
-
*/
|
|
2712
|
-
proration_behavior?: SubscriptionDetails.ProrationBehavior;
|
|
2713
|
-
|
|
2714
|
-
/**
|
|
2715
|
-
* If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'.
|
|
2716
|
-
*/
|
|
2717
|
-
proration_date?: number;
|
|
2718
|
-
|
|
2719
|
-
/**
|
|
2720
|
-
* For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.
|
|
2721
|
-
*/
|
|
2722
|
-
resume_at?: 'now';
|
|
2723
|
-
|
|
2724
|
-
/**
|
|
2725
|
-
* Date a subscription is intended to start (can be future or past).
|
|
2726
|
-
*/
|
|
2727
|
-
start_date?: number;
|
|
2728
|
-
|
|
2729
|
-
/**
|
|
2730
|
-
* If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required.
|
|
2731
|
-
*/
|
|
2732
|
-
trial_end?: 'now' | number;
|
|
2733
|
-
}
|
|
2734
|
-
|
|
2735
|
-
namespace SubscriptionDetails {
|
|
2736
|
-
type BillingCycleAnchor = 'now' | 'unchanged';
|
|
2737
|
-
|
|
2738
|
-
interface Item {
|
|
2739
|
-
/**
|
|
2740
|
-
* 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.
|
|
2741
|
-
*/
|
|
2742
|
-
billing_thresholds?: Stripe.Emptyable<Item.BillingThresholds>;
|
|
2743
|
-
|
|
2744
|
-
/**
|
|
2745
|
-
* Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
|
|
2746
|
-
*/
|
|
2747
|
-
clear_usage?: boolean;
|
|
2748
|
-
|
|
2749
|
-
/**
|
|
2750
|
-
* A flag that, if set to `true`, will delete the specified item.
|
|
2751
|
-
*/
|
|
2752
|
-
deleted?: boolean;
|
|
2753
|
-
|
|
2754
|
-
/**
|
|
2755
|
-
* The coupons to redeem into discounts for the subscription item.
|
|
2756
|
-
*/
|
|
2757
|
-
discounts?: Stripe.Emptyable<Array<Item.Discount>>;
|
|
2758
|
-
|
|
2759
|
-
/**
|
|
2760
|
-
* Subscription item to update.
|
|
2761
|
-
*/
|
|
2762
|
-
id?: string;
|
|
2763
|
-
|
|
2764
|
-
/**
|
|
2765
|
-
* 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`.
|
|
2766
|
-
*/
|
|
2767
|
-
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
2768
|
-
|
|
2769
|
-
/**
|
|
2770
|
-
* Plan ID for this item, as a string.
|
|
2771
|
-
*/
|
|
2772
|
-
plan?: string;
|
|
2773
|
-
|
|
2774
|
-
/**
|
|
2775
|
-
* The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
|
|
2776
|
-
*/
|
|
2777
|
-
price?: string;
|
|
2778
|
-
|
|
2779
|
-
/**
|
|
2780
|
-
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
|
2781
|
-
*/
|
|
2782
|
-
price_data?: Item.PriceData;
|
|
2783
|
-
|
|
2784
|
-
/**
|
|
2785
|
-
* Quantity for this item.
|
|
2786
|
-
*/
|
|
2787
|
-
quantity?: number;
|
|
2788
|
-
|
|
2789
|
-
/**
|
|
2790
|
-
* A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
|
2791
|
-
*/
|
|
2792
|
-
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
2793
|
-
}
|
|
2794
|
-
|
|
2795
|
-
namespace Item {
|
|
2796
|
-
interface BillingThresholds {
|
|
2797
|
-
/**
|
|
2798
|
-
* 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))
|
|
2799
|
-
*/
|
|
2800
|
-
usage_gte: number;
|
|
2801
|
-
}
|
|
2802
|
-
|
|
2803
|
-
interface Discount {
|
|
2804
|
-
/**
|
|
2805
|
-
* ID of the coupon to create a new discount for.
|
|
2806
|
-
*/
|
|
2807
|
-
coupon?: string;
|
|
2808
|
-
|
|
2809
|
-
/**
|
|
2810
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
2811
|
-
*/
|
|
2812
|
-
discount?: string;
|
|
2813
|
-
|
|
2814
|
-
/**
|
|
2815
|
-
* ID of the promotion code to create a new discount for.
|
|
2816
|
-
*/
|
|
2817
|
-
promotion_code?: string;
|
|
2818
|
-
}
|
|
2819
|
-
|
|
2820
|
-
interface PriceData {
|
|
2821
|
-
/**
|
|
2822
|
-
* 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).
|
|
2823
|
-
*/
|
|
2824
|
-
currency: string;
|
|
2825
|
-
|
|
2826
|
-
/**
|
|
2827
|
-
* The ID of the product that this price will belong to.
|
|
2828
|
-
*/
|
|
2829
|
-
product: string;
|
|
2830
|
-
|
|
2831
|
-
/**
|
|
2832
|
-
* The recurring components of a price such as `interval` and `interval_count`.
|
|
2833
|
-
*/
|
|
2834
|
-
recurring: PriceData.Recurring;
|
|
2835
|
-
|
|
2836
|
-
/**
|
|
2837
|
-
* Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
2838
|
-
*/
|
|
2839
|
-
tax_behavior?: PriceData.TaxBehavior;
|
|
2840
|
-
|
|
2841
|
-
/**
|
|
2842
|
-
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
|
2843
|
-
*/
|
|
2844
|
-
unit_amount?: number;
|
|
2845
|
-
|
|
2846
|
-
/**
|
|
2847
|
-
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
2848
|
-
*/
|
|
2849
|
-
unit_amount_decimal?: string;
|
|
2850
|
-
}
|
|
2851
|
-
|
|
2852
|
-
namespace PriceData {
|
|
2853
|
-
interface Recurring {
|
|
2854
|
-
/**
|
|
2855
|
-
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
2856
|
-
*/
|
|
2857
|
-
interval: Recurring.Interval;
|
|
2858
|
-
|
|
2859
|
-
/**
|
|
2860
|
-
* The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
|
2861
|
-
*/
|
|
2862
|
-
interval_count?: number;
|
|
2863
|
-
}
|
|
2864
|
-
|
|
2865
|
-
namespace Recurring {
|
|
2866
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
2867
|
-
}
|
|
2868
|
-
|
|
2869
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
2870
|
-
}
|
|
2871
|
-
}
|
|
2872
|
-
|
|
2873
|
-
type ProrationBehavior =
|
|
2874
|
-
| 'always_invoice'
|
|
2875
|
-
| 'create_prorations'
|
|
2876
|
-
| 'none';
|
|
2877
|
-
}
|
|
2878
|
-
}
|
|
2879
|
-
|
|
2880
|
-
interface InvoiceFinalizeInvoiceParams {
|
|
2881
|
-
/**
|
|
2882
|
-
* Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
|
|
2883
|
-
*/
|
|
2884
|
-
auto_advance?: boolean;
|
|
2885
|
-
|
|
2886
|
-
/**
|
|
2887
|
-
* Specifies which fields in the response should be expanded.
|
|
2888
|
-
*/
|
|
2889
|
-
expand?: Array<string>;
|
|
2890
|
-
}
|
|
2891
|
-
|
|
2892
|
-
interface InvoiceListLineItemsParams extends PaginationParams {
|
|
2893
|
-
/**
|
|
2894
|
-
* Specifies which fields in the response should be expanded.
|
|
2895
|
-
*/
|
|
2896
|
-
expand?: Array<string>;
|
|
2897
|
-
}
|
|
2898
|
-
|
|
2899
|
-
interface InvoiceListUpcomingLinesParams extends PaginationParams {
|
|
2900
|
-
/**
|
|
2901
|
-
* Settings for automatic tax lookup for this invoice preview.
|
|
2902
|
-
*/
|
|
2903
|
-
automatic_tax?: InvoiceListUpcomingLinesParams.AutomaticTax;
|
|
2904
|
-
|
|
2905
|
-
/**
|
|
2906
|
-
* The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
|
|
2907
|
-
*/
|
|
2908
|
-
coupon?: string;
|
|
2909
|
-
|
|
2910
|
-
/**
|
|
2911
|
-
* The currency to preview this invoice in. Defaults to that of `customer` if not specified.
|
|
2912
|
-
*/
|
|
2913
|
-
currency?: string;
|
|
2914
|
-
|
|
2915
|
-
/**
|
|
2916
|
-
* The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
|
2917
|
-
*/
|
|
2918
|
-
customer?: string;
|
|
2919
|
-
|
|
2920
|
-
/**
|
|
2921
|
-
* Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
|
2922
|
-
*/
|
|
2923
|
-
customer_details?: InvoiceListUpcomingLinesParams.CustomerDetails;
|
|
2924
|
-
|
|
2925
|
-
/**
|
|
2926
|
-
* The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
|
|
2927
|
-
*/
|
|
2928
|
-
discounts?: Stripe.Emptyable<
|
|
2929
|
-
Array<InvoiceListUpcomingLinesParams.Discount>
|
|
2930
|
-
>;
|
|
2931
|
-
|
|
2932
|
-
/**
|
|
2933
|
-
* Specifies which fields in the response should be expanded.
|
|
2934
|
-
*/
|
|
2935
|
-
expand?: Array<string>;
|
|
2936
|
-
|
|
2937
|
-
/**
|
|
2938
|
-
* List of invoice items to add or update in the upcoming invoice preview (up to 250).
|
|
2939
|
-
*/
|
|
2940
|
-
invoice_items?: Array<InvoiceListUpcomingLinesParams.InvoiceItem>;
|
|
2941
|
-
|
|
2942
|
-
/**
|
|
2943
|
-
* The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
|
2944
|
-
*/
|
|
2945
|
-
issuer?: InvoiceListUpcomingLinesParams.Issuer;
|
|
2946
|
-
|
|
2947
|
-
/**
|
|
2948
|
-
* The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
|
|
2949
|
-
*/
|
|
2950
|
-
on_behalf_of?: Stripe.Emptyable<string>;
|
|
2951
|
-
|
|
2952
|
-
/**
|
|
2953
|
-
* Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
|
|
2954
|
-
*/
|
|
2955
|
-
preview_mode?: InvoiceListUpcomingLinesParams.PreviewMode;
|
|
2956
|
-
|
|
2957
|
-
/**
|
|
2958
|
-
* The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
|
|
2959
|
-
*/
|
|
2960
|
-
schedule?: string;
|
|
2961
|
-
|
|
2962
|
-
/**
|
|
2963
|
-
* The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.
|
|
2964
|
-
*/
|
|
2965
|
-
schedule_details?: InvoiceListUpcomingLinesParams.ScheduleDetails;
|
|
2966
|
-
|
|
2967
|
-
/**
|
|
2968
|
-
* The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.
|
|
2969
|
-
*/
|
|
2970
|
-
subscription?: string;
|
|
2971
|
-
|
|
2972
|
-
/**
|
|
2973
|
-
* For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.billing_cycle_anchor` instead.
|
|
2974
|
-
*/
|
|
2975
|
-
subscription_billing_cycle_anchor?:
|
|
2976
|
-
| InvoiceListUpcomingLinesParams.SubscriptionBillingCycleAnchor
|
|
2977
|
-
| number;
|
|
2978
|
-
|
|
2979
|
-
/**
|
|
2980
|
-
* A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at` instead.
|
|
2981
|
-
*/
|
|
2982
|
-
subscription_cancel_at?: Stripe.Emptyable<number>;
|
|
2983
|
-
|
|
2984
|
-
/**
|
|
2985
|
-
* Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead.
|
|
2986
|
-
*/
|
|
2987
|
-
subscription_cancel_at_period_end?: boolean;
|
|
2988
|
-
|
|
2989
|
-
/**
|
|
2990
|
-
* This simulates the subscription being canceled or expired immediately. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_now` instead.
|
|
2991
|
-
*/
|
|
2992
|
-
subscription_cancel_now?: boolean;
|
|
2993
|
-
|
|
2994
|
-
/**
|
|
2995
|
-
* If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. This field has been deprecated and will be removed in a future API version. Use `subscription_details.default_tax_rates` instead.
|
|
2996
|
-
*/
|
|
2997
|
-
subscription_default_tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
2998
|
-
|
|
2999
|
-
/**
|
|
3000
|
-
* The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.
|
|
3001
|
-
*/
|
|
3002
|
-
subscription_details?: InvoiceListUpcomingLinesParams.SubscriptionDetails;
|
|
3003
|
-
|
|
3004
|
-
/**
|
|
3005
|
-
* A list of up to 20 subscription items, each with an attached price. This field has been deprecated and will be removed in a future API version. Use `subscription_details.items` instead.
|
|
3006
|
-
*/
|
|
3007
|
-
subscription_items?: Array<
|
|
3008
|
-
InvoiceListUpcomingLinesParams.SubscriptionItem
|
|
3009
|
-
>;
|
|
3010
|
-
|
|
3011
|
-
/**
|
|
3012
|
-
* Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead.
|
|
3013
|
-
*/
|
|
3014
|
-
subscription_proration_behavior?: InvoiceListUpcomingLinesParams.SubscriptionProrationBehavior;
|
|
3015
|
-
|
|
3016
|
-
/**
|
|
3017
|
-
* If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_date` instead.
|
|
3018
|
-
*/
|
|
3019
|
-
subscription_proration_date?: number;
|
|
3020
|
-
|
|
3021
|
-
/**
|
|
3022
|
-
* For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. This field has been deprecated and will be removed in a future API version. Use `subscription_details.resume_at` instead.
|
|
3023
|
-
*/
|
|
3024
|
-
subscription_resume_at?: 'now';
|
|
3025
|
-
|
|
3026
|
-
/**
|
|
3027
|
-
* Date a subscription is intended to start (can be future or past). This field has been deprecated and will be removed in a future API version. Use `subscription_details.start_date` instead.
|
|
3028
|
-
*/
|
|
3029
|
-
subscription_start_date?: number;
|
|
3030
|
-
|
|
3031
|
-
/**
|
|
3032
|
-
* If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead.
|
|
3033
|
-
*/
|
|
3034
|
-
subscription_trial_end?: 'now' | number;
|
|
3035
|
-
|
|
3036
|
-
/**
|
|
3037
|
-
* Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
|
|
3038
|
-
*/
|
|
3039
|
-
subscription_trial_from_plan?: boolean;
|
|
3040
|
-
}
|
|
3041
|
-
|
|
3042
|
-
namespace InvoiceListUpcomingLinesParams {
|
|
3043
|
-
interface AutomaticTax {
|
|
3044
|
-
/**
|
|
3045
|
-
* Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
|
|
3046
|
-
*/
|
|
3047
|
-
enabled: boolean;
|
|
3048
|
-
|
|
3049
|
-
/**
|
|
3050
|
-
* The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
|
3051
|
-
*/
|
|
3052
|
-
liability?: AutomaticTax.Liability;
|
|
3053
|
-
}
|
|
3054
|
-
|
|
3055
|
-
namespace AutomaticTax {
|
|
3056
|
-
interface Liability {
|
|
3057
|
-
/**
|
|
3058
|
-
* The connected account being referenced when `type` is `account`.
|
|
3059
|
-
*/
|
|
3060
|
-
account?: string;
|
|
3061
|
-
|
|
3062
|
-
/**
|
|
3063
|
-
* Type of the account referenced in the request.
|
|
3064
|
-
*/
|
|
3065
|
-
type: Liability.Type;
|
|
3066
|
-
}
|
|
3067
|
-
|
|
3068
|
-
namespace Liability {
|
|
3069
|
-
type Type = 'account' | 'self';
|
|
3070
|
-
}
|
|
3071
|
-
}
|
|
3072
|
-
|
|
3073
|
-
interface CustomerDetails {
|
|
3074
|
-
/**
|
|
3075
|
-
* The customer's address.
|
|
3076
|
-
*/
|
|
3077
|
-
address?: Stripe.Emptyable<Stripe.AddressParam>;
|
|
3078
|
-
|
|
3079
|
-
/**
|
|
3080
|
-
* The customer's shipping information. Appears on invoices emailed to this customer.
|
|
3081
|
-
*/
|
|
3082
|
-
shipping?: Stripe.Emptyable<CustomerDetails.Shipping>;
|
|
3083
|
-
|
|
3084
|
-
/**
|
|
3085
|
-
* Tax details about the customer.
|
|
3086
|
-
*/
|
|
3087
|
-
tax?: CustomerDetails.Tax;
|
|
3088
|
-
|
|
3089
|
-
/**
|
|
3090
|
-
* The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
|
|
3091
|
-
*/
|
|
3092
|
-
tax_exempt?: Stripe.Emptyable<CustomerDetails.TaxExempt>;
|
|
3093
|
-
|
|
3094
|
-
/**
|
|
3095
|
-
* The customer's tax IDs.
|
|
3096
|
-
*/
|
|
3097
|
-
tax_ids?: Array<CustomerDetails.TaxId>;
|
|
3098
|
-
}
|
|
3099
|
-
|
|
3100
|
-
namespace CustomerDetails {
|
|
3101
|
-
interface Shipping {
|
|
3102
|
-
/**
|
|
3103
|
-
* Customer shipping address.
|
|
3104
|
-
*/
|
|
3105
|
-
address: Stripe.AddressParam;
|
|
3106
|
-
|
|
3107
|
-
/**
|
|
3108
|
-
* Customer name.
|
|
3109
|
-
*/
|
|
3110
|
-
name: string;
|
|
3111
|
-
|
|
3112
|
-
/**
|
|
3113
|
-
* Customer phone (including extension).
|
|
3114
|
-
*/
|
|
3115
|
-
phone?: string;
|
|
3116
|
-
}
|
|
3117
|
-
|
|
3118
|
-
interface Tax {
|
|
3119
|
-
/**
|
|
3120
|
-
* A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
|
|
3121
|
-
*/
|
|
3122
|
-
ip_address?: Stripe.Emptyable<string>;
|
|
3123
|
-
}
|
|
3124
|
-
|
|
3125
|
-
type TaxExempt = 'exempt' | 'none' | 'reverse';
|
|
3126
|
-
|
|
3127
|
-
interface TaxId {
|
|
3128
|
-
/**
|
|
3129
|
-
* Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
|
|
3130
|
-
*/
|
|
3131
|
-
type: TaxId.Type;
|
|
3132
|
-
|
|
3133
|
-
/**
|
|
3134
|
-
* Value of the tax ID.
|
|
3135
|
-
*/
|
|
3136
|
-
value: string;
|
|
3137
|
-
}
|
|
3138
|
-
|
|
3139
|
-
namespace TaxId {
|
|
3140
|
-
type Type =
|
|
3141
|
-
| 'ad_nrt'
|
|
3142
|
-
| 'ae_trn'
|
|
3143
|
-
| 'al_tin'
|
|
3144
|
-
| 'am_tin'
|
|
3145
|
-
| 'ao_tin'
|
|
3146
|
-
| 'ar_cuit'
|
|
3147
|
-
| 'au_abn'
|
|
3148
|
-
| 'au_arn'
|
|
3149
|
-
| 'ba_tin'
|
|
3150
|
-
| 'bb_tin'
|
|
3151
|
-
| 'bg_uic'
|
|
3152
|
-
| 'bh_vat'
|
|
3153
|
-
| 'bo_tin'
|
|
3154
|
-
| 'br_cnpj'
|
|
3155
|
-
| 'br_cpf'
|
|
3156
|
-
| 'bs_tin'
|
|
3157
|
-
| 'by_tin'
|
|
3158
|
-
| 'ca_bn'
|
|
3159
|
-
| 'ca_gst_hst'
|
|
3160
|
-
| 'ca_pst_bc'
|
|
3161
|
-
| 'ca_pst_mb'
|
|
3162
|
-
| 'ca_pst_sk'
|
|
3163
|
-
| 'ca_qst'
|
|
3164
|
-
| 'cd_nif'
|
|
3165
|
-
| 'ch_uid'
|
|
3166
|
-
| 'ch_vat'
|
|
3167
|
-
| 'cl_tin'
|
|
3168
|
-
| 'cn_tin'
|
|
3169
|
-
| 'co_nit'
|
|
3170
|
-
| 'cr_tin'
|
|
3171
|
-
| 'de_stn'
|
|
3172
|
-
| 'do_rcn'
|
|
3173
|
-
| 'ec_ruc'
|
|
3174
|
-
| 'eg_tin'
|
|
3175
|
-
| 'es_cif'
|
|
3176
|
-
| 'eu_oss_vat'
|
|
3177
|
-
| 'eu_vat'
|
|
3178
|
-
| 'gb_vat'
|
|
3179
|
-
| 'ge_vat'
|
|
3180
|
-
| 'gn_nif'
|
|
3181
|
-
| 'hk_br'
|
|
3182
|
-
| 'hr_oib'
|
|
3183
|
-
| 'hu_tin'
|
|
3184
|
-
| 'id_npwp'
|
|
3185
|
-
| 'il_vat'
|
|
3186
|
-
| 'in_gst'
|
|
3187
|
-
| 'is_vat'
|
|
3188
|
-
| 'jp_cn'
|
|
3189
|
-
| 'jp_rn'
|
|
3190
|
-
| 'jp_trn'
|
|
3191
|
-
| 'ke_pin'
|
|
3192
|
-
| 'kh_tin'
|
|
3193
|
-
| 'kr_brn'
|
|
3194
|
-
| 'kz_bin'
|
|
3195
|
-
| 'li_uid'
|
|
3196
|
-
| 'li_vat'
|
|
3197
|
-
| 'ma_vat'
|
|
3198
|
-
| 'md_vat'
|
|
3199
|
-
| 'me_pib'
|
|
3200
|
-
| 'mk_vat'
|
|
3201
|
-
| 'mr_nif'
|
|
3202
|
-
| 'mx_rfc'
|
|
3203
|
-
| 'my_frp'
|
|
3204
|
-
| 'my_itn'
|
|
3205
|
-
| 'my_sst'
|
|
3206
|
-
| 'ng_tin'
|
|
3207
|
-
| 'no_vat'
|
|
3208
|
-
| 'no_voec'
|
|
3209
|
-
| 'np_pan'
|
|
3210
|
-
| 'nz_gst'
|
|
3211
|
-
| 'om_vat'
|
|
3212
|
-
| 'pe_ruc'
|
|
3213
|
-
| 'ph_tin'
|
|
3214
|
-
| 'ro_tin'
|
|
3215
|
-
| 'rs_pib'
|
|
3216
|
-
| 'ru_inn'
|
|
3217
|
-
| 'ru_kpp'
|
|
3218
|
-
| 'sa_vat'
|
|
3219
|
-
| 'sg_gst'
|
|
3220
|
-
| 'sg_uen'
|
|
3221
|
-
| 'si_tin'
|
|
3222
|
-
| 'sn_ninea'
|
|
3223
|
-
| 'sr_fin'
|
|
3224
|
-
| 'sv_nit'
|
|
3225
|
-
| 'th_vat'
|
|
3226
|
-
| 'tj_tin'
|
|
3227
|
-
| 'tr_tin'
|
|
3228
|
-
| 'tw_vat'
|
|
3229
|
-
| 'tz_vat'
|
|
3230
|
-
| 'ua_vat'
|
|
3231
|
-
| 'ug_tin'
|
|
3232
|
-
| 'us_ein'
|
|
3233
|
-
| 'uy_ruc'
|
|
3234
|
-
| 'uz_tin'
|
|
3235
|
-
| 'uz_vat'
|
|
3236
|
-
| 've_rif'
|
|
3237
|
-
| 'vn_tin'
|
|
3238
|
-
| 'za_vat'
|
|
3239
|
-
| 'zm_tin'
|
|
3240
|
-
| 'zw_tin';
|
|
3241
|
-
}
|
|
3242
|
-
}
|
|
3243
|
-
|
|
3244
|
-
interface Discount {
|
|
3245
|
-
/**
|
|
3246
|
-
* ID of the coupon to create a new discount for.
|
|
3247
|
-
*/
|
|
3248
|
-
coupon?: string;
|
|
3249
|
-
|
|
3250
|
-
/**
|
|
3251
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
3252
|
-
*/
|
|
3253
|
-
discount?: string;
|
|
3254
|
-
|
|
3255
|
-
/**
|
|
3256
|
-
* ID of the promotion code to create a new discount for.
|
|
3257
|
-
*/
|
|
3258
|
-
promotion_code?: string;
|
|
3259
|
-
}
|
|
3260
|
-
|
|
3261
|
-
interface InvoiceItem {
|
|
3262
|
-
/**
|
|
3263
|
-
* The integer amount in cents (or local equivalent) of previewed invoice item.
|
|
3264
|
-
*/
|
|
3265
|
-
amount?: number;
|
|
3266
|
-
|
|
3267
|
-
/**
|
|
3268
|
-
* 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). Only applicable to new invoice items.
|
|
3269
|
-
*/
|
|
3270
|
-
currency?: string;
|
|
3271
|
-
|
|
3272
|
-
/**
|
|
3273
|
-
* An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
|
|
3274
|
-
*/
|
|
3275
|
-
description?: string;
|
|
3276
|
-
|
|
3277
|
-
/**
|
|
3278
|
-
* Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items.
|
|
3279
|
-
*/
|
|
3280
|
-
discountable?: boolean;
|
|
3281
|
-
|
|
3282
|
-
/**
|
|
3283
|
-
* The coupons to redeem into discounts for the invoice item in the preview.
|
|
3284
|
-
*/
|
|
3285
|
-
discounts?: Stripe.Emptyable<Array<InvoiceItem.Discount>>;
|
|
3286
|
-
|
|
3287
|
-
/**
|
|
3288
|
-
* The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice.
|
|
3289
|
-
*/
|
|
3290
|
-
invoiceitem?: string;
|
|
3291
|
-
|
|
3292
|
-
/**
|
|
3293
|
-
* 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`.
|
|
3294
|
-
*/
|
|
3295
|
-
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
3296
|
-
|
|
3297
|
-
/**
|
|
3298
|
-
* The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
|
|
3299
|
-
*/
|
|
3300
|
-
period?: InvoiceItem.Period;
|
|
3301
|
-
|
|
3302
|
-
/**
|
|
3303
|
-
* The ID of the price object. One of `price` or `price_data` is required.
|
|
3304
|
-
*/
|
|
3305
|
-
price?: string;
|
|
3306
|
-
|
|
3307
|
-
/**
|
|
3308
|
-
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
|
3309
|
-
*/
|
|
3310
|
-
price_data?: InvoiceItem.PriceData;
|
|
3311
|
-
|
|
3312
|
-
/**
|
|
3313
|
-
* Non-negative integer. The quantity of units for the invoice item.
|
|
3314
|
-
*/
|
|
3315
|
-
quantity?: number;
|
|
3316
|
-
|
|
3317
|
-
/**
|
|
3318
|
-
* Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
3319
|
-
*/
|
|
3320
|
-
tax_behavior?: InvoiceItem.TaxBehavior;
|
|
3321
|
-
|
|
3322
|
-
/**
|
|
3323
|
-
* A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
|
|
3324
|
-
*/
|
|
3325
|
-
tax_code?: Stripe.Emptyable<string>;
|
|
3326
|
-
|
|
3327
|
-
/**
|
|
3328
|
-
* The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item.
|
|
3329
|
-
*/
|
|
3330
|
-
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
3331
|
-
|
|
3332
|
-
/**
|
|
3333
|
-
* The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
|
|
3334
|
-
*/
|
|
3335
|
-
unit_amount?: number;
|
|
3336
|
-
|
|
3337
|
-
/**
|
|
3338
|
-
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
3339
|
-
*/
|
|
3340
|
-
unit_amount_decimal?: string;
|
|
3341
|
-
}
|
|
3342
|
-
|
|
3343
|
-
namespace InvoiceItem {
|
|
3344
|
-
interface Discount {
|
|
3345
|
-
/**
|
|
3346
|
-
* ID of the coupon to create a new discount for.
|
|
3347
|
-
*/
|
|
3348
|
-
coupon?: string;
|
|
3349
|
-
|
|
3350
|
-
/**
|
|
3351
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
3352
|
-
*/
|
|
3353
|
-
discount?: string;
|
|
3354
|
-
|
|
3355
|
-
/**
|
|
3356
|
-
* ID of the promotion code to create a new discount for.
|
|
3357
|
-
*/
|
|
3358
|
-
promotion_code?: string;
|
|
3359
|
-
}
|
|
3360
|
-
|
|
3361
|
-
interface Period {
|
|
3362
|
-
/**
|
|
3363
|
-
* The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
|
3364
|
-
*/
|
|
3365
|
-
end: number;
|
|
3366
|
-
|
|
3367
|
-
/**
|
|
3368
|
-
* The start of the period. This value is inclusive.
|
|
3369
|
-
*/
|
|
3370
|
-
start: number;
|
|
3371
|
-
}
|
|
3372
|
-
|
|
3373
|
-
interface PriceData {
|
|
3374
|
-
/**
|
|
3375
|
-
* 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).
|
|
3376
|
-
*/
|
|
3377
|
-
currency: string;
|
|
3378
|
-
|
|
3379
|
-
/**
|
|
3380
|
-
* The ID of the product that this price will belong to.
|
|
3381
|
-
*/
|
|
3382
|
-
product: string;
|
|
3383
|
-
|
|
3384
|
-
/**
|
|
3385
|
-
* Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
3386
|
-
*/
|
|
3387
|
-
tax_behavior?: PriceData.TaxBehavior;
|
|
3388
|
-
|
|
3389
|
-
/**
|
|
3390
|
-
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
|
3391
|
-
*/
|
|
3392
|
-
unit_amount?: number;
|
|
3393
|
-
|
|
3394
|
-
/**
|
|
3395
|
-
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
3396
|
-
*/
|
|
3397
|
-
unit_amount_decimal?: string;
|
|
3398
|
-
}
|
|
3399
|
-
|
|
3400
|
-
namespace PriceData {
|
|
3401
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
3402
|
-
}
|
|
3403
|
-
|
|
3404
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
3405
|
-
}
|
|
3406
|
-
|
|
3407
|
-
interface Issuer {
|
|
3408
|
-
/**
|
|
3409
|
-
* The connected account being referenced when `type` is `account`.
|
|
3410
|
-
*/
|
|
3411
|
-
account?: string;
|
|
3412
|
-
|
|
3413
|
-
/**
|
|
3414
|
-
* Type of the account referenced in the request.
|
|
3415
|
-
*/
|
|
3416
|
-
type: Issuer.Type;
|
|
3417
|
-
}
|
|
3418
|
-
|
|
3419
|
-
namespace Issuer {
|
|
3420
|
-
type Type = 'account' | 'self';
|
|
3421
|
-
}
|
|
3422
|
-
|
|
3423
|
-
type PreviewMode = 'next' | 'recurring';
|
|
3424
|
-
|
|
3425
|
-
interface ScheduleDetails {
|
|
3426
|
-
/**
|
|
3427
|
-
* Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription.
|
|
3428
|
-
*/
|
|
3429
|
-
end_behavior?: ScheduleDetails.EndBehavior;
|
|
3430
|
-
|
|
3431
|
-
/**
|
|
3432
|
-
* List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase.
|
|
3433
|
-
*/
|
|
3434
|
-
phases?: Array<ScheduleDetails.Phase>;
|
|
3435
|
-
|
|
3436
|
-
/**
|
|
3437
|
-
* In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
|
|
3438
|
-
*/
|
|
3439
|
-
proration_behavior?: ScheduleDetails.ProrationBehavior;
|
|
3440
|
-
}
|
|
3441
|
-
|
|
3442
|
-
namespace ScheduleDetails {
|
|
3443
|
-
type EndBehavior = 'cancel' | 'release';
|
|
3444
|
-
|
|
3445
|
-
interface Phase {
|
|
3446
|
-
/**
|
|
3447
|
-
* A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items.
|
|
3448
|
-
*/
|
|
3449
|
-
add_invoice_items?: Array<Phase.AddInvoiceItem>;
|
|
3450
|
-
|
|
3451
|
-
/**
|
|
3452
|
-
* A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
|
|
3453
|
-
*/
|
|
3454
|
-
application_fee_percent?: number;
|
|
3455
|
-
|
|
3456
|
-
/**
|
|
3457
|
-
* Automatic tax settings for this phase.
|
|
3458
|
-
*/
|
|
3459
|
-
automatic_tax?: Phase.AutomaticTax;
|
|
3460
|
-
|
|
3461
|
-
/**
|
|
3462
|
-
* Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
|
|
3463
|
-
*/
|
|
3464
|
-
billing_cycle_anchor?: Phase.BillingCycleAnchor;
|
|
3465
|
-
|
|
3466
|
-
/**
|
|
3467
|
-
* Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
|
3468
|
-
*/
|
|
3469
|
-
billing_thresholds?: Stripe.Emptyable<Phase.BillingThresholds>;
|
|
3470
|
-
|
|
3471
|
-
/**
|
|
3472
|
-
* 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`. Defaults to `charge_automatically` on creation.
|
|
3473
|
-
*/
|
|
3474
|
-
collection_method?: Phase.CollectionMethod;
|
|
3475
|
-
|
|
3476
|
-
/**
|
|
3477
|
-
* The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
|
|
3478
|
-
*/
|
|
3479
|
-
coupon?: string;
|
|
3480
|
-
|
|
3481
|
-
/**
|
|
3482
|
-
* 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).
|
|
3483
|
-
*/
|
|
3484
|
-
currency?: string;
|
|
3485
|
-
|
|
3486
|
-
/**
|
|
3487
|
-
* ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
|
|
3488
|
-
*/
|
|
3489
|
-
default_payment_method?: string;
|
|
3490
|
-
|
|
3491
|
-
/**
|
|
3492
|
-
* A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
|
|
3493
|
-
*/
|
|
3494
|
-
default_tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
3495
|
-
|
|
3496
|
-
/**
|
|
3497
|
-
* Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
|
|
3498
|
-
*/
|
|
3499
|
-
description?: Stripe.Emptyable<string>;
|
|
3500
|
-
|
|
3501
|
-
/**
|
|
3502
|
-
* The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts.
|
|
3503
|
-
*/
|
|
3504
|
-
discounts?: Stripe.Emptyable<Array<Phase.Discount>>;
|
|
3505
|
-
|
|
3506
|
-
/**
|
|
3507
|
-
* The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
|
|
3508
|
-
*/
|
|
3509
|
-
end_date?: number | 'now';
|
|
3510
|
-
|
|
3511
|
-
/**
|
|
3512
|
-
* All invoices will be billed using the specified settings.
|
|
3513
|
-
*/
|
|
3514
|
-
invoice_settings?: Phase.InvoiceSettings;
|
|
3515
|
-
|
|
3516
|
-
/**
|
|
3517
|
-
* List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
|
|
3518
|
-
*/
|
|
3519
|
-
items: Array<Phase.Item>;
|
|
3520
|
-
|
|
3521
|
-
/**
|
|
3522
|
-
* Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
|
|
3523
|
-
*/
|
|
3524
|
-
iterations?: number;
|
|
3525
|
-
|
|
3526
|
-
/**
|
|
3527
|
-
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
|
|
3528
|
-
*/
|
|
3529
|
-
metadata?: Stripe.MetadataParam;
|
|
3530
|
-
|
|
3531
|
-
/**
|
|
3532
|
-
* The account on behalf of which to charge, for each of the associated subscription's invoices.
|
|
3533
|
-
*/
|
|
3534
|
-
on_behalf_of?: string;
|
|
3535
|
-
|
|
3536
|
-
/**
|
|
3537
|
-
* Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase.
|
|
3538
|
-
*/
|
|
3539
|
-
proration_behavior?: Phase.ProrationBehavior;
|
|
3540
|
-
|
|
3541
|
-
/**
|
|
3542
|
-
* The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase.
|
|
3543
|
-
*/
|
|
3544
|
-
start_date?: number | 'now';
|
|
3545
|
-
|
|
3546
|
-
/**
|
|
3547
|
-
* The data with which to automatically create a Transfer for each of the associated subscription's invoices.
|
|
3548
|
-
*/
|
|
3549
|
-
transfer_data?: Phase.TransferData;
|
|
3550
|
-
|
|
3551
|
-
/**
|
|
3552
|
-
* If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
|
|
3553
|
-
*/
|
|
3554
|
-
trial?: boolean;
|
|
3555
|
-
|
|
3556
|
-
/**
|
|
3557
|
-
* Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial`
|
|
3558
|
-
*/
|
|
3559
|
-
trial_end?: number | 'now';
|
|
3560
|
-
}
|
|
3561
|
-
|
|
3562
|
-
namespace Phase {
|
|
3563
|
-
interface AddInvoiceItem {
|
|
3564
|
-
/**
|
|
3565
|
-
* The coupons to redeem into discounts for the item.
|
|
3566
|
-
*/
|
|
3567
|
-
discounts?: Array<AddInvoiceItem.Discount>;
|
|
3568
|
-
|
|
3569
|
-
/**
|
|
3570
|
-
* The ID of the price object. One of `price` or `price_data` is required.
|
|
3571
|
-
*/
|
|
3572
|
-
price?: string;
|
|
3573
|
-
|
|
3574
|
-
/**
|
|
3575
|
-
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
|
3576
|
-
*/
|
|
3577
|
-
price_data?: AddInvoiceItem.PriceData;
|
|
3578
|
-
|
|
3579
|
-
/**
|
|
3580
|
-
* Quantity for this item. Defaults to 1.
|
|
3581
|
-
*/
|
|
3582
|
-
quantity?: number;
|
|
3583
|
-
|
|
3584
|
-
/**
|
|
3585
|
-
* The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item.
|
|
3586
|
-
*/
|
|
3587
|
-
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
3588
|
-
}
|
|
3589
|
-
|
|
3590
|
-
namespace AddInvoiceItem {
|
|
3591
|
-
interface Discount {
|
|
3592
|
-
/**
|
|
3593
|
-
* ID of the coupon to create a new discount for.
|
|
3594
|
-
*/
|
|
3595
|
-
coupon?: string;
|
|
3596
|
-
|
|
3597
|
-
/**
|
|
3598
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
3599
|
-
*/
|
|
3600
|
-
discount?: string;
|
|
3601
|
-
|
|
3602
|
-
/**
|
|
3603
|
-
* ID of the promotion code to create a new discount for.
|
|
3604
|
-
*/
|
|
3605
|
-
promotion_code?: string;
|
|
3606
|
-
}
|
|
3607
|
-
|
|
3608
|
-
interface PriceData {
|
|
3609
|
-
/**
|
|
3610
|
-
* 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).
|
|
3611
|
-
*/
|
|
3612
|
-
currency: string;
|
|
3613
|
-
|
|
3614
|
-
/**
|
|
3615
|
-
* The ID of the product that this price will belong to.
|
|
3616
|
-
*/
|
|
3617
|
-
product: string;
|
|
3618
|
-
|
|
3619
|
-
/**
|
|
3620
|
-
* Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
3621
|
-
*/
|
|
3622
|
-
tax_behavior?: PriceData.TaxBehavior;
|
|
3623
|
-
|
|
3624
|
-
/**
|
|
3625
|
-
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer.
|
|
3626
|
-
*/
|
|
3627
|
-
unit_amount?: number;
|
|
3628
|
-
|
|
3629
|
-
/**
|
|
3630
|
-
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
3631
|
-
*/
|
|
3632
|
-
unit_amount_decimal?: string;
|
|
3633
|
-
}
|
|
3634
|
-
|
|
3635
|
-
namespace PriceData {
|
|
3636
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
3637
|
-
}
|
|
3638
|
-
}
|
|
3639
|
-
|
|
3640
|
-
interface AutomaticTax {
|
|
3641
|
-
/**
|
|
3642
|
-
* Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription.
|
|
3643
|
-
*/
|
|
3644
|
-
enabled: boolean;
|
|
3645
|
-
|
|
3646
|
-
/**
|
|
3647
|
-
* The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
|
|
3648
|
-
*/
|
|
3649
|
-
liability?: AutomaticTax.Liability;
|
|
3650
|
-
}
|
|
3651
|
-
|
|
3652
|
-
namespace AutomaticTax {
|
|
3653
|
-
interface Liability {
|
|
3654
|
-
/**
|
|
3655
|
-
* The connected account being referenced when `type` is `account`.
|
|
3656
|
-
*/
|
|
3657
|
-
account?: string;
|
|
3658
|
-
|
|
3659
|
-
/**
|
|
3660
|
-
* Type of the account referenced in the request.
|
|
3661
|
-
*/
|
|
3662
|
-
type: Liability.Type;
|
|
3663
|
-
}
|
|
3664
|
-
|
|
3665
|
-
namespace Liability {
|
|
3666
|
-
type Type = 'account' | 'self';
|
|
3667
|
-
}
|
|
3668
|
-
}
|
|
3669
|
-
|
|
3670
|
-
type BillingCycleAnchor = 'automatic' | 'phase_start';
|
|
3671
|
-
|
|
3672
|
-
interface BillingThresholds {
|
|
3673
|
-
/**
|
|
3674
|
-
* Monetary threshold that triggers the subscription to advance to a new billing period
|
|
3675
|
-
*/
|
|
3676
|
-
amount_gte?: number;
|
|
3677
|
-
|
|
3678
|
-
/**
|
|
3679
|
-
* 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.
|
|
3680
|
-
*/
|
|
3681
|
-
reset_billing_cycle_anchor?: boolean;
|
|
3682
|
-
}
|
|
3683
|
-
|
|
3684
|
-
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
3685
|
-
|
|
3686
|
-
interface Discount {
|
|
3687
|
-
/**
|
|
3688
|
-
* ID of the coupon to create a new discount for.
|
|
3689
|
-
*/
|
|
3690
|
-
coupon?: string;
|
|
3691
|
-
|
|
3692
|
-
/**
|
|
3693
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
3694
|
-
*/
|
|
3695
|
-
discount?: string;
|
|
3696
|
-
|
|
3697
|
-
/**
|
|
3698
|
-
* ID of the promotion code to create a new discount for.
|
|
3699
|
-
*/
|
|
3700
|
-
promotion_code?: string;
|
|
3701
|
-
}
|
|
3702
|
-
|
|
3703
|
-
interface InvoiceSettings {
|
|
3704
|
-
/**
|
|
3705
|
-
* The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule.
|
|
3706
|
-
*/
|
|
3707
|
-
account_tax_ids?: Stripe.Emptyable<Array<string>>;
|
|
3708
|
-
|
|
3709
|
-
/**
|
|
3710
|
-
* Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
|
|
3711
|
-
*/
|
|
3712
|
-
days_until_due?: number;
|
|
3713
|
-
|
|
3714
|
-
/**
|
|
3715
|
-
* The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
|
3716
|
-
*/
|
|
3717
|
-
issuer?: InvoiceSettings.Issuer;
|
|
3718
|
-
}
|
|
3719
|
-
|
|
3720
|
-
namespace InvoiceSettings {
|
|
3721
|
-
interface Issuer {
|
|
3722
|
-
/**
|
|
3723
|
-
* The connected account being referenced when `type` is `account`.
|
|
3724
|
-
*/
|
|
3725
|
-
account?: string;
|
|
3726
|
-
|
|
3727
|
-
/**
|
|
3728
|
-
* Type of the account referenced in the request.
|
|
3729
|
-
*/
|
|
3730
|
-
type: Issuer.Type;
|
|
3731
|
-
}
|
|
3732
|
-
|
|
3733
|
-
namespace Issuer {
|
|
3734
|
-
type Type = 'account' | 'self';
|
|
3735
|
-
}
|
|
3736
|
-
}
|
|
3737
|
-
|
|
3738
|
-
interface Item {
|
|
3739
|
-
/**
|
|
3740
|
-
* 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.
|
|
3741
|
-
*/
|
|
3742
|
-
billing_thresholds?: Stripe.Emptyable<Item.BillingThresholds>;
|
|
3743
|
-
|
|
3744
|
-
/**
|
|
3745
|
-
* The coupons to redeem into discounts for the subscription item.
|
|
3746
|
-
*/
|
|
3747
|
-
discounts?: Stripe.Emptyable<Array<Item.Discount>>;
|
|
3748
|
-
|
|
3749
|
-
/**
|
|
3750
|
-
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`.
|
|
3751
|
-
*/
|
|
3752
|
-
metadata?: Stripe.MetadataParam;
|
|
3753
|
-
|
|
3754
|
-
/**
|
|
3755
|
-
* The plan ID to subscribe to. You may specify the same ID in `plan` and `price`.
|
|
3756
|
-
*/
|
|
3757
|
-
plan?: string;
|
|
3758
|
-
|
|
3759
|
-
/**
|
|
3760
|
-
* The ID of the price object.
|
|
3761
|
-
*/
|
|
3762
|
-
price?: string;
|
|
3763
|
-
|
|
3764
|
-
/**
|
|
3765
|
-
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
|
|
3766
|
-
*/
|
|
3767
|
-
price_data?: Item.PriceData;
|
|
3768
|
-
|
|
3769
|
-
/**
|
|
3770
|
-
* Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`.
|
|
3771
|
-
*/
|
|
3772
|
-
quantity?: number;
|
|
3773
|
-
|
|
3774
|
-
/**
|
|
3775
|
-
* A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
|
3776
|
-
*/
|
|
3777
|
-
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
3778
|
-
}
|
|
3779
|
-
|
|
3780
|
-
namespace Item {
|
|
3781
|
-
interface BillingThresholds {
|
|
3782
|
-
/**
|
|
3783
|
-
* 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))
|
|
3784
|
-
*/
|
|
3785
|
-
usage_gte: number;
|
|
3786
|
-
}
|
|
3787
|
-
|
|
3788
|
-
interface Discount {
|
|
3789
|
-
/**
|
|
3790
|
-
* ID of the coupon to create a new discount for.
|
|
3791
|
-
*/
|
|
3792
|
-
coupon?: string;
|
|
3793
|
-
|
|
3794
|
-
/**
|
|
3795
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
3796
|
-
*/
|
|
3797
|
-
discount?: string;
|
|
3798
|
-
|
|
3799
|
-
/**
|
|
3800
|
-
* ID of the promotion code to create a new discount for.
|
|
3801
|
-
*/
|
|
3802
|
-
promotion_code?: string;
|
|
3803
|
-
}
|
|
3804
|
-
|
|
3805
|
-
interface PriceData {
|
|
3806
|
-
/**
|
|
3807
|
-
* 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).
|
|
3808
|
-
*/
|
|
3809
|
-
currency: string;
|
|
3810
|
-
|
|
3811
|
-
/**
|
|
3812
|
-
* The ID of the product that this price will belong to.
|
|
3813
|
-
*/
|
|
3814
|
-
product: string;
|
|
3815
|
-
|
|
3816
|
-
/**
|
|
3817
|
-
* The recurring components of a price such as `interval` and `interval_count`.
|
|
3818
|
-
*/
|
|
3819
|
-
recurring: PriceData.Recurring;
|
|
3820
|
-
|
|
3821
|
-
/**
|
|
3822
|
-
* Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
3823
|
-
*/
|
|
3824
|
-
tax_behavior?: PriceData.TaxBehavior;
|
|
3825
|
-
|
|
3826
|
-
/**
|
|
3827
|
-
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
|
3828
|
-
*/
|
|
3829
|
-
unit_amount?: number;
|
|
3830
|
-
|
|
3831
|
-
/**
|
|
3832
|
-
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
3833
|
-
*/
|
|
3834
|
-
unit_amount_decimal?: string;
|
|
3835
|
-
}
|
|
3836
|
-
|
|
3837
|
-
namespace PriceData {
|
|
3838
|
-
interface Recurring {
|
|
3839
|
-
/**
|
|
3840
|
-
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
3841
|
-
*/
|
|
3842
|
-
interval: Recurring.Interval;
|
|
3843
|
-
|
|
3844
|
-
/**
|
|
3845
|
-
* The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
|
3846
|
-
*/
|
|
3847
|
-
interval_count?: number;
|
|
3848
|
-
}
|
|
3849
|
-
|
|
3850
|
-
namespace Recurring {
|
|
3851
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
3852
|
-
}
|
|
3853
|
-
|
|
3854
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
3855
|
-
}
|
|
3856
|
-
}
|
|
3857
|
-
|
|
3858
|
-
type ProrationBehavior =
|
|
3859
|
-
| 'always_invoice'
|
|
3860
|
-
| 'create_prorations'
|
|
3861
|
-
| 'none';
|
|
3862
|
-
|
|
3863
|
-
interface TransferData {
|
|
3864
|
-
/**
|
|
3865
|
-
* A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
|
|
3866
|
-
*/
|
|
3867
|
-
amount_percent?: number;
|
|
3868
|
-
|
|
3869
|
-
/**
|
|
3870
|
-
* ID of an existing, connected Stripe account.
|
|
3871
|
-
*/
|
|
3872
|
-
destination: string;
|
|
3873
|
-
}
|
|
3874
|
-
}
|
|
3875
|
-
|
|
3876
|
-
type ProrationBehavior =
|
|
3877
|
-
| 'always_invoice'
|
|
3878
|
-
| 'create_prorations'
|
|
3879
|
-
| 'none';
|
|
3880
|
-
}
|
|
3881
|
-
|
|
3882
|
-
type SubscriptionBillingCycleAnchor = 'now' | 'unchanged';
|
|
3883
|
-
|
|
3884
|
-
interface SubscriptionDetails {
|
|
3885
|
-
/**
|
|
3886
|
-
* For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
|
|
3887
|
-
*/
|
|
3888
|
-
billing_cycle_anchor?: SubscriptionDetails.BillingCycleAnchor | number;
|
|
3889
|
-
|
|
3890
|
-
/**
|
|
3891
|
-
* A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
|
|
3892
|
-
*/
|
|
3893
|
-
cancel_at?: Stripe.Emptyable<number>;
|
|
3894
|
-
|
|
3895
|
-
/**
|
|
3896
|
-
* Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
|
|
3897
|
-
*/
|
|
3898
|
-
cancel_at_period_end?: boolean;
|
|
3899
|
-
|
|
3900
|
-
/**
|
|
3901
|
-
* This simulates the subscription being canceled or expired immediately.
|
|
3902
|
-
*/
|
|
3903
|
-
cancel_now?: boolean;
|
|
3904
|
-
|
|
3905
|
-
/**
|
|
3906
|
-
* If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set.
|
|
3907
|
-
*/
|
|
3908
|
-
default_tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
3909
|
-
|
|
3910
|
-
/**
|
|
3911
|
-
* A list of up to 20 subscription items, each with an attached price.
|
|
3912
|
-
*/
|
|
3913
|
-
items?: Array<SubscriptionDetails.Item>;
|
|
3914
|
-
|
|
3915
|
-
/**
|
|
3916
|
-
* Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`.
|
|
3917
|
-
*/
|
|
3918
|
-
proration_behavior?: SubscriptionDetails.ProrationBehavior;
|
|
3919
|
-
|
|
3920
|
-
/**
|
|
3921
|
-
* If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'.
|
|
3922
|
-
*/
|
|
3923
|
-
proration_date?: number;
|
|
3924
|
-
|
|
3925
|
-
/**
|
|
3926
|
-
* For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed.
|
|
3927
|
-
*/
|
|
3928
|
-
resume_at?: 'now';
|
|
3929
|
-
|
|
3930
|
-
/**
|
|
3931
|
-
* Date a subscription is intended to start (can be future or past).
|
|
3932
|
-
*/
|
|
3933
|
-
start_date?: number;
|
|
3934
|
-
|
|
3935
|
-
/**
|
|
3936
|
-
* If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required.
|
|
3937
|
-
*/
|
|
3938
|
-
trial_end?: 'now' | number;
|
|
3939
|
-
}
|
|
3940
|
-
|
|
3941
|
-
namespace SubscriptionDetails {
|
|
3942
|
-
type BillingCycleAnchor = 'now' | 'unchanged';
|
|
3943
|
-
|
|
3944
|
-
interface Item {
|
|
3945
|
-
/**
|
|
3946
|
-
* 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.
|
|
3947
|
-
*/
|
|
3948
|
-
billing_thresholds?: Stripe.Emptyable<Item.BillingThresholds>;
|
|
3949
|
-
|
|
3950
|
-
/**
|
|
3951
|
-
* Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
|
|
3952
|
-
*/
|
|
3953
|
-
clear_usage?: boolean;
|
|
3954
|
-
|
|
3955
|
-
/**
|
|
3956
|
-
* A flag that, if set to `true`, will delete the specified item.
|
|
3957
|
-
*/
|
|
3958
|
-
deleted?: boolean;
|
|
3959
|
-
|
|
3960
|
-
/**
|
|
3961
|
-
* The coupons to redeem into discounts for the subscription item.
|
|
3962
|
-
*/
|
|
3963
|
-
discounts?: Stripe.Emptyable<Array<Item.Discount>>;
|
|
3964
|
-
|
|
3965
|
-
/**
|
|
3966
|
-
* Subscription item to update.
|
|
3967
|
-
*/
|
|
3968
|
-
id?: string;
|
|
3969
|
-
|
|
3970
|
-
/**
|
|
3971
|
-
* 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`.
|
|
3972
|
-
*/
|
|
3973
|
-
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
3974
|
-
|
|
3975
|
-
/**
|
|
3976
|
-
* Plan ID for this item, as a string.
|
|
3977
|
-
*/
|
|
3978
|
-
plan?: string;
|
|
3979
|
-
|
|
3980
|
-
/**
|
|
3981
|
-
* The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
|
|
3982
|
-
*/
|
|
3983
|
-
price?: string;
|
|
3984
|
-
|
|
3985
|
-
/**
|
|
3986
|
-
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
|
3987
|
-
*/
|
|
3988
|
-
price_data?: Item.PriceData;
|
|
3989
|
-
|
|
3990
|
-
/**
|
|
3991
|
-
* Quantity for this item.
|
|
3992
|
-
*/
|
|
3993
|
-
quantity?: number;
|
|
3994
|
-
|
|
3995
|
-
/**
|
|
3996
|
-
* A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
|
3997
|
-
*/
|
|
3998
|
-
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
3999
|
-
}
|
|
4000
|
-
|
|
4001
|
-
namespace Item {
|
|
4002
|
-
interface BillingThresholds {
|
|
4003
|
-
/**
|
|
4004
|
-
* 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))
|
|
4005
|
-
*/
|
|
4006
|
-
usage_gte: number;
|
|
4007
|
-
}
|
|
4008
|
-
|
|
4009
|
-
interface Discount {
|
|
4010
|
-
/**
|
|
4011
|
-
* ID of the coupon to create a new discount for.
|
|
4012
|
-
*/
|
|
4013
|
-
coupon?: string;
|
|
4014
|
-
|
|
4015
|
-
/**
|
|
4016
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
4017
|
-
*/
|
|
4018
|
-
discount?: string;
|
|
4019
|
-
|
|
4020
|
-
/**
|
|
4021
|
-
* ID of the promotion code to create a new discount for.
|
|
4022
|
-
*/
|
|
4023
|
-
promotion_code?: string;
|
|
4024
|
-
}
|
|
4025
|
-
|
|
4026
|
-
interface PriceData {
|
|
4027
|
-
/**
|
|
4028
|
-
* 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).
|
|
4029
|
-
*/
|
|
4030
|
-
currency: string;
|
|
4031
|
-
|
|
4032
|
-
/**
|
|
4033
|
-
* The ID of the product that this price will belong to.
|
|
4034
|
-
*/
|
|
4035
|
-
product: string;
|
|
4036
|
-
|
|
4037
|
-
/**
|
|
4038
|
-
* The recurring components of a price such as `interval` and `interval_count`.
|
|
4039
|
-
*/
|
|
4040
|
-
recurring: PriceData.Recurring;
|
|
4041
|
-
|
|
4042
|
-
/**
|
|
4043
|
-
* Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
4044
|
-
*/
|
|
4045
|
-
tax_behavior?: PriceData.TaxBehavior;
|
|
4046
|
-
|
|
4047
|
-
/**
|
|
4048
|
-
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
|
4049
|
-
*/
|
|
4050
|
-
unit_amount?: number;
|
|
4051
|
-
|
|
4052
|
-
/**
|
|
4053
|
-
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
4054
|
-
*/
|
|
4055
|
-
unit_amount_decimal?: string;
|
|
4056
|
-
}
|
|
4057
|
-
|
|
4058
|
-
namespace PriceData {
|
|
4059
|
-
interface Recurring {
|
|
4060
|
-
/**
|
|
4061
|
-
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
4062
|
-
*/
|
|
4063
|
-
interval: Recurring.Interval;
|
|
4064
|
-
|
|
4065
|
-
/**
|
|
4066
|
-
* The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
|
4067
|
-
*/
|
|
4068
|
-
interval_count?: number;
|
|
4069
|
-
}
|
|
4070
|
-
|
|
4071
|
-
namespace Recurring {
|
|
4072
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4073
|
-
}
|
|
4074
|
-
|
|
4075
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
4076
|
-
}
|
|
4077
|
-
}
|
|
4078
|
-
|
|
4079
|
-
type ProrationBehavior =
|
|
4080
|
-
| 'always_invoice'
|
|
4081
|
-
| 'create_prorations'
|
|
4082
|
-
| 'none';
|
|
4083
|
-
}
|
|
4084
|
-
|
|
4085
|
-
interface SubscriptionItem {
|
|
4086
|
-
/**
|
|
4087
|
-
* 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.
|
|
4088
|
-
*/
|
|
4089
|
-
billing_thresholds?: Stripe.Emptyable<
|
|
4090
|
-
SubscriptionItem.BillingThresholds
|
|
4091
|
-
>;
|
|
4092
|
-
|
|
4093
|
-
/**
|
|
4094
|
-
* Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
|
|
4095
|
-
*/
|
|
4096
|
-
clear_usage?: boolean;
|
|
4097
|
-
|
|
4098
|
-
/**
|
|
4099
|
-
* A flag that, if set to `true`, will delete the specified item.
|
|
4100
|
-
*/
|
|
4101
|
-
deleted?: boolean;
|
|
4102
|
-
|
|
4103
|
-
/**
|
|
4104
|
-
* The coupons to redeem into discounts for the subscription item.
|
|
4105
|
-
*/
|
|
4106
|
-
discounts?: Stripe.Emptyable<Array<SubscriptionItem.Discount>>;
|
|
4107
|
-
|
|
4108
|
-
/**
|
|
4109
|
-
* Subscription item to update.
|
|
4110
|
-
*/
|
|
4111
|
-
id?: string;
|
|
4112
|
-
|
|
4113
|
-
/**
|
|
4114
|
-
* 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`.
|
|
4115
|
-
*/
|
|
4116
|
-
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
4117
|
-
|
|
4118
|
-
/**
|
|
4119
|
-
* Plan ID for this item, as a string.
|
|
4120
|
-
*/
|
|
4121
|
-
plan?: string;
|
|
4122
|
-
|
|
4123
|
-
/**
|
|
4124
|
-
* The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
|
|
4125
|
-
*/
|
|
4126
|
-
price?: string;
|
|
4127
|
-
|
|
4128
|
-
/**
|
|
4129
|
-
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
|
4130
|
-
*/
|
|
4131
|
-
price_data?: SubscriptionItem.PriceData;
|
|
4132
|
-
|
|
4133
|
-
/**
|
|
4134
|
-
* Quantity for this item.
|
|
4135
|
-
*/
|
|
4136
|
-
quantity?: number;
|
|
4137
|
-
|
|
4138
|
-
/**
|
|
4139
|
-
* A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
|
|
4140
|
-
*/
|
|
4141
|
-
tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
4142
|
-
}
|
|
4143
|
-
|
|
4144
|
-
namespace SubscriptionItem {
|
|
4145
|
-
interface BillingThresholds {
|
|
4146
|
-
/**
|
|
4147
|
-
* 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))
|
|
4148
|
-
*/
|
|
4149
|
-
usage_gte: number;
|
|
4150
|
-
}
|
|
4151
|
-
|
|
4152
|
-
interface Discount {
|
|
4153
|
-
/**
|
|
4154
|
-
* ID of the coupon to create a new discount for.
|
|
4155
|
-
*/
|
|
4156
|
-
coupon?: string;
|
|
4157
|
-
|
|
4158
|
-
/**
|
|
4159
|
-
* ID of an existing discount on the object (or one of its ancestors) to reuse.
|
|
4160
|
-
*/
|
|
4161
|
-
discount?: string;
|
|
4162
|
-
|
|
4163
|
-
/**
|
|
4164
|
-
* ID of the promotion code to create a new discount for.
|
|
4165
|
-
*/
|
|
4166
|
-
promotion_code?: string;
|
|
4167
|
-
}
|
|
4168
|
-
|
|
4169
|
-
interface PriceData {
|
|
4170
|
-
/**
|
|
4171
|
-
* 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).
|
|
4172
|
-
*/
|
|
4173
|
-
currency: string;
|
|
4174
|
-
|
|
4175
|
-
/**
|
|
4176
|
-
* The ID of the product that this price will belong to.
|
|
4177
|
-
*/
|
|
4178
|
-
product: string;
|
|
4179
|
-
|
|
4180
|
-
/**
|
|
4181
|
-
* The recurring components of a price such as `interval` and `interval_count`.
|
|
4182
|
-
*/
|
|
4183
|
-
recurring: PriceData.Recurring;
|
|
4184
|
-
|
|
4185
|
-
/**
|
|
4186
|
-
* Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
|
4187
|
-
*/
|
|
4188
|
-
tax_behavior?: PriceData.TaxBehavior;
|
|
4189
|
-
|
|
4190
|
-
/**
|
|
4191
|
-
* A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
|
4192
|
-
*/
|
|
4193
|
-
unit_amount?: number;
|
|
4194
|
-
|
|
4195
|
-
/**
|
|
4196
|
-
* Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
|
4197
|
-
*/
|
|
4198
|
-
unit_amount_decimal?: string;
|
|
4199
|
-
}
|
|
4200
|
-
|
|
4201
|
-
namespace PriceData {
|
|
4202
|
-
interface Recurring {
|
|
4203
|
-
/**
|
|
4204
|
-
* Specifies billing frequency. Either `day`, `week`, `month` or `year`.
|
|
4205
|
-
*/
|
|
4206
|
-
interval: Recurring.Interval;
|
|
4207
|
-
|
|
4208
|
-
/**
|
|
4209
|
-
* The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
|
|
4210
|
-
*/
|
|
4211
|
-
interval_count?: number;
|
|
4212
|
-
}
|
|
4213
|
-
|
|
4214
|
-
namespace Recurring {
|
|
4215
|
-
type Interval = 'day' | 'month' | 'week' | 'year';
|
|
4216
|
-
}
|
|
4217
|
-
|
|
4218
|
-
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
4219
|
-
}
|
|
4220
|
-
}
|
|
4221
|
-
|
|
4222
|
-
type SubscriptionProrationBehavior =
|
|
4223
|
-
| 'always_invoice'
|
|
4224
|
-
| 'create_prorations'
|
|
4225
|
-
| 'none';
|
|
4226
|
-
}
|
|
4227
|
-
|
|
4228
|
-
interface InvoiceMarkUncollectibleParams {
|
|
4229
|
-
/**
|
|
4230
|
-
* Specifies which fields in the response should be expanded.
|
|
4231
|
-
*/
|
|
4232
|
-
expand?: Array<string>;
|
|
4233
|
-
}
|
|
4234
|
-
|
|
4235
|
-
interface InvoicePayParams {
|
|
4236
|
-
/**
|
|
4237
|
-
* Specifies which fields in the response should be expanded.
|
|
4238
|
-
*/
|
|
4239
|
-
expand?: Array<string>;
|
|
4240
|
-
|
|
4241
|
-
/**
|
|
4242
|
-
* In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due.
|
|
4243
|
-
*
|
|
4244
|
-
* Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`.
|
|
4245
|
-
*/
|
|
4246
|
-
forgive?: boolean;
|
|
4247
|
-
|
|
4248
|
-
/**
|
|
4249
|
-
* ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set.
|
|
4250
|
-
*/
|
|
4251
|
-
mandate?: Stripe.Emptyable<string>;
|
|
4252
|
-
|
|
4253
|
-
/**
|
|
4254
|
-
* Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session).
|
|
4255
|
-
*/
|
|
4256
|
-
off_session?: boolean;
|
|
4257
|
-
|
|
4258
|
-
/**
|
|
4259
|
-
* Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`.
|
|
4260
|
-
*/
|
|
4261
|
-
paid_out_of_band?: boolean;
|
|
4262
|
-
|
|
4263
|
-
/**
|
|
4264
|
-
* A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.
|
|
4265
|
-
*/
|
|
4266
|
-
payment_method?: string;
|
|
4267
|
-
|
|
4268
|
-
/**
|
|
4269
|
-
* A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid.
|
|
4270
|
-
*/
|
|
4271
|
-
source?: string;
|
|
4272
|
-
}
|
|
4273
|
-
|
|
4274
|
-
interface InvoiceRemoveLinesParams {
|
|
4275
|
-
/**
|
|
4276
|
-
* The line items to remove.
|
|
4277
|
-
*/
|
|
4278
|
-
lines: Array<InvoiceRemoveLinesParams.Line>;
|
|
4279
|
-
|
|
4280
|
-
/**
|
|
4281
|
-
* Specifies which fields in the response should be expanded.
|
|
4282
|
-
*/
|
|
4283
|
-
expand?: Array<string>;
|
|
4284
|
-
|
|
4285
|
-
/**
|
|
4286
|
-
* 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`.
|
|
4287
|
-
*/
|
|
4288
|
-
invoice_metadata?: Stripe.Emptyable<{
|
|
4289
|
-
[key: string]: string;
|
|
4290
|
-
}>;
|
|
4291
|
-
}
|
|
4292
|
-
|
|
4293
|
-
namespace InvoiceRemoveLinesParams {
|
|
4294
|
-
interface Line {
|
|
4295
|
-
/**
|
|
4296
|
-
* Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice.
|
|
4297
|
-
*/
|
|
4298
|
-
behavior: Line.Behavior;
|
|
4299
|
-
|
|
4300
|
-
/**
|
|
4301
|
-
* ID of an existing line item to remove from this invoice.
|
|
4302
|
-
*/
|
|
4303
|
-
id: string;
|
|
4304
|
-
}
|
|
4305
|
-
|
|
4306
|
-
namespace Line {
|
|
4307
|
-
type Behavior = 'delete' | 'unassign';
|
|
4308
|
-
}
|
|
4309
|
-
}
|
|
4310
|
-
|
|
4311
|
-
interface InvoiceRetrieveUpcomingParams {
|
|
4312
|
-
/**
|
|
4313
|
-
* Settings for automatic tax lookup for this invoice preview.
|
|
4314
|
-
*/
|
|
4315
|
-
automatic_tax?: InvoiceRetrieveUpcomingParams.AutomaticTax;
|
|
4316
|
-
|
|
4317
|
-
/**
|
|
4318
|
-
* The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
|
|
4319
|
-
*/
|
|
4320
|
-
coupon?: string;
|
|
4321
|
-
|
|
4322
|
-
/**
|
|
4323
|
-
* The currency to preview this invoice in. Defaults to that of `customer` if not specified.
|
|
4324
|
-
*/
|
|
4325
|
-
currency?: string;
|
|
4326
|
-
|
|
4327
|
-
/**
|
|
4328
|
-
* The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
|
4329
|
-
*/
|
|
4330
|
-
customer?: string;
|
|
4331
|
-
|
|
4332
|
-
/**
|
|
4333
|
-
* Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set.
|
|
4334
|
-
*/
|
|
4335
|
-
customer_details?: InvoiceRetrieveUpcomingParams.CustomerDetails;
|
|
4336
|
-
|
|
4337
|
-
/**
|
|
4338
|
-
* The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts.
|
|
4339
|
-
*/
|
|
4340
|
-
discounts?: Stripe.Emptyable<
|
|
4341
|
-
Array<InvoiceRetrieveUpcomingParams.Discount>
|
|
4342
|
-
>;
|
|
4343
|
-
|
|
4344
|
-
/**
|
|
4345
|
-
* Specifies which fields in the response should be expanded.
|
|
4346
|
-
*/
|
|
4347
|
-
expand?: Array<string>;
|
|
4348
|
-
|
|
4349
|
-
/**
|
|
4350
|
-
* List of invoice items to add or update in the upcoming invoice preview (up to 250).
|
|
4351
|
-
*/
|
|
4352
|
-
invoice_items?: Array<InvoiceRetrieveUpcomingParams.InvoiceItem>;
|
|
4353
|
-
|
|
4354
|
-
/**
|
|
4355
|
-
* The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account.
|
|
4356
|
-
*/
|
|
4357
|
-
issuer?: InvoiceRetrieveUpcomingParams.Issuer;
|
|
4358
|
-
|
|
4359
|
-
/**
|
|
4360
|
-
* The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details.
|
|
4361
|
-
*/
|
|
4362
|
-
on_behalf_of?: Stripe.Emptyable<string>;
|
|
4363
|
-
|
|
4364
|
-
/**
|
|
4365
|
-
* Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified.
|
|
4366
|
-
*/
|
|
4367
|
-
preview_mode?: InvoiceRetrieveUpcomingParams.PreviewMode;
|
|
4368
|
-
|
|
4369
|
-
/**
|
|
4370
|
-
* The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields.
|
|
4371
|
-
*/
|
|
4372
|
-
schedule?: string;
|
|
4373
|
-
|
|
4374
|
-
/**
|
|
4375
|
-
* The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields.
|
|
4376
|
-
*/
|
|
4377
|
-
schedule_details?: InvoiceRetrieveUpcomingParams.ScheduleDetails;
|
|
4378
|
-
|
|
4379
|
-
/**
|
|
4380
|
-
* The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions.
|
|
4381
|
-
*/
|
|
4382
|
-
subscription?: string;
|
|
4383
|
-
|
|
4384
|
-
/**
|
|
4385
|
-
* For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.billing_cycle_anchor` instead.
|
|
4386
|
-
*/
|
|
4387
|
-
subscription_billing_cycle_anchor?:
|
|
4388
|
-
| InvoiceRetrieveUpcomingParams.SubscriptionBillingCycleAnchor
|
|
4389
|
-
| number;
|
|
4390
|
-
|
|
4391
|
-
/**
|
|
4392
|
-
* A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at` instead.
|
|
4393
|
-
*/
|
|
4394
|
-
subscription_cancel_at?: Stripe.Emptyable<number>;
|
|
4395
|
-
|
|
4396
|
-
/**
|
|
4397
|
-
* Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead.
|
|
4398
|
-
*/
|
|
4399
|
-
subscription_cancel_at_period_end?: boolean;
|
|
4400
|
-
|
|
4401
|
-
/**
|
|
4402
|
-
* This simulates the subscription being canceled or expired immediately. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_now` instead.
|
|
4403
|
-
*/
|
|
4404
|
-
subscription_cancel_now?: boolean;
|
|
4405
|
-
|
|
4406
|
-
/**
|
|
4407
|
-
* If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. This field has been deprecated and will be removed in a future API version. Use `subscription_details.default_tax_rates` instead.
|
|
4408
|
-
*/
|
|
4409
|
-
subscription_default_tax_rates?: Stripe.Emptyable<Array<string>>;
|
|
4410
|
-
|
|
4411
|
-
/**
|
|
4412
|
-
* The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.
|
|
4413
|
-
*/
|
|
4414
|
-
subscription_details?: InvoiceRetrieveUpcomingParams.SubscriptionDetails;
|
|
4415
|
-
|
|
4416
|
-
/**
|
|
4417
|
-
* A list of up to 20 subscription items, each with an attached price. This field has been deprecated and will be removed in a future API version. Use `subscription_details.items` instead.
|
|
4418
|
-
*/
|
|
4419
|
-
subscription_items?: Array<
|
|
4420
|
-
InvoiceRetrieveUpcomingParams.SubscriptionItem
|
|
4421
|
-
>;
|
|
4422
|
-
|
|
4423
|
-
/**
|
|
4424
|
-
* Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead.
|
|
4425
|
-
*/
|
|
4426
|
-
subscription_proration_behavior?: InvoiceRetrieveUpcomingParams.SubscriptionProrationBehavior;
|
|
4427
|
-
|
|
4428
|
-
/**
|
|
4429
|
-
* If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_date` instead.
|
|
4430
|
-
*/
|
|
4431
|
-
subscription_proration_date?: number;
|
|
4432
|
-
|
|
4433
|
-
/**
|
|
4434
|
-
* For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. This field has been deprecated and will be removed in a future API version. Use `subscription_details.resume_at` instead.
|
|
4435
|
-
*/
|
|
4436
|
-
subscription_resume_at?: 'now';
|
|
4437
|
-
|
|
4438
|
-
/**
|
|
4439
|
-
* Date a subscription is intended to start (can be future or past). This field has been deprecated and will be removed in a future API version. Use `subscription_details.start_date` instead.
|
|
4440
|
-
*/
|
|
4441
|
-
subscription_start_date?: number;
|
|
4442
|
-
|
|
4443
|
-
/**
|
|
4444
|
-
* If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead.
|
|
4445
|
-
*/
|
|
4446
|
-
subscription_trial_end?: 'now' | number;
|
|
4447
|
-
|
|
4448
|
-
/**
|
|
4449
|
-
* Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more.
|
|
1874
|
+
* The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields.
|
|
4450
1875
|
*/
|
|
4451
|
-
|
|
1876
|
+
subscription_details?: InvoiceCreatePreviewParams.SubscriptionDetails;
|
|
4452
1877
|
}
|
|
4453
1878
|
|
|
4454
|
-
namespace
|
|
1879
|
+
namespace InvoiceCreatePreviewParams {
|
|
4455
1880
|
interface AutomaticTax {
|
|
4456
1881
|
/**
|
|
4457
1882
|
* Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices.
|
|
@@ -4789,7 +2214,7 @@ declare module 'stripe' {
|
|
|
4789
2214
|
currency: string;
|
|
4790
2215
|
|
|
4791
2216
|
/**
|
|
4792
|
-
* The ID of the
|
|
2217
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
4793
2218
|
*/
|
|
4794
2219
|
product: string;
|
|
4795
2220
|
|
|
@@ -4875,21 +2300,11 @@ declare module 'stripe' {
|
|
|
4875
2300
|
*/
|
|
4876
2301
|
billing_cycle_anchor?: Phase.BillingCycleAnchor;
|
|
4877
2302
|
|
|
4878
|
-
/**
|
|
4879
|
-
* Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds.
|
|
4880
|
-
*/
|
|
4881
|
-
billing_thresholds?: Stripe.Emptyable<Phase.BillingThresholds>;
|
|
4882
|
-
|
|
4883
2303
|
/**
|
|
4884
2304
|
* 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`. Defaults to `charge_automatically` on creation.
|
|
4885
2305
|
*/
|
|
4886
2306
|
collection_method?: Phase.CollectionMethod;
|
|
4887
2307
|
|
|
4888
|
-
/**
|
|
4889
|
-
* The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead.
|
|
4890
|
-
*/
|
|
4891
|
-
coupon?: string;
|
|
4892
|
-
|
|
4893
2308
|
/**
|
|
4894
2309
|
* 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).
|
|
4895
2310
|
*/
|
|
@@ -5024,7 +2439,7 @@ declare module 'stripe' {
|
|
|
5024
2439
|
currency: string;
|
|
5025
2440
|
|
|
5026
2441
|
/**
|
|
5027
|
-
* The ID of the
|
|
2442
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
5028
2443
|
*/
|
|
5029
2444
|
product: string;
|
|
5030
2445
|
|
|
@@ -5081,18 +2496,6 @@ declare module 'stripe' {
|
|
|
5081
2496
|
|
|
5082
2497
|
type BillingCycleAnchor = 'automatic' | 'phase_start';
|
|
5083
2498
|
|
|
5084
|
-
interface BillingThresholds {
|
|
5085
|
-
/**
|
|
5086
|
-
* Monetary threshold that triggers the subscription to advance to a new billing period
|
|
5087
|
-
*/
|
|
5088
|
-
amount_gte?: number;
|
|
5089
|
-
|
|
5090
|
-
/**
|
|
5091
|
-
* 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.
|
|
5092
|
-
*/
|
|
5093
|
-
reset_billing_cycle_anchor?: boolean;
|
|
5094
|
-
}
|
|
5095
|
-
|
|
5096
2499
|
type CollectionMethod = 'charge_automatically' | 'send_invoice';
|
|
5097
2500
|
|
|
5098
2501
|
interface Discount {
|
|
@@ -5148,11 +2551,6 @@ declare module 'stripe' {
|
|
|
5148
2551
|
}
|
|
5149
2552
|
|
|
5150
2553
|
interface Item {
|
|
5151
|
-
/**
|
|
5152
|
-
* 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.
|
|
5153
|
-
*/
|
|
5154
|
-
billing_thresholds?: Stripe.Emptyable<Item.BillingThresholds>;
|
|
5155
|
-
|
|
5156
2554
|
/**
|
|
5157
2555
|
* The coupons to redeem into discounts for the subscription item.
|
|
5158
2556
|
*/
|
|
@@ -5190,13 +2588,6 @@ declare module 'stripe' {
|
|
|
5190
2588
|
}
|
|
5191
2589
|
|
|
5192
2590
|
namespace Item {
|
|
5193
|
-
interface BillingThresholds {
|
|
5194
|
-
/**
|
|
5195
|
-
* 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))
|
|
5196
|
-
*/
|
|
5197
|
-
usage_gte: number;
|
|
5198
|
-
}
|
|
5199
|
-
|
|
5200
2591
|
interface Discount {
|
|
5201
2592
|
/**
|
|
5202
2593
|
* ID of the coupon to create a new discount for.
|
|
@@ -5221,7 +2612,7 @@ declare module 'stripe' {
|
|
|
5221
2612
|
currency: string;
|
|
5222
2613
|
|
|
5223
2614
|
/**
|
|
5224
|
-
* The ID of the
|
|
2615
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
5225
2616
|
*/
|
|
5226
2617
|
product: string;
|
|
5227
2618
|
|
|
@@ -5291,8 +2682,6 @@ declare module 'stripe' {
|
|
|
5291
2682
|
| 'none';
|
|
5292
2683
|
}
|
|
5293
2684
|
|
|
5294
|
-
type SubscriptionBillingCycleAnchor = 'now' | 'unchanged';
|
|
5295
|
-
|
|
5296
2685
|
interface SubscriptionDetails {
|
|
5297
2686
|
/**
|
|
5298
2687
|
* For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`.
|
|
@@ -5354,11 +2743,6 @@ declare module 'stripe' {
|
|
|
5354
2743
|
type BillingCycleAnchor = 'now' | 'unchanged';
|
|
5355
2744
|
|
|
5356
2745
|
interface Item {
|
|
5357
|
-
/**
|
|
5358
|
-
* 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.
|
|
5359
|
-
*/
|
|
5360
|
-
billing_thresholds?: Stripe.Emptyable<Item.BillingThresholds>;
|
|
5361
|
-
|
|
5362
2746
|
/**
|
|
5363
2747
|
* Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
|
|
5364
2748
|
*/
|
|
@@ -5411,13 +2795,6 @@ declare module 'stripe' {
|
|
|
5411
2795
|
}
|
|
5412
2796
|
|
|
5413
2797
|
namespace Item {
|
|
5414
|
-
interface BillingThresholds {
|
|
5415
|
-
/**
|
|
5416
|
-
* 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))
|
|
5417
|
-
*/
|
|
5418
|
-
usage_gte: number;
|
|
5419
|
-
}
|
|
5420
|
-
|
|
5421
2798
|
interface Discount {
|
|
5422
2799
|
/**
|
|
5423
2800
|
* ID of the coupon to create a new discount for.
|
|
@@ -5442,7 +2819,7 @@ declare module 'stripe' {
|
|
|
5442
2819
|
currency: string;
|
|
5443
2820
|
|
|
5444
2821
|
/**
|
|
5445
|
-
* The ID of the
|
|
2822
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to.
|
|
5446
2823
|
*/
|
|
5447
2824
|
product: string;
|
|
5448
2825
|
|
|
@@ -5493,148 +2870,108 @@ declare module 'stripe' {
|
|
|
5493
2870
|
| 'create_prorations'
|
|
5494
2871
|
| 'none';
|
|
5495
2872
|
}
|
|
2873
|
+
}
|
|
5496
2874
|
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
SubscriptionItem.BillingThresholds
|
|
5503
|
-
>;
|
|
5504
|
-
|
|
5505
|
-
/**
|
|
5506
|
-
* Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached.
|
|
5507
|
-
*/
|
|
5508
|
-
clear_usage?: boolean;
|
|
5509
|
-
|
|
5510
|
-
/**
|
|
5511
|
-
* A flag that, if set to `true`, will delete the specified item.
|
|
5512
|
-
*/
|
|
5513
|
-
deleted?: boolean;
|
|
5514
|
-
|
|
5515
|
-
/**
|
|
5516
|
-
* The coupons to redeem into discounts for the subscription item.
|
|
5517
|
-
*/
|
|
5518
|
-
discounts?: Stripe.Emptyable<Array<SubscriptionItem.Discount>>;
|
|
5519
|
-
|
|
5520
|
-
/**
|
|
5521
|
-
* Subscription item to update.
|
|
5522
|
-
*/
|
|
5523
|
-
id?: string;
|
|
5524
|
-
|
|
5525
|
-
/**
|
|
5526
|
-
* 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`.
|
|
5527
|
-
*/
|
|
5528
|
-
metadata?: Stripe.Emptyable<Stripe.MetadataParam>;
|
|
5529
|
-
|
|
5530
|
-
/**
|
|
5531
|
-
* Plan ID for this item, as a string.
|
|
5532
|
-
*/
|
|
5533
|
-
plan?: string;
|
|
5534
|
-
|
|
5535
|
-
/**
|
|
5536
|
-
* The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided.
|
|
5537
|
-
*/
|
|
5538
|
-
price?: string;
|
|
5539
|
-
|
|
5540
|
-
/**
|
|
5541
|
-
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
|
5542
|
-
*/
|
|
5543
|
-
price_data?: SubscriptionItem.PriceData;
|
|
5544
|
-
|
|
5545
|
-
/**
|
|
5546
|
-
* Quantity for this item.
|
|
5547
|
-
*/
|
|
5548
|
-
quantity?: number;
|
|
2875
|
+
interface InvoiceFinalizeInvoiceParams {
|
|
2876
|
+
/**
|
|
2877
|
+
* Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action.
|
|
2878
|
+
*/
|
|
2879
|
+
auto_advance?: boolean;
|
|
5549
2880
|
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
2881
|
+
/**
|
|
2882
|
+
* Specifies which fields in the response should be expanded.
|
|
2883
|
+
*/
|
|
2884
|
+
expand?: Array<string>;
|
|
2885
|
+
}
|
|
5555
2886
|
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
}
|
|
2887
|
+
interface InvoiceListLineItemsParams extends PaginationParams {
|
|
2888
|
+
/**
|
|
2889
|
+
* Specifies which fields in the response should be expanded.
|
|
2890
|
+
*/
|
|
2891
|
+
expand?: Array<string>;
|
|
2892
|
+
}
|
|
5563
2893
|
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
-
|
|
2894
|
+
interface InvoiceMarkUncollectibleParams {
|
|
2895
|
+
/**
|
|
2896
|
+
* Specifies which fields in the response should be expanded.
|
|
2897
|
+
*/
|
|
2898
|
+
expand?: Array<string>;
|
|
2899
|
+
}
|
|
5569
2900
|
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
|
|
2901
|
+
interface InvoicePayParams {
|
|
2902
|
+
/**
|
|
2903
|
+
* Specifies which fields in the response should be expanded.
|
|
2904
|
+
*/
|
|
2905
|
+
expand?: Array<string>;
|
|
5574
2906
|
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
2907
|
+
/**
|
|
2908
|
+
* In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due.
|
|
2909
|
+
*
|
|
2910
|
+
* Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`.
|
|
2911
|
+
*/
|
|
2912
|
+
forgive?: boolean;
|
|
5580
2913
|
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
currency: string;
|
|
2914
|
+
/**
|
|
2915
|
+
* ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set.
|
|
2916
|
+
*/
|
|
2917
|
+
mandate?: Stripe.Emptyable<string>;
|
|
5586
2918
|
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
2919
|
+
/**
|
|
2920
|
+
* Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session).
|
|
2921
|
+
*/
|
|
2922
|
+
off_session?: boolean;
|
|
5591
2923
|
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
2924
|
+
/**
|
|
2925
|
+
* Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`.
|
|
2926
|
+
*/
|
|
2927
|
+
paid_out_of_band?: boolean;
|
|
5596
2928
|
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
2929
|
+
/**
|
|
2930
|
+
* A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid.
|
|
2931
|
+
*/
|
|
2932
|
+
payment_method?: string;
|
|
5601
2933
|
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
2934
|
+
/**
|
|
2935
|
+
* A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid.
|
|
2936
|
+
*/
|
|
2937
|
+
source?: string;
|
|
2938
|
+
}
|
|
5606
2939
|
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
2940
|
+
interface InvoiceRemoveLinesParams {
|
|
2941
|
+
/**
|
|
2942
|
+
* The line items to remove.
|
|
2943
|
+
*/
|
|
2944
|
+
lines: Array<InvoiceRemoveLinesParams.Line>;
|
|
5612
2945
|
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
*/
|
|
5618
|
-
interval: Recurring.Interval;
|
|
2946
|
+
/**
|
|
2947
|
+
* Specifies which fields in the response should be expanded.
|
|
2948
|
+
*/
|
|
2949
|
+
expand?: Array<string>;
|
|
5619
2950
|
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
2951
|
+
/**
|
|
2952
|
+
* 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`.
|
|
2953
|
+
*/
|
|
2954
|
+
invoice_metadata?: Stripe.Emptyable<{
|
|
2955
|
+
[key: string]: string;
|
|
2956
|
+
}>;
|
|
2957
|
+
}
|
|
5625
2958
|
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
2959
|
+
namespace InvoiceRemoveLinesParams {
|
|
2960
|
+
interface Line {
|
|
2961
|
+
/**
|
|
2962
|
+
* Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice.
|
|
2963
|
+
*/
|
|
2964
|
+
behavior: Line.Behavior;
|
|
5629
2965
|
|
|
5630
|
-
|
|
5631
|
-
|
|
2966
|
+
/**
|
|
2967
|
+
* ID of an existing line item to remove from this invoice.
|
|
2968
|
+
*/
|
|
2969
|
+
id: string;
|
|
5632
2970
|
}
|
|
5633
2971
|
|
|
5634
|
-
|
|
5635
|
-
| '
|
|
5636
|
-
|
|
5637
|
-
| 'none';
|
|
2972
|
+
namespace Line {
|
|
2973
|
+
type Behavior = 'delete' | 'unassign';
|
|
2974
|
+
}
|
|
5638
2975
|
}
|
|
5639
2976
|
|
|
5640
2977
|
interface InvoiceSearchParams {
|
|
@@ -5723,14 +3060,14 @@ declare module 'stripe' {
|
|
|
5723
3060
|
period?: Line.Period;
|
|
5724
3061
|
|
|
5725
3062
|
/**
|
|
5726
|
-
*
|
|
3063
|
+
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
|
|
5727
3064
|
*/
|
|
5728
|
-
|
|
3065
|
+
price_data?: Line.PriceData;
|
|
5729
3066
|
|
|
5730
3067
|
/**
|
|
5731
|
-
*
|
|
3068
|
+
* The pricing information for the invoice item.
|
|
5732
3069
|
*/
|
|
5733
|
-
|
|
3070
|
+
pricing?: Line.Pricing;
|
|
5734
3071
|
|
|
5735
3072
|
/**
|
|
5736
3073
|
* Non-negative integer. The quantity of units for the line item.
|
|
@@ -5785,12 +3122,12 @@ declare module 'stripe' {
|
|
|
5785
3122
|
currency: string;
|
|
5786
3123
|
|
|
5787
3124
|
/**
|
|
5788
|
-
* The ID of the
|
|
3125
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
|
|
5789
3126
|
*/
|
|
5790
3127
|
product?: string;
|
|
5791
3128
|
|
|
5792
3129
|
/**
|
|
5793
|
-
* Data used to generate a new
|
|
3130
|
+
* Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
|
|
5794
3131
|
*/
|
|
5795
3132
|
product_data?: PriceData.ProductData;
|
|
5796
3133
|
|
|
@@ -5841,6 +3178,13 @@ declare module 'stripe' {
|
|
|
5841
3178
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
5842
3179
|
}
|
|
5843
3180
|
|
|
3181
|
+
interface Pricing {
|
|
3182
|
+
/**
|
|
3183
|
+
* The ID of the price object.
|
|
3184
|
+
*/
|
|
3185
|
+
price?: string;
|
|
3186
|
+
}
|
|
3187
|
+
|
|
5844
3188
|
interface TaxAmount {
|
|
5845
3189
|
/**
|
|
5846
3190
|
* The amount, in cents (or local equivalent), of the tax.
|
|
@@ -5854,6 +3198,11 @@ declare module 'stripe' {
|
|
|
5854
3198
|
*/
|
|
5855
3199
|
tax_rate_data: TaxAmount.TaxRateData;
|
|
5856
3200
|
|
|
3201
|
+
/**
|
|
3202
|
+
* The reasoning behind this tax, for example, if the product is tax exempt.
|
|
3203
|
+
*/
|
|
3204
|
+
taxability_reason?: TaxAmount.TaxabilityReason;
|
|
3205
|
+
|
|
5857
3206
|
/**
|
|
5858
3207
|
* The amount on which tax is calculated, in cents (or local equivalent).
|
|
5859
3208
|
*/
|
|
@@ -5861,6 +3210,23 @@ declare module 'stripe' {
|
|
|
5861
3210
|
}
|
|
5862
3211
|
|
|
5863
3212
|
namespace TaxAmount {
|
|
3213
|
+
type TaxabilityReason =
|
|
3214
|
+
| 'customer_exempt'
|
|
3215
|
+
| 'not_collecting'
|
|
3216
|
+
| 'not_subject_to_tax'
|
|
3217
|
+
| 'not_supported'
|
|
3218
|
+
| 'portion_product_exempt'
|
|
3219
|
+
| 'portion_reduced_rated'
|
|
3220
|
+
| 'portion_standard_rated'
|
|
3221
|
+
| 'product_exempt'
|
|
3222
|
+
| 'product_exempt_holiday'
|
|
3223
|
+
| 'proportionally_rated'
|
|
3224
|
+
| 'reduced_rated'
|
|
3225
|
+
| 'reverse_charge'
|
|
3226
|
+
| 'standard_rated'
|
|
3227
|
+
| 'taxable_basis_reduced'
|
|
3228
|
+
| 'zero_rated';
|
|
3229
|
+
|
|
5864
3230
|
interface TaxRateData {
|
|
5865
3231
|
/**
|
|
5866
3232
|
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
@@ -5887,6 +3253,11 @@ declare module 'stripe' {
|
|
|
5887
3253
|
*/
|
|
5888
3254
|
jurisdiction?: string;
|
|
5889
3255
|
|
|
3256
|
+
/**
|
|
3257
|
+
* The level of the jurisdiction that imposes this tax rate.
|
|
3258
|
+
*/
|
|
3259
|
+
jurisdiction_level?: TaxRateData.JurisdictionLevel;
|
|
3260
|
+
|
|
5890
3261
|
/**
|
|
5891
3262
|
* The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
|
|
5892
3263
|
*/
|
|
@@ -5904,6 +3275,14 @@ declare module 'stripe' {
|
|
|
5904
3275
|
}
|
|
5905
3276
|
|
|
5906
3277
|
namespace TaxRateData {
|
|
3278
|
+
type JurisdictionLevel =
|
|
3279
|
+
| 'city'
|
|
3280
|
+
| 'country'
|
|
3281
|
+
| 'county'
|
|
3282
|
+
| 'district'
|
|
3283
|
+
| 'multiple'
|
|
3284
|
+
| 'state';
|
|
3285
|
+
|
|
5907
3286
|
type TaxType =
|
|
5908
3287
|
| 'amusement_tax'
|
|
5909
3288
|
| 'communications_tax'
|
|
@@ -5961,14 +3340,14 @@ declare module 'stripe' {
|
|
|
5961
3340
|
period?: InvoiceUpdateLineItemParams.Period;
|
|
5962
3341
|
|
|
5963
3342
|
/**
|
|
5964
|
-
*
|
|
3343
|
+
* Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline.
|
|
5965
3344
|
*/
|
|
5966
|
-
|
|
3345
|
+
price_data?: InvoiceUpdateLineItemParams.PriceData;
|
|
5967
3346
|
|
|
5968
3347
|
/**
|
|
5969
|
-
*
|
|
3348
|
+
* The pricing information for the invoice item.
|
|
5970
3349
|
*/
|
|
5971
|
-
|
|
3350
|
+
pricing?: InvoiceUpdateLineItemParams.Pricing;
|
|
5972
3351
|
|
|
5973
3352
|
/**
|
|
5974
3353
|
* Non-negative integer. The quantity of units for the line item.
|
|
@@ -6025,12 +3404,12 @@ declare module 'stripe' {
|
|
|
6025
3404
|
currency: string;
|
|
6026
3405
|
|
|
6027
3406
|
/**
|
|
6028
|
-
* The ID of the
|
|
3407
|
+
* The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required.
|
|
6029
3408
|
*/
|
|
6030
3409
|
product?: string;
|
|
6031
3410
|
|
|
6032
3411
|
/**
|
|
6033
|
-
* Data used to generate a new
|
|
3412
|
+
* Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required.
|
|
6034
3413
|
*/
|
|
6035
3414
|
product_data?: PriceData.ProductData;
|
|
6036
3415
|
|
|
@@ -6081,6 +3460,13 @@ declare module 'stripe' {
|
|
|
6081
3460
|
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
|
|
6082
3461
|
}
|
|
6083
3462
|
|
|
3463
|
+
interface Pricing {
|
|
3464
|
+
/**
|
|
3465
|
+
* The ID of the price object.
|
|
3466
|
+
*/
|
|
3467
|
+
price?: string;
|
|
3468
|
+
}
|
|
3469
|
+
|
|
6084
3470
|
interface TaxAmount {
|
|
6085
3471
|
/**
|
|
6086
3472
|
* The amount, in cents (or local equivalent), of the tax.
|
|
@@ -6094,6 +3480,11 @@ declare module 'stripe' {
|
|
|
6094
3480
|
*/
|
|
6095
3481
|
tax_rate_data: TaxAmount.TaxRateData;
|
|
6096
3482
|
|
|
3483
|
+
/**
|
|
3484
|
+
* The reasoning behind this tax, for example, if the product is tax exempt.
|
|
3485
|
+
*/
|
|
3486
|
+
taxability_reason?: TaxAmount.TaxabilityReason;
|
|
3487
|
+
|
|
6097
3488
|
/**
|
|
6098
3489
|
* The amount on which tax is calculated, in cents (or local equivalent).
|
|
6099
3490
|
*/
|
|
@@ -6101,6 +3492,23 @@ declare module 'stripe' {
|
|
|
6101
3492
|
}
|
|
6102
3493
|
|
|
6103
3494
|
namespace TaxAmount {
|
|
3495
|
+
type TaxabilityReason =
|
|
3496
|
+
| 'customer_exempt'
|
|
3497
|
+
| 'not_collecting'
|
|
3498
|
+
| 'not_subject_to_tax'
|
|
3499
|
+
| 'not_supported'
|
|
3500
|
+
| 'portion_product_exempt'
|
|
3501
|
+
| 'portion_reduced_rated'
|
|
3502
|
+
| 'portion_standard_rated'
|
|
3503
|
+
| 'product_exempt'
|
|
3504
|
+
| 'product_exempt_holiday'
|
|
3505
|
+
| 'proportionally_rated'
|
|
3506
|
+
| 'reduced_rated'
|
|
3507
|
+
| 'reverse_charge'
|
|
3508
|
+
| 'standard_rated'
|
|
3509
|
+
| 'taxable_basis_reduced'
|
|
3510
|
+
| 'zero_rated';
|
|
3511
|
+
|
|
6104
3512
|
interface TaxRateData {
|
|
6105
3513
|
/**
|
|
6106
3514
|
* Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
|
@@ -6127,6 +3535,11 @@ declare module 'stripe' {
|
|
|
6127
3535
|
*/
|
|
6128
3536
|
jurisdiction?: string;
|
|
6129
3537
|
|
|
3538
|
+
/**
|
|
3539
|
+
* The level of the jurisdiction that imposes this tax rate.
|
|
3540
|
+
*/
|
|
3541
|
+
jurisdiction_level?: TaxRateData.JurisdictionLevel;
|
|
3542
|
+
|
|
6130
3543
|
/**
|
|
6131
3544
|
* The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
|
|
6132
3545
|
*/
|
|
@@ -6144,6 +3557,14 @@ declare module 'stripe' {
|
|
|
6144
3557
|
}
|
|
6145
3558
|
|
|
6146
3559
|
namespace TaxRateData {
|
|
3560
|
+
type JurisdictionLevel =
|
|
3561
|
+
| 'city'
|
|
3562
|
+
| 'country'
|
|
3563
|
+
| 'county'
|
|
3564
|
+
| 'district'
|
|
3565
|
+
| 'multiple'
|
|
3566
|
+
| 'state';
|
|
3567
|
+
|
|
6147
3568
|
type TaxType =
|
|
6148
3569
|
| 'amusement_tax'
|
|
6149
3570
|
| 'communications_tax'
|
|
@@ -6283,17 +3704,6 @@ declare module 'stripe' {
|
|
|
6283
3704
|
options?: RequestOptions
|
|
6284
3705
|
): ApiListPromise<Stripe.InvoiceLineItem>;
|
|
6285
3706
|
|
|
6286
|
-
/**
|
|
6287
|
-
* When retrieving an upcoming invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
|
|
6288
|
-
*/
|
|
6289
|
-
listUpcomingLines(
|
|
6290
|
-
params?: InvoiceListUpcomingLinesParams,
|
|
6291
|
-
options?: RequestOptions
|
|
6292
|
-
): ApiListPromise<Stripe.InvoiceLineItem>;
|
|
6293
|
-
listUpcomingLines(
|
|
6294
|
-
options?: RequestOptions
|
|
6295
|
-
): ApiListPromise<Stripe.InvoiceLineItem>;
|
|
6296
|
-
|
|
6297
3707
|
/**
|
|
6298
3708
|
* Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes.
|
|
6299
3709
|
*/
|
|
@@ -6329,23 +3739,6 @@ declare module 'stripe' {
|
|
|
6329
3739
|
options?: RequestOptions
|
|
6330
3740
|
): Promise<Stripe.Response<Stripe.Invoice>>;
|
|
6331
3741
|
|
|
6332
|
-
/**
|
|
6333
|
-
* At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.
|
|
6334
|
-
*
|
|
6335
|
-
* Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
|
|
6336
|
-
*
|
|
6337
|
-
* You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.
|
|
6338
|
-
*
|
|
6339
|
-
* Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions)
|
|
6340
|
-
*/
|
|
6341
|
-
retrieveUpcoming(
|
|
6342
|
-
params?: InvoiceRetrieveUpcomingParams,
|
|
6343
|
-
options?: RequestOptions
|
|
6344
|
-
): Promise<Stripe.Response<Stripe.UpcomingInvoice>>;
|
|
6345
|
-
retrieveUpcoming(
|
|
6346
|
-
options?: RequestOptions
|
|
6347
|
-
): Promise<Stripe.Response<Stripe.UpcomingInvoice>>;
|
|
6348
|
-
|
|
6349
3742
|
/**
|
|
6350
3743
|
* Search for invoices you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language).
|
|
6351
3744
|
* Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating
|