#youmin-checkout

1 messages ยท Page 1 of 1 (latest)

placid flare
pale fjord
#

req_TrtUqj88X3CqDt

placid flare
#

Thanks! And can you share the code you are using for this request? I'm not sure to understand what you are doing.
Note that this Checkout Session doesn't exist cs_test_a1uyeu6USI3dmpZj5j5NwZbnP2vvc1oelepVuygopRGWSwIqLzVjQSjdHS

pale fjord
#

Hi I just copied the curl command from your dev page

#

Same error when I use fresh checkout session id

placid flare
#

Got it. In the request you shared (req_TrtUqj88X3CqDt) you are trying to access the ID cs_test_a1uyeu6USI3dmpZj5j5NwZbnP2vvc1oelepVuygopRGWSwIqLzVjQSjdHS. Where did you find this ID? It doesn't exist, so there might be a typo or an issue when you copy-pasted it.

pale fjord
#

How about this one? req_fflSw6a7ZxwaoA

#

I use this from the screenshot cs_test_a1GrTjf2UV4DV7DorEIbqTfUk7JbptcF7MC3zEasEyOU7eq8RDUWfrI4PK

pale fjord
placid flare
#

How about this one? req_fflSw6a7ZxwaoA
This checkout session ID exists, but it doesn't belong to the account making the API call. Are you a platform account trying to retrieve an object from a connected account?

pale fjord
#

yes We use stripe connect

#

I assumed that platform's key should be available? It is same key when I created the session

placid flare
pale fjord
#
const stripe = require('stripe')('{{PLATFORM_SECRET_KEY}}');
const customer = await stripe.customers.create(
  {email: 'person@example.edu'},
  {stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}'}
);

// Fetching an account just needs the ID as a parameter
const account = await stripe.accounts.retrieve('{{CONNECTED_STRIPE_ACCOUNT_ID}}');
#

In this node example, where should I put the header?

#

I tried this code and it returned the same error

const stripe = require('stripe')('...');

const session = await stripe.checkout.sessions.retrieve('cs_test_a1HtJADib84Som3hlFhgGTkCeTe8fLJLLVAXDy3zzsoFtaQyc5beCbekNf'
);
smoky flame
#

Hi there ๐Ÿ‘‹ jumping in for soma. You would pass it in a hash after the params for the request as shown in the example. So you're request would look like:


const session = await stripe.checkout.sessions.retrieve(
  'cs_test_a1HtJADib84Som3hlFhgGTkCeTe8fLJLLVAXDy3zzsoFtaQyc5beCbekNf',
  {stripeAccount: '{{CONNECTED_STRIPE_ACCOUNT_ID}}'}
);```
pale fjord
smoky flame
#

Hm, I'm seeing that header in the code examples that are on that page. Did you toggle the doc to "Direct charges"?

pale fjord
#

Ah, just found it in the creation logic. I meant in fulfilment logic

#

Instead of using Webhook, I want to retrieve session status in success_url and show the payment status directly. Does this make sense?

smoky flame
pale fjord
#

Yes

smoky flame
#

Awesome! Feel free to let us know if you run into problems implementing that.