Stripe recommends the verification of all webhook messages. This is important to ensure that Stripe sent the message, not someone else.
Stripe generates signatures for each message. According to Stripe documentation, the Stripe-Signature
header included in each signed event contains a timestamp and one or more signatures that you must verify. The timestamp is prefixed by t=
, and each signature is prefixed by a scheme . Schemes start with v
, followed by an integer. Currently, the only valid live signature scheme is v1
. To aid with testing, Stripe sends an additional signature with a fake v0
scheme, for test mode events.
Stripe-Signature:
t=1492774577,
v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd,
v0=6ffbb59b2300aae63f272406069a9788598b792a944a07aba816edb039989a39
Stripe generates signatures using a hash-based message authentication code (HMAC) with SHA-256. To prevent downgrade attacks, ignore all schemes that arenât v1
.
Currently, no plugin verifies the message, and the Stripe notifications blog post in Bubble documentation recommends to ârun without authentication for simplicityâ.
Could you please include a message verification action in Stripeâs plugin?
The documentation is available at the following link:
https://docs.stripe.com/webhooks?lang=node#verify-webhook-signatures-with-official-libraries