#Saurabh Jha
1 messages · Page 1 of 1 (latest)
Hi there!
Can you share the ID (req_xxx) of the failing API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
System.HttpRequest[Endpoint=https://api.stripe.com/v1/checkout/sessions/cs_test_a1XkUeLnjimkTUmnXzdd8Km1eIos8LvUGKlEAG6n8yYxFn9dnBPVMp9dWUF, Method=GET]
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
Thanks for sharing let me check
sure
Your endpoint is calling this endpoint:
GET /v1/checkout/sessions/**source=**cs_test_a1W295WShvVzaUiNJkrdY178HZ02lHJMME0bKyiYXdkrFKJcL75b8cyvwm
You need to remove "source="
Could you please share the requestId ?
That CheckoutSession (cs_test_a1W295WShvVzaUiNJkrdY178HZ02lHJMME0bKyiYXdkrFKJcL75b8cyvwm) is expired. So the API returns 404
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?
Could you please share the Checkout Session Id ?
Nope sorry I'm not allowed to
cs_test_a1Xo8s52zMmbFxJXcYhPnn0M6Jl0d6O13VZ7gD81Zo0oDODQQy7PUC4avY
ok no problem
This one is already completed
yes
I want to retrieve the session response through the API
and save the Payment Intent Id
how can I do that?
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
but logs are not getting created in stripe
req_dVS85hSgetgEFx
can you tell me what has happened in the above RequestId
You can find it in your dashboard:
https://dashboard.stripe.com/test/logs/req_dVS85hSgetgEFx
It responded with 200
yes
can you not look into the session Id and tell me how to structure the Endpoint to retrieve the session object?
Here is a curl in order to retrieve the details of this Checkout Session
curl https://api.stripe.com/v1/checkout/sessions/cs_test_a1Xo8s52zMmbFxJXcYhPnn0M6Jl0d6O13VZ7gD81Zo0oDODQQy7PUC4avY \
-u {THE_SECRET_KEY_OF_YOUR_ACCOUNT}:
This works in POSTMAN
but when I try to call the API through Salesforce Apex, it fails with the above error
It should be a GET request, not POST. Change the HTTP method
If you look at the highlighted line
the Method is set to 'GET'
still it throws this error
Look at the error returned: Unrecogniuzed request URL
Can you share the req_xxx for that request
these API calls are not creating request logs in Stripe
I suspect your code is not functioning as your expect. Clearly you're still setting a POST method somewhere
Ok I will check again