#Mael CHEMLA

1 messages · Page 1 of 1 (latest)

stone obsidianBOT
vapid kestrel
zealous ingot
#

in this call ?

stripe.charges.retrieve('ch_1IvPCPFJKvxtEEiiZpRcyPgj', {
  stripeAccount: 'acct_1Iv7kVFJKvxtEEii'
});
#

this is where your link redirect me

vapid kestrel
#

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

zealous ingot
#

Yeah sure

vapid kestrel
#

You can use it for any API call, such as creating a customer

zealous ingot
#

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 ?

vapid kestrel
#

Yes exactly, that will create the customer object on that account for you to use later.

zealous ingot
#

ok !

#

got it, thanks a lot

vapid kestrel
#

Actually, quick question, what kind of Stripe connected accounts are you using there? Standard, Express, or Custom?

zealous ingot
#

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

vapid kestrel
#

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.

zealous ingot
#

So you think I take the best choice ?

vapid kestrel
#

Yeah that sounds like a fine way to go

zealous ingot
#

Thanks its works perfectly !

#

have a nice day