- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the older NVP/SOAP API, there was a clear return in every api call of "CORRELATIONID". We would log this with every api call for internal monitoring/debugging and correlating calls to the merchant terminal. Very useful.
We are trying to find such an ID in the return from the newer Orders / Payments v2 REST APIs. Is there one? We noticed that upon an ERROR condition (only), there is a noted "debug_id" which the documentation states is "The PayPal internal ID. Used for correlation purposes.". Would this be the only reference made?
Solved! Go to Solution.
- Labels:
-
Payments REST APIs
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After some poking, I have discovered what I need.
These instructions are for if using the Checkout PHP SDK (however the solution can also be found with any SDK using curl). After receiving a response (that is not an Exception) from a REST request, the Correlation ID can be found in the return headers by the name of "Paypal-Debug-Id".
To access these headers with the Checkout PHP SDK, you can simply pull it via:
// following the same format as the example code provided with the SDK
$request = new WhateverMethodYouAreDoing();
$client = PayPalClient::client();
$response = $client->execute($request);
// thankfully $response->headers is exposed and not set as private or protected!
$correlationid = $response->headers['Paypal-Debug-Id'];
And then you now have the ID like we are used to getting in prior versions of the paypal processes. Which can then be used to lookup these calls and debug.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After some poking, I have discovered what I need.
These instructions are for if using the Checkout PHP SDK (however the solution can also be found with any SDK using curl). After receiving a response (that is not an Exception) from a REST request, the Correlation ID can be found in the return headers by the name of "Paypal-Debug-Id".
To access these headers with the Checkout PHP SDK, you can simply pull it via:
// following the same format as the example code provided with the SDK
$request = new WhateverMethodYouAreDoing();
$client = PayPalClient::client();
$response = $client->execute($request);
// thankfully $response->headers is exposed and not set as private or protected!
$correlationid = $response->headers['Paypal-Debug-Id'];
And then you now have the ID like we are used to getting in prior versions of the paypal processes. Which can then be used to lookup these calls and debug.
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Assistance Required: Locating Existing APP ID for Adaptive Payments in PayPal Business Account in NVP/SOAP APIs
- trying to locate my APIs area in NVP/SOAP APIs
- Payment Processing if located in the British Virgin Islands? in PayPal Payments Standard
- Persist 403 ERROR in REST APIs
- Locating the HTML code for my PayPal button? in PayPal Payments Standard