stripe 18.5.0-beta.2 → 18.6.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/OPENAPI_VERSION +1 -1
  3. package/VERSION +1 -1
  4. package/cjs/Error.js +55 -55
  5. package/cjs/apiVersion.js +1 -1
  6. package/cjs/resources/Mandates.js +5 -0
  7. package/cjs/resources.js +24 -24
  8. package/cjs/stripe.core.js +1 -1
  9. package/esm/Error.js +44 -44
  10. package/esm/apiVersion.js +1 -1
  11. package/esm/resources/Mandates.js +5 -0
  12. package/esm/resources.js +5 -5
  13. package/esm/stripe.core.js +1 -1
  14. package/package.json +1 -1
  15. package/types/AccountSessions.d.ts +45 -0
  16. package/types/AccountSessionsResource.d.ts +76 -13
  17. package/types/Accounts.d.ts +2 -2
  18. package/types/Balance.d.ts +2 -7
  19. package/types/BalanceSettings.d.ts +52 -46
  20. package/types/BalanceSettingsResource.d.ts +55 -46
  21. package/types/Billing/AlertTriggereds.d.ts +1 -1
  22. package/types/Billing/MeterUsageRows.d.ts +1 -1
  23. package/types/Billing/Meters.d.ts +1 -1
  24. package/types/Billing/MetersResource.d.ts +1 -1
  25. package/types/BillingPortal/Configurations.d.ts +5 -0
  26. package/types/BillingPortal/ConfigurationsResource.d.ts +10 -0
  27. package/types/Charges.d.ts +81 -5
  28. package/types/Checkout/Sessions.d.ts +70 -2
  29. package/types/Checkout/SessionsResource.d.ts +117 -3
  30. package/types/CreditNotesResource.d.ts +3 -3
  31. package/types/Disputes.d.ts +7 -2
  32. package/types/Errors.d.ts +45 -45
  33. package/types/FileLinksResource.d.ts +1 -1
  34. package/types/Files.d.ts +1 -0
  35. package/types/FilesResource.d.ts +3 -1
  36. package/types/InvoicePaymentsResource.d.ts +3 -0
  37. package/types/Invoices.d.ts +3 -1
  38. package/types/InvoicesResource.d.ts +59 -0
  39. package/types/Issuing/CardsResource.d.ts +10 -0
  40. package/types/Mandates.d.ts +58 -1
  41. package/types/MandatesResource.d.ts +31 -0
  42. package/types/PaymentAttemptRecords.d.ts +164 -9
  43. package/types/PaymentAttemptRecordsResource.d.ts +5 -0
  44. package/types/PaymentIntents.d.ts +136 -2
  45. package/types/PaymentIntentsResource.d.ts +280 -3
  46. package/types/PaymentLinksResource.d.ts +1 -1
  47. package/types/PaymentMethods.d.ts +5 -0
  48. package/types/PaymentRecords.d.ts +164 -9
  49. package/types/PaymentRecordsResource.d.ts +24 -3
  50. package/types/Payouts.d.ts +1 -1
  51. package/types/PromotionCodes.d.ts +5 -2
  52. package/types/QuotePreviewInvoices.d.ts +3 -1
  53. package/types/QuotePreviewSubscriptionSchedules.d.ts +47 -0
  54. package/types/SetupAttempts.d.ts +7 -1
  55. package/types/SetupIntents.d.ts +95 -1
  56. package/types/SetupIntentsResource.d.ts +207 -0
  57. package/types/SubscriptionSchedules.d.ts +47 -0
  58. package/types/SubscriptionSchedulesResource.d.ts +112 -0
  59. package/types/SubscriptionsResource.d.ts +119 -7
  60. package/types/Terminal/Configurations.d.ts +28 -0
  61. package/types/Terminal/ConfigurationsResource.d.ts +72 -0
  62. package/types/TestHelpers/Terminal/ReadersResource.d.ts +28 -1
  63. package/types/V2/Core/Accounts/PersonsResource.d.ts +32 -0
  64. package/types/V2/Core/Accounts.d.ts +49 -0
  65. package/types/V2/Core/AccountsResource.d.ts +78 -0
  66. package/types/V2/Core/Persons.d.ts +16 -0
  67. package/types/V2/EventTypes.d.ts +377 -377
  68. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +5 -0
  69. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +5 -0
  70. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +1 -1
  71. package/types/V2/MoneyManagement/TransactionEntries.d.ts +7 -0
  72. package/types/V2/MoneyManagement/Transactions.d.ts +7 -0
  73. package/types/WebhookEndpointsResource.d.ts +2 -1
  74. package/types/index.d.ts +5 -5
  75. package/types/lib.d.ts +1 -1
  76. package/types/test/typescriptTest.ts +3 -3
