question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to set up both Account and Connect webhooks on Dj-stripe

See original GitHub issue

Hi,

I’m using dj-stripe==2.5.1

I’ve recently ran into an issue when trying to listen to both Connect and Account webhook events. According to this documentation: one would have to create two webhook instances, one with connect=True and another with connect=False so both types would be listened.

Issue is: How can I set up two webhook endpoints, with two different secrets, with dj-stripe? From what I gather from the docs, we can only set one whsec_xxxx value.

One possible solution I thought of, was to leave the DJSTRIPE_WEBHOOK_SECRET to an empty value so I could receive all the events from both webhooks.

I am writing this question to see if there is an alternative that will still allow me to check the signatures of the events, or if for now I should just forego event signature checking just to achieve desired behaviour.

Thanks.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jleclanchecommented, Jan 19, 2022

Please try dj-stripe 2.7.0a0 which contains the aforementioned changes.

1reaction
jleclanchecommented, Dec 29, 2021

@oitsl if you want, work is happening on the dev/webhooks-refactor branch. You can already use the django admin to create new webhooks. You may have to do some manual surgery to get existing endpoints into the db.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I use django stripe with connected accounts? #1337
Check to make sure the endpoint is correct for both the type of webhooks. Check all keys and webhook secrets are correct. Invoke...
Read more >
Connect webhooks
Log in to your Stripe account and set up the CLI by running stripe login on the command line. Allow your local host...
Read more >
Django, webhooks and dj-stripe (2014) - YouTube
Stripe is great for working with payments. Webhooks and dj-stripe make it even better, in this video learn how to use stripe webhooks...
Read more >
Dj-Stripe
Set up your webhook endpoint and start receiving model updates. ... Support for multiple accounts and API keys; Stripe Connect (partial support) ...
Read more >
How to use multiple Stripe API keys in Djstripe webhook, is ...
If so, how? I have two client apps, both using Stripe. Expectedly, there are two sets of Stripe API keys, each set for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found