Stripe connect - user account and multiple vendor accounts
See original GitHub issueThere seems to be a fundamental issue with dj-stripe 1.0.0 and Stripe Connect. Stripe Connect allows a single user email to be associated with different vendor accounts by adding “stripe_account=(account_id)”. However, the Customer model has:
unique_together = ("subscriber", "livemode")
Therefore, on my platform when I visit one vendor it creates an account. And then when I visit another vendor, I get an
Integrity Error: UNIQUE constraint failed: djstripe_customer.subscriber_id, djstripe_customer.livemode
I may try to remove the unique constraint but I’m not sure about the ramifications.
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Multiple accounts | Stripe Documentation
Learn how to create and manage multiple Stripe accounts. You can create additional Stripe accounts associated with your email address. You might create...
Read more >How To: Set up Stripe Connect in Multi-Vendor
Step 1. Configure the Payment Method¶. Install and configure the Stripe Connect Payments add-on. Go to Administration → Payment methods and click the...
Read more >Stripe Connect for Multi-Vendor - eCom Labs
Stripe Connect then deducts money from the customer's account and deposits it in both your account and the vendors' accounts.
Read more >WooCommerce Multi Vendor Stripe Connect Plugin - YouTube
Using this plugin, now accept payments from all over the world for your e-commerce store. This Plugin can be run in both test...
Read more >How to pay vendors' commissions using Stripe Connect
In this video you'll learn how to use the integration between YITH WooCommerce Multi Vendor / Marketplace and YITH Stripe Connect for ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can remove the constraint for now, but you might run into race conditions and such.
I suppose the real fix is to add the account to the unique_together.
@tkwon, I’m curious, did you end up dropping the relation?
Are you creating a different Stripe customer for each account + django user combination in your platform? It seems like if one is doing direct charges, then that would make sense.Update: is the main assumption in this issue incorrect?
If my understanding of all that is correct (especially no. 3), then is it possible you were trying to sync customers from your connected accounts into the dj-stripe customers table, and that wasn’t working because it is designed to only sync customers from the platform’s account (not the connected ones)?