#matrix-Connect
1 messages · Page 1 of 1 (latest)
Hi
What language are you using?
Hello, I have seen that guide. I am using node
const session = await stripe.checkout.sessions.create({
payment_method_types: ['card'],
line_items: [{
name: 'Stainless Steel Water Bottle',
amount: 1000,
currency: 'jpy',
quantity: 1,
}],
payment_intent_data: {
application_fee_amount: 123,
},
mode: 'payment',
success_url: 'https://example.com/success',
cancel_url: 'https://example.com/cancel',
}, {
stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
});
Wouldn't this work?
from the Doc
i am really trying to understand the last part
stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',
Sample here: https://github.com/stripe-samples/connect-direct-charge-checkout/blob/master/server/node/server.js#L35-L66
You just pass the Account Id to that {{...}} block
i have a constant declared like this const stripeVendorAccount = 'acct_xxxx'
should do stripeAccount: stripeVendorAccount,
yes
or do i need to add {
ok let me try
ok, i am getting this message error
'sk_test_51*********************************************************************************************5i7g' does not have access to account '{{acct_1Jpu8gFbYZoKrptz}}' (or that account does not exist). Application access may have been revoked.
This is the same problem I had last night
Paste me you account id
Normally it means you don't have connection to that Connected Account
I see that account in my dashboard
const stripeVendorAccount = 'acct_1Jpu8gFbYZoKrptz';
const session = await stripe.checkout.sessions.create(
{
line_items: [
{
price: 'price_xxxxqRH',
quantity: 1,
},
],
payment_method_types: [
'card',
],
mode: 'subscription',
success_url: `https://google.com`,
cancel_url: `https://yahoo.com`,
}, {
stripeAccount: stripeVendorAccount,
}
);
return {
id: session.id,
};
i am re running now
Please go to Dashboard log and find the request failed, and paste here its Id (req_xxx)
with the code above i am not getting a different error
Unhandled error StripeInvalidRequestError: No such price: 'price_1JowlvKXjwYd84Q40yMk3qRH'
there are no logs, i am not even able to start the checkout session
Okie this is a different problem
your account is acct_1EpuOEKXjwYd84Q4, correct?
and your connected account is acct_1Jpu8gFbYZoKrptz
The Price object is existed on your Platform account. And because you are passing stripeAccount to your Connected Account, Stripe will try to search for the price id in your Connected Account
So it's not found