stripe 20.2.0-alpha.1 → 20.2.0-alpha.2

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.
Files changed (54) hide show
  1. package/CHANGELOG.md +105 -36
  2. package/OPENAPI_VERSION +1 -1
  3. package/VERSION +1 -1
  4. package/cjs/resources/Subscriptions.js +4 -0
  5. package/cjs/resources/Tax/Locations.js +18 -0
  6. package/cjs/resources/TestHelpers/SharedPayment/GrantedTokens.js +1 -1
  7. package/cjs/resources.js +4 -2
  8. package/cjs/stripe.core.js +1 -1
  9. package/esm/resources/Subscriptions.js +4 -0
  10. package/esm/resources/Tax/Locations.js +15 -0
  11. package/esm/resources/TestHelpers/SharedPayment/GrantedTokens.js +1 -1
  12. package/esm/resources.js +2 -0
  13. package/esm/stripe.core.js +1 -1
  14. package/package.json +3 -3
  15. package/types/Checkout/SessionsResource.d.ts +10 -0
  16. package/types/DelegatedCheckout/RequestedSessionsResource.d.ts +6 -4
  17. package/types/Invoices.d.ts +5 -0
  18. package/types/InvoicesResource.d.ts +17 -2
  19. package/types/PaymentIntentsResource.d.ts +3 -3
  20. package/types/PaymentLinksResource.d.ts +5 -0
  21. package/types/Plans.d.ts +5 -0
  22. package/types/PlansResource.d.ts +19 -0
  23. package/types/Prices.d.ts +5 -0
  24. package/types/PricesResource.d.ts +19 -0
  25. package/types/ProductsResource.d.ts +10 -0
  26. package/types/QuoteLines.d.ts +1 -1
  27. package/types/QuotePreviewInvoices.d.ts +5 -0
  28. package/types/Quotes.d.ts +4 -4
  29. package/types/QuotesResource.d.ts +10 -10
  30. package/types/SetupIntentsResource.d.ts +3 -3
  31. package/types/SubscriptionSchedulesResource.d.ts +5 -5
  32. package/types/SubscriptionsResource.d.ts +47 -0
  33. package/types/Tax/CalculationLineItems.d.ts +14 -1
  34. package/types/Tax/Calculations.d.ts +17 -1
  35. package/types/Tax/CalculationsResource.d.ts +5 -0
  36. package/types/Tax/Locations.d.ts +34 -0
  37. package/types/Tax/LocationsResource.d.ts +117 -0
  38. package/types/Tax/Registrations.d.ts +81 -1
  39. package/types/Tax/RegistrationsResource.d.ts +9 -1
  40. package/types/Tax/Transactions.d.ts +9 -1
  41. package/types/TaxCodes.d.ts +18 -0
  42. package/types/TestHelpers/SharedPayment/GrantedTokensResource.d.ts +7 -3
  43. package/types/V2/Core/AccountLinksResource.d.ts +1 -0
  44. package/types/V2/Core/AccountTokensResource.d.ts +2 -0
  45. package/types/V2/Core/Accounts/PersonTokensResource.d.ts +2 -0
  46. package/types/V2/Core/Accounts/PersonsResource.d.ts +5 -0
  47. package/types/V2/Core/AccountsResource.d.ts +5 -0
  48. package/types/V2/Core/EventTypes.d.ts +25 -0
  49. package/types/V2/Iam/ApiKeysResource.d.ts +5 -5
  50. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +4 -4
  51. package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +4 -4
  52. package/types/V2/MoneyManagement/OutboundPayments.d.ts +122 -2
  53. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +28 -2
  54. package/types/index.d.ts +3 -0
@@ -1598,9 +1598,60 @@ declare module 'stripe' {
1598
1598
  * Type of registration in the US.
1599
1599
  */
1600
1600
  type: Us.Type;
1601
+
1602
+ admissions_tax?: Us.AdmissionsTax;
1603
+
1604
+ attendance_tax?: Us.AttendanceTax;
1605
+
1606
+ entertainment_tax?: Us.EntertainmentTax;
1607
+
1608
+ gross_receipts_tax?: Us.GrossReceiptsTax;
1609
+
1610
+ hospitality_tax?: Us.HospitalityTax;
1611
+
1612
+ luxury_tax?: Us.LuxuryTax;
1613
+
1614
+ resort_tax?: Us.ResortTax;
1615
+
1616
+ tourism_tax?: Us.TourismTax;
1601
1617
  }