@@ -1095,6 +1095,11 @@ declare module 'stripe' {
1095
1095
  */
1096
1096
  payto?: PaymentMethodOptions.Payto;
1097
1097
 
1098
+ /**
1099
+ * If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options.
1100
+ */
1101
+ pix?: PaymentMethodOptions.Pix;
1102
+
1098
1103
  /**
1099
1104
  * If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
1100
1105
  */
@@ -1624,6 +1629,70 @@ declare module 'stripe' {
1624
1629
  }
1625
1630
  }
1626
1631
 
1632
+ interface Pix {
1633
+ /**
1634
+ * Additional fields for mandate creation.
1635
+ */
1636
+ mandate_options?: Pix.MandateOptions;
1637
+ }
1638
+
1639
+ namespace Pix {
1640
+ interface MandateOptions {
1641
+ /**
1642
+ * Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
1643
+ */
1644
+ amount?: number;
1645
+
1646
+ /**
1647
+ * Determines if the amount includes the IOF tax. Defaults to `never`.
1648
+ */
1649
+ amount_includes_iof?: MandateOptions.AmountIncludesIof;
1650
+
1651
+ /**
1652
+ * Type of amount. Defaults to `maximum`.
1653
+ */
1654
+ amount_type?: MandateOptions.AmountType;
1655
+
1656
+ /**
1657
+ * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
1658
+ */
1659
+ currency?: string;
1660
+
1661
+ /**
1662
+ * Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
1663
+ */
1664
+ end_date?: string;
1665
+
1666
+ /**
1667
+ * Schedule at which the future payments will be charged. Defaults to `weekly`.
1668
+ */
1669
+ payment_schedule?: MandateOptions.PaymentSchedule;
1670
+
1671
+ /**
1672
+ * Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
1673
+ */
1674
+ reference?: string;
1675
+
1676
+ /**
1677
+ * Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
1678
+ */
1679
+ start_date?: string;
1680
+ }
1681
+
1682
+ namespace MandateOptions {
1683
+ type AmountIncludesIof = 'always' | 'never';
1684
+
1685
+ type AmountType = 'fixed' | 'maximum';
1686
+
1687
+ type PaymentSchedule =
1688
+ | 'halfyearly'
1689
+ | 'monthly'
1690
+ | 'quarterly'
1691
+ | 'weekly'
1692
+ | 'yearly';
1693
+ }
1694
+ }
1695
+
1627
1696
  interface SepaDebit {
1628
1697
  /**
1629
1698
  * Additional fields for Mandate creation
@@ -2757,6 +2826,11 @@ declare module 'stripe' {
2757
2826
  */
2758
2827
  payto?: PaymentMethodOptions.Payto;
2759
2828
 
2829
+ /**
2830
+ * If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options.
2831
+ */
2832
+ pix?: PaymentMethodOptions.Pix;
2833
+
2760
2834
  /**
2761
2835
  * If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
2762
2836
  */
@@ -3286,6 +3360,70 @@ declare module 'stripe' {
3286
3360
  }
3287
3361
  }
3288
3362
 
