#rodrigodietze_26827

1 messages · Page 1 of 1 (latest)

cedar novaBOT
loud thorn
south ibex
#

Sure, one second

#

Where do I see it? It is not showing anywhere.
The offending call is this:

$stripe->tokens->create(
['customer' => $userid],
['stripe_account' => 'acct_1Nly9KPmKHmVpRqu']
);

#

But no log about the token creation shows under the customer or the account tab.

loud thorn
#

You need to view the Dashboard as the connected account, since you're creating the Token on the connected account.

#

But you shouldn't be using the Tokens API at all.

south ibex
#

I was using this guide:

#

It works for cards added with card_ prefix from the dashboard. Not programatically.

loud thorn
south ibex
#

I am a market place, so i have a global account. All users and payment methods are created under it. Then depending on which store they make a purchase, i make a direct payment on behalf of that account. But I can't use a global customer, it says I need to clone the customer :\

#

I will give a quick try here cloning only the pm

#

one sec

#

If I try using the global customer (pertaining to the platform not the conncted account) I get this error:

No such customer: 'cus_OcvGcnksDqahPc'

#

The customer belongs to my account not the connected one.

loud thorn
#

Let's back up a bit.

#

You're cloning in order to do direct charges on your connected accounts, correct?

south ibex
#

Yes, we have 100K app users. They can go to any store in Brazil and make purchases there by scanning a qrcode of the goods... The qrcode gives us the info on what store that good belongs too, and we make a direct charge for that connected account.

#

But the users are global (cross-store).

#

So I create them on my platform but at the payment moment we clone them to be used in the conncted account.

loud thorn
#

And then you do it again for the next direct charge, and so on.

south ibex
#

Let me try quicly one sec

#

Wow it worked. I had to remove the customer attribute from the paymentintent and only use the cloned payment method

#

I guess the api realises if there is no customer, the payment method has it embeded perhaps

loud thorn
#

When you clone a Payment Method to a connected account the clone is an entirely new, separate Payment Method that exists on the connected account and is not associated with any Customer. You can use it for a single payment (recommended) or attach it to a Customer on the connected account to make it reusable (not recommended).

south ibex
#

Thank you so much Rubeus! I appreciate it

loud thorn
#

Happy to help!

south ibex
#

Really! Very grateful! Have a good night!