1602
1618
 
1603
1619
  namespace Us {
1620
+ interface AdmissionsTax {
1621
+ /**
1622
+ * A [jurisdiction code](https://docs.stripe.com/tax/registering?type=admissions_tax#registration-types) representing the local jurisdiction.
1623
+ */
1624
+ jurisdiction: string;
1625
+ }
1626
+
1627
+ interface AttendanceTax {
1628
+ /**
1629
+ * A [jurisdiction code](https://docs.stripe.com/tax/registering?type=attendance_tax#registration-types) representing the local jurisdiction.
1630
+ */
1631
+ jurisdiction: string;
1632
+ }
1633
+
1634
+ interface EntertainmentTax {
1635
+ /**
1636
+ * A [jurisdiction code](https://docs.stripe.com/tax/registering?type=entertainment_tax#registration-types) representing the local jurisdiction.
1637
+ */
1638
+ jurisdiction: string;
1639
+ }
1640
+
1641
+ interface GrossReceiptsTax {
1642
+ /**
1643
+ * A [jurisdiction code](https://docs.stripe.com/tax/registering?type=gross_receipts_tax#registration-types) representing the local jurisdiction.
1644
+ */
1645
+ jurisdiction: string;
1646
+ }
1647
+
1648
+ interface HospitalityTax {
1649
+ /**
1650
+ * A [jurisdiction code](https://docs.stripe.com/tax/registering?type=hospitality_tax#registration-types) representing the local jurisdiction.
1651
+ */
1652
+ jurisdiction: string;
1653
+ }
1654
+
1604
1655
  interface LocalAmusementTax {
1605
1656
  /**
1606
1657
  * A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction.
@@ -1615,6 +1666,20 @@ declare module 'stripe' {
1615
1666
  jurisdiction: string;
1616
1667
  }
1617
1668
 
1669
+ interface LuxuryTax {
1670
+ /**
1671
+ * A [jurisdiction code](https://docs.stripe.com/tax/registering?type=luxury_tax#registration-types) representing the local jurisdiction.
1672
+ */
1673
+ jurisdiction: string;
1674
+ }
1675
+
1676
+ interface ResortTax {
1677
+ /**
1678
+ * A [jurisdiction code](https://docs.stripe.com/tax/registering?type=resort_tax#registration-types) representing the local jurisdiction.
1679
+ */
1680
+ jurisdiction: string;
1681
+ }
1682
+
1618
1683
  interface StateSalesTax {
1619
1684
  /**
1620
1685
  * Elections for the state sales tax registration.
@@ -1643,12 +1708,27 @@ declare module 'stripe' {
1643
1708
  }
1644
1709
  }
1645
1710
 
1711
+ interface TourismTax {
1712
+ /**
1713
+ * A [jurisdiction code](https://docs.stripe.com/tax/registering?type=tourism_tax#registration-types) representing the local jurisdiction.
1714
+ */
1715
+ jurisdiction: string;
1716
+ }
1717
+
1646
1718
  type Type =
1719
+ | 'admissions_tax'
1720
+ | 'attendance_tax'
1721
+ | 'entertainment_tax'
1722
+ | 'gross_receipts_tax'
1723
+ | 'hospitality_tax'
1647
1724
  | 'local_amusement_tax'
1648
1725
  | 'local_lease_tax'
1726
+ | 'luxury_tax'
1727
+ | 'resort_tax'
1649
1728
  | 'state_communications_tax'
1650
1729
  | 'state_retail_delivery_fee'
1651
- | 'state_sales_tax';
1730
+ | 'state_sales_tax'
1731
+ | 'tourism_tax';
1652
1732
  }
1653
1733
 
1654
1734
  interface Uy {
@@ -2379,11 +2379,19 @@ declare module 'stripe' {
2379
2379
  }
2380
2380
 
2381
2381
  type Type =
2382
+ | 'admissions_tax'
2383
+ | 'attendance_tax'
2384
+ | 'entertainment_tax'
2385
+ | 'gross_receipts_tax'
2386
+ | 'hospitality_tax'
2382
2387
  | 'local_amusement_tax'
2383
2388
  | 'local_lease_tax'
2389
+ | 'luxury_tax'
2390
+ | 'resort_tax'
2384
2391
  | 'state_communications_tax'
2385
2392
  | 'state_retail_delivery_fee'
2386
- | 'state_sales_tax';
2393
+ | 'state_sales_tax'
2394
+ | 'tourism_tax';
2387
2395
  }
