#debbie-subscription
1 messages · Page 1 of 1 (latest)
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
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
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
- you create the subscription with platform secret key and stripe-account header in the server side
- you confirm the payment_intent from step 1 with platform publishable_key and stripe-account header on the client side
i.e. can you please share first 3-4 and last 3-4 characters of the secret key i need to use?
I don't have access to your key, you should be able to login to your platform
dashboard and find the key there in https://dashboard.stripe.com/test/apikeys
Platform dashboard ^
his is current behaviour, right?
no, currently you are
- you create the subscription with
connected accountsecret key in the server side - you confirm the payment_intent from step 1 with platform publishable_key and stripe-account header on the client side
which is not correct
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
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
this is the correct stripe account i a trying to create for
yeah, what you should do is on your PHP side
Yes correct, this is set dynamically, as mentioned.
you should use acct_1Fk8dcIAe1cGEvRe's secret key + acct_1AWjGbDp2yQ9npTE as the header, in this case, the frontend and server end are consistent
sorry I did not see you are asking PHP side
PHP side is a server side, it is using secret key
same above ending EAXP9 publishable key is used on client side, just put a console.log on it
it is not using that secret key of your screenshot no
it is using acct_1AWjGbDp2yQ9npTE's secret key as I mentioned
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
do you have login of the acct_1AWjGbDp2yQ9npTE account?
you can login to that dashboard and head to https://dashboard.stripe.com/test/apikeys page of that account's dashboard page
I need to leave now. thank you very much. as with regards to the login, i need to check.
np. feel free to come back and ask in the channel again.
Thanks have a great day!
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?
@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
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):
- creating the subscription with the platform secret key (sk_test_b41ES.............mrqM1 ) + connected account id (acct_1AWjGbDp2yQ9npTE)
- 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?
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):
- creating the subscription with the platform secret key (sk_test_b41ES.............mrqM1 ) + connected account id (acct_1AWjGbDp2yQ9npTE)
- 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 do you have the two requests ID? The requests you provided yesterday was not doing that. The error was caused by
- creating the subscription with the connected account id (acct_1AWjGbDp2yQ9npTE)'s secret key
- 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
- creating the subscription with the connected account id (acct_1AWjGbDp2yQ9npTE)'s secret key
sk_test_Id******************ZwV9usingLaravel Cashier/10.7.1 - confirm payment_Intent with platform's publishable key
pk_test_AQ****************************AXP9+ connect account headeracct_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?
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