#Saurabh Jha

1 messages · Page 1 of 1 (latest)

cobalt blazeBOT
grave kindle
uncut moth
grave kindle
#

Trying to retrieve Session object from Salesforce Apex by calling Retrieve Session Object API
The retrieve need to be a GET, but according to your error message it's a POST

uncut moth
#

req_sdB65Opq2AwCYr

#

Please take a look at this failed request Id

grave kindle
#

Thanks for sharing let me check

uncut moth
#

sure

grave kindle
#

Your endpoint is calling this endpoint:
GET /v1/checkout/sessions/**source=**cs_test_a1W295WShvVzaUiNJkrdY178HZ02lHJMME0bKyiYXdkrFKJcL75b8cyvwm
You need to remove "source="

uncut moth
#

ok

#

let me try\

#

I tried

#

it did not work

grave kindle
uncut moth
#

No logs are getting created now

grave kindle
#

That CheckoutSession (cs_test_a1W295WShvVzaUiNJkrdY178HZ02lHJMME0bKyiYXdkrFKJcL75b8cyvwm) is expired. So the API returns 404

uncut moth
#

ok

#

let me create a new one

#

I created a new session record

#

still cannot see the failed request Id in the Logs

#

is this session Id also got expired?

#

can we connect over call?

grave kindle
#

Could you please share the Checkout Session Id ?

grave kindle
uncut moth
#

cs_test_a1Xo8s52zMmbFxJXcYhPnn0M6Jl0d6O13VZ7gD81Zo0oDODQQy7PUC4avY

uncut moth
grave kindle
uncut moth
#

yes

#

I want to retrieve the session response through the API

#

and save the Payment Intent Id

#

how can I do that?

grave kindle
#

You can get it normally even if its completed

#

I need the requestId, like you shared above, in order to see what is the problem with it

uncut moth
#

but logs are not getting created in stripe

#

req_dVS85hSgetgEFx

#

can you tell me what has happened in the above RequestId

grave kindle
uncut moth
#

yes

uncut moth
# uncut moth

can you not look into the session Id and tell me how to structure the Endpoint to retrieve the session object?

grave kindle
uncut moth
#

but when I try to call the API through Salesforce Apex, it fails with the above error

harsh oyster
#

It should be a GET request, not POST. Change the HTTP method

uncut moth
#

If you look at the highlighted line

#

the Method is set to 'GET'

#

still it throws this error

harsh oyster
#

Look at the error returned: Unrecogniuzed request URL

#

Can you share the req_xxx for that request

uncut moth
# uncut moth

these API calls are not creating request logs in Stripe

harsh oyster
#

I suspect your code is not functioning as your expect. Clearly you're still setting a POST method somewhere

uncut moth
#

Ok I will check again