#Mael CHEMLA
1 messages · Page 1 of 1 (latest)
Customer objects can only exist on one account, so you would make the create a customer call but on the connected account itself https://stripe.com/docs/api/connected_accounts
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
in this call ?
stripe.charges.retrieve('ch_1IvPCPFJKvxtEEiiZpRcyPgj', {
stripeAccount: 'acct_1Iv7kVFJKvxtEEii'
});
this is where your link redirect me
I think I may not understand your question. Can you explain in a bit more detail what you are trying to do here?
That is just demonstrating how to use the stripeAccount: 'acct_1Iv7kVFJKvxtEEii' line of that code
Yeah sure
You can use it for any API call, such as creating a customer
Ok I understand
For exemple like that ?
public createCustomer = async (studentInfo: StudentUserInfo, stripeAccountId: string): Promise<string> => {
const customer = await this.stripe.customers.create({
email: studentInfo.email,
name: `${studentInfo.firstName} ${studentInfo.lastName}`,
phone: studentInfo.phoneNumber,
}, {
stripeAccount: stripeAccountId
});
return customer.id;
};
I create a customer to this special stripeAccountId that right ?
Yes exactly, that will create the customer object on that account for you to use later.
Actually, quick question, what kind of Stripe connected accounts are you using there? Standard, Express, or Custom?
When a company signup on my platform I create an account with type: "standard"
Because I want the user think he do business only with the company and not my platform
Gotcha, sounds good. Then what we discussed should still be helpful there. There are flows with Express and Custom accounts where there might be a slightly different thing that you need to do.
So you think I take the best choice ?
Yeah that sounds like a fine way to go