#Priyanka

1 messages ยท Page 1 of 1 (latest)

pale saddleBOT
stable dagger
crude cedar
#

I am passing this

#

var requestOptions = new RequestOptions
{
StripeAccount = "{{CONNECTED_ACCOUNT_ID}}",
};

#

When I try to create payment intent

#

with connected account's id

stable dagger
#

then the Customer ID you're passing must be incorrect, for example you are passing the ID of a Customer created on the platform account, not one created on the Connected account.

#

note if you are cloning PaymentMethods, it's only the PaymentMethod that is cloned, nothing else. Unless you explicitly create one, there is no Customer on the connected account involved.

crude cedar
#

So does that mean I need to clone the customer as well?

#

to connected account

#

because my customer exists only on platform account and not on connected account

stable dagger
#

you don't have to, it depends on your use case. If you want to create a Customer on the connected account so you can attach the cloned payment method to that customer(and use it more than once), you can; otherwise you can just pass the PaymentMethod directly to a PaymentIntent and charge it.

crude cedar
#

Actually I don't want to create or clone customer to connected account.

#

I have succesfully cloned payment method from platform account to connected account

#

Now should I use that cloned payment method to create a payment intent using platform account?

stable dagger
crude cedar
#

I used connected account first and then it gave me this error:- No such customer

stable dagger
#

yep

#

and as we've been discussing, you don't have a Customer on the connected account

crude cedar
#

yes

stable dagger
#

and you say you don't want one

#

so

#

remove the customer param from the API call you're making ๐Ÿ™‚

crude cedar
#

OK let me try that one ๐Ÿ™‚

#

OK it worked and payment got created on connected account. ๐Ÿ˜‹

#

But then how can I add customer information like (stripe customer id from platform account) to this payment that got created.

#

Metadata maybe?

stable dagger
#

you can use metadata yes

crude cedar
#

Ok thanks a lot. And can you give me information on how can I use this cloned payment method id in future for future payments?

stable dagger
#

you'd have to create a Customer on the connected account and attach the PaymentMethod to that customer.

crude cedar
#

or how about I clone the payment method id every time when I want to create a payment intent on connected account?

#

Does that sound ridiculous? ๐Ÿ˜…

stable dagger
#

that's normal and is usually what I suggest.

#

otherwise you'd have 100 different Customer accounts all with slightly different saved cards and if the actual user wants to update their details you have to go re-clone a card to all 100 connected accounts, etc.

crude cedar
#

how long does these cloned payment method id stay on connected account? I mean what's their lifetime and will I be creating lot of cloned payment methods unnecessarily every time?

stable dagger
#

they stay forever

crude cedar
#

Then I am just worried it will create lot of ids ๐Ÿ™

#

how about attaching this newly cloned payment method id to customer on platform account?

#

is that possible?

stable dagger
#

the IDs don't matter

crude cedar
#

Maybe I can save it somewhere, like some database and reuse it ๐Ÿ™‚

#

what do you think?

#

Is that the best approach?

stable dagger
#

what it comes down to is

  • option 1 : Customer on the platform account. On-demand, clone a PaymentMethod to the connected account, create a PI and charge it. You're done, that's it. Clone again the next time you want to charge and create a new pm_xxx

  • option 2 : Customer on the platform account. Customer on the connected account. Clone the PaymentMethod to the connected account and attach to the Customer there. Process a PI using that customer ID and ID of the cloned PaymentMethod. That can be done multiple times. But then you end up with the "100 different Customer accounts all with slightly different saved cards and if the actual user wants to update their details you have to go re-clone a card to all 100 connected accounts, etc." which is why often it's easier to go with option 1 with the "master" customer.

crude cedar
#

Awsome. That's really a valuable piece of information which is not present on stripe documents. I will go with option no. 1 and clone it every time. ๐Ÿ™‚

#

Thank you so much for sharing all this. I think I got everything.

#

I wish you a wonderful day ahead ๐Ÿ˜Š

stable dagger
#

yes the docs for cloning are extremely bad overall and the feature is not well-fleshed out or well documented unfortunately

crude cedar
#

Sorry one last question. ๐Ÿ˜… What's the difference between 'card_xxx' and 'pm_xxx' in payment methods?

stable dagger
#

one is legacy and should not be created any more (card_xxx)

pale saddleBOT
stable dagger
crude cedar
#

OK. Thank you so much ๐Ÿ’•