#Amer Bearat
1 messages ยท Page 1 of 1 (latest)
And you are following this guide, correct? https://stripe.com/docs/payments/payment-methods/connect#cloning-payment-methods
yes, this link was given to me by the account holder.
yesterday, i had this issue and someone here told me that both accounts are not connected. I reached to the account holder from stripe and he helped me connect both accounts together
but now i dont now whats the issue
That is because there is no connection between the two accounts
The account ID in the request is not a Connected Account for the account making the request
we connected the connected account to the platform account. as you see in the image
But the account ID in the request (acct_1MXULZHPXl4VPg9A) is the platform in this relationship. You can't copy from the Connected Account to the Platform which is how the request is currently configured
I want to copy from the platform to the connected account. I have the platform account as the secret key and stripe_account as the connected account.
what i did wrong here or i need to change here?
When I look at these accounts, I see acct_1MXULZHPXl4VPg9A as the Platform that that has acct_1MgZv1K9mHIYl5Oa as a Connected Account.
So you can only clone Payment Methods from acct_1MXULZHPXl4VPg9A to acct_1MgZv1K9mHIYl5Oa
๐ Hopping in here
okay
If your intention was for acct_1MXULZHPXl4VPg9A to be the connected account then I don't think you started up that connection correctly
On our end, we can look at that account and see all the connections to/from it and right now that account (acct_1MXULZHPXl4VPg9A) isn't connected to any other account
Account acct_1MgZv1K9mHIYl5Oa is the one that's connected to acct_1MXULZHPXl4VPg9A (which is the platform)
@manic spade i did the connection but still getting same error req_qoNqDKICL9P9M1
Yeah, so now the connection is correct but your request is wrong
What does your code look like that's making the request?
I have secret key as platform account and stripe_account as the connected account
Yes, but can I see your code? I believe your pass in stripe_account incorrectly
Map<String, Object> requestBodyObjectMap = new Map<String, Object>{
'stripe_account' => 'acct_1MXULZHPXl4VPg9A',
'customer' => platformCustomerId,
'payment_method' => platformPaymentMethodId,
'metadata[Origin]' => 'Salesforce'
};
String serializeString = JSON.serialize(requestBodyObjectMap);
string requestBody = (Map<String, Object>) JSON.deserializeUntyped(serializeString);
Yeah that's not going to work - Stripe-Account is a header, it shouldn't be passed in with the request body
Is there a reason you're not using our SDKs for this? It'll be much easier to make the requests if you use one of our client libraries
We have these docs (https://stripe.com/docs/connect/authentication) which include an example of how to make the request with CURL
ok thanks
๐ I need to head out, but if you still need help codename_duchess is around and can answer your questions
okay thank you
๐