stripe 23.2.0-alpha.1 → 23.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 (153) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/OPENAPI_VERSION +1 -1
  3. package/VERSION +1 -1
  4. package/cjs/StripeEventNotificationHandler.js +2 -0
  5. package/cjs/StripeEventNotificationHandler.js.map +1 -1
  6. package/cjs/WorkloadIdentity.js +1 -1
  7. package/cjs/resources/AccountSessions.d.ts +226 -0
  8. package/cjs/resources/Apps/Installs.d.ts +1 -1
  9. package/cjs/resources/Apps/Installs.js +1 -1
  10. package/cjs/resources/Charges.d.ts +383 -0
  11. package/cjs/resources/Checkout/Sessions.d.ts +82 -6
  12. package/cjs/resources/ConfirmationTokens.d.ts +40 -1
  13. package/cjs/resources/CustomerTaxExemptions.d.ts +28 -0
  14. package/cjs/resources/Customers.d.ts +31 -1
  15. package/cjs/resources/Disputes.d.ts +1 -1
  16. package/cjs/resources/Invoices.d.ts +15 -3
  17. package/cjs/resources/Issuing/Cards.d.ts +2 -2
  18. package/cjs/resources/PaymentAttemptRecords.d.ts +140 -1
  19. package/cjs/resources/PaymentIntentAmountDetailsLineItems.d.ts +48 -0
  20. package/cjs/resources/PaymentIntents.d.ts +532 -20
  21. package/cjs/resources/PaymentLinks.d.ts +3 -3
  22. package/cjs/resources/PaymentMethodConfigurations.d.ts +70 -0
  23. package/cjs/resources/PaymentMethods.d.ts +66 -3
  24. package/cjs/resources/PaymentRecords.d.ts +85 -1
  25. package/cjs/resources/QuotePreviewInvoices.d.ts +1 -1
  26. package/cjs/resources/Quotes.d.ts +2 -2
  27. package/cjs/resources/Radar/PaymentEvaluations.d.ts +45 -4
  28. package/cjs/resources/Refunds.d.ts +31 -1
  29. package/cjs/resources/Reporting/ReportRuns.d.ts +4 -0
  30. package/cjs/resources/SetupAttempts.d.ts +4 -0
  31. package/cjs/resources/SetupIntents.d.ts +129 -15
  32. package/cjs/resources/Subscriptions.d.ts +21 -5
  33. package/cjs/resources/Tax/Certificates.d.ts +107 -0
  34. package/cjs/resources/Tax/Certificates.js +35 -0
  35. package/cjs/resources/Tax/Certificates.js.map +1 -0
  36. package/cjs/resources/Tax/FormCorrections.d.ts +29 -0
  37. package/cjs/resources/Tax/FormCorrections.js +4 -0
  38. package/cjs/resources/Tax/FormCorrections.js.map +1 -0
  39. package/cjs/resources/Tax/Forms.d.ts +376 -1
  40. package/cjs/resources/Tax/Forms.js +6 -0
  41. package/cjs/resources/Tax/Forms.js.map +1 -1
  42. package/cjs/resources/Tax/index.d.ts +38 -25
  43. package/cjs/resources/Tax/index.js +2 -0
  44. package/cjs/resources/Tax/index.js.map +1 -1
  45. package/cjs/resources/TestHelpers/ConfirmationTokens.d.ts +25 -1
  46. package/cjs/resources/Treasury/InboundTransfers.d.ts +22 -0
  47. package/cjs/resources/Treasury/OutboundPayments.d.ts +22 -0
  48. package/cjs/resources/Treasury/OutboundTransfers.d.ts +22 -0
  49. package/cjs/resources/V2/Core/AccountSessions.d.ts +28 -0
  50. package/cjs/resources/V2/Core/ApprovalRequests.d.ts +34 -2
  51. package/cjs/resources/V2/Core/Events.d.ts +85 -5
  52. package/cjs/resources/V2/Extend/ObjectDefinitionVersions.d.ts +222 -0
  53. package/cjs/resources/V2/Extend/ObjectDefinitionVersions.js +4 -0
  54. package/cjs/resources/V2/Extend/ObjectDefinitionVersions.js.map +1 -0
  55. package/cjs/resources/V2/Extend/ObjectDefinitions/Versions.d.ts +33 -0
  56. package/cjs/resources/V2/Extend/ObjectDefinitions/Versions.js +23 -0
  57. package/cjs/resources/V2/Extend/ObjectDefinitions/Versions.js.map +1 -0
  58. package/cjs/resources/V2/Extend/ObjectDefinitions.d.ts +63 -0
  59. package/cjs/resources/V2/Extend/ObjectDefinitions.js +29 -0
  60. package/cjs/resources/V2/Extend/ObjectDefinitions.js.map +1 -0
  61. package/cjs/resources/V2/Extend/index.d.ts +16 -7
  62. package/cjs/resources/V2/Extend/index.js +2 -0
  63. package/cjs/resources/V2/Extend/index.js.map +1 -1
  64. package/cjs/resources/V2/MoneyManagement/Adjustments.d.ts +34 -2
  65. package/cjs/resources/V2/MoneyManagement/FundingIntents.d.ts +30 -2
  66. package/cjs/resources/V2/MoneyManagement/FundingIntents.js.map +1 -1
  67. package/cjs/resources/V2/MoneyManagement/InboundTransfers.d.ts +34 -2
  68. package/cjs/resources/V2/MoneyManagement/OutboundPayments.d.ts +32 -2
  69. package/cjs/resources/V2/MoneyManagement/OutboundPayments.js.map +1 -1
  70. package/cjs/resources/V2/MoneyManagement/ReceivedCredits.d.ts +34 -2
  71. package/cjs/resources/V2/MoneyManagement/TransactionEntries.d.ts +30 -2
  72. package/cjs/resources/V2/MoneyManagement/Transactions.d.ts +30 -2
  73. package/cjs/resources/V2/MoneyManagement/Transactions.js.map +1 -1
  74. package/cjs/resources.js +4 -0
  75. package/cjs/resources.js.map +1 -1
  76. package/cjs/stripe.cjs.node.d.ts +459 -0
  77. package/cjs/stripe.cjs.node.js.map +1 -1
  78. package/cjs/stripe.core.js +1 -1
  79. package/esm/StripeEventNotificationHandler.js +2 -0
  80. package/esm/StripeEventNotificationHandler.js.map +1 -1
  81. package/esm/WorkloadIdentity.js +1 -1
  82. package/esm/resources/AccountSessions.d.ts +226 -0
  83. package/esm/resources/Apps/Installs.d.ts +1 -1
  84. package/esm/resources/Apps/Installs.js +1 -1
  85. package/esm/resources/Charges.d.ts +383 -0
  86. package/esm/resources/Checkout/Sessions.d.ts +82 -6
  87. package/esm/resources/ConfirmationTokens.d.ts +40 -1
  88. package/esm/resources/CustomerTaxExemptions.d.ts +28 -0
  89. package/esm/resources/Customers.d.ts +31 -1
  90. package/esm/resources/Disputes.d.ts +1 -1
  91. package/esm/resources/Invoices.d.ts +15 -3
  92. package/esm/resources/Issuing/Cards.d.ts +2 -2
  93. package/esm/resources/PaymentAttemptRecords.d.ts +140 -1
  94. package/esm/resources/PaymentIntentAmountDetailsLineItems.d.ts +48 -0
  95. package/esm/resources/PaymentIntents.d.ts +532 -20
  96. package/esm/resources/PaymentLinks.d.ts +3 -3
  97. package/esm/resources/PaymentMethodConfigurations.d.ts +70 -0
  98. package/esm/resources/PaymentMethods.d.ts +66 -3
  99. package/esm/resources/PaymentRecords.d.ts +85 -1
  100. package/esm/resources/QuotePreviewInvoices.d.ts +1 -1
  101. package/esm/resources/Quotes.d.ts +2 -2
  102. package/esm/resources/Radar/PaymentEvaluations.d.ts +45 -4
  103. package/esm/resources/Refunds.d.ts +31 -1
  104. package/esm/resources/Reporting/ReportRuns.d.ts +4 -0
  105. package/esm/resources/SetupAttempts.d.ts +4 -0
  106. package/esm/resources/SetupIntents.d.ts +129 -15
  107. package/esm/resources/Subscriptions.d.ts +21 -5
  108. package/esm/resources/Tax/Certificates.d.ts +107 -0
  109. package/esm/resources/Tax/Certificates.js +31 -0
  110. package/esm/resources/Tax/Certificates.js.map +1 -0
  111. package/esm/resources/Tax/FormCorrections.d.ts +29 -0
  112. package/esm/resources/Tax/FormCorrections.js +3 -0
  113. package/esm/resources/Tax/FormCorrections.js.map +1 -0
  114. package/esm/resources/Tax/Forms.d.ts +376 -1
  115. package/esm/resources/Tax/Forms.js +6 -0
  116. package/esm/resources/Tax/Forms.js.map +1 -1
  117. package/esm/resources/Tax/index.d.ts +38 -25
  118. package/esm/resources/Tax/index.js +2 -0
  119. package/esm/resources/Tax/index.js.map +1 -1
  120. package/esm/resources/TestHelpers/ConfirmationTokens.d.ts +25 -1
  121. package/esm/resources/Treasury/InboundTransfers.d.ts +22 -0
  122. package/esm/resources/Treasury/OutboundPayments.d.ts +22 -0
  123. package/esm/resources/Treasury/OutboundTransfers.d.ts +22 -0
  124. package/esm/resources/V2/Core/AccountSessions.d.ts +28 -0
  125. package/esm/resources/V2/Core/ApprovalRequests.d.ts +34 -2
  126. package/esm/resources/V2/Core/Events.d.ts +85 -5
  127. package/esm/resources/V2/Extend/ObjectDefinitionVersions.d.ts +222 -0
  128. package/esm/resources/V2/Extend/ObjectDefinitionVersions.js +3 -0
  129. package/esm/resources/V2/Extend/ObjectDefinitionVersions.js.map +1 -0
  130. package/esm/resources/V2/Extend/ObjectDefinitions/Versions.d.ts +33 -0
  131. package/esm/resources/V2/Extend/ObjectDefinitions/Versions.js +19 -0
  132. package/esm/resources/V2/Extend/ObjectDefinitions/Versions.js.map +1 -0
  133. package/esm/resources/V2/Extend/ObjectDefinitions.d.ts +63 -0
  134. package/esm/resources/V2/Extend/ObjectDefinitions.js +25 -0
  135. package/esm/resources/V2/Extend/ObjectDefinitions.js.map +1 -0
  136. package/esm/resources/V2/Extend/index.d.ts +16 -7
  137. package/esm/resources/V2/Extend/index.js +2 -0
  138. package/esm/resources/V2/Extend/index.js.map +1 -1
  139. package/esm/resources/V2/MoneyManagement/Adjustments.d.ts +34 -2
  140. package/esm/resources/V2/MoneyManagement/FundingIntents.d.ts +30 -2
  141. package/esm/resources/V2/MoneyManagement/FundingIntents.js.map +1 -1
  142. package/esm/resources/V2/MoneyManagement/InboundTransfers.d.ts +34 -2
  143. package/esm/resources/V2/MoneyManagement/OutboundPayments.d.ts +32 -2
  144. package/esm/resources/V2/MoneyManagement/OutboundPayments.js.map +1 -1
  145. package/esm/resources/V2/MoneyManagement/ReceivedCredits.d.ts +34 -2
  146. package/esm/resources/V2/MoneyManagement/TransactionEntries.d.ts +30 -2
  147. package/esm/resources/V2/MoneyManagement/Transactions.d.ts +30 -2
  148. package/esm/resources/V2/MoneyManagement/Transactions.js.map +1 -1
  149. package/esm/resources.js +4 -0
  150. package/esm/resources.js.map +1 -1
  151. package/esm/stripe.core.js +1 -1
  152. package/esm/stripe.esm.node.js +1 -1
  153. package/package.json +1 -1
