#enriquejf_error

1 messages ยท Page 1 of 1 (latest)

raw shadowBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1433742123101978675

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

mossy minnow
fluid pond
mossy minnow
#

The payment was successful in Stripe

#

:No such checkout.session: cs_live_a1dG6OohSJlB57bJSxdoWwP91IT8PJ6Xl8a59ubK0D7DrpcwkhUBeG7Iiy; code: resource_missing; request-id: req_pDbih0MgJtBkec

#

this?

fluid pond
#

Are you sure you're using the correct secret key in your request?

mossy minnow
#

yes

#

we have same code deployed and the rest of payments are working ok

fluid pond
mossy minnow
#

those accounts are dynamic?

fluid pond
#

What do you mean by dynamic?

mossy minnow
#

hmmmm thanks, you've gave me an idea. I think you're right with the key

#

thank you

fluid pond
#

No problem, happy to help

mossy minnow
#

sorry, those accounts are created with a new session with apikey and secret, isn't it?

fluid pond
#

Each account has it's own keys/secrets, yes

mossy minnow
#

We're on Java, when we get the response from Stripe after payment, we're calling

Session.retrieve(sessionId);

#

how Stripe knows the account?

fluid pond
#

You would have previously initialized the code with your secret key - this is what ties your requests to a specific account

mossy minnow
#

And stripe stores it internally in the web session?

fluid pond
#

It's stored locally on your side and included with requests sent to Stripe

mossy minnow
#

hmmm we don't store anything ad-hoc, we only take the session id for checking, perhaps into your jar file is the response...

fluid pond
#

You would need to pass the api key to Stripe.apiKey in order for it to be able to make any requests - this is all you need to do. How it's stored/transmitted is done in the background

mossy minnow
#

ok, but somehow stripe stores this account in the background associated to a token to not ask for creds again. As we had networking issues, we lost the web session, so that connection was lost and on the background Stripe obtained a new account with the same api key, could be?

fluid pond
#

Networking issues wouldn't affect it, the API key is set in your app locally, and then sent to us with each request. So I'd look into how your setting it, if you perhaps have multiple instances with different keys, or if you're caching it in some way in your integration

raw shadowBOT
mossy minnow
#

ok, the api key is sent with each request, but the account should be the same for all the payment process, true?

unborn axle
#

๐Ÿ‘‹ Hi there, I'm taking over for my colleague who had to step away

#

ok, the api key is sent with each request, but the account should be the same for all the payment process, true?
In general, yes. You set the API key when initialising the SDK, and that corresponds to one Stripe account.

But it is possible to override the API key per request. But this is something you would have to do explicitly

mossy minnow
#

but if we override the API it will create another stripe account and we couldn't retrieve the session, true?

unborn axle
#

Right. An API key only lets you access one Stripe account.

So if you create a Checkout Session using an API key for Account ABC, you cannot later retrieve that Checkout Session using an API key that belongs to Account XYZ, for example.

mossy minnow
#

but the account is always the same for the same api keys?

unborn axle
#

Yes.

  • You created the checkout session yesterday using the API key ending in KoeDLD, which belongs to acct_1PcnwMDx7LcOdCbe
  • You attempted to retrieve the Checkout Session using the API key ending in EWuITO, which belongs to acct_1PcnlbCvxUUwNn8g
mossy minnow
#

ahh thanks!!! this is what we should need to clarify

#

thanks!!!