title: Django Forbidden (CSRF cookie not set.)
body: <p>I was wondering what's up with the <code>CSRF Cookie not set</code> error that Django throws at me all the time. I created a view (see below) that is a callback for a payment. I have no influence of what is being sent to that view. I have checked other posts on StackOverflow, but I don't think any apply to me. Most of them can just implement a csrf protection into their forms, csrf_exempt their views, or they use rest_framework.</p>
  
  <pre><code>class PaymentWebhook(View):
  
      def post(self, request, *args, **kwargs):
          # ...
  </code></pre>
  
  <p>Now, I'm getting this error everytime when I do nothing about this function:</p>
  
  <pre><code>Forbidden (CSRF cookie not set.): /payment/webhook
  </code></pre>
  
  <p>Since this is about payments, can I just <code>csrf_exempt</code> this, or would that just open a security hole? By the way, I have even tried putting an exempt on this function, but it still throws that error.
  Any suggestions?</p>