stripe 18.4.0-beta.2 → 18.5.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 (79) hide show
  1. package/CHANGELOG.md +39 -10
  2. package/OPENAPI_VERSION +1 -1
  3. package/VERSION +1 -1
  4. package/cjs/apiVersion.js +1 -1
  5. package/cjs/resources/Billing/MeterUsage.js +12 -0
  6. package/cjs/resources/Terminal/OnboardingLinks.js +12 -0
  7. package/cjs/resources.js +4 -0
  8. package/cjs/stripe.core.js +2 -1
  9. package/esm/apiVersion.js +1 -1
  10. package/esm/resources/Billing/MeterUsage.js +9 -0
  11. package/esm/resources/Terminal/OnboardingLinks.js +9 -0
  12. package/esm/resources.js +4 -0
  13. package/esm/stripe.core.js +2 -1
  14. package/package.json +1 -1
  15. package/types/AccountLinksResource.d.ts +3 -1
  16. package/types/AccountSessions.d.ts +30 -0
  17. package/types/AccountSessionsResource.d.ts +36 -0
  18. package/types/Accounts.d.ts +1 -1
  19. package/types/AccountsResource.d.ts +3 -3
  20. package/types/BalanceSettings.d.ts +6 -4
  21. package/types/BalanceSettingsResource.d.ts +8 -6
  22. package/types/Billing/CreditGrantsResource.d.ts +1 -1
  23. package/types/Billing/MeterUsage.d.ts +32 -0
  24. package/types/Billing/MeterUsageResource.d.ts +685 -0
  25. package/types/Billing/MeterUsageRows.d.ts +49 -0
  26. package/types/BillingPortal/Configurations.d.ts +21 -0
  27. package/types/BillingPortal/ConfigurationsResource.d.ts +48 -0
  28. package/types/Capabilities.d.ts +1 -6
  29. package/types/Charges.d.ts +10 -5
  30. package/types/Checkout/Sessions.d.ts +24 -1
  31. package/types/Checkout/SessionsResource.d.ts +108 -0
  32. package/types/ConfirmationTokens.d.ts +3 -3
  33. package/types/Customers.d.ts +1 -1
  34. package/types/Disputes.d.ts +23 -1
  35. package/types/Events.d.ts +14 -26
  36. package/types/FxQuotes.d.ts +6 -4
  37. package/types/Identity/VerificationSessions.d.ts +2 -2
  38. package/types/InvoiceItemsResource.d.ts +1 -1
  39. package/types/Invoices.d.ts +38 -0
  40. package/types/InvoicesResource.d.ts +115 -6
  41. package/types/PaymentAttemptRecords.d.ts +9 -4
  42. package/types/PaymentIntents.d.ts +1 -1
  43. package/types/PaymentIntentsResource.d.ts +966 -40
  44. package/types/PaymentLinks.d.ts +5 -0
  45. package/types/PaymentLinksResource.d.ts +102 -3
  46. package/types/PaymentMethods.d.ts +3 -3
  47. package/types/PaymentMethodsResource.d.ts +1 -1
  48. package/types/PaymentRecords.d.ts +9 -4
  49. package/types/QuotePreviewInvoices.d.ts +38 -0
  50. package/types/QuotesResource.d.ts +3 -0
  51. package/types/Radar/ValueLists.d.ts +1 -1
  52. package/types/Radar/ValueListsResource.d.ts +1 -1
  53. package/types/Refunds.d.ts +1 -1
  54. package/types/Reporting/ReportRunsResource.d.ts +1 -0
  55. package/types/Reviews.d.ts +2 -2
  56. package/types/SetupAttempts.d.ts +1 -1
  57. package/types/SubscriptionItemsResource.d.ts +2 -2
  58. package/types/SubscriptionSchedulesResource.d.ts +47 -2
  59. package/types/Subscriptions.d.ts +38 -0
  60. package/types/SubscriptionsResource.d.ts +86 -1
  61. package/types/Tax/Registrations.d.ts +228 -27
  62. package/types/Tax/RegistrationsResource.d.ts +648 -27
  63. package/types/Terminal/Configurations.d.ts +76 -0
  64. package/types/Terminal/ConfigurationsResource.d.ts +176 -0
  65. package/types/Terminal/OnboardingLinks.d.ts +57 -0
  66. package/types/Terminal/OnboardingLinksResource.d.ts +62 -0
  67. package/types/V2/Core/AccountLinks.d.ts +66 -4
  68. package/types/V2/Core/AccountLinksResource.d.ts +65 -3
  69. package/types/V2/Core/Accounts.d.ts +22 -0
  70. package/types/V2/Core/AccountsResource.d.ts +44 -0
  71. package/types/V2/EventTypes.d.ts +32 -25
  72. package/types/V2/MoneyManagement/PayoutMethods.d.ts +9 -0
  73. package/types/V2/Payments/OffSessionPayments.d.ts +40 -23
  74. package/types/V2/Payments/OffSessionPaymentsResource.d.ts +34 -19
  75. package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +2 -0
  76. package/types/WebhookEndpointsResource.d.ts +2 -1
  77. package/types/index.d.ts +7 -0
  78. package/types/lib.d.ts +2 -1
  79. package/types/test/typescriptTest.ts +3 -3