@@ -51,7 +51,7 @@ export interface PaymentEvaluation {
51
51
  */
52
52
  payment_details?: PaymentEvaluation.PaymentDetails;
53
53
  /**
54
- * Recommended action based on the score of the `fraudulent_payment` signal. Possible values are `block`, `continue` and `request_three_d_secure`.
54
+ * Recommended action for this payment based on its evaluated signals and rules.
55
55
  */
56
56
  recommended_action: PaymentEvaluation.RecommendedAction;
57
57
  /**
@@ -178,7 +178,7 @@ export declare namespace PaymentEvaluation {
178
178
  */
179
179
  statement_descriptor: string | null;
180
180
  }
181
- type RecommendedAction = 'block' | 'continue' | 'request_three_d_secure' | 'reroute' | OtherString;
181
+ type RecommendedAction = 'block' | 'continue' | 'continue_with_manual_review' | 'request_three_d_secure' | 'reroute' | OtherString;
182
182
  interface Rules {
183
183
  /**
184
184
  * List of Radar rule tokens that matched during evaluation. Expandable to full rule objects.
@@ -194,6 +194,10 @@ export declare namespace PaymentEvaluation {
194
194
  * A payment evaluation signal with evaluated_at, risk_level, and score fields.
195
195
  */
196
196
  bank_initiated_return?: Signals.BankInitiatedReturn;
197
+ /**
198
+ * The likelihood that this `PaymentEvaluation` is part of a card testing attack.
199
+ */
200
+ card_testing?: Signals.CardTesting | null;
197
201
  /**
198
202
  * The likelihood that this `PaymentEvaluation` results in an early fraud warning.
199
203
  */
@@ -397,6 +401,10 @@ export declare namespace PaymentEvaluation {
397
401
  * Describes the type of money movement.
398
402
  */
399
403
  money_movement_type: MoneyMovementDetails.MoneyMovementType;
404
+ /**
405
+ * Describes SEPA debit money movement details.
406
+ */
407
+ sepa_debit?: MoneyMovementDetails.SepaDebit | null;
400
408
  /**
401
409
  * Describes US bank account money movement details.
402
410
  */
@@ -441,7 +449,13 @@ export declare namespace PaymentEvaluation {
441
449
  */
442
450
  payment_type: Card.PaymentType | null;
443
451
  }
444
- type MoneyMovementType = 'card' | 'us_bank_account' | OtherString;
452
+ type MoneyMovementType = 'card' | 'sepa_debit' | 'us_bank_account' | OtherString;
453
+ interface SepaDebit {
454
+ /**
455
+ * Creditor identifier used for the intended debit.
456
+ */
457
+ creditor_id: string | null;
458
+ }
445
459
  interface UsBankAccount {
446
460
  /**
447
461
  * Describes the presence of the customer during the payment.
@@ -515,6 +529,20 @@ export declare namespace PaymentEvaluation {
515
529
  */
516
530
  score: number | null;
517
531
  }
532
+ interface CardTesting {
533
+ /**
534
+ * The time when this signal was evaluated.
535
+ */
536
+ evaluated_at: number;
537
+ /**
538
+ * Risk level of this signal, based on the score.
539
+ */
540
+ risk_level: CardTesting.RiskLevel;
541
+ /**
542
+ * Numeric score for this signal, returned with two decimal places. Possible values for evaluated payments are between 0 and 100, where higher scores indicate a higher likelihood of the signal being true.
543
+ */
544
+ score: number | null;
545
+ }
518
546
  interface EarlyFraudWarning {
519
547
  /**
520
548
  * The time when this signal was evaluated.
@@ -560,6 +588,9 @@ export declare namespace PaymentEvaluation {
560
588
  namespace BankInitiatedReturn {
561
589
  type RiskLevel = 'elevated' | 'highest' | 'low' | 'normal' | 'not_assessed' | 'unknown' | OtherString;
562
590
  }
591
+ namespace CardTesting {
592
+ type RiskLevel = 'elevated' | 'highest' | 'low' | 'normal' | 'not_assessed' | 'unknown' | OtherString;
593
+ }
563
594
  namespace EarlyFraudWarning {
564
595
  type RiskLevel = 'elevated' | 'highest' | 'low' | 'normal' | 'not_assessed' | 'unknown' | OtherString;
565
596
  }
@@ -694,6 +725,10 @@ export declare namespace Radar {
694
725
  * Describes the type of money movement.
695
726
  */
696
727
  money_movement_type: MoneyMovementDetails.MoneyMovementType;
728
+ /**
729
+ * Describes SEPA debit money movement details.
730
+ */
731
+ sepa_debit?: MoneyMovementDetails.SepaDebit;
697
732
  /**
698
733
  * Describes US bank account money movement details.
699
734
  */
@@ -738,7 +773,13 @@ export declare namespace Radar {
738
773
  */
739
774
  payment_type?: Card.PaymentType;
740
775
  }
741
- type MoneyMovementType = 'card' | 'us_bank_account' | OtherString;
776
+ type MoneyMovementType = 'card' | 'sepa_debit' | 'us_bank_account' | OtherString;
777
+ interface SepaDebit {
778
+ /**
779
+ * Supply the SEPA Creditor Identifier configured for the intended debit with your selected processor. Obtain it from your processor's SEPA configuration API or onboarding/support information. Do not supply a statement descriptor, IBAN, processor merchant-account ID, or mandate reference. If the creditor identifier is unknown, omit it.
780
+ */
781
+ creditor_id?: string;
782
+ }
742
783
  interface UsBankAccount {
743
784
  /**
744
785
  * Describes the presence of the customer during the payment.
@@ -118,6 +118,10 @@ export interface Refund {
118
118
  * ID of the payment method associated with this refund.
119
119
  */
120
120
  payment_method: string | PaymentMethod | null;
121
+ /**
122
+ * ID of the PaymentRecord associated with the payment that has been refunded.
123
+ */
124
+ payment_record?: string;
121
125
  /**
122
126
  * Provides the reason for why the refund is pending. Possible values are: `processing`, `insufficient_funds`, or `charge_pending`.
123
127
  */
@@ -152,6 +156,7 @@ export declare namespace Refund {
152
156
  alma?: DestinationDetails.Alma;
153
157
  amazon_pay?: DestinationDetails.AmazonPay;
154
158
  au_bank_transfer?: DestinationDetails.AuBankTransfer;
159
+ bizum?: DestinationDetails.Bizum;
155
160
  blik?: DestinationDetails.Blik;
156
161
  br_bank_transfer?: DestinationDetails.BrBankTransfer;
157
162
  card?: DestinationDetails.Card;
@@ -184,6 +189,7 @@ export declare namespace Refund {
184
189
  * The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction.
185
190
  */
186
191
  type: string;
192
+ upi?: DestinationDetails.Upi;
187
193
  us_bank_transfer?: DestinationDetails.UsBankTransfer;
188
194
  wechat_pay?: DestinationDetails.WechatPay;
189
195
  zip?: DestinationDetails.Zip;
@@ -228,6 +234,16 @@ export declare namespace Refund {
228
234
  }
229
235
  interface AuBankTransfer {
230
236
  }
237
+ interface Bizum {
238
+ /**
239
+ * The reference assigned to the refund.
240
+ */
241
+ reference: string | null;
242
+ /**
243
+ * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
244
+ */
245
+ reference_status: string | null;
246
+ }
231
247
  interface Blik {
232
248
  /**
233
249
  * For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed.
@@ -428,6 +444,16 @@ export declare namespace Refund {
428
444
  }
429
445
  interface Twint {
430
446
  }
447
+ interface Upi {
448
+ /**
449
+ * The reference assigned to the refund.
450
+ */
451
+ reference: string | null;
452
+ /**
453
+ * Status of the reference on the refund. This can be `pending`, `available` or `unavailable`.
454
+ */
455
+ reference_status: string | null;
456
+ }
431
457
  interface UsBankTransfer {
432
458
  /**
433
459
  * The reference assigned to the refund.
@@ -506,6 +532,10 @@ export interface RefundCreateParams {
506
532
  * The identifier of the PaymentIntent to refund.
507
533
  */
508
534
  payment_intent?: string;
535
+ /**
536
+ * The ID of a PaymentMethod that will receive the refund.
537
+ */
538
+ payment_method?: string;
509
539
  /**
510
540
  * Used to create the PaymentMethod that will receive the refund.
511
541
  */
@@ -558,7 +588,7 @@ export declare namespace RefundCreateParams {
558
588
  */
559
589
  gift_card: string;
560
590
  }
561
- type Type = 'acss_debit' | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'amazon_pay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' | 'billie' | 'bizum' | 'blik' | 'boleto' | 'card' | 'carecredit' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'eps' | 'fpx' | 'getflex' | 'gift_card' | 'giropay' | 'gopay' | 'grabpay' | 'id_bank_transfer' | 'ideal' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'mb_way' | 'mobilepay' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'oxxo' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'paypay' | 'payto' | 'pix' | 'promptpay' | 'qris' | 'rakuten_pay' | 'rechnung' | 'revolut_pay' | 'samsung_pay' | 'satispay' | 'scalapay' | 'sepa_debit' | 'sequra' | 'sezzle' | 'shopeepay' | 'sofort' | 'stripe_balance' | 'sunbit' | 'swish' | 'tamara' | 'toss_pay' | 'twint' | 'upi' | 'us_bank_account' | 'vipps' | 'wechat_pay' | 'wero' | 'zip' | OtherString;
591
+ type Type = 'acss_debit' | 'aeon_pay' | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'alma' | 'amazon_pay' | 'au_becs_debit' | 'au_pay' | 'bacs_debit' | 'bancontact' | 'billie' | 'bizum' | 'blik' | 'boleto' | 'card' | 'carecredit' | 'cashapp' | 'crypto' | 'custom' | 'customer_balance' | 'dbarai' | 'eps' | 'fpx' | 'getflex' | 'gift_card' | 'giropay' | 'gopay' | 'grabpay' | 'id_bank_transfer' | 'ideal' | 'kakao_pay' | 'klarna' | 'konbini' | 'kr_card' | 'link' | 'mb_way' | 'merpay' | 'mobilepay' | 'multibanco' | 'naver_pay' | 'nz_bank_account' | 'oxxo' | 'p24' | 'pay_by_bank' | 'payco' | 'paynow' | 'paypal' | 'paypay' | 'payto' | 'pix' | 'promptpay' | 'qris' | 'rakuten_pay' | 'rechnung' | 'revolut_pay' | 'samsung_pay' | 'satispay' | 'scalapay' | 'sepa_debit' | 'sequra' | 'sezzle' | 'shopeepay' | 'sofort' | 'stripe_balance' | 'sunbit' | 'swish' | 'tamara' | 'toss_pay' | 'twint' | 'upi' | 'us_bank_account' | 'vipps' | 'wechat_pay' | 'wero' | 'zip' | OtherString;
562
592
  }
563
593
  namespace PaymentMethodOptions {
564
594
  interface GiftCard {
@@ -90,6 +90,10 @@ export declare namespace ReportRun {
90
90
  * Category of balance transactions to be included in the report run.
91
91
  */
92
92
  reporting_category?: string;
93
+ /**
94
+ * The tax invoice month in YYYY-MM format.
95
+ */
96
+ tax_invoice_month?: string;
93
97
  /**
94
98
  * Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`.
95
99
  */
@@ -416,6 +416,10 @@ export declare namespace SetupAttempt {
416
416
  interface Paypal {
417
417
  }
418
418
  interface Paypay {
419
+ /**
420
+ * Uniquely identifies this particular PayPay account. You can use this attribute to check whether two PayPay accounts are the same.
421
+ */
422
+ fingerprint?: string | null;
419
423
  }
420
424
  interface Payto {
421
425
  }