I am using stripe.js for stripe payments. I need to setup a callback wenhook to receive the request from stripe.
Since the webhook is posted to by stripe - I have marked it as csrf_excempt
.
csrf_excempt
?That's not going to work. Definitely disable csrf for the callback from Stripe.
Even if you..
csrf_token
to stripeThe token would be irrelevant at that point as the token is for your current browser session only (typically a cookie).
The CSRF token is generated upon every request and sent to the browser to be stored in a cookie. Stripe will not have this cookie and thus you'll get a CSRF Error just the same.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With