Stripe 404 with DJStripe and Django
I am running a django app using stripe for payments.
Upon running stripe cli I am encountering 404 errors when triggering payment events.
project level urls.py
path('api/payments/', include('payments_app.urls'))
payments_app level urls.py:
path('stripe/', include('djstripe.urls', namespace='djstripe'))
I am consistently encountering the following errors:
2025-01-19 22:04:48 --> customer.created [evt_1QjCEGKCdat1JCnURBfuIFLH]
2025-01-19 22:04:48 <-- [404] POST http://localhost:8000/api/payments/djstripe/ [evt_1QjCEGKCdat1JCnURBfuIFLH]
I can assure you that the API keys have been set correctly as I was able to successfully sync from the products and prices.
I ran many permutations of the following url with changing the urlpatterns
stripe listen --forward-to http://localhost:8000/api/payments/stripe/webhook
I tried running:
curl -X POST http://localhost:8000/payments/stripe/webhook -H "Content-Type: application/json" -d '{}'
It also give a 404