Comments (10)
I have the same problem after updating to djstripe 2.7.3. I also have DJSTRIPE_WEBHOOK_SECRET
in settings and I do not know where the key is supposed to be set.
Edit1: I went to admin site, added a webhook (the uuid version), the new webhook appears on stripe.com, but the problem persists.
Edit2: I removed the old webhook from stripe.com. However, there seems to be no way to remove the old webhook from the admin interface. I actually receive a 500 error when I select the old webhook and run re-sync selected instance
(which I hope should remove it). Performing "Sync all instances for all api keys" does not do anything.
Edit3: Although this error message blocks python manage.py showmigraitons
, python manage.py shell
is still usable. Upon inspecting djstripe.models.WebhookEndpoint
, I can see that the secret
of the old webhook is empty. Since I already removed the webhook from stripe.com, I have to remove it from the database. This appears to be the only way to remove this endpoint.
from dj-stripe.
Thank you Arnav
from dj-stripe.
@yousifa Are you seeing any warnings in the console after launching the server? If yes please list them here
from dj-stripe.
CRITICALS:
?: (djstripe.C006) DJSTRIPE_WEBHOOK_VALIDATION='verify_signature' but Webhook Endpoint: <ENDPOINT 1> has no secret set
HINT: Set secret or set DJSTRIPE_WEBHOOK_VALIDATION='retrieve_event'
?: (djstripe.C006) DJSTRIPE_WEBHOOK_VALIDATION='verify_signature' but Webhook Endpoint: <ENDPOINT 2> has no secret set
HINT: Set secret or set DJSTRIPE_WEBHOOK_VALIDATION='retrieve_event'
WARNINGS:
?: (djstripe.W005) The secret of Webhook Endpoint: <ENDPOINT 1> is not populated in the db. Events sent to it will not work properly.
HINT: This can happen if it was deleted and resynced as Stripe sends the webhook secret ONLY on the creation call. Please use the django shell and update the secret with the value from <STRIPE WEBHOOK> ?: (djstripe.W005) The secret of Webhook Endpoint:<ENDPOINT 2> is not populated in the db. Events sent to it will not work properly.
HINT: This can happen if it was deleted and resynced as Stripe sends the webhook secret ONLY on the creation call. Please use the django shell and update the secret with the value from <STRIPE WEBHOOK>
account.OwnerProfile: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
from dj-stripe.
This may have happened after we activated another webhook for local testing via stripe, I'm not sure. The warning suggests that the webhook secret of <ENDPOINT 2> doesn't exist, but as far as I know there is no way to set multiple secrets. Also, it doesn't make sense that adding another endpoint to stripe breaks the entire system.
from dj-stripe.
Did you delete your local database ever after creating your webhooks from the djstripe-admin?
Stripe only sends the webhook secrets when they are created so this would work as expected if you used the admin to create the webhook secret and you never deleted the local webhooks as the api does not send the secret.
from dj-stripe.
@BoPeng Thank you for your observations. I will look at this and raise a PR fixing this.
from dj-stripe.
Unfortunately tried a lot but still couldn't reproduce. I'm afraid but it seems something unique to your setup. I wish I had a better answer
from dj-stripe.
This is happening to me right now. What's the form to use in Django Admin to delete and re-create DJSTRIPE_WEBHOOK_SECRET
?
from dj-stripe.
You can delete it from the admin page from the WebhookEndpoint model. Or you can do the same by logging into the Django shell.
from dj-stripe.
Related Issues (20)
- Feature list for Products. HOT 3
- Djstripe fails to retrieve related objects from connected accounts
- How do I upgrade/downgrade a stripe subsciption?
- Incorrect Stripe Trigger Account gets populated for events fired on a Stripe Connected Account
- Invoice assignmet for IIs missing HOT 2
- How do i get the API Key in the Authorization header ? HOT 1
- Duplicate customers at Stripe Dashboard in NodeJs HOT 1
- SubscriptionItem id not found after SubscriptionSchedule phase change
- Discord link does not work HOT 2
- Unsupported unicode escape sequence when migrating the stripe account HOT 1
- Fetching any Upcoming Invoice with a Discount fails HOT 1
- StripeBaseModel.sync_from_stripe_data only persists data if its a new instance, but won't update an existing instance
- How do I keep using a version of stripe higher than 5.0.0 HOT 1
- DJSTRIPE_WEBHOOK_EVENT_CALLBACK deprecated. How to use djstripe.signals? HOT 1
- VerificationSession: add field client_reference_id
- 🔥 Django Admin URLs found many Internal Server Errors (500) while testing using django-smoke-tests
- djstripe.exceptions.InvalidStripeAPIKey: Invalid API key: '' when attaching a payment method HOT 1
- value too long for type character varying(9) when processing checkout.session.completed webhook (possible stripe API version 2024-04-10 issue) HOT 17
- When installing for the first time and running migrate: AttributeError: module 'stripe' has no attribute 'Order' HOT 6
- ProgrammingError: column djstripe_product.default_price_id does not exist HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dj-stripe.