#matteov7

1 messages ยท Page 1 of 1 (latest)

stray condorBOT
rare depot
#

๐Ÿ‘‹ happy to help

celest summit
#

Hi tarzan, thank you very much

#

in the web hook i'm trying to retrieve a session object with session service but i receive stripe exception wth "No such checkout.session: cs_live_b1teKhSdFPi4RjtMCBCK5fm6ZXsMfMOz7OhODNAk9jy1oINahFEHCoQGGm"

#

but this session exists in the logs

#

the cose i use is this

#

var checkoutSessionService = new SessionService();
var options = new SessionGetOptions();
options.AddExpand("line_items");
options.AddExpand("line_items.data.price.product");
options.AddExpand("subscription");
var s = checkoutSessionService.Get(s.Id, options);

rare depot
celest summit
#

no request fail because my webhook respond ok 200

#

req_6KGuyMiyaiZeVl is the session checkout

#

it is about session id cs_live_b1teKhSdFPi4RjtMCBCK5fm6ZXsMfMOz7OhODNAk9jy1oINahFEHCoQGGm so it's exists

#

but when i try to retrive it, it's not founded

rare depot
#

would you mind sharing the request ID for the retrieve API?

celest summit
#

i see 3 GETs: req_udIUVuCSG26caX , req_JA6XZxuz6AGFLg , req_1WL7eMIxUG8jBX

gaunt bane
#

Hi! I'm taking over my colleague. Please, give me a moment to catch up.

celest summit
#

thank you very much.

gaunt bane
#

Could you please share a screenshot of where you see the "No such checkout.session: " error?

celest summit
#

In the meantime i changed my webhok implementation so the next time i'll permit to throw exception to Stripe response.

#

The "No such checkout.session: " is in my logs because i catch the exception, logged in my system and responded 200 to stripe. I change now this implementation and permit the exception to responde to Stripe.

#

when i called the Get method to retrieve session object i received StripeException with message No such checkout.session: cs_live_b1teKhSdFPi4RjtMCBCK5fm6ZXsMfMOz7OhODNAk9jy1oINahFEHCoQGGm

#

Sorry but it's all i have

gaunt bane
#

Is this on the frontend or on the backend?

celest summit
#

backend

#

this is the stacktrace

#

at Stripe.StripeClient.ProcessResponse[T] (Stripe.StripeResponse response) [0x00013] in <78a154776b26491b9bf14be81b7da25b>:0
at Stripe.StripeClient.RequestAsync[T] (System.Net.Http.HttpMethod method, System.String path, Stripe.BaseOptions options, Stripe.RequestOptions requestOptions, System.Threading.CancellationToken cancellationToken) [0x000a1] in <78a154776b26491b9bf14be81b7da25b>:0
at Stripe.Service1[TEntityReturned].RequestAsync[T] (System.Net.Http.HttpMethod method, System.String path, Stripe.BaseOptions options, Stripe.RequestOptions requestOptions, System.Threading.CancellationToken cancellationToken) [0x000a1] in <78a154776b26491b9bf14be81b7da25b>:0 at Stripe.Service1[TEntityReturned].Request[T] (System.Net.Http.HttpMethod method, System.String path, Stripe.BaseOptions options, Stripe.RequestOptions requestOptions) [0x00023] in <78a154776b26491b9bf14be81b7da25b>:0
at Stripe.Service1[TEntityReturned].Request (System.Net.Http.HttpMethod method, System.String path, Stripe.BaseOptions options, Stripe.RequestOptions requestOptions) [0x00000] in <78a154776b26491b9bf14be81b7da25b>:0 at Stripe.Service1[TEntityReturned].GetEntity (System.String id, Stripe.BaseOptions options, Stripe.RequestOptions requestOptions) [0x0000d] in <78a154776b26491b9bf14be81b7da25b>:0
at Stripe.Checkout.SessionService.Get (System.String id, Stripe.Checkout.SessionGetOptions options, Stripe.RequestOptions requestOptions) [0x00000] in <78a154776b26491b9bf14be81b7da25b>:0
at XTyres.FE.Mgmt.v100.Admin.MgmtAdminAdapter.Post (XTyres.FE.Mgmt.admin.Models.Stripe.StripeWebhookRequest req) [0x0017c] in <6d6cf71e00a84a9283ab14a9b0ecca03>:0

#

i image it's better to wait the next error, right?

#

the next one will be with exception Stripe side

gaunt bane
#

I don't quite understand where this error comes from, as we have nothing recorded on our side. Are you sure you are using the correct Stripe secret key?

#

When did this error happen?

celest summit
#

I receive correctly the vento to my webhook, i verify successfully the event so the secret key is ok. Then, i try to retrieve again the session object but with lines_items and subscription sub-objects and here i have the StripeException with "no such ...."

#

Maybe, when the session checkout is completed it's cancelled from your side?

gaunt bane
#

You should be able to retrieve the Session at all times.

#

Did this only happen once?

celest summit
#

we go in production just this morning ๐Ÿ™‚ in test env it was ok

#

Let's wait for the next payment

#

then we can debug the request with the exception, it's ok for you?

gaunt bane
#

Sure.
Normally, every request that reaches our API is trackable by us so we can investigate.

#

Could you maybe share the code of your webhook endpoint?

#

Please, let me know if you have any other questions.