@@ -1207,6 +1207,11 @@ declare module 'stripe' {
1207
1207
  */
1208
1208
  sepa_debit: PaymentMethodOptions.SepaDebit | null;
1209
1209
 
1210
+ /**
1211
+ * If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent.
1212
+ */
1213
+ upi?: PaymentMethodOptions.Upi | null;
1214
+
1210
1215
  /**
1211
1216
  * If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
1212
1217
  */
@@ -1308,6 +1313,38 @@ declare module 'stripe' {
1308
1313
 
1309
1314
  interface SepaDebit {}
1310
1315
 
1316
+ interface Upi {
1317
+ mandate_options?: Upi.MandateOptions;
1318
+ }
1319
+
1320
+ namespace Upi {
1321
+ interface MandateOptions {
1322
+ /**
1323
+ * Amount to be charged for future payments.
1324
+ */
1325
+ amount: number | null;
1326
+
1327
+ /**
1328
+ * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
1329
+ */
1330
+ amount_type: MandateOptions.AmountType | null;
1331
+
1332
+ /**
1333
+ * A description of the mandate or subscription that is meant to be displayed to the customer.
1334
+ */
1335
+ description: string | null;
1336
+
1337
+ /**
1338
+ * End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
1339
+ */
1340
+ end_date: number | null;
1341
+ }
1342
+
1343
+ namespace MandateOptions {
1344
+ type AmountType = 'fixed' | 'maximum';
1345
+ }
1346
+ }
1347
+
1311
1348
  interface UsBankAccount {
1312
1349
  financial_connections?: UsBankAccount.FinancialConnections;
1313
1350
 
@@ -1407,6 +1444,7 @@ declare module 'stripe' {
1407
1444
  | 'sofort'
1408
1445
  | 'stripe_balance'
1409
1446
  | 'swish'
1447
+ | 'upi'
1410
1448
  | 'us_bank_account'
1411
1449
  | 'wechat_pay';
1412
1450
  }
@@ -19,7 +19,7 @@ declare module 'stripe' {
19
19
  application_fee_amount?: number;
20
20
 
21
21
  /**
22
- * 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.
22
+ * 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. Defaults to false.
23
23
  */
24
24
  auto_advance?: boolean;
25
25
 
@@ -29,7 +29,7 @@ declare module 'stripe' {
29
29
  automatic_tax?: InvoiceCreateParams.AutomaticTax;
30
30
 
31
31
  /**
32
- * The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state.
32
+ * The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state.
33
33
  */
34
34
  automatically_finalizes_at?: number;
35
35
 
@@ -395,6 +395,11 @@ declare module 'stripe' {
395
395
  */
396
396
  sepa_debit?: Stripe.Emptyable<PaymentMethodOptions.SepaDebit>;
397
397
 
398
+ /**
399
+ * If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent.
400
+ */
401
+ upi?: Stripe.Emptyable<PaymentMethodOptions.Upi>;
402
+
398
403
  /**
399
404
  * If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
400
405
  */
@@ -444,7 +449,7 @@ declare module 'stripe' {
444
449
 
445
450
  interface Card {
446
451
  /**
447
- * Installment configuration for payments attempted on this invoice (Mexico Only).
452
+ * Installment configuration for payments attempted on this invoice.
448
453
  *
449
454
  * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
450
455
  */
@@ -538,6 +543,41 @@ declare module 'stripe' {
538
543
 
539
544
  interface SepaDebit {}
540
545
 
546
+ interface Upi {
547
+ /**
548
+ * Configuration options for setting up an eMandate
549
+ */
550
+ mandate_options?: Upi.MandateOptions;
551
+ }
552
+
553
+ namespace Upi {
554
+ interface MandateOptions {
555
+ /**
556
+ * Amount to be charged for future payments.
557
+ */
558
+ amount?: number;
559
+
560
+ /**
561
+ * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
562
+ */
563
+ amount_type?: MandateOptions.AmountType;
564
+
565
+ /**
566
+ * A description of the mandate or subscription that is meant to be displayed to the customer.
567
+ */
568
+ description?: string;
569
+
570
+ /**
571
+ * End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
572
+ */
573
+ end_date?: number;
574
+ }
575
+
576
+ namespace MandateOptions {
577
+ type AmountType = 'fixed' | 'maximum';
578
+ }
579
+ }
580
+
541
581
  interface UsBankAccount {
542
582
  /**
543
583
  * Additional fields for Financial Connections Session creation
@@ -643,6 +683,7 @@ declare module 'stripe' {
643
683
  | 'sofort'
644
684
  | 'stripe_balance'
645
685
  | 'swish'
686
+ | 'upi'
646
687
  | 'us_bank_account'
647
688
  | 'wechat_pay';
648
689
  }
@@ -890,7 +931,7 @@ declare module 'stripe' {
890
931
  automatic_tax?: InvoiceUpdateParams.AutomaticTax;
891
932
 
892
933
  /**
893
- * The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false.
934
+ * The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state. To turn off automatic finalization, set `auto_advance` to false.
894
935
  */
895
936
  automatically_finalizes_at?: number;
896
937
 
@@ -1214,6 +1255,11 @@ declare module 'stripe' {
1214
1255
  */
1215
1256
  sepa_debit?: Stripe.Emptyable<PaymentMethodOptions.SepaDebit>;
1216
1257
 
1258
+ /**
1259
+ * If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent.
1260
+ */
1261
+ upi?: Stripe.Emptyable<PaymentMethodOptions.Upi>;
1262
+
1217
1263
  /**
1218
1264
  * If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent.
1219
1265
  */
@@ -1263,7 +1309,7 @@ declare module 'stripe' {
1263
1309
 
1264
1310
  interface Card {
1265
1311
  /**
1266
- * Installment configuration for payments attempted on this invoice (Mexico Only).
1312
+ * Installment configuration for payments attempted on this invoice.
1267
1313
  *
1268
1314
  * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
1269
1315
  */
@@ -1357,6 +1403,41 @@ declare module 'stripe' {
1357
1403
 
1358
1404
  interface SepaDebit {}
1359
1405
 
1406
+ interface Upi {
1407
+ /**
1408
+ * Configuration options for setting up an eMandate
1409
+ */
1410
+ mandate_options?: Upi.MandateOptions;
1411
+ }
1412
+
1413
+ namespace Upi {
1414
+ interface MandateOptions {
1415
+ /**
1416
+ * Amount to be charged for future payments.
1417
+ */
1418
+ amount?: number;
1419
+
1420
+ /**
1421
+ * One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param.
1422
+ */
1423
+ amount_type?: MandateOptions.AmountType;
1424
+
1425
+ /**
1426
+ * A description of the mandate or subscription that is meant to be displayed to the customer.
1427
+ */
1428
+ description?: string;
1429
+
1430
+ /**
1431
+ * End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date.
1432
+ */
1433
+ end_date?: number;
1434
+ }
1435
+
1436
+ namespace MandateOptions {
1437
+ type AmountType = 'fixed' | 'maximum';
1438
+ }
1439
+ }
1440
+
1360
1441
  interface UsBankAccount {
1361
1442
  /**
1362
1443
  * Additional fields for Financial Connections Session creation
@@ -1462,6 +1543,7 @@ declare module 'stripe' {
1462
1543
  | 'sofort'
1463
1544
  | 'stripe_balance'
1464
1545
  | 'swish'
1546
+ | 'upi'
1465
1547
  | 'us_bank_account'
1466
1548
  | 'wechat_pay';
1467
1549
  }
@@ -3324,6 +3406,9 @@ declare module 'stripe' {
3324
3406
  type BillingBehavior = 'prorate_on_next_phase' | 'prorate_up_front';
3325
3407
 
3326
3408
  interface BillingMode {
3409
+ /**
3410
+ * Controls the calculation and orchestration of prorations and invoices for subscriptions.
3411
+ */
3327
3412
  type: BillingMode.Type;
3328
3413
  }
3329
3414
 
@@ -3389,6 +3474,11 @@ declare module 'stripe' {
3389
3474
  */
3390
3475
  discounts?: Stripe.Emptyable<Array<Phase.Discount>>;
3391
3476
 
3477
+ /**
3478
+ * The number of intervals the phase should last. If set, `end_date` must not be set.
3479
+ */
3480
+ duration?: Phase.Duration;
3481
+
3392
3482
  /**
3393
3483
  * The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
3394
3484
  */
@@ -3405,7 +3495,7 @@ declare module 'stripe' {
3405
3495
  items: Array<Phase.Item>;
3406
3496
 
3407
3497
  /**
3408
- * 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.
3498
+ * 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. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
3409
3499
  */
3410
3500
  iterations?: number;
3411
3501
 
@@ -3689,6 +3779,22 @@ declare module 'stripe' {
3689
3779
  }
3690
3780
  }
3691
3781
 
3782
+ interface Duration {
3783
+ /**
3784
+ * Specifies phase duration. Either `day`, `week`, `month` or `year`.
3785
+ */
3786
+ interval: Duration.Interval;
3787
+
3788
+ /**
3789
+ * The multiplier applied to the interval.
3790
+ */
3791
+ interval_count?: number;
3792
+ }
3793
+
3794
+ namespace Duration {
3795
+ type Interval = 'day' | 'month' | 'week' | 'year';
3796
+ }
3797
+
3692
3798
  interface InvoiceSettings {
3693
3799
  /**
3694
3800
  * 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.
@@ -4104,6 +4210,9 @@ declare module 'stripe' {
4104
4210
  type BillingCycleAnchor = 'now' | 'unchanged';
4105
4211
 
4106
4212
  interface BillingMode {
4213
+ /**
4214
+ * Controls the calculation and orchestration of prorations and invoices for subscriptions.
4215
+ */
4107
4216
  type: BillingMode.Type;
4108
4217
  }
4109
4218
 
@@ -482,7 +482,7 @@ declare module 'stripe' {
482
482
  namespace Funding {
483
483
  interface Card {
484
484
  /**
485
- * Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
485
+ * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
486
486
  */
487
487
  brand: string | null;
488
488
 
@@ -651,7 +651,7 @@ declare module 'stripe' {
651
651
 
652
652
  interface Card {
653
653
  /**
654
- * Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
654
+ * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
655
655
  */
656
656
  brand: Card.Brand;
657
657
 
@@ -823,7 +823,7 @@ declare module 'stripe' {
823
823
  amount_authorized: number | null;
824
824
 
825
825
  /**
826
- * Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
826
+ * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
827
827
  */
828
828
  brand: string | null;
829
829
 
@@ -1035,6 +1035,11 @@ declare module 'stripe' {
1035
1035
  * A public identifier for buyers using Cash App.
1036
1036
  */
1037
1037
  cashtag: string | null;
1038
+
1039
+ /**
1040
+ * A unique and immutable identifier of payments assigned by Cash App
1041
+ */
1042
+ transaction_id: string | null;
1038
1043
  }
1039
1044
 
1040
1045
  interface Crypto {
@@ -1875,7 +1880,7 @@ declare module 'stripe' {
1875
1880
  namespace Funding {
1876
1881
  interface Card {
1877
1882
  /**
1878
- * Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
1883
+ * Card brand. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa` or `unknown`.
1879
1884
  */
1880
1885
  brand: string | null;
1881
1886
 
@@ -3488,7 +3488,7 @@ declare module 'stripe' {
3488
3488
 
3489
3489
  interface PresentmentDetails {
3490
3490
  /**
3491
- * Amount intended to be collected by this payment, denominated in presentment_currency.
3491
+ * Amount intended to be collected by this payment, denominated in `presentment_currency`.
3492
3492
  */
3493
3493
  presentment_amount: number;
3494
3494