#matrix-Connect

1 messages · Page 1 of 1 (latest)

tepid imp
wide patrol
#

Hi

tepid imp
#

What language are you using?

wide patrol
#

Hello, I have seen that guide. I am using node

tepid imp
#
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

wide patrol
#

i am really trying to understand the last part

#

stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}',

tepid imp
tepid imp
wide patrol
#

i have a constant declared like this const stripeVendorAccount = 'acct_xxxx'

#

should do stripeAccount: stripeVendorAccount,

tepid imp
#

yes

wide patrol
#

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

tepid imp
#

Paste me you account id

#

Normally it means you don't have connection to that Connected Account

wide patrol
#

I see that account in my dashboard

tepid imp
#

Why is it having {{ and }} ?

#

I think you passed the value without brackets?

wide patrol
#

exactly

#

this is my code

tepid imp
#

Paste me the request id

#

that errored

wide patrol
#

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

tepid imp
#

Please go to Dashboard log and find the request failed, and paste here its Id (req_xxx)

wide patrol
#

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

tepid imp
#

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

wide patrol
#

ah ok

#

should i then create the product in my connected account?