Skip to content
Advertisement

Django CSRF verification failed. Webhook payment system

I’m trying to implement a webhook for my payment system. I have a path to my webhook view, which is a simple definition where the provided id is printed.

The usage is like this

JavaScript

Path

JavaScript

View

JavaScript

I’m getting the following error

JavaScript

Advertisement

Answer

Use the csrf_exempt decorator to mark the view as exempt from CSRF checks

JavaScript
Advertisement