#Yure
1 messages · Page 1 of 1 (latest)
Let me answer one by one
sure, no problem
- It seems like you are using the old set of params which isn't compatible with the Stripe API version that your account is using. You shall check the https://stripe.com/docs/payments/checkout/migrating-prices and use the new params
- I don't see the error in screenshot 2, can you share with me the request ID
- You shouldn't use Connected account's secret key. You should use Platform secret key, and pass connected account ID to
Stripe-Accountheader. More details here https://stripe.com/docs/connect/authentication
- Here is request Id for the second question, but I am not sure if it's relevant anymore since I used Connected account's secret key for this
req_5b0jMgYFu6LQek
If I use the platform key, then I am getting the error that is in the first screenshot
the question is: why does it work if I use platform key and not connected account's key? how could I check the api version that I am using? shouldn't it come from the Stripe object?
Can you send me the request IDs, the one that works and the one doesn't?
give me a couple of minutes please
I tried logging in but it seems like Stripe has some issues at the moment, let me ask you another question, that doesn't require req parameters
Yes, the Dashboard is not accessible at this moment, we are working on it.
Do I understand it correctly that in order to add Stripe-Header I need to use this line of code as a second parameter?
{
...line_items,
...payment_intent_data,
// other parameters
},
{ stripeAccount: accountId } // Stripe-Header?
)```
accountId is the Connected Account id
Yes, that's right.
The problem then is that I get this error: The 'payment_intent_data[transfer_data][destination]' param cannot be set to your own account.
"request-id":"req_lfQk4vZSzlenkk","stripe-account":"acct_1LxPURPP1WbC8gyf","stripe-version":"2019-05-16"
Wait, why are you setting destination to your own account?
the destination should be one of your express/custom connected account
the destination is the Connected account
destination: accountId,
},```
this is the same as { stripeAccount: accountId } // Stripe-Header?
Are you still using the connected account's secret key?
no, this is the platform's key
sorry, actually this might be the conected account's key
And acct_1LxPURPP1WbC8gyf is your account (e.g., platform ) or connected account
let me double check
double checked - acct_1LxPURPP1WbC8gyf is connected account
and it happens if I use platform's key
could it be related to Stripe having problems at the moment?
Ah I know the problem
You are using destination charge, the charge is to be created in platform, and later transferred to connected account. In this case you don't need to specify the stripe-account header
I would like to use Direct charge, so that the charge is created on the COnnected Account
how could I do that with Checkout Session Object?
I was told by the support a couple of days ago it uses Direct Charge
sorry, need to afk for 10 minutes, hope it's not a problem
For direct charge, you don't need to specify a transfer_data in your request
I am back sorry
this is what I get if I remove transfer_data
could it be caused by Stripe-Header?
Send me the request ID
could you work with payment Id pi_3LxQpsPP1WbC8gyf0VATIxHq? I cannot find request id
Sure
here you go pi_3LxQpsPP1WbC8gyf0VATIxHq
I don't see an error and I'm able to open this checkout page
do you know what could cause an error on my side?
Are you opening the Checkout URL to open directly or you are using the frontend stripe.redirectToCheckout to open the checkout session?
I use stripe.redirectToCheckout
Hey! Taking over for my colleague. Let me catch up.
Let me summarize, so you created a Checkout Session :
https://dashboard.stripe.com/test/logs/req_mtRhXkvNl94yZg
An now you are unable to open it from your frontend ?
sorry, let me get back to you in 10 minutes
sorry, I am back
yes, what I get is this error
but Jack Tan said he is able to view the session
hm, I just copied the link from the logs and it worked for me in a new tab but the initial tab (redirected to with stripe.redirectToCheckout) is showing the error still even if I reload
Yes I see,
So the Checkout Session was created by this account acct_1LxPURPP1WbC8gyf (kykypyd3o11+test-header@gmail.com)
You are using the publicKey of what account in your frontend ?
weird, it is supposed to be the public key of the platform but in the Developer API keys page it shows different public key
let me try to use the one from the Stripe instead
oh, I am sorry, looked at the wrong settings file
the public key is from the platform indeed
the exact same one
SO you confirm you are using the public key of this account acct_1LxPURPP1WbC8gyf (kykypyd3o11+test-header@gmail.com) when you load Stripe in your Frontend ?
no, this is the Connected Account, I use the public key of the Platform that the Connected Account is connected to
I suppose I need the public key of the connected account now, don't I?
Yes
could you please help me find how I could fetch the public key from the connected account?
Actually, you can loadStripe as a connected account
https://stripe.com/docs/js/initializing#init_stripe_js-options
Something like that:
const stripe = new Stripe(
"pk_test_...",
{
stripeAccount: 'acct_1LxPURPP1WbC8gyf'
}
);
and the pk_test_... in this example if my (platform's) public key and not connected account's ?
your platform account
got it, thank you, let me come back to you in a couple of minutes
yay, it worked !
thank you for the help on this one
could I ask you one more question?
Yeah with pleasure, what is your question ?
great, thank you!
how could I fetch Tax Ids on Connected Accounts? is it possible? I am looking for something that could help sending VAT invoices to Connected Users for their sales
after the sale* (using Checkout Session flow)
You can refer to this guide in order to automatically collect tax using Checkout Session:
https://stripe.com/docs/tax/checkout