Optionalconfig: StripeConfigStaticStripeStaticwebhooksParses webhook event payload into a EventNotification and verifies webhook signature.
To get more information on the event, call .fetchEvent(). You can also cast to a Stripe.V2.UnknownEventNotification to represent event notifications we don't have types for. It's not included in the return type of this function because it breaks narrowing.
Raw text body payload received from Stripe.
Value of the stripe-signature header from Stripe.
Typically a string.
Note that this is typed to accept an array of strings so that it works seamlessly with express's types, but will throw if an array is passed in practice since express should never return this header as an array, only a string.
Your Webhook Signing Secret for this endpoint (e.g., 'whsec_...'). You can get this in your dashboard.
Optionaltolerance: numberSeconds of tolerance on timestamps.
OptionalcryptoProvider: CryptoProviderOptional CryptoProvider to use for computing HMAC signatures.
OptionalreceivedAt: numberOptional: timestamp to use when checking signature validity. Defaults to Date.now().
Allows for sending "raw" requests to the Stripe API, which can be used for testing new API endpoints or performing requests that the library does not support yet.
This is an experimental interface and is not yet stable.
HTTP request method, 'GET', 'POST', or 'DELETE'
The path of the request, e.g. '/v1/beta_endpoint'
Optionalparams: { [key: string]: unknown }The parameters to include in the request body.
Optionaloptions: RawRequestOptionsAdditional request options.
API Errors