Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Stripe -403 authentication credentials not provided

I am working on an application where I am using Stripe to process my payments. I have tested each and everything in test mode but when I switch to live mode I am facing errors on my web hooks and the error rate is 100% the possible explanation that Stripe returns is:
{
"detail": "Authentication credentials were not provided."
}
The status code is: 403.

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Check your API keys if that’s not the case the possible error could be because of csrf_token as the error "Authentication credentials were not provided" is not being returned by Stripe it is your server issue.

Add this to your webhook:

@csrf_exempt
def my_webhook_view(request):
 payload = request.body
 event = None

This will resolve your issue.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading