#debbie-subscription

1 messages · Page 1 of 1 (latest)

verbal mist
#

it seems that you are creating subscriptions using the secret key of the connected account

but you are confirming the payment_intent using the platform publishable key with stripe-account header.

#

You will need to make them consistent

#

where you will need to create the subscription using the platform secret key and stripe-account header too

wooden steppe
#

indeed, i am doing so. is this an issue only with subscriptions with connected account? if i am doing it with no connected account, it works fine

verbal mist
#

correct.

#

you will just need the frontend and your server side call consistent.

wooden steppe
#

hmm, let me re read your message above. so, i need to create the subscription and confirm the payment intent with the PLATFORM secret key and stripe account header? or with connected account secret key and stripe account header

verbal mist
#
  1. you create the subscription with platform secret key and stripe-account header in the server side
  2. you confirm the payment_intent from step 1 with platform publishable_key and stripe-account header on the client side
wooden steppe
#

i.e. can you please share first 3-4 and last 3-4 characters of the secret key i need to use?

verbal mist
#

I don't have access to your key, you should be able to login to your platform

#

Platform dashboard ^

wooden steppe
#

his is current behaviour, right?

verbal mist
#

no, currently you are

  1. you create the subscription with connected account secret key in the server side
  2. you confirm the payment_intent from step 1 with platform publishable_key and stripe-account header on the client side
#

which is not correct

wooden steppe
#

yes, indeed. we are using the connected account keys dynamically. i.e. saving into database and using based on the fact if those are used or not

#

but still not sure why it gets the platfoem publishable_key on the client side, i will further investigate. i will try to make more tests, but hard coding the keys, to see if it works

verbal mist
#

yeah, according to our log, you are using acct_1Fk8dcIAe1cGEvRe publishable key

#

with stripe-account acct_1AWjGbDp2yQ9npTE as the header

#

in the frontend

#

in your PHP side, you are using acct_1AWjGbDp2yQ9npTE 's secret key

wooden steppe
#

this is the correct stripe account i a trying to create for

verbal mist
#

yeah, what you should do is on your PHP side

wooden steppe
#

Yes correct, this is set dynamically, as mentioned.

verbal mist
#

you should use acct_1Fk8dcIAe1cGEvRe's secret key + acct_1AWjGbDp2yQ9npTE as the header, in this case, the frontend and server end are consistent

wooden steppe
#

can you please confirm on the php side i am using the publishable from above?

verbal mist
#

sorry I did not see you are asking PHP side

#

PHP side is a server side, it is using secret key

wooden steppe
#

same above ending EAXP9 publishable key is used on client side, just put a console.log on it

verbal mist
#

it is not using that secret key of your screenshot no

#

it is using acct_1AWjGbDp2yQ9npTE's secret key as I mentioned

wooden steppe
#

hmm...can you please head me to where i can see the keys of the connected account? i am currently using the above mentioned secret keys and connected account id and it works fine for all the other payments

#

Hi @verbal mist can you please head me to where i can see the keys of the connected account? i am currently using the above mentioned secret keys and connected account id and it works fine for all the other payments

verbal mist
#

do you have login of the acct_1AWjGbDp2yQ9npTE account?

wooden steppe
#

I need to leave now. thank you very much. as with regards to the login, i need to check.

verbal mist
#

np. feel free to come back and ask in the channel again.

wooden steppe
#

Thanks have a great day!

wooden steppe
#

Hi @verbal mist I have tried the solution you provided, which means i have created the subscription with the connected account secret key and then handled card payment with the platform publishable key. It works indeed and pops up the 3d secure check modal. But my concern is still why this has to be done this way, i mean using one key from the platform and one from the connected account. We are also handling one time payments, but in those processes we are using the secret key of the connected account to create the payment intent and the publishable key of the same connected account to handle card payment, so both from the connected account. Or the subscription flow is the only one needed that platform-connected account combo?

verbal mist
#

@wooden steppe sorry, there might be some miscommunication here. for any payment including subscription or one time payment, you just need two things

  • Platform account's keys (secret and publishable )
  • Connected account ID (acct_xxxx)

