#Amer Bearat

1 messages ยท Page 1 of 1 (latest)

fiery fableBOT
robust halo
unborn galleon
#

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

robust halo
#

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

unborn galleon
#

we connected the connected account to the platform account. as you see in the image

robust halo
#

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

unborn galleon
#

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?

robust halo
#

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

unborn galleon
#

no acct_1MXULZHPXl4VPg9A is the conected account

#

how do u know its the plaftorm?

manic spade
#

๐Ÿ‘‹ Hopping in here

unborn galleon
#

okay

manic spade
#

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)

unborn galleon
#

ok i see

#

let me cancel the current connection and reconnect again

unborn galleon
#

@manic spade i did the connection but still getting same error req_qoNqDKICL9P9M1

manic spade
#

Yeah, so now the connection is correct but your request is wrong

#

What does your code look like that's making the request?

unborn galleon
#

I have secret key as platform account and stripe_account as the connected account

manic spade
#

Yes, but can I see your code? I believe your pass in stripe_account incorrectly

unborn galleon
#

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);

manic spade
#

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

unborn galleon
#

we cant use library

#

do u ahve an example of rest api

manic spade
unborn galleon
#

ok thanks

manic spade
#

๐Ÿ‘ I need to head out, but if you still need help codename_duchess is around and can answer your questions

unborn galleon
#

okay thank you

alpine osprey
#

๐Ÿ‘‹