#Dmitrii - cloning payment methods
1 messages · Page 1 of 1 (latest)
Hi 👋
can you share the request ID for the request that generated this error?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
One sec!
Dmitrii - cloning payment methods
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.
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?
$payment_method = \Stripe\PaymentMethod::create([
'customer' => "cus_MtmGEMSafp82",
'payment_method' => $paymentMethodID,
], [
'stripe_account' => "cus_MtmYu9Cpphdgek",
]);
That ID is not a Stripe Account
that won't work
[
'stripe_account' => "cus_MtmYu9Cpphdgek", <- this has to be an Account ID: acct_XXXXXXX
]
Could you tell me please where can I get this id on dashboard?
It's the account ID for the connected account you are trying to clone the PM to
Oh, should I make some additional steps for connecting the child account?
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
I got it! Could you direct me to the page to know how can I create this connection?
Wait wait wait... back up
Is the individual this customer record represents someone that has a Stripe Account?
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
When you say they "exist on my dashboard". They show up under the Connect tab?
No, under customers tab
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
Is there a way to share the payment method between the customers under customers tab ?
No
Could you direct me to the doc page where I can read about how to create the connection I need, please?
Here is a good place to start: https://stripe.com/docs/connect/explore-connect-guide
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?
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.
What would you do if you needed to create a system where you have to share the same payment method across app users?
Unfortunately I don't see how that would work. They would need to all be the same Customer record in Stripe.
@fierce path I appreciate your time and help, thank you so much!