#Dmitrii - cloning payment methods

1 messages · Page 1 of 1 (latest)

thorny oysterBOT
fierce path
keen quarry
#

One sec!

fierce path
#

Dmitrii - cloning payment methods

keen quarry
#

The weird thing - I don't see the log for this call at all

#

I tried to repeat request but got the same error in catch block:

The provided key *** does not have access to account 'the customerId of child account' (or that account does not exist). Application access may have been revoked.
fierce path
#

OH

#

It looks like the $childAccId value is not a Stripe Account id acct_XXXXX

#

can you try logging that variable before you make the API call?

keen quarry
#
    $payment_method = \Stripe\PaymentMethod::create([
      'customer' => "cus_MtmGEMSafp82",
      'payment_method' => $paymentMethodID,
    ], [
      'stripe_account' => "cus_MtmYu9Cpphdgek",
    ]);
fierce path
#

That ID is not a Stripe Account

#

that won't work

#
[
      'stripe_account' => "cus_MtmYu9Cpphdgek", <- this has to be an Account ID: acct_XXXXXXX
    ]  
keen quarry
#

Could you tell me please where can I get this id on dashboard?

fierce path
#

It's the account ID for the connected account you are trying to clone the PM to

keen quarry
#

Oh, should I make some additional steps for connecting the child account?

fierce path
#

Wait..what do you mean? This whole approach depends on you cloning between a Platform Account and a Connect Account

#

Without that relationship you cannot do any of this

keen quarry
#

I got it! Could you direct me to the page to know how can I create this connection?

fierce path
#

Wait wait wait... back up

#

Is the individual this customer record represents someone that has a Stripe Account?

keen quarry
#

Yes! The idea is that I create customerId for child users on my platform when they sign up. Then I want to share the payment method of a parent account(who also has a Stripe account in my dashboard) across other(child) users.

#

All users have Stripe accounts and they exist inside my dashboard. The goal is to allow a parent account to share their payment method with child users

fierce path
#

When you say they "exist on my dashboard". They show up under the Connect tab?

keen quarry
#

No, under customers tab

fierce path
#

Then those aren't Stripe Accounts

#

If you h ave Connected Stripe Accounts they show up under your Connect tab

#

Those are Customer records which are an entirely different thing

keen quarry
#

Is there a way to share the payment method between the customers under customers tab ?

fierce path
#

No

keen quarry
#

Could you direct me to the doc page where I can read about how to create the connection I need, please?

fierce path
keen quarry
#

Thank you so much for your help @fierce path ! It was eyes-opening to know that I miss such an important step in my implementation. Just to confirm, using connected accounts is the only way to share payment method across different users inside the app?

fierce path
#

You still won't be able to share payment methods between Customers.

#

The doc you linked is to allow Platforms to share Payment Methods to their Connect Accounts.

#

But it won't assign them to the corresponding Customer records.

keen quarry
#

What would you do if you needed to create a system where you have to share the same payment method across app users?

fierce path
#

Unfortunately I don't see how that would work. They would need to all be the same Customer record in Stripe.

keen quarry
#

@fierce path I appreciate your time and help, thank you so much!