#mymo-terminal-application-fee

1 messages ยท Page 1 of 1 (latest)

daring rose
#

Hi ๐Ÿ‘‹ do you have the request ID from a request where you're receiving this error, that we can take a look at?

chilly veldt
#

Oh yes, sorry, here it is: req_z0xxMLqckSHywy

daring rose
#

Thanks, taking a look.

#

Hm, that does seem a little odd. It'll take me a little while to dig in deeper and see if anything jumps out at me.

chilly veldt
#

Alright, take your time, thanks for your help ๐Ÿ™‚

daring rose
#

Thanks for your patience! The key that you're using to make that request, does it belong to your platform account or the connected account?

chilly veldt
#

the connected account at the moment. Tried with our also and got the same issue

daring rose
#

Gotcha, so you'll want to use the secret key from your platform account. The stripe_account parameter should still be the account ID of the connected account.

#

Can you try building the request that way, and capture the request ID if it throws the same error?

chilly veldt
#

Sure, will do that right now!

#

req_rkA5iKJjO6RBHr

#

I'm now getting this error tho: No such customer: 'cus_KOYvepneDszQBQ'

daring rose
#

Apologies for the delay, taking a look.

#

So it looks like that customer is associated with your platform account. Since you're using direct charges all the associated objects (such as the customer) will need to reside on the connected account.

chilly veldt
#

So you're saying the customer is being created in our platform instead of in the connect account?

#

to create de customer, I'm using $customer = \Stripe\Customer::create(); right before the paymentIntent create in create.php..

daring rose
#

Yeah

chilly veldt
#

might be a stupid question: but how is this possible? ๐Ÿ˜ฆ

daring rose
#

Yeah, I can see the customers being created on your platform just before the payment intents are created on the connected account. Just a moment while I double check how to avoid this.

chilly veldt
#

great, thanks SO MUCH ๐Ÿ˜…

daring rose
#

Can you try doing a customer creation and pass in the stripe_account parameter the same way you do for the PaymentIntent?

chilly veldt
#

You mean like this? If so, I got "Received unknown parameter: stripe_account"

#

req_piQ6SNTHKTfNDA

noble carbon
#

it's \Stripe\Customer::create([], ['stripe_account'=>...]) instead

#

the first parameter is for params specific to creating a customer, the second is for generic options that all endpoints take, like stripe_account

chilly veldt
#

WOW. Thanks to both of you, it now works ๐Ÿฅณ !!