stripe 22.2.0-alpha.2 → 22.2.0-alpha.4
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 +23 -0
- package/OPENAPI_VERSION +1 -1
- package/README.md +0 -1
- package/VERSION +1 -1
- package/cjs/StripeEventNotificationHandler.d.ts +21 -0
- package/cjs/StripeEventNotificationHandler.js +464 -0
- package/cjs/StripeEventNotificationHandler.js.map +1 -0
- package/cjs/resources/Accounts.d.ts +40 -0
- package/cjs/resources/Capabilities.d.ts +23 -0
- package/cjs/resources/ConfirmationTokens.d.ts +31 -1
- package/cjs/resources/Customers.d.ts +1 -1
- package/cjs/resources/DelegatedCheckout/RequestedSessions.d.ts +4 -0
- package/cjs/resources/Files.d.ts +2 -0
- package/cjs/resources/Files.js +5 -0
- package/cjs/resources/Files.js.map +1 -1
- package/cjs/resources/InvoiceItems.d.ts +25 -0
- package/cjs/resources/Issuing/Disputes.d.ts +50 -0
- package/cjs/resources/PaymentIntents.d.ts +37 -7
- package/cjs/resources/PaymentLocations.d.ts +216 -0
- package/cjs/resources/PaymentLocations.js +33 -0
- package/cjs/resources/PaymentLocations.js.map +1 -0
- package/cjs/resources/PaymentMethods.d.ts +43 -3
- package/cjs/resources/SetupIntents.d.ts +36 -6
- package/cjs/resources/SharedPayment/GrantedTokens.d.ts +31 -1
- package/cjs/resources/Subscriptions.d.ts +37 -0
- package/cjs/resources/TestHelpers/ConfirmationTokens.d.ts +11 -1
- package/cjs/resources/V2/Core/Accounts.d.ts +251 -2
- package/cjs/resources/V2/Core/Events.d.ts +1 -1
- package/cjs/resources.d.ts +1 -0
- package/cjs/resources.js +4 -2
- package/cjs/resources.js.map +1 -1
- package/cjs/stripe.core.d.ts +6 -0
- package/cjs/stripe.core.js +7 -1
- package/cjs/stripe.core.js.map +1 -1
- package/esm/StripeEventNotificationHandler.d.ts +21 -0
- package/esm/StripeEventNotificationHandler.js +460 -0
- package/esm/StripeEventNotificationHandler.js.map +1 -0
- package/esm/resources/Accounts.d.ts +40 -0
- package/esm/resources/Capabilities.d.ts +23 -0
- package/esm/resources/ConfirmationTokens.d.ts +31 -1
- package/esm/resources/Customers.d.ts +1 -1
- package/esm/resources/DelegatedCheckout/RequestedSessions.d.ts +4 -0
- package/esm/resources/Files.d.ts +2 -0
- package/esm/resources/Files.js +5 -0
- package/esm/resources/Files.js.map +1 -1
- package/esm/resources/InvoiceItems.d.ts +25 -0
- package/esm/resources/Issuing/Disputes.d.ts +50 -0
- package/esm/resources/PaymentIntents.d.ts +37 -7
- package/esm/resources/PaymentLocations.d.ts +216 -0
- package/esm/resources/PaymentLocations.js +29 -0
- package/esm/resources/PaymentLocations.js.map +1 -0
- package/esm/resources/PaymentMethods.d.ts +43 -3
- package/esm/resources/SetupIntents.d.ts +36 -6
- package/esm/resources/SharedPayment/GrantedTokens.d.ts +31 -1
- package/esm/resources/Subscriptions.d.ts +37 -0
- package/esm/resources/TestHelpers/ConfirmationTokens.d.ts +11 -1
- package/esm/resources/V2/Core/Accounts.d.ts +251 -2
- package/esm/resources/V2/Core/Events.d.ts +1 -1
- package/esm/resources.d.ts +1 -0
- package/esm/resources.js +1 -0
- package/esm/resources.js.map +1 -1
- package/esm/stripe.core.d.ts +6 -0
- package/esm/stripe.core.js +7 -1
- package/esm/stripe.core.js.map +1 -1
- package/esm/stripe.esm.node.d.ts +6 -0
- package/esm/stripe.esm.node.js +7 -1
- package/esm/stripe.esm.node.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 22.2.0-alpha.4 - 2026-05-06
|
|
4
|
+
* [#2699](https://github.com/stripe/stripe-node/pull/2699) Update generated code for private-preview
|
|
5
|
+
* Add support for new resource `PaymentLocation`
|
|
6
|
+
* Add support for `create`, `del`, `retrieve`, and `update` methods on resource `PaymentLocation`
|
|
7
|
+
* Add support for `protections` on `AccountCreateParams.capabilities.card_payments`, `AccountUpdateParams.capabilities.card_payments`, and `Capability`
|
|
8
|
+
* Add support for `gift_card` on `ConfirmationToken.payment_method_preview`, `ConfirmationTokenCreateParams.testHelpers.payment_method_data`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentMethodCreateParams`, `PaymentMethod`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, `SetupIntentUpdateParams.payment_method_data`, and `SharedPayment.GrantedToken.payment_method_details`
|
|
9
|
+
* Add support for new value `gift_card` on enums `ConfirmationTokenCreateParams.testHelpers.payment_method_data.type`, `PaymentIntentConfirmParams.payment_method_data.type`, `PaymentIntentCreateParams.payment_method_data.type`, `PaymentIntentUpdateParams.payment_method_data.type`, `SetupIntentConfirmParams.payment_method_data.type`, `SetupIntentCreateParams.payment_method_data.type`, and `SetupIntentUpdateParams.payment_method_data.type`
|
|
10
|
+
* ⚠️ Add support for new value `gift_card` on enums `ConfirmationToken.payment_method_preview.type`, `PaymentMethod.type`, and `SharedPayment.GrantedToken.payment_method_details.type`
|
|
11
|
+
* Add support for new value `gift_card` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type`
|
|
12
|
+
* Add support for `metadata` on `DelegatedCheckout.RequestedSessionConfirmParams`
|
|
13
|
+
* Add support for `credited_items` on `InvoiceItem.proration_details`
|
|
14
|
+
* Add support for `network_lifecycle` on `Issuing.Dispute`
|
|
15
|
+
* Add support for new value `gift_card` on enums `PaymentIntentConfirmParams.excluded_payment_method_types`, `PaymentIntentCreateParams.excluded_payment_method_types`, `PaymentIntentUpdateParams.excluded_payment_method_types`, `SetupIntentCreateParams.excluded_payment_method_types`, and `SetupIntentUpdateParams.excluded_payment_method_types`
|
|
16
|
+
* ⚠️ Add support for new value `gift_card` on enums `PaymentIntent.excluded_payment_method_types` and `SetupIntent.excluded_payment_method_types`
|
|
17
|
+
* Add support for `status_details` on `Subscription`
|
|
18
|
+
* [#2702](https://github.com/stripe/stripe-node/pull/2702) Add EventNotificationHandler (private preview)
|
|
19
|
+
|
|
20
|
+
## 22.2.0-alpha.3 - 2026-04-28
|
|
21
|
+
* [#2696](https://github.com/stripe/stripe-node/pull/2696) Update generated code for private-preview
|
|
22
|
+
* Add support for `debit_card` on `V2.Core.Account.configuration.card_creator.capabilities.consumer.lead`, `V2.Core.Account.identity.attestations.terms_of_service.card_creator.consumer.lead`, `V2.Core.AccountCreateParams.configuration.card_creator.capabilities.consumer.lead`, `V2.Core.AccountCreateParams.identity.attestations.terms_of_service.card_creator.consumer.lead`, `V2.Core.AccountUpdateParams.configuration.card_creator.capabilities.consumer.lead`, and `V2.Core.AccountUpdateParams.identity.attestations.terms_of_service.card_creator.consumer.lead`
|
|
23
|
+
* ⚠️ Add support for new value `consumer.lead.debit_card` on enums `V2.Core.Account.future_requirements.entries[].impact.restricts_capabilities[].capability` and `V2.Core.Account.requirements.entries[].impact.restricts_capabilities[].capability`
|
|
24
|
+
* ⚠️ Add support for new value `consumer.lead.debit_card` on enum `EventsV2CoreAccountIncludingConfigurationCardCreatorCapabilityStatusUpdatedEvent.updated_capability`
|
|
25
|
+
|
|
3
26
|
## 22.2.0-alpha.2 - 2026-04-28
|
|
4
27
|
* [#2695](https://github.com/stripe/stripe-node/pull/2695) Update generated code for private-preview
|
|
5
28
|
* Add support for new resource `V2.Data.Analytics.MetricQueryResult`
|
package/OPENAPI_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
v2256
|
package/README.md
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
[](https://www.npmjs.org/package/stripe)
|
|
4
4
|
[](https://github.com/stripe/stripe-node/actions?query=branch%3Amaster)
|
|
5
5
|
[](https://www.npmjs.com/package/stripe)
|
|
6
|
-
[](https://runkit.com/npm/stripe)
|
|
7
6
|
|
|
8
7
|
> [!TIP]
|
|
9
8
|
> Want to chat live with Stripe engineers? Join us on our [Discord server](https://stripe.com/go/discord/node).
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
22.2.0-alpha.
|
|
1
|
+
22.2.0-alpha.4
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
import { Stripe } from './stripe.core.js';
|
|
4
|
+
import * as Events from './resources/V2/Core/Events.js';
|
|
5
|
+
export interface UnhandledNotificationDetails {
|
|
6
|
+
isKnownEventType: boolean;
|
|
7
|
+
}
|
|
8
|
+
export type FallbackCallback = (event: Events.UnknownEventNotification, client: Stripe, details: UnhandledNotificationDetails) => Promise<void>;
|
|
9
|
+
export declare class StripeEventNotificationHandler {
|
|
10
|
+
private client;
|
|
11
|
+
private webhookSecret;
|
|
12
|
+
private fallbackCallback;
|
|
13
|
+
private registeredHandlers;
|
|
14
|
+
private hasHandledEvent;
|
|
15
|
+
constructor(client: Stripe, webhookSecret: string, fallbackCallback: FallbackCallback);
|
|
16
|
+
on<T extends Stripe.V2.Core.EventNotification['type']>(type: T, callback: (event: Extract<Stripe.V2.Core.EventNotification, {
|
|
17
|
+
type: T;
|
|
18
|
+
}>, client: Stripe) => Promise<void>): this;
|
|
19
|
+
registeredEventTypes(): string[];
|
|
20
|
+
handle(rawBody: string | Buffer, signature: string | Buffer): Promise<void>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,464 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File copied from our code generator; changes here will be overwritten.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.StripeEventNotificationHandler = void 0;
|
|
5
|
+
// most languages can check if we have an UnknownEventNotification at runtime
|
|
6
|
+
// but JS only has interfaces so we fall back to a string match to determine known events
|
|
7
|
+
const KNOWN_EVENT_TYPES = new Set([
|
|
8
|
+
// event-types: The beginning of the section generated from our OpenAPI spec
|
|
9
|
+
'v1.account.application.authorized',
|
|
10
|
+
'v1.account.application.deauthorized',
|
|
11
|
+
'v1.account.external_account.created',
|
|
12
|
+
'v1.account.external_account.deleted',
|
|
13
|
+
'v1.account.external_account.updated',
|
|
14
|
+
'v1.account.updated',
|
|
15
|
+
'v1.account_signals[delinquency].created',
|
|
16
|
+
'v1.application_fee.created',
|
|
17
|
+
'v1.application_fee.refund.updated',
|
|
18
|
+
'v1.application_fee.refunded',
|
|
19
|
+
'v1.balance.available',
|
|
20
|
+
'v1.billing.alert.triggered',
|
|
21
|
+
'v1.billing.meter.error_report_triggered',
|
|
22
|
+
'v1.billing.meter.no_meter_found',
|
|
23
|
+
'v1.billing_portal.configuration.created',
|
|
24
|
+
'v1.billing_portal.configuration.updated',
|
|
25
|
+
'v1.billing_portal.session.created',
|
|
26
|
+
'v1.capability.updated',
|
|
27
|
+
'v1.cash_balance.funds_available',
|
|
28
|
+
'v1.charge.captured',
|
|
29
|
+
'v1.charge.dispute.closed',
|
|
30
|
+
'v1.charge.dispute.created',
|
|
31
|
+
'v1.charge.dispute.funds_reinstated',
|
|
32
|
+
'v1.charge.dispute.funds_withdrawn',
|
|
33
|
+
'v1.charge.dispute.updated',
|
|
34
|
+
'v1.charge.expired',
|
|
35
|
+
'v1.charge.failed',
|
|
36
|
+
'v1.charge.pending',
|
|
37
|
+
'v1.charge.refund.updated',
|
|
38
|
+
'v1.charge.refunded',
|
|
39
|
+
'v1.charge.succeeded',
|
|
40
|
+
'v1.charge.updated',
|
|
41
|
+
'v1.checkout.session.async_payment_failed',
|
|
42
|
+
'v1.checkout.session.async_payment_succeeded',
|
|
43
|
+
'v1.checkout.session.completed',
|
|
44
|
+
'v1.checkout.session.expired',
|
|
45
|
+
'v1.climate.order.canceled',
|
|
46
|
+
'v1.climate.order.created',
|
|
47
|
+
'v1.climate.order.delayed',
|
|
48
|
+
'v1.climate.order.delivered',
|
|
49
|
+
'v1.climate.order.product_substituted',
|
|
50
|
+
'v1.climate.product.created',
|
|
51
|
+
'v1.climate.product.pricing_updated',
|
|
52
|
+
'v1.coupon.created',
|
|
53
|
+
'v1.coupon.deleted',
|
|
54
|
+
'v1.coupon.updated',
|
|
55
|
+
'v1.credit_note.created',
|
|
56
|
+
'v1.credit_note.updated',
|
|
57
|
+
'v1.credit_note.voided',
|
|
58
|
+
'v1.customer.created',
|
|
59
|
+
'v1.customer.deleted',
|
|
60
|
+
'v1.customer.subscription.created',
|
|
61
|
+
'v1.customer.subscription.deleted',
|
|
62
|
+
'v1.customer.subscription.paused',
|
|
63
|
+
'v1.customer.subscription.pending_update_applied',
|
|
64
|
+
'v1.customer.subscription.pending_update_expired',
|
|
65
|
+
'v1.customer.subscription.resumed',
|
|
66
|
+
'v1.customer.subscription.trial_will_end',
|
|
67
|
+
'v1.customer.subscription.updated',
|
|
68
|
+
'v1.customer.tax_id.created',
|
|
69
|
+
'v1.customer.tax_id.deleted',
|
|
70
|
+
'v1.customer.tax_id.updated',
|
|
71
|
+
'v1.customer.updated',
|
|
72
|
+
'v1.customer_cash_balance_transaction.created',
|
|
73
|
+
'v1.entitlements.active_entitlement_summary.updated',
|
|
74
|
+
'v1.file.created',
|
|
75
|
+
'v1.financial_connections.account.created',
|
|
76
|
+
'v1.financial_connections.account.deactivated',
|
|
77
|
+
'v1.financial_connections.account.disconnected',
|
|
78
|
+
'v1.financial_connections.account.reactivated',
|
|
79
|
+
'v1.financial_connections.account.refreshed_balance',
|
|
80
|
+
'v1.financial_connections.account.refreshed_ownership',
|
|
81
|
+
'v1.financial_connections.account.refreshed_transactions',
|
|
82
|
+
'v1.identity.verification_session.canceled',
|
|
83
|
+
'v1.identity.verification_session.created',
|
|
84
|
+
'v1.identity.verification_session.processing',
|
|
85
|
+
'v1.identity.verification_session.redacted',
|
|
86
|
+
'v1.identity.verification_session.requires_input',
|
|
87
|
+
'v1.identity.verification_session.verified',
|
|
88
|
+
'v1.invoice.created',
|
|
89
|
+
'v1.invoice.deleted',
|
|
90
|
+
'v1.invoice.finalization_failed',
|
|
91
|
+
'v1.invoice.finalized',
|
|
92
|
+
'v1.invoice.marked_uncollectible',
|
|
93
|
+
'v1.invoice.overdue',
|
|
94
|
+
'v1.invoice.overpaid',
|
|
95
|
+
'v1.invoice.paid',
|
|
96
|
+
'v1.invoice.payment_action_required',
|
|
97
|
+
'v1.invoice.payment_failed',
|
|
98
|
+
'v1.invoice.payment_succeeded',
|
|
99
|
+
'v1.invoice.sent',
|
|
100
|
+
'v1.invoice.upcoming',
|
|
101
|
+
'v1.invoice.updated',
|
|
102
|
+
'v1.invoice.voided',
|
|
103
|
+
'v1.invoice.will_be_due',
|
|
104
|
+
'v1.invoice_payment.paid',
|
|
105
|
+
'v1.invoiceitem.created',
|
|
106
|
+
'v1.invoiceitem.deleted',
|
|
107
|
+
'v1.issuing_authorization.created',
|
|
108
|
+
'v1.issuing_authorization.request',
|
|
109
|
+
'v1.issuing_authorization.updated',
|
|
110
|
+
'v1.issuing_card.created',
|
|
111
|
+
'v1.issuing_card.updated',
|
|
112
|
+
'v1.issuing_cardholder.created',
|
|
113
|
+
'v1.issuing_cardholder.updated',
|
|
114
|
+
'v1.issuing_dispute.closed',
|
|
115
|
+
'v1.issuing_dispute.created',
|
|
116
|
+
'v1.issuing_dispute.funds_reinstated',
|
|
117
|
+
'v1.issuing_dispute.funds_rescinded',
|
|
118
|
+
'v1.issuing_dispute.submitted',
|
|
119
|
+
'v1.issuing_dispute.updated',
|
|
120
|
+
'v1.issuing_personalization_design.activated',
|
|
121
|
+
'v1.issuing_personalization_design.deactivated',
|
|
122
|
+
'v1.issuing_personalization_design.rejected',
|
|
123
|
+
'v1.issuing_personalization_design.updated',
|
|
124
|
+
'v1.issuing_token.created',
|
|
125
|
+
'v1.issuing_token.updated',
|
|
126
|
+
'v1.issuing_transaction.created',
|
|
127
|
+
'v1.issuing_transaction.purchase_details_receipt_updated',
|
|
128
|
+
'v1.issuing_transaction.updated',
|
|
129
|
+
'v1.mandate.updated',
|
|
130
|
+
'v1.payment_intent.amount_capturable_updated',
|
|
131
|
+
'v1.payment_intent.canceled',
|
|
132
|
+
'v1.payment_intent.created',
|
|
133
|
+
'v1.payment_intent.partially_funded',
|
|
134
|
+
'v1.payment_intent.payment_failed',
|
|
135
|
+
'v1.payment_intent.processing',
|
|
136
|
+
'v1.payment_intent.requires_action',
|
|
137
|
+
'v1.payment_intent.succeeded',
|
|
138
|
+
'v1.payment_link.created',
|
|
139
|
+
'v1.payment_link.updated',
|
|
140
|
+
'v1.payment_method.attached',
|
|
141
|
+
'v1.payment_method.automatically_updated',
|
|
142
|
+
'v1.payment_method.detached',
|
|
143
|
+
'v1.payment_method.updated',
|
|
144
|
+
'v1.payout.canceled',
|
|
145
|
+
'v1.payout.created',
|
|
146
|
+
'v1.payout.failed',
|
|
147
|
+
'v1.payout.paid',
|
|
148
|
+
'v1.payout.reconciliation_completed',
|
|
149
|
+
'v1.payout.updated',
|
|
150
|
+
'v1.person.created',
|
|
151
|
+
'v1.person.deleted',
|
|
152
|
+
'v1.person.updated',
|
|
153
|
+
'v1.plan.created',
|
|
154
|
+
'v1.plan.deleted',
|
|
155
|
+
'v1.plan.updated',
|
|
156
|
+
'v1.price.created',
|
|
157
|
+
'v1.price.deleted',
|
|
158
|
+
'v1.price.updated',
|
|
159
|
+
'v1.product.created',
|
|
160
|
+
'v1.product.deleted',
|
|
161
|
+
'v1.product.updated',
|
|
162
|
+
'v1.promotion_code.created',
|
|
163
|
+
'v1.promotion_code.updated',
|
|
164
|
+
'v1.quote.accepted',
|
|
165
|
+
'v1.quote.canceled',
|
|
166
|
+
'v1.quote.created',
|
|
167
|
+
'v1.quote.finalized',
|
|
168
|
+
'v1.radar.early_fraud_warning.created',
|
|
169
|
+
'v1.radar.early_fraud_warning.updated',
|
|
170
|
+
'v1.refund.created',
|
|
171
|
+
'v1.refund.failed',
|
|
172
|
+
'v1.refund.updated',
|
|
173
|
+
'v1.review.closed',
|
|
174
|
+
'v1.review.opened',
|
|
175
|
+
'v1.setup_intent.canceled',
|
|
176
|
+
'v1.setup_intent.created',
|
|
177
|
+
'v1.setup_intent.requires_action',
|
|
178
|
+
'v1.setup_intent.setup_failed',
|
|
179
|
+
'v1.setup_intent.succeeded',
|
|
180
|
+
'v1.sigma.scheduled_query_run.created',
|
|
181
|
+
'v1.source.canceled',
|
|
182
|
+
'v1.source.chargeable',
|
|
183
|
+
'v1.source.failed',
|
|
184
|
+
'v1.source.refund_attributes_required',
|
|
185
|
+
'v1.subscription_schedule.aborted',
|
|
186
|
+
'v1.subscription_schedule.canceled',
|
|
187
|
+
'v1.subscription_schedule.completed',
|
|
188
|
+
'v1.subscription_schedule.created',
|
|
189
|
+
'v1.subscription_schedule.expiring',
|
|
190
|
+
'v1.subscription_schedule.released',
|
|
191
|
+
'v1.subscription_schedule.updated',
|
|
192
|
+
'v1.tax.settings.updated',
|
|
193
|
+
'v1.tax_rate.created',
|
|
194
|
+
'v1.tax_rate.updated',
|
|
195
|
+
'v1.terminal.reader.action_failed',
|
|
196
|
+
'v1.terminal.reader.action_succeeded',
|
|
197
|
+
'v1.terminal.reader.action_updated',
|
|
198
|
+
'v1.test_helpers.test_clock.advancing',
|
|
199
|
+
'v1.test_helpers.test_clock.created',
|
|
200
|
+
'v1.test_helpers.test_clock.deleted',
|
|
201
|
+
'v1.test_helpers.test_clock.internal_failure',
|
|
202
|
+
'v1.test_helpers.test_clock.ready',
|
|
203
|
+
'v1.topup.canceled',
|
|
204
|
+
'v1.topup.created',
|
|
205
|
+
'v1.topup.failed',
|
|
206
|
+
'v1.topup.reversed',
|
|
207
|
+
'v1.topup.succeeded',
|
|
208
|
+
'v1.transfer.created',
|
|
209
|
+
'v1.transfer.reversed',
|
|
210
|
+
'v1.transfer.updated',
|
|
211
|
+
'v2.billing.cadence.billed',
|
|
212
|
+
'v2.billing.cadence.canceled',
|
|
213
|
+
'v2.billing.cadence.created',
|
|
214
|
+
'v2.billing.license_fee.created',
|
|
215
|
+
'v2.billing.license_fee.updated',
|
|
216
|
+
'v2.billing.license_fee_version.created',
|
|
217
|
+
'v2.billing.licensed_item.created',
|
|
218
|
+
'v2.billing.licensed_item.updated',
|
|
219
|
+
'v2.billing.metered_item.created',
|
|
220
|
+
'v2.billing.metered_item.updated',
|
|
221
|
+
'v2.billing.pricing_plan.created',
|
|
222
|
+
'v2.billing.pricing_plan.updated',
|
|
223
|
+
'v2.billing.pricing_plan_component.created',
|
|
224
|
+
'v2.billing.pricing_plan_component.updated',
|
|
225
|
+
'v2.billing.pricing_plan_subscription.collection_awaiting_customer_action',
|
|
226
|
+
'v2.billing.pricing_plan_subscription.collection_current',
|
|
227
|
+
'v2.billing.pricing_plan_subscription.collection_past_due',
|
|
228
|
+
'v2.billing.pricing_plan_subscription.collection_paused',
|
|
229
|
+
'v2.billing.pricing_plan_subscription.collection_unpaid',
|
|
230
|
+
'v2.billing.pricing_plan_subscription.servicing_activated',
|
|
231
|
+
'v2.billing.pricing_plan_subscription.servicing_canceled',
|
|
232
|
+
'v2.billing.pricing_plan_subscription.servicing_paused',
|
|
233
|
+
'v2.billing.pricing_plan_version.created',
|
|
234
|
+
'v2.billing.rate_card.created',
|
|
235
|
+
'v2.billing.rate_card.updated',
|
|
236
|
+
'v2.billing.rate_card_custom_pricing_unit_overage_rate.created',
|
|
237
|
+
'v2.billing.rate_card_rate.created',
|
|
238
|
+
'v2.billing.rate_card_subscription.activated',
|
|
239
|
+
'v2.billing.rate_card_subscription.canceled',
|
|
240
|
+
'v2.billing.rate_card_subscription.collection_awaiting_customer_action',
|
|
241
|
+
'v2.billing.rate_card_subscription.collection_current',
|
|
242
|
+
'v2.billing.rate_card_subscription.collection_past_due',
|
|
243
|
+
'v2.billing.rate_card_subscription.collection_paused',
|
|
244
|
+
'v2.billing.rate_card_subscription.collection_unpaid',
|
|
245
|
+
'v2.billing.rate_card_subscription.servicing_activated',
|
|
246
|
+
'v2.billing.rate_card_subscription.servicing_canceled',
|
|
247
|
+
'v2.billing.rate_card_subscription.servicing_paused',
|
|
248
|
+
'v2.billing.rate_card_version.created',
|
|
249
|
+
'v2.commerce.product_catalog.imports.failed',
|
|
250
|
+
'v2.commerce.product_catalog.imports.processing',
|
|
251
|
+
'v2.commerce.product_catalog.imports.succeeded',
|
|
252
|
+
'v2.commerce.product_catalog.imports.succeeded_with_errors',
|
|
253
|
+
'v2.core.account.closed',
|
|
254
|
+
'v2.core.account.created',
|
|
255
|
+
'v2.core.account.updated',
|
|
256
|
+
'v2.core.account[configuration.card_creator].capability_status_updated',
|
|
257
|
+
'v2.core.account[configuration.card_creator].updated',
|
|
258
|
+
'v2.core.account[configuration.customer].capability_status_updated',
|
|
259
|
+
'v2.core.account[configuration.customer].updated',
|
|
260
|
+
'v2.core.account[configuration.merchant].capability_status_updated',
|
|
261
|
+
'v2.core.account[configuration.merchant].updated',
|
|
262
|
+
'v2.core.account[configuration.recipient].capability_status_updated',
|
|
263
|
+
'v2.core.account[configuration.recipient].updated',
|
|
264
|
+
'v2.core.account[configuration.storer].capability_status_updated',
|
|
265
|
+
'v2.core.account[configuration.storer].updated',
|
|
266
|
+
'v2.core.account[defaults].updated',
|
|
267
|
+
'v2.core.account[future_requirements].updated',
|
|
268
|
+
'v2.core.account[identity].updated',
|
|
269
|
+
'v2.core.account[requirements].updated',
|
|
270
|
+
'v2.core.account_link.returned',
|
|
271
|
+
'v2.core.account_person.created',
|
|
272
|
+
'v2.core.account_person.deleted',
|
|
273
|
+
'v2.core.account_person.updated',
|
|
274
|
+
'v2.core.account_signals.fraudulent_website_ready',
|
|
275
|
+
'v2.core.approval_request.approved',
|
|
276
|
+
'v2.core.approval_request.canceled',
|
|
277
|
+
'v2.core.approval_request.created',
|
|
278
|
+
'v2.core.approval_request.expired',
|
|
279
|
+
'v2.core.approval_request.failed',
|
|
280
|
+
'v2.core.approval_request.rejected',
|
|
281
|
+
'v2.core.approval_request.succeeded',
|
|
282
|
+
'v2.core.batch_job.batch_failed',
|
|
283
|
+
'v2.core.batch_job.canceled',
|
|
284
|
+
'v2.core.batch_job.completed',
|
|
285
|
+
'v2.core.batch_job.created',
|
|
286
|
+
'v2.core.batch_job.ready_for_upload',
|
|
287
|
+
'v2.core.batch_job.timeout',
|
|
288
|
+
'v2.core.batch_job.updated',
|
|
289
|
+
'v2.core.batch_job.upload_timeout',
|
|
290
|
+
'v2.core.batch_job.validating',
|
|
291
|
+
'v2.core.batch_job.validation_failed',
|
|
292
|
+
'v2.core.claimable_sandbox.claimed',
|
|
293
|
+
'v2.core.claimable_sandbox.created',
|
|
294
|
+
'v2.core.claimable_sandbox.expired',
|
|
295
|
+
'v2.core.claimable_sandbox.expiring',
|
|
296
|
+
'v2.core.claimable_sandbox.updated',
|
|
297
|
+
'v2.core.event_destination.ping',
|
|
298
|
+
'v2.core.health.api_error.firing',
|
|
299
|
+
'v2.core.health.api_error.resolved',
|
|
300
|
+
'v2.core.health.api_latency.firing',
|
|
301
|
+
'v2.core.health.api_latency.resolved',
|
|
302
|
+
'v2.core.health.authorization_rate_drop.firing',
|
|
303
|
+
'v2.core.health.authorization_rate_drop.resolved',
|
|
304
|
+
'v2.core.health.event_generation_failure.resolved',
|
|
305
|
+
'v2.core.health.fraud_rate.increased',
|
|
306
|
+
'v2.core.health.issuing_authorization_request_errors.firing',
|
|
307
|
+
'v2.core.health.issuing_authorization_request_errors.resolved',
|
|
308
|
+
'v2.core.health.issuing_authorization_request_timeout.firing',
|
|
309
|
+
'v2.core.health.issuing_authorization_request_timeout.resolved',
|
|
310
|
+
'v2.core.health.meter_event_summaries_delayed.firing',
|
|
311
|
+
'v2.core.health.meter_event_summaries_delayed.resolved',
|
|
312
|
+
'v2.core.health.payment_method_error.firing',
|
|
313
|
+
'v2.core.health.payment_method_error.resolved',
|
|
314
|
+
'v2.core.health.sepa_debit_delayed.firing',
|
|
315
|
+
'v2.core.health.sepa_debit_delayed.resolved',
|
|
316
|
+
'v2.core.health.traffic_volume_drop.firing',
|
|
317
|
+
'v2.core.health.traffic_volume_drop.resolved',
|
|
318
|
+
'v2.core.health.webhook_latency.firing',
|
|
319
|
+
'v2.core.health.webhook_latency.resolved',
|
|
320
|
+
'v2.data.reporting.query_run.created',
|
|
321
|
+
'v2.data.reporting.query_run.failed',
|
|
322
|
+
'v2.data.reporting.query_run.succeeded',
|
|
323
|
+
'v2.data.reporting.query_run.updated',
|
|
324
|
+
'v2.extend.extension_run.failed',
|
|
325
|
+
'v2.extend.workflow_run.failed',
|
|
326
|
+
'v2.extend.workflow_run.started',
|
|
327
|
+
'v2.extend.workflow_run.succeeded',
|
|
328
|
+
'v2.iam.api_key.created',
|
|
329
|
+
'v2.iam.api_key.default_secret_revealed',
|
|
330
|
+
'v2.iam.api_key.expired',
|
|
331
|
+
'v2.iam.api_key.permissions_updated',
|
|
332
|
+
'v2.iam.api_key.rotated',
|
|
333
|
+
'v2.iam.api_key.updated',
|
|
334
|
+
'v2.iam.stripe_access_grant.approved',
|
|
335
|
+
'v2.iam.stripe_access_grant.canceled',
|
|
336
|
+
'v2.iam.stripe_access_grant.denied',
|
|
337
|
+
'v2.iam.stripe_access_grant.removed',
|
|
338
|
+
'v2.iam.stripe_access_grant.requested',
|
|
339
|
+
'v2.iam.stripe_access_grant.updated',
|
|
340
|
+
'v2.money_management.adjustment.created',
|
|
341
|
+
'v2.money_management.financial_account.created',
|
|
342
|
+
'v2.money_management.financial_account.updated',
|
|
343
|
+
'v2.money_management.financial_address.activated',
|
|
344
|
+
'v2.money_management.financial_address.failed',
|
|
345
|
+
'v2.money_management.inbound_transfer.available',
|
|
346
|
+
'v2.money_management.inbound_transfer.bank_debit_failed',
|
|
347
|
+
'v2.money_management.inbound_transfer.bank_debit_processing',
|
|
348
|
+
'v2.money_management.inbound_transfer.bank_debit_queued',
|
|
349
|
+
'v2.money_management.inbound_transfer.bank_debit_returned',
|
|
350
|
+
'v2.money_management.inbound_transfer.bank_debit_succeeded',
|
|
351
|
+
'v2.money_management.outbound_payment.canceled',
|
|
352
|
+
'v2.money_management.outbound_payment.created',
|
|
353
|
+
'v2.money_management.outbound_payment.failed',
|
|
354
|
+
'v2.money_management.outbound_payment.posted',
|
|
355
|
+
'v2.money_management.outbound_payment.returned',
|
|
356
|
+
'v2.money_management.outbound_payment.updated',
|
|
357
|
+
'v2.money_management.outbound_transfer.canceled',
|
|
358
|
+
'v2.money_management.outbound_transfer.created',
|
|
359
|
+
'v2.money_management.outbound_transfer.failed',
|
|
360
|
+
'v2.money_management.outbound_transfer.posted',
|
|
361
|
+
'v2.money_management.outbound_transfer.returned',
|
|
362
|
+
'v2.money_management.outbound_transfer.updated',
|
|
363
|
+
'v2.money_management.payout_method.created',
|
|
364
|
+
'v2.money_management.payout_method.updated',
|
|
365
|
+
'v2.money_management.received_credit.available',
|
|
366
|
+
'v2.money_management.received_credit.failed',
|
|
367
|
+
'v2.money_management.received_credit.returned',
|
|
368
|
+
'v2.money_management.received_credit.succeeded',
|
|
369
|
+
'v2.money_management.received_debit.canceled',
|
|
370
|
+
'v2.money_management.received_debit.failed',
|
|
371
|
+
'v2.money_management.received_debit.pending',
|
|
372
|
+
'v2.money_management.received_debit.succeeded',
|
|
373
|
+
'v2.money_management.received_debit.updated',
|
|
374
|
+
'v2.money_management.recipient_verification.created',
|
|
375
|
+
'v2.money_management.recipient_verification.updated',
|
|
376
|
+
'v2.money_management.transaction.created',
|
|
377
|
+
'v2.money_management.transaction.updated',
|
|
378
|
+
'v2.orchestrated_commerce.agreement.confirmed',
|
|
379
|
+
'v2.orchestrated_commerce.agreement.created',
|
|
380
|
+
'v2.orchestrated_commerce.agreement.partially_confirmed',
|
|
381
|
+
'v2.orchestrated_commerce.agreement.terminated',
|
|
382
|
+
'v2.payments.off_session_payment.attempt_failed',
|
|
383
|
+
'v2.payments.off_session_payment.attempt_started',
|
|
384
|
+
'v2.payments.off_session_payment.authorization_attempt_failed',
|
|
385
|
+
'v2.payments.off_session_payment.authorization_attempt_started',
|
|
386
|
+
'v2.payments.off_session_payment.canceled',
|
|
387
|
+
'v2.payments.off_session_payment.created',
|
|
388
|
+
'v2.payments.off_session_payment.failed',
|
|
389
|
+
'v2.payments.off_session_payment.paused',
|
|
390
|
+
'v2.payments.off_session_payment.requires_capture',
|
|
391
|
+
'v2.payments.off_session_payment.resumed',
|
|
392
|
+
'v2.payments.off_session_payment.succeeded',
|
|
393
|
+
'v2.payments.settlement_allocation_intent.canceled',
|
|
394
|
+
'v2.payments.settlement_allocation_intent.created',
|
|
395
|
+
'v2.payments.settlement_allocation_intent.errored',
|
|
396
|
+
'v2.payments.settlement_allocation_intent.funds_not_received',
|
|
397
|
+
'v2.payments.settlement_allocation_intent.matched',
|
|
398
|
+
'v2.payments.settlement_allocation_intent.not_found',
|
|
399
|
+
'v2.payments.settlement_allocation_intent.settled',
|
|
400
|
+
'v2.payments.settlement_allocation_intent.submitted',
|
|
401
|
+
'v2.payments.settlement_allocation_intent_split.canceled',
|
|
402
|
+
'v2.payments.settlement_allocation_intent_split.created',
|
|
403
|
+
'v2.payments.settlement_allocation_intent_split.settled',
|
|
404
|
+
'v2.reporting.report_run.created',
|
|
405
|
+
'v2.reporting.report_run.failed',
|
|
406
|
+
'v2.reporting.report_run.succeeded',
|
|
407
|
+
'v2.reporting.report_run.updated',
|
|
408
|
+
'v2.signals.account_signal.fraudulent_merchant_ready',
|
|
409
|
+
// event-types: The end of the section generated from our OpenAPI spec
|
|
410
|
+
]);
|
|
411
|
+
class StripeEventNotificationHandler {
|
|
412
|
+
// eslint-disable-next-line no-useless-constructor
|
|
413
|
+
constructor(client, webhookSecret, fallbackCallback) {
|
|
414
|
+
this.client = client;
|
|
415
|
+
this.webhookSecret = webhookSecret;
|
|
416
|
+
this.fallbackCallback = fallbackCallback;
|
|
417
|
+
this.registeredHandlers = {};
|
|
418
|
+
this.hasHandledEvent = false;
|
|
419
|
+
}
|
|
420
|
+
on(type, callback) {
|
|
421
|
+
if (this.hasHandledEvent) {
|
|
422
|
+
throw new Error('Cannot register new handlers after an event has been handled. This is indicative of a bug.');
|
|
423
|
+
}
|
|
424
|
+
// the matched types are validated by the type system
|
|
425
|
+
if (this.registeredHandlers[type]) {
|
|
426
|
+
throw new Error(`Handler already registered for event type: ${type}`);
|
|
427
|
+
}
|
|
428
|
+
this.registeredHandlers[type] = callback;
|
|
429
|
+
return this;
|
|
430
|
+
}
|
|
431
|
+
registeredEventTypes() {
|
|
432
|
+
const keys = Object.keys(this.registeredHandlers);
|
|
433
|
+
keys.sort();
|
|
434
|
+
return keys;
|
|
435
|
+
}
|
|
436
|
+
async handle(
|
|
437
|
+
// these types are duplicated in the manual types, so they're just here for internal use
|
|
438
|
+
rawBody, signature) {
|
|
439
|
+
// we're not worried about thread safety here because we expect callbacks will be registered synchronously on app startup
|
|
440
|
+
this.hasHandledEvent = true;
|
|
441
|
+
const event = this.client.parseEventNotification(rawBody, signature, this.webhookSecret);
|
|
442
|
+
// Create a new client with the event's context instead of modifying the shared client
|
|
443
|
+
// This ensures thread-safety when processing webhooks in parallel
|
|
444
|
+
// We create a shallow copy and override _api with a new object containing the event context
|
|
445
|
+
// This reuses expensive resources like httpClient (Flyweight pattern)
|
|
446
|
+
const eventClient = Object.create(Object.getPrototypeOf(this.client));
|
|
447
|
+
Object.assign(eventClient, this.client);
|
|
448
|
+
eventClient._api = {
|
|
449
|
+
...this.client._api,
|
|
450
|
+
stripeContext: event.context,
|
|
451
|
+
};
|
|
452
|
+
const handler = this.registeredHandlers[event.type];
|
|
453
|
+
if (handler) {
|
|
454
|
+
return await handler(event, eventClient);
|
|
455
|
+
}
|
|
456
|
+
else {
|
|
457
|
+
return await this.fallbackCallback(event, eventClient, {
|
|
458
|
+
isKnownEventType: KNOWN_EVENT_TYPES.has(event.type),
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
exports.StripeEventNotificationHandler = StripeEventNotificationHandler;
|
|
464
|
+
//# sourceMappingURL=StripeEventNotificationHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StripeEventNotificationHandler.js","sourceRoot":"","sources":["../src/Stripe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AAI,GAAG;YACjB,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI;YACnB,aAAa,EAAE,KAAK,CAAC,OAAO;SAC7B,CAAC;QAEF,MAAM,OAAO,GAAG,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,OAAO,EAAE;YACX,OAAO,MAAM,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;SAC1C;aAAM;YACL,OAAO,MAAM,IAAI,CAAC,gBAAgB,CAChC,KAAwC,EACxC,WAAW,EACX;gBACE,gBAAgB,EAAE,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;aACpD,CACF,CAAC;SACH;IACH,CAAC;CACF;AA7ED,wEA6EC"}
|
|
@@ -2424,6 +2424,10 @@ export declare namespace AccountCreateParams {
|
|
|
2424
2424
|
requested?: boolean;
|
|
2425
2425
|
}
|
|
2426
2426
|
interface CardPayments {
|
|
2427
|
+
/**
|
|
2428
|
+
* Protections to apply to this capability.
|
|
2429
|
+
*/
|
|
2430
|
+
protections?: CardPayments.Protections;
|
|
2427
2431
|
/**
|
|
2428
2432
|
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
|
|
2429
2433
|
*/
|
|
@@ -2795,6 +2799,22 @@ export declare namespace AccountCreateParams {
|
|
|
2795
2799
|
*/
|
|
2796
2800
|
requested?: boolean;
|
|
2797
2801
|
}
|
|
2802
|
+
namespace CardPayments {
|
|
2803
|
+
interface Protections {
|
|
2804
|
+
/**
|
|
2805
|
+
* Protection for connected accounts migrating from another PSP.
|
|
2806
|
+
*/
|
|
2807
|
+
psp_migration: Protections.PspMigration;
|
|
2808
|
+
}
|
|
2809
|
+
namespace Protections {
|
|
2810
|
+
interface PspMigration {
|
|
2811
|
+
/**
|
|
2812
|
+
* Passing true requests the protection.
|
|
2813
|
+
*/
|
|
2814
|
+
requested: boolean;
|
|
2815
|
+
}
|
|
2816
|
+
}
|
|
2817
|
+
}
|
|
2798
2818
|
}
|
|
2799
2819
|
namespace Company {
|
|
2800
2820
|
interface DirectorshipDeclaration {
|
|
@@ -4332,6 +4352,10 @@ export declare namespace AccountUpdateParams {
|
|
|
4332
4352
|
requested?: boolean;
|
|
4333
4353
|
}
|
|
4334
4354
|
interface CardPayments {
|
|
4355
|
+
/**
|
|
4356
|
+
* Protections to apply to this capability.
|
|
4357
|
+
*/
|
|
4358
|
+
protections?: CardPayments.Protections;
|
|
4335
4359
|
/**
|
|
4336
4360
|
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
|
|
4337
4361
|
*/
|
|
@@ -4703,6 +4727,22 @@ export declare namespace AccountUpdateParams {
|
|
|
4703
4727
|
*/
|
|
4704
4728
|
requested?: boolean;
|
|
4705
4729
|
}
|
|
4730
|
+
namespace CardPayments {
|
|
4731
|
+
interface Protections {
|
|
4732
|
+
/**
|
|
4733
|
+
* Protection for connected accounts migrating from another PSP.
|
|
4734
|
+
*/
|
|
4735
|
+
psp_migration: Protections.PspMigration;
|
|
4736
|
+
}
|
|
4737
|
+
namespace Protections {
|
|
4738
|
+
interface PspMigration {
|
|
4739
|
+
/**
|
|
4740
|
+
* Passing true requests the protection.
|
|
4741
|
+
*/
|
|
4742
|
+
requested: boolean;
|
|
4743
|
+
}
|
|
4744
|
+
}
|
|
4745
|
+
}
|
|
4706
4746
|
}
|
|
4707
4747
|
namespace Company {
|
|
4708
4748
|
interface DirectorshipDeclaration {
|