#Gumehara

1 messages · Page 1 of 1 (latest)

smoky basinBOT
keen forge
#

What's the Q?

hollow lynx
#

I am trying to do a charge with a payment intent on a connected account but when i try to confirm it says : Can only apply an application_fee when the request is made on behalf of another account (using an OAuth key, the Stripe-Account header, or the destination parameter).

#

I Create the payment intent first

#

this.stripe = Stripe('test_key', {
stripeAccount: 'account_id'
});

    const elements = this.stripe.elements({
      clientSecret: stripeTokenResponse,
      beta: 'on',
    });
#

Instantiate the js library

#

with the client_id and client_secret

keen forge
#

Can you share the req_xxx ID?

hollow lynx
#

one sec

#

req_xx?

#

where do i find that

keen forge
hollow lynx
#

req_PxoxGD6DAOUHm6

slender anchor
#

looks like you're doing something wrong like using the secret key of the connected account or setting stripe_account to your own account ID or similiar

hollow lynx
#

i do not do that

#

i use the platform secret key

#

everywhere

slender anchor
#

you need to use the secret key of your platform account, and set stripe_account to the ID of a connected account

hollow lynx
#

i know

#

im doing that

slender anchor
#

when you add logs, what is the value of $company->stripeId?

hollow lynx
#

acct_1LxU1DLTMcD6M5l6

slender anchor
#

this.stripe = Stripe('test_key', {
stripeAccount: 'account_id'
});
is "test key" the publishable key of your platform? And is account_id acct_1LxU1DLTMcD6M5l6 ?

hollow lynx
#

yes and yes

slender anchor
#

I don't think so

#

because it looks to me like 'test_key' is the publishable key of the connected account acct_1LxU1DLTMcD6M5l6, that's what is shown by the req_xx you posted

#

that request is using a key pk_test_***Keo84N belongs to acct_1LxU1DLTMcD6M5l6 , which is incorrect when using Direct Charges like this

hollow lynx
#

test_key is my platform account is it not ?

slender anchor
#

it is not, in that req_xxx you posted it is using a key pk_test_***Keo84N which belongs to acct_1LxU1DLTMcD6M5l6

#

it should be your platform's publishable key instead

hollow lynx
#

Ok where can i find that

slender anchor
hollow lynx
#

Well it's the same key

#

can i provide in DM?

slender anchor
#

no, and it can't be the same key , you must be looking at the wrong account.

#

the platform key looks like pk_test_5*****3zaeS