3363
+ interface Pix {
3364
+ /**
3365
+ * Additional fields for mandate creation.
3366
+ */
3367
+ mandate_options?: Pix.MandateOptions;
3368
+ }
3369
+
3370
+ namespace Pix {
3371
+ interface MandateOptions {
3372
+ /**
3373
+ * Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
3374
+ */
3375
+ amount?: number;
3376
+
3377
+ /**
3378
+ * Determines if the amount includes the IOF tax. Defaults to `never`.
3379
+ */
3380
+ amount_includes_iof?: MandateOptions.AmountIncludesIof;
3381
+
3382
+ /**
3383
+ * Type of amount. Defaults to `maximum`.
3384
+ */
3385
+ amount_type?: MandateOptions.AmountType;
3386
+
3387
+ /**
3388
+ * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
3389
+ */
3390
+ currency?: string;
3391
+
3392
+ /**
3393
+ * Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
3394
+ */
3395
+ end_date?: string;
3396
+
3397
+ /**
3398
+ * Schedule at which the future payments will be charged. Defaults to `weekly`.
3399
+ */
3400
+ payment_schedule?: MandateOptions.PaymentSchedule;
3401
+
3402
+ /**
3403
+ * Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
3404
+ */
3405
+ reference?: string;
3406
+
3407
+ /**
3408
+ * Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
3409
+ */
3410
+ start_date?: string;
3411
+ }
3412
+
3413
+ namespace MandateOptions {
3414
+ type AmountIncludesIof = 'always' | 'never';
3415
+
3416
+ type AmountType = 'fixed' | 'maximum';
3417
+
3418
+ type PaymentSchedule =
3419
+ | 'halfyearly'
3420
+ | 'monthly'
3421
+ | 'quarterly'
3422
+ | 'weekly'
3423
+ | 'yearly';
3424
+ }
3425
+ }
3426
+
3289
3427
  interface SepaDebit {
3290
3428
  /**
3291
3429
  * Additional fields for Mandate creation
@@ -4466,6 +4604,11 @@ declare module 'stripe' {
4466
4604
  */
4467
4605
  payto?: PaymentMethodOptions.Payto;
4468
4606
 
4607
+ /**
4608
+ * If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options.
4609
+ */
4610
+ pix?: PaymentMethodOptions.Pix;
4611
+
4469
4612
  /**
4470
4613
  * If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options.
4471
4614
  */
@@ -4995,6 +5138,70 @@ declare module 'stripe' {
4995
5138
  }
4996
5139
  }
4997
5140
 
5141
+ interface Pix {
5142
+ /**
5143
+ * Additional fields for mandate creation.
5144
+ */
5145
+ mandate_options?: Pix.MandateOptions;
5146
+ }
5147
+
5148
+ namespace Pix {
5149
+ interface MandateOptions {
5150
+ /**
5151
+ * Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000.
5152
+ */
5153
+ amount?: number;
5154
+
5155
+ /**
5156
+ * Determines if the amount includes the IOF tax. Defaults to `never`.
5157
+ */
5158
+ amount_includes_iof?: MandateOptions.AmountIncludesIof;
5159
+
5160
+ /**
5161
+ * Type of amount. Defaults to `maximum`.
5162
+ */
5163
+ amount_type?: MandateOptions.AmountType;
5164
+
5165
+ /**
5166
+ * Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently.
5167
+ */
5168
+ currency?: string;
5169
+
5170
+ /**
5171
+ * Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
5172
+ */
5173
+ end_date?: string;
5174
+
5175
+ /**
5176
+ * Schedule at which the future payments will be charged. Defaults to `weekly`.
5177
+ */
5178
+ payment_schedule?: MandateOptions.PaymentSchedule;
5179
+
5180
+ /**
5181
+ * Subscription name displayed to buyers in their bank app. Defaults to the displayable business name.
5182
+ */
5183
+ reference?: string;
5184
+
5185
+ /**
5186
+ * Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date.
5187
+ */
5188
+ start_date?: string;
5189
+ }
5190
+
5191
+ namespace MandateOptions {
5192
+ type AmountIncludesIof = 'always' | 'never';
5193
+
5194
+ type AmountType = 'fixed' | 'maximum';
5195
+
5196
+ type PaymentSchedule =
5197
+ | 'halfyearly'
5198
+ | 'monthly'
5199
+ | 'quarterly'
5200
+ | 'weekly'
5201
+ | 'yearly';
5202
+ }
5203
+ }
5204
+
4998
5205
  interface SepaDebit {
4999
5206
  /**
5000
5207
  * Additional fields for Mandate creation
@@ -455,6 +455,13 @@ declare module 'stripe' {
455
455
  */
456
456
  discounts: Array<AddInvoiceItem.Discount>;
457
457
 
458
+ /**
459
+ * 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.
460
+ */
461
+ metadata: Stripe.Metadata | null;
462
+
463
+ period: AddInvoiceItem.Period;
464
+
458
465
  /**
459
466
  * ID of the price used to generate the invoice item.
460
467
  */
@@ -507,6 +514,46 @@ declare module 'stripe' {
507
514
  type: 'timestamp';
508
515
  }
509
516
  }