2388
2396
 
2389
2397
  interface Uy {
@@ -353,7 +353,7 @@ declare module 'stripe' {
353
353
  type Level = 'city' | 'country' | 'county' | 'district' | 'state';
354
354
  }
355
355
 
356
- type Sourcing = 'destination' | 'origin';
356
+ type Sourcing = 'destination' | 'origin' | 'performance';
357
357
 
358
358
  type TaxabilityReason =
359
359
  | 'customer_exempt'
@@ -391,19 +391,27 @@ declare module 'stripe' {
391
391
 
392
392
  namespace TaxRateDetails {
393
393
  type TaxType =
394
+ | 'admissions_tax'
394
395
  | 'amusement_tax'
396
+ | 'attendance_tax'
395
397
  | 'communications_tax'
398
+ | 'entertainment_tax'
399
+ | 'gross_receipts_tax'
396
400
  | 'gst'
401
+ | 'hospitality_tax'
397
402
  | 'hst'
398
403
  | 'igst'
399
404
  | 'jct'
400
405
  | 'lease_tax'
406
+ | 'luxury_tax'
401
407
  | 'pst'
402
408
  | 'qst'
409
+ | 'resort_tax'
403
410
  | 'retail_delivery_fee'
404
411
  | 'rst'
405
412
  | 'sales_tax'
406
413
  | 'service_tax'
414
+ | 'tourism_tax'
407
415
  | 'vat';
408
416
  }
409
417
  }
@@ -25,6 +25,24 @@ declare module 'stripe' {
25
25
  * A short name for the tax code.
26
26
  */
27
27
  name: string;
28
+
29
+ /**
30
+ * An object that describes more information about the tax location required for this tax code. Some [tax codes](https://docs.stripe.com/tax/tax-for-tickets/integration-guide#types-of-products) require a tax location of type `performance` to calculate tax correctly.
31
+ */
32
+ requirements?: TaxCode.Requirements | null;
33
+ }
34
+
35
+ namespace TaxCode {
36
+ interface Requirements {
37
+ /**
38
+ * Describes whether a performance location is required for a successful tax calculation with a tax code.
39
+ */
40
+ performance_location?: Requirements.PerformanceLocation;
41
+ }
42
+
43
+ namespace Requirements {
44
+ type PerformanceLocation = 'optional' | 'required';
45
+ }
28
46
  }
29
47
  }
30
48
  }
@@ -54,7 +54,7 @@ declare module 'stripe' {
54
54
  }
55
55
 