you should

  • create subscription with platform's secret key + connected account ID as stripe-account header
  • confirm the payment with platform 's publishable key + connected account ID as stripe-account header
#

You should never need Connected account's keys for any payment

wooden steppe
#

Thank you. acct_1Fk8dcIAe1cGEvRe is the account id for the platform account: Experience Ticketing Master - on this platform account we are having a connected account (acct_1AWjGbDp2yQ9npTE)

#

ok. I followed the exactly 2 steps from your previous email for a subscription (i'll add details of keys for each line):

  1. creating the subscription with the platform secret key (sk_test_b41ES.............mrqM1 ) + connected account id (acct_1AWjGbDp2yQ9npTE)
  2. try to confirm the payment with the platform publishable key (pk_test_AQ2zhr............EAXP9) + connected account (acct_1AWjGbDp2yQ9npTE) (screenshot attached too - from stripe client generated client side)

API endpoint -> https://api.stripe.com/v1/payment_intents/pi_3JXk13Dp2yQ9npTE1bEfMlRq/confirm
result => "The client_secret provided does not match the client_secret associated with the PaymentIntent.”

#

is this right?

wooden steppe
#

Hi @verbal mist reposting from my yesterdays question.

#

acct_1Fk8dcIAe1cGEvRe is the account id for the platform account: Experience Ticketing Master - on this platform account we are having a connected account (acct_1AWjGbDp2yQ9npTE)
ok. I followed the exactly 2 steps from your previous email for a subscription (i'll add details of keys for each line):

  1. creating the subscription with the platform secret key (sk_test_b41ES.............mrqM1 ) + connected account id (acct_1AWjGbDp2yQ9npTE)
  2. try to confirm the payment with the platform publishable key (pk_test_AQ2zhr............EAXP9) + connected account (acct_1AWjGbDp2yQ9npTE) (screenshot attached too - from stripe client generated client side)

API endpoint -> https://api.stripe.com/v1/payment_intents/pi_3JXk13Dp2yQ9npTE1bEfMlRq/confirm
result => "The client_secret provided does not match the client_secret associated with the PaymentIntent.”
is this right?

verbal mist
#

@wooden steppe do you have the two requests ID? The requests you provided yesterday was not doing that. The error was caused by

  1. creating the subscription with the connected account id (acct_1AWjGbDp2yQ9npTE)'s secret key
  2. try to confirm the payment with the platform publishable key (pk_test_AQ2zhr............EAXP9) + connected account (acct_1AWjGbDp2yQ9npTE) (screenshot attached too - from stripe client generated client side)

so can you share the two requests again so that I can confirm the code is really using the right key?

#

o, you have the payment_Intent id in the link, I can confirm now

#

what you are doing now is

  1. creating the subscription with the connected account id (acct_1AWjGbDp2yQ9npTE)'s secret key sk_test_Id******************ZwV9 using Laravel Cashier/10.7.1
  2. confirm payment_Intent with platform's publishable key pk_test_AQ****************************AXP9 + connect account header acct_1AWjGbDp2yQ9npTE
#

I think your laravel Cashier was not using the right secret key and no account header is set

#

Can you confirm your step 1 is really using platform secret key?

wooden steppe
#

secret key of platform account “Experience Ticketing Master” (acct_1Fk8dcIAe1cGEvRe) and the connected account id (acct_1AWjGbDp2yQ9npTE) as a stripe account header for creating the subscription server side (PHP) and 2.using the publishable key of platform account “Experience Ticketing Master” (acct_1Fk8dcIAe1cGEvRe) and the connected account id (acct_1AWjGbDp2yQ9npTE) as a stripe account header for confirming from client side (JS).

Sorry, i was mistaken yesterday when i mentioned we were using acct_1AWjGbDp2yQ9npTE ’s keys, we do not have access to those. We are only using the keys (these are the ones i mentioned above) from our platform account “Experience Ticketing Master” (acct_1Fk8dcIAe1cGEvRe):

  • secret “sk_test_b41EStf…………………PmrqM1"
  • publishable “pk_test_AQ2zhr............EAXP9"

But anyway, thanks for your help. You've been great