517
+
518
+ interface Period {
519
+ end: Period.End;
520
+
521
+ start: Period.Start;
522
+ }
523
+
524
+ namespace Period {
525
+ interface End {
526
+ /**
527
+ * A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
528
+ */
529
+ timestamp?: number;
530
+
531
+ /**
532
+ * Select how to calculate the end of the invoice item period.
533
+ */
534
+ type: End.Type;
535
+ }
536
+
537
+ namespace End {
538
+ type Type = 'min_item_period_end' | 'phase_end' | 'timestamp';
539
+ }
540
+
541
+ interface Start {
542
+ /**
543
+ * A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
544
+ */
545
+ timestamp?: number;
546
+
547
+ /**
548
+ * Select how to calculate the start of the invoice item period.
549
+ */
550
+ type: Start.Type;
551
+ }
552
+
553
+ namespace Start {
554
+ type Type = 'max_item_period_start' | 'phase_start' | 'timestamp';
555
+ }
556
+ }
510
557
  }
511
558
 
512
559
  interface AutomaticTax {
@@ -363,6 +363,16 @@ declare module 'stripe' {
363
363
  */
364
364
  discounts?: Array<AddInvoiceItem.Discount>;
365
365
 
366
+ /**
367
+ * 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`.
368
+ */
369
+ metadata?: Stripe.MetadataParam;
370
+
371
+ /**
372
+ * The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
373
+ */
374
+ period?: AddInvoiceItem.Period;
375
+
366
376
  /**
367
377
  * The ID of the price object. One of `price` or `price_data` is required.
368
378
  */
@@ -446,6 +456,52 @@ declare module 'stripe' {
446
456
  }
447
457
  }
448
458
 
459
+ interface Period {
460
+ /**
461
+ * End of the invoice item period.
462
+ */
463
+ end: Period.End;
464
+
465
+ /**
466
+ * Start of the invoice item period.
467
+ */
468
+ start: Period.Start;
469
+ }
470
+
471
+ namespace Period {
472
+ interface End {
473
+ /**
474
+ * A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
475
+ */
476
+ timestamp?: number;
477
+
478
+ /**
479
+ * Select how to calculate the end of the invoice item period.
480
+ */
481
+ type: End.Type;
482
+ }
483
+
484
+ namespace End {
485
+ type Type = 'min_item_period_end' | 'phase_end' | 'timestamp';
486
+ }
487
+
488
+ interface Start {
489
+ /**
490
+ * A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
491
+ */
492
+ timestamp?: number;
493
+
494
+ /**
495
+ * Select how to calculate the start of the invoice item period.
496
+ */
497
+ type: Start.Type;
498
+ }
499
+
500
+ namespace Start {
501
+ type Type = 'max_item_period_start' | 'phase_start' | 'timestamp';
502
+ }
503
+ }
504
+
449
505
  interface PriceData {
450
506
  /**
451
507
  * 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).
@@ -1231,6 +1287,16 @@ declare module 'stripe' {
1231
1287
  */
1232
1288
  discounts?: Array<AddInvoiceItem.Discount>;
1233
1289
 
1290
+ /**
1291
+ * 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`.
1292
+ */
1293
+ metadata?: Stripe.MetadataParam;
1294
+
1295
+ /**
1296
+ * The period associated with this invoice item. Defaults to the period of the underlying subscription that surrounds the start of the phase.
1297
+ */
1298
+ period?: AddInvoiceItem.Period;
1299
+
1234
1300
  /**
1235
1301
  * The ID of the price object. One of `price` or `price_data` is required.
1236
1302
  */
@@ -1314,6 +1380,52 @@ declare module 'stripe' {
1314
1380
  }
1315
1381
  }
1316
1382
 
1383
+ interface Period {
1384
+ /**
1385
+ * End of the invoice item period.
1386
+ */
1387
+ end: Period.End;
1388
+
1389
+ /**
1390
+ * Start of the invoice item period.
1391
+ */
1392
+ start: Period.Start;
1393
+ }
1394
+
1395
+ namespace Period {
1396
+ interface End {
1397
+ /**
1398
+ * A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
1399
+ */
1400
+ timestamp?: number;
1401
+
1402
+ /**
1403
+ * Select how to calculate the end of the invoice item period.
1404
+ */
1405
+ type: End.Type;
1406
+ }
1407
+
1408
+ namespace End {
1409
+ type Type = 'min_item_period_end' | 'phase_end' | 'timestamp';
1410
+ }
1411
+
1412
+ interface Start {
1413
+ /**
1414
+ * A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
1415
+ */
1416
+ timestamp?: number;
1417
+
1418
+ /**
1419
+ * Select how to calculate the start of the invoice item period.
1420
+ */
1421
+ type: Start.Type;
1422
+ }
1423
+
1424
+ namespace Start {
1425
+ type Type = 'max_item_period_start' | 'phase_start' | 'timestamp';
1426
+ }
1427
+ }
1428
+
1317
1429
  interface PriceData {
1318
1430
  /**
1319
1431
  * 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).
@@ -205,6 +205,16 @@ declare module 'stripe' {
205
205
  */
206
206
  discounts?: Array<AddInvoiceItem.Discount>;
207
207
 
208
+ /**
209
+ * 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`.
210
+ */
211
+ metadata?: Stripe.MetadataParam;
212
+
213
+ /**
214
+ * The period associated with this invoice item. Defaults to the current period of the subscription.
215
+ */
216
+ period?: AddInvoiceItem.Period;
217
+
208
218
  /**
209
219
  * The ID of the price object. One of `price` or `price_data` is required.
210
220
  */
@@ -288,6 +298,52 @@ declare module 'stripe' {
288
298
  }
289
299
  }
290
300
 
301
+ interface Period {
302
+ /**
303
+ * End of the invoice item period.
304
+ */
305
+ end: Period.End;
306
+
307
+ /**
308
+ * Start of the invoice item period.
309
+ */
310
+ start: Period.Start;
311
+ }
312
+
313
+ namespace Period {
314
+ interface End {
315
+ /**
316
+ * A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
317
+ */
318
+ timestamp?: number;
319
+
320
+ /**
321
+ * Select how to calculate the end of the invoice item period.
322
+ */
323
+ type: End.Type;
324
+ }
325
+
326
+ namespace End {
327
+ type Type = 'min_item_period_end' | 'timestamp';
328
+ }
329
+
330
+ interface Start {
331
+ /**
332
+ * A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
333
+ */
334
+ timestamp?: number;
335
+
336
+ /**
337
+ * Select how to calculate the start of the invoice item period.
338
+ */
339
+ type: Start.Type;
340
+ }
341
+
342
+ namespace Start {
343
+ type Type = 'max_item_period_start' | 'now' | 'timestamp';
344
+ }
345
+ }
346
+
291
347
  interface PriceData {
292
348
  /**
293
349
  * 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).
@@ -352,27 +408,27 @@ declare module 'stripe' {
352
408
 
353
409
  interface BillingCycleAnchorConfig {
354
410
  /**
355
- * The day of the month the billing_cycle_anchor should be. Ranges from 1 to 31.
411
+ * The day of the month the anchor should be. Ranges from 1 to 31.
356
412
  */
357
413
  day_of_month: number;
358
414
 
359
415
  /**
360
- * The hour of the day the billing_cycle_anchor should be. Ranges from 0 to 23.
416
+ * The hour of the day the anchor should be. Ranges from 0 to 23.
361
417
  */
362
418
  hour?: number;
363
419
 
364
420
  /**
365
- * The minute of the hour the billing_cycle_anchor should be. Ranges from 0 to 59.
421
+ * The minute of the hour the anchor should be. Ranges from 0 to 59.
366
422
  */
367
423
  minute?: number;
368
424
 
369
425
  /**
370
- * The month to start full cycle billing periods. Ranges from 1 to 12.
426
+ * The month to start full cycle periods. Ranges from 1 to 12.
371
427
  */
372
428
  month?: number;
373
429
 
374
430
  /**
375
- * The second of the minute the billing_cycle_anchor should be. Ranges from 0 to 59.
431
+ * The second of the minute the anchor should be. Ranges from 0 to 59.
376
432
  */
377
433
  second?: number;
378
434
  }
@@ -1298,6 +1354,16 @@ declare module 'stripe' {
1298
1354
  */
1299
1355
  discounts?: Array<AddInvoiceItem.Discount>;
1300
1356
 
1357
+ /**
1358
+ * 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`.
1359
+ */
1360
+ metadata?: Stripe.MetadataParam;
1361
+
1362
+ /**
1363
+ * The period associated with this invoice item. Defaults to the current period of the subscription.
1364
+ */
1365
+ period?: AddInvoiceItem.Period;
1366
+
1301
1367
  /**
1302
1368
  * The ID of the price object. One of `price` or `price_data` is required.
1303
1369
  */
@@ -1381,6 +1447,52 @@ declare module 'stripe' {
1381
1447
  }
1382
1448
  }
1383
1449
 
1450
+ interface Period {
1451
+ /**
1452
+ * End of the invoice item period.
1453
+ */
1454
+ end: Period.End;
1455
+
1456
+ /**
1457
+ * Start of the invoice item period.
1458
+ */
1459
+ start: Period.Start;
1460
+ }
1461
+
1462
+ namespace Period {
1463
+ interface End {
1464
+ /**
1465
+ * A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`.
1466
+ */
1467
+ timestamp?: number;
1468
+
1469
+ /**
1470
+ * Select how to calculate the end of the invoice item period.
1471
+ */
1472
+ type: End.Type;
1473
+ }
1474
+
1475
+ namespace End {
1476
+ type Type = 'min_item_period_end' | 'timestamp';
1477
+ }
1478
+
1479
+ interface Start {
1480
+ /**
1481
+ * A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`.
1482
+ */
1483
+ timestamp?: number;
1484
+
1485
+ /**
1486
+ * Select how to calculate the start of the invoice item period.
1487
+ */
1488
+ type: Start.Type;
1489
+ }
1490
+
1491
+ namespace Start {
1492
+ type Type = 'max_item_period_start' | 'now' | 'timestamp';
1493
+ }
1494
+ }
1495
+
1384
1496
  interface PriceData {
1385
1497
  /**
1386
1498
  * 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).
@@ -2218,12 +2330,12 @@ declare module 'stripe' {
2218
2330
  created?: Stripe.RangeQueryParam | number;
2219
2331
 
2220
2332
  /**
2221
- * Only return subscriptions whose current_period_end falls within the given date interval.
2333
+ * Only return subscriptions whose minimum item current_period_end falls within the given date interval.
2222
2334
  */
2223
2335
  current_period_end?: Stripe.RangeQueryParam | number;
2224
2336
 
2225
2337
  /**
2226
- * Only return subscriptions whose current_period_start falls within the given date interval.
2338
+ * Only return subscriptions whose maximum item current_period_start falls within the given date interval.
2227
2339
  */
2228
2340
  current_period_start?: Stripe.RangeQueryParam | number;
2229
2341
 
@@ -42,6 +42,8 @@ declare module 'stripe' {
42
42
 
43
43
  offline?: Configuration.Offline;
44
44
 
45
+ reader_security?: Configuration.ReaderSecurity;
46
+
45
47
  reboot_window?: Configuration.RebootWindow;
46
48
 
47
49
  stripe_s700?: Configuration.StripeS700;
@@ -68,6 +70,13 @@ declare module 'stripe' {
68
70
  enabled: boolean | null;
69
71
  }
70
72
 
73
+ interface ReaderSecurity {
74
+ /**
75
+ * Passcode used to access a reader's admin menu.
76
+ */
77
+ admin_menu_passcode: string;
78
+ }
79
+
71
80
  interface RebootWindow {
72
81
  /**
73
82
  * Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour.
@@ -112,6 +121,8 @@ declare module 'stripe' {
112
121
 
113
122
  jpy?: Tipping.Jpy;
114
123
 
124
+ mxn?: Tipping.Mxn;
125
+
115
126
  myr?: Tipping.Myr;
116
127
 
117
128
  nok?: Tipping.Nok;
@@ -334,6 +345,23 @@ declare module 'stripe' {
334
345
  smart_tip_threshold?: number;
335
346
  }
336
347
 
348
+ interface Mxn {
349
+ /**
350
+ * Fixed amounts displayed when collecting a tip
351
+ */
352
+ fixed_amounts?: Array<number> | null;
353
+
354
+ /**
355
+ * Percentages displayed when collecting a tip
356
+ */
357
+ percentages?: Array<number> | null;
358
+
359
+ /**
360
+ * Below this amount, fixed amounts will be displayed; above it, percentages will be displayed
361
+ */
362
+ smart_tip_threshold?: number;
363
+ }
364
+
337
365
  interface Myr {
338
366
  /**
339
367
  * Fixed amounts displayed when collecting a tip