#sanjeewa

1 messages · Page 1 of 1 (latest)

shy zephyrBOT
glacial fjord
#

Hi there, can you share with me the link to the doc that you are following?

flint sundial
glacial fjord
#

Ok, so you want to clone a payment_method from platform to a collected account?

flint sundial
#

Yes

glacial fjord
#

OK. Are you having a legacy Stripe integration that use Sources and Tokens API, or you are building something new? I'm asking because Sources and Tokens are legacy APIs, and I'll suggest you using PaymentMethods API

flint sundial
#

Im building new thing

glacial fjord
flint sundial
#

Thank you will check

flint sundial
#

We can implement this to do direct payment to connected account but when we view payment details it is not showing customer infomation

glacial fjord
#

Did you specify a customer for this direct charge?

flint sundial
#

When I pass customer ID it occurred an error

#

"No such customer: 'cus_MvpSH2oiW60Z0I'"

glacial fjord
#

It looks like you passed in a customer that was created in platform

#

You should create a new customer in connected account, and use this customer for direct charge

flint sundial
#

This can be get done by cloning the customer ?

glacial fjord
#

No, you can't clone a customer

flint sundial
#

This is my code & followed this

#

Is there anything wrong with for direct charges ?

#

Also when we try this, we got a error

#

this is the request ID

glacial fjord
#

Hmm. it looks like you are still using Tokens and Sources API?

flint sundial
glacial fjord
flint sundial
#

$payment_method = \Stripe\PaymentMethod::create([
'customer' => '{{CUSTOMER_ID}}',
'payment_method' => '{{PAYMENT_METHOD_ID}}',
], [
'stripe_account' => '{{CONNECTED_ACCOUNT_ID}}',
]);

#

But we cant clone the customer from platform to connected account ?

glacial fjord
#

yes you are right