#Hassan Yousaf Bara-webhook

1 messages · Page 1 of 1 (latest)

formal fern
winter fulcrum
#

error file

formal fern
#

Hmm... Do you have any logs from your server that may give you a better indication of where the issue is?

winter fulcrum
#

That's the error from the webhook response event

formal fern
#

Look like you're missing something to fully exempt that view from csrf. Do you have anything else that could be getting hit earlier that would still need the csrf token?

winter fulcrum
#

No, I am sending webhooks from account dashboard and they direct them direct to this view which I have shared earlier

formal fern
#

What does your code look like that is setting up csrf protection?

winter fulcrum
#

I don't know much about setting csrf protection but I have used the decorator @csrf.exempt to protect it

#

Here is the code. Could please have a look at it

formal fern
#

This is the same code you shared earlier - as is, there's nothing here that I can see that would result in the specific "The CSRF token is mising" error. You need to take a look at the rest of your code, not just the code for your webhook since something about your csrf protection setup is making these requests fail

winter fulcrum
#

Alright. Thanks, I will let you know if I found something

#

I have been trying to find the error for hours. Is there anyway you could look at the code and inspect it. I could share github repo

charred nest
#

Unfortunately no, we can't look at your entire repo and debug this for you. At the moment this isn't really a Stripe issue/bug. It's something with your own code/setup. You can remove all Stripe code and just focus on making a route that will accept POST requests without CSRF and you can curl that endpoint yourself to debug

mint frost
#

Were you able to get this working @winter fulcrum , or get any further debugging information?