56
56
  namespace SharedPayment {
57
- interface GrantedTokenUpdateParams {
57
+ interface GrantedTokenRevokeParams {
58
58
  /**
59
59
  * Specifies which fields in the response should be expanded.
60
60
  */
@@ -75,9 +75,13 @@ declare module 'stripe' {
75
75
  /**
76
76
  * Revokes a test SharedPaymentGrantedToken object. This endpoint is only available in test mode and allows sellers to revoke SharedPaymentGrantedTokens for testing their integration
77
77
  */
78
- update(
78
+ revoke(
79
+ id: string,
80
+ params?: GrantedTokenRevokeParams,
81
+ options?: RequestOptions
82
+ ): Promise<Stripe.Response<Stripe.SharedPayment.GrantedToken>>;
83
+ revoke(
79
84
  id: string,
80
- params?: GrantedTokenUpdateParams,
81
85
  options?: RequestOptions
82
86
  ): Promise<Stripe.Response<Stripe.SharedPayment.GrantedToken>>;
83
87
  }
@@ -140,6 +140,7 @@ declare module 'stripe' {
140
140
  class AccountLinksResource {
141
141
  /**
142
142
  * Creates an AccountLink object that includes a single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information.
143
+ * @throws Stripe.RateLimitError
143
144
  */
144
145
  create(
145
146
  params: AccountLinkCreateParams,
@@ -1376,6 +1376,7 @@ declare module 'stripe' {
1376
1376
  class AccountTokensResource {
1377
1377
  /**
1378
1378
  * Creates an Account Token.
1379
+ * @throws Stripe.RateLimitError
1379
1380
  */
1380
1381
  create(
1381
1382
  params?: AccountTokenCreateParams,
@@ -1387,6 +1388,7 @@ declare module 'stripe' {
1387
1388
 
1388
1389
  /**
1389
1390
  * Retrieves an Account Token.
1391
+ * @throws Stripe.RateLimitError
1390
1392
  */
1391
1393
  retrieve(
1392
1394
  id: string,
@@ -521,6 +521,7 @@ declare module 'stripe' {
521
521
  class PersonTokensResource {
522
522
  /**
523
523
  * Creates a Person Token associated with an Account.
524
+ * @throws Stripe.RateLimitError
524
525
  */
525
526
  create(
526
527
  id: string,
@@ -534,6 +535,7 @@ declare module 'stripe' {
534
535
 
535
536
  /**
536
537
  * Retrieves a Person Token associated with an Account.
538
+ * @throws Stripe.RateLimitError
537
539
  */
538
540
  retrieve(
539
541
  accountId: string,
@@ -1184,6 +1184,7 @@ declare module 'stripe' {
1184
1184
  class PersonsResource {
1185
1185
  /**
1186
1186
  * Create a Person. Adds an individual to an Account's identity. You can set relationship attributes and identity information at creation.
1187
+ * @throws Stripe.RateLimitError
1187
1188
  */
1188
1189
  create(
1189
1190
  id: string,
@@ -1197,6 +1198,7 @@ declare module 'stripe' {
1197
1198
 
1198
1199
  /**
1199
1200
  * Retrieves a Person associated with an Account.
1201
+ * @throws Stripe.RateLimitError
1200
1202
  */
1201
1203
  retrieve(
1202
1204
  accountId: string,
@@ -1212,6 +1214,7 @@ declare module 'stripe' {
1212
1214
 
1213
1215
  /**
1214
1216
  * Updates a Person associated with an Account.
1217
+ * @throws Stripe.RateLimitError
1215
1218
  */
1216
1219
  update(
1217
1220
  accountId: string,
@@ -1222,6 +1225,7 @@ declare module 'stripe' {
1222
1225
 
1223
1226
  /**
1224
1227
  * Returns a paginated list of Persons associated with an Account.
1228
+ * @throws Stripe.RateLimitError
1225
1229
  */
1226
1230
  list(
1227
1231
  id: string,
@@ -1235,6 +1239,7 @@ declare module 'stripe' {
1235
1239
 
1236
1240
  /**
1237
1241
  * Delete a Person associated with an Account.
1242
+ * @throws Stripe.RateLimitError
1238
1243
  */
1239
1244
  del(
1240
1245
  accountId: string,
@@ -7141,6 +7141,7 @@ declare module 'stripe' {
7141
7141
 
7142
7142
  /**
7143
7143
  * An Account is a representation of a company, individual or other entity that a user interacts with. Accounts contain identifying information about the entity, and configurations that store the features an account has access to. An account can be configured as any or all of the following configurations: Customer, Merchant and/or Recipient.
7144
+ * @throws Stripe.RateLimitError
7144
7145
  */
7145
7146
  create(
7146
7147
  params?: AccountCreateParams,
@@ -7152,6 +7153,7 @@ declare module 'stripe' {
7152
7153
 
7153
7154
  /**
7154
7155
  * Retrieves the details of an Account.
7156
+ * @throws Stripe.RateLimitError
7155
7157
  */
7156
7158
  retrieve(
7157
7159
  id: string,
@@ -7165,6 +7167,7 @@ declare module 'stripe' {
7165
7167
 
7166
7168
  /**
7167
7169
  * Updates the details of an Account.
7170
+ * @throws Stripe.RateLimitError
7168
7171
  */
7169
7172
  update(
7170
7173
  id: string,
@@ -7174,6 +7177,7 @@ declare module 'stripe' {
7174
7177
 
7175
7178
  /**
7176
7179
  * Returns a list of Accounts.
7180
+ * @throws Stripe.RateLimitError
7177
7181
  */
7178
7182
  list(
7179
7183
  params?: AccountListParams,
@@ -7185,6 +7189,7 @@ declare module 'stripe' {
7185
7189
 
7186
7190
  /**
7187
7191
  * Removes access to the Account and its associated resources. Closed Accounts can no longer be operated on, but limited information can still be retrieved through the API in order to be able to track their history.
7192
+ * @throws Stripe.RateLimitError
7188
7193
  */
7189
7194
  close(
7190
7195
  id: string,
@@ -56,6 +56,7 @@ declare module 'stripe' {
56
56
  | Stripe.Events.V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEvent
57
57
  | Stripe.Events.V2CoreAccountIncludingConfigurationStorerUpdatedEvent
58
58
  | Stripe.Events.V2CoreAccountIncludingDefaultsUpdatedEvent
59
+ | Stripe.Events.V2CoreAccountIncludingFutureRequirementsUpdatedEvent
59
60
  | Stripe.Events.V2CoreAccountIncludingIdentityUpdatedEvent
60
61
  | Stripe.Events.V2CoreAccountIncludingRequirementsUpdatedEvent
61
62
  | Stripe.Events.V2CoreAccountLinkReturnedEvent
@@ -211,6 +212,7 @@ declare module 'stripe' {
211
212
  | Stripe.Events.V2CoreAccountIncludingConfigurationStorerCapabilityStatusUpdatedEventNotification
212
213
  | Stripe.Events.V2CoreAccountIncludingConfigurationStorerUpdatedEventNotification
213
214
  | Stripe.Events.V2CoreAccountIncludingDefaultsUpdatedEventNotification
215
+ | Stripe.Events.V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification
214
216
  | Stripe.Events.V2CoreAccountIncludingIdentityUpdatedEventNotification
215
217
  | Stripe.Events.V2CoreAccountIncludingRequirementsUpdatedEventNotification
216
218
  | Stripe.Events.V2CoreAccountLinkReturnedEventNotification
@@ -1899,6 +1901,29 @@ declare module 'stripe' {
1899
1901
  fetchEvent(): Promise<V2CoreAccountIncludingDefaultsUpdatedEvent>;
1900
1902
  }
1901
1903
 
1904
+ /**
1905
+ * Occurs when an Account's future requirements are updated.
1906
+ */
1907
+ export interface V2CoreAccountIncludingFutureRequirementsUpdatedEvent
1908
+ extends V2.Core.EventBase {
1909
+ type: 'v2.core.account[future_requirements].updated';
1910
+ // Object containing the reference to API resource relevant to the event.
1911
+ related_object: V2.Core.Events.RelatedObject;
1912
+ // Retrieves the object associated with the event.
1913
+ fetchRelatedObject(): Promise<V2.Core.Account>;
1914
+ }
1915
+ export interface V2CoreAccountIncludingFutureRequirementsUpdatedEventNotification
1916
+ extends V2.Core.EventNotificationBase {
1917
+ type: 'v2.core.account[future_requirements].updated';
1918
+ // Object containing the reference to API resource relevant to the event.
1919
+ related_object: V2.Core.Events.RelatedObject;
1920
+ // Retrieves the object associated with the event.
1921
+ fetchRelatedObject(): Promise<V2.Core.Account>;
1922
+ fetchEvent(): Promise<
1923
+ V2CoreAccountIncludingFutureRequirementsUpdatedEvent
1924
+ >;
1925
+ }
1926
+
1902
1927
  /**
1903
1928
  * Occurs when an Identity is updated.
1904
1929
  */
@@ -145,7 +145,7 @@ declare module 'stripe' {
145
145
  namespace Iam {
146
146
  class ApiKeysResource {
147
147
  /**
148
- * Create an API key.
148
+ * Create an API key. To create a secret key in livemode, a public key for encryption must be provided.
149
149
  */
150
150
  create(
151
151
  params: ApiKeyCreateParams,
@@ -153,7 +153,7 @@ declare module 'stripe' {
153
153
  ): Promise<Stripe.Response<Stripe.V2.Iam.ApiKey>>;
154
154
 
155
155
  /**
156
- * Retrieve an API key.
156
+ * Retrieve an API key. For livemode secret keys, secret tokens are only returned on creation, and never returned here.
157
157
  */
158
158
  retrieve(
159
159
  id: string,
@@ -166,7 +166,7 @@ declare module 'stripe' {
166
166
  ): Promise<Stripe.Response<Stripe.V2.Iam.ApiKey>>;
167
167
 
168
168
  /**
169
- * Update an API key.
169
+ * Update an API key. Only parameters that are specified in the request will be updated.
170
170
  */
171
171
  update(
172
172
  id: string,
@@ -184,7 +184,7 @@ declare module 'stripe' {
184
184
  list(options?: RequestOptions): ApiListPromise<Stripe.V2.Iam.ApiKey>;
185
185
 
186
186
  /**
187
- * Expire an API key.
187
+ * Expire an API key. The specified key becomes invalid immediately.
188
188
  */
189
189
  expire(
190
190
  id: string,
@@ -197,7 +197,7 @@ declare module 'stripe' {
197
197
  ): Promise<Stripe.Response<Stripe.V2.Iam.ApiKey>>;
198
198
 
199
199
  /**
200
- * Rotate an API key.
200
+ * Rotate an API key. A new key with the same properties is created and returned. The existing key is expired immediately, unless an expiry time is specified.
201
201
  */
202
202
  rotate(
203
203
  id: string,
@@ -75,14 +75,14 @@ declare module 'stripe' {
75
75
 
76
76
  interface DeliveryOptions {
77
77
  /**
78
- * Open Enum. Method for bank account.
78
+ * Open Enum. Speed of the payout.
79
79
  */
80
- bank_account?: DeliveryOptions.BankAccount;
80
+ speed?: DeliveryOptions.Speed;
81
81
 
82
82
  /**
83
- * Open Enum. Speed of the payout.
83
+ * Open Enum. Method for bank account.
84
84
  */
85
- speed?: DeliveryOptions.Speed;
85
+ bank_account?: DeliveryOptions.BankAccount;
86
86
  }
87
87
 
88
88
  namespace DeliveryOptions {
@@ -41,14 +41,14 @@ declare module 'stripe' {
41
41
 
42
42
  interface DeliveryOptions {
43
43
  /**
44
- * Open Enum. Method for bank account.
44
+ * Open Enum. Speed of the payout.
45
45
  */
46
- bank_account?: DeliveryOptions.BankAccount;
46
+ speed?: DeliveryOptions.Speed;
47
47
 
48
48
  /**
49
- * Open Enum. Speed of the payout.
49
+ * Open Enum. Method for bank account.
50
50
  */
51
- speed?: DeliveryOptions.Speed;
51
+ bank_account?: DeliveryOptions.BankAccount;
52
52
  }
53
53
 
54
54
  namespace DeliveryOptions {
@@ -117,6 +117,11 @@ declare module 'stripe' {
117
117
  * A unique identifier that can be used to track this OutboundPayment with recipient bank. Banks might call this a “reference number” or something similar.
118
118
  */
119
119
  trace_id: OutboundPayment.TraceId;
120
+
121
+ /**
122
+ * Information to track this OutboundPayment with the recipient bank.
123
+ */
124
+ tracking_details?: OutboundPayment.TrackingDetails;
120
125
  }
121
126
 
122
127
  namespace OutboundPayment {
@@ -133,20 +138,46 @@ declare module 'stripe' {
133
138
  }
134
139
 
135
140
  interface DeliveryOptions {
141
+ /**
142
+ * Open Enum. Speed of the payout.
143
+ */
144
+ speed?: DeliveryOptions.Speed;
145
+
136
146
  /**
137
147
  * Open Enum. Method for bank account.
138
148
  */
139
149
  bank_account?: DeliveryOptions.BankAccount;
140
150
 
141
151
  /**
142
- * Open Enum. Speed of the payout.
152
+ * Delivery options for paper check.
143
153
  */
144
- speed?: DeliveryOptions.Speed;
154
+ paper_check?: DeliveryOptions.PaperCheck;
145
155
  }
146
156
 
147
157
  namespace DeliveryOptions {
148
158
  type BankAccount = 'automatic' | 'local' | 'wire';
149
159
 
160
+ interface PaperCheck {
161
+ /**
162
+ * Memo printed on the memo field of the check.
163
+ */
164
+ memo?: string;
165
+
166
+ /**
167
+ * Open Enum. Shipping speed of the paper check.
168
+ */
169
+ shipping_speed: PaperCheck.ShippingSpeed;
170
+
171
+ /**
172
+ * Signature for the paper check.
173
+ */
174
+ signature: string;
175
+ }
176
+
177
+ namespace PaperCheck {
178
+ type ShippingSpeed = 'priority' | 'standard';
179
+ }
180
+
150
181
  type Speed = 'instant' | 'next_business_day' | 'standard';
151
182
  }
152
183
 
@@ -323,6 +354,95 @@ declare module 'stripe' {
323
354
  namespace TraceId {
324
355
  type Status = 'pending' | 'supported' | 'unsupported';
325
356
  }
357
+
358
+ interface TrackingDetails {
359
+ /**
360
+ * Paper check tracking details.
361
+ */
362
+ paper_check?: TrackingDetails.PaperCheck;
363
+ }
364
+
365
+ namespace TrackingDetails {
366
+ interface PaperCheck {
367
+ /**
368
+ * Open Enum. Carrier of the paper check.
369
+ */
370
+ carrier: PaperCheck.Carrier;
371
+
372
+ /**
373
+ * Check number.
374
+ */
375
+ check_number: string;
376
+
377
+ /**
378
+ * Postal code of the latest tracking update.
379
+ */
380
+ current_postal_code: string;
381
+
382
+ /**
383
+ * Mailing address of the paper check.
384
+ */
385
+ mailing_address: PaperCheck.MailingAddress;
386
+
387
+ /**
388
+ * Tracking number for the check.
389
+ */
390
+ tracking_number: string;
391
+
392
+ /**
393
+ * Open Enum. Tracking status of the paper check.
394
+ */
395
+ tracking_status: PaperCheck.TrackingStatus;
396
+
397
+ /**
398
+ * When the tracking details were last updated.
399
+ */
400
+ updated_at: string;
401
+ }
402
+
403
+ namespace PaperCheck {
404
+ type Carrier = 'fedex' | 'usps';
405
+
406
+ interface MailingAddress {
407
+ /**
408
+ * City, district, suburb, town, or village.
409
+ */
410
+ city?: string;
411
+
412
+ /**
413
+ * Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
414
+ */
415
+ country?: string;
416
+
417
+ /**
418
+ * Address line 1 (e.g., street, PO Box, or company name).
419
+ */
420
+ line1?: string;
421
+
422
+ /**
423
+ * Address line 2 (e.g., apartment, suite, unit, or building).
424
+ */
425
+ line2?: string;
426
+
427
+ /**
428
+ * ZIP or postal code.
429
+ */
430
+ postal_code?: string;
431
+
432
+ /**
433
+ * State, county, province, or region.
434
+ */
435
+ state?: string;
436
+
437
+ /**
438
+ * Town or district.
439
+ */
440
+ town?: string;
441
+ }
442
+
443
+ type TrackingStatus = 'delivered' | 'in_transit' | 'mailed';
444
+ }
445
+ }
326
446
  }
327
447
  }
328
448
  }
@@ -65,20 +65,46 @@ declare module 'stripe' {
65
65
  }
66
66
 
67
67
  interface DeliveryOptions {
68
+ /**
69
+ * Open Enum. Speed of the payout.
70
+ */
71
+ speed?: DeliveryOptions.Speed;
72
+
68
73
  /**
69
74
  * Open Enum. Method for bank account.
70
75
  */
71
76
  bank_account?: DeliveryOptions.BankAccount;
72
77
 
73
78
  /**
74
- * Open Enum. Speed of the payout.
79
+ * Delivery options for paper check.
75
80
  */
76
- speed?: DeliveryOptions.Speed;
81
+ paper_check?: DeliveryOptions.PaperCheck;
77
82
  }
78
83
 
79
84
  namespace DeliveryOptions {
80
85
  type BankAccount = 'automatic' | 'local' | 'wire';
81
86
 
87
+ interface PaperCheck {
88
+ /**
89
+ * Memo printed on the memo field of the check.
90
+ */
91
+ memo?: string;
92
+
93
+ /**
94
+ * Open Enum. Shipping speed of the paper check. Defaults to standard.
95
+ */
96
+ shipping_speed?: PaperCheck.ShippingSpeed;
97
+
98
+ /**
99
+ * Signature for the paper check.
100
+ */
101
+ signature: string;
102
+ }
103
+
104
+ namespace PaperCheck {
105
+ type ShippingSpeed = 'priority' | 'standard';
106
+ }
107
+
82
108
  type Speed = 'instant' | 'next_business_day' | 'standard';
83
109
  }
84
110