#.stevenp
1 messages · Page 1 of 1 (latest)
Hello! Can you clarify that last part? Auto update what?
So within my database, each user can have multiple organizations (projects/companies). Each user has a one to many relationship with companies, and each company needs a different payment method
When a user adds a company to their account, I generate a new customer object within Stripe to correspond to that company, so that the single user can split up their payment invoices across each organization
The issue I'm having is I'd like for the default payment method when the user inits the company to be the payment method on their existing account
can think of it like AWS, you can belong to multiple organizations but each org has its own billing page
each time you generate a new organization the payment method for it should default to the current payment method on the org
anyway I have all the business logic working on my end, the only issue I have is on the POST request to update the default payment method is failing because I am trying to put a payment method from one "customer" onto another "customer" object within Stripe, despite both customer objects actually being the same person (the emails match even)
Yeah, you can't do that. Payment Methods can't be shared across Customers. Once a Payment Method is attached to one Customer that's the only Customer you can use it with.
is there some way to "clone" a customer?
i.e. preserve the payment method on a new customer object so that they dont have to enter it again
You can do that kind of thing with Connect across accounts, but it sounds like you want to do this on a single Stripe account, correct?
ya
Yeah, there's no way to do that.
A Customer in Stripe is designed to represent the entity paying you. It might be a single person, a company, an organization, etc.
A single entity paying you is not intended to be represented by multiple Customer objects.
got it
so the thing is they need to be separate "customer" objects because each org can involve separate team members. can think of it like AWS
so I believe multiple customer object is the correct and only way to structure this.
and each time a user on my end makes a new org account they will just have to enter payment info again
I mean... it's not the only way. You can still use a single Customer in Stripe with multiple Payment Methods attached to it and handle the separate team member logic on your end.