Paypal REST Api Internal Server Error - rest

I'm in a pickle with PayPal's new (and nice) REST Api. I am able to make many calls to the Paypal REST sandbox successfully. However, there are random times it won't work for short perdiods at all and the response code is *Internal Server Error *
Is this because I'm using a Sandbox? Or am I testing it too often? Is there a log stored for my account where I can see why the sandbox returned this error?
Here are the credit cards Im generally testing with.
4000000000000002
4417119669820331
It's sporadic, and unpredictible if it will work or not. Is anyone else having this issue?
Here is the response:
debug_id: 394271a164c9
name: INTERNAL_SERVICE_ERROR

Related

How to send transactions to the sandbox paypal using paypal API?

I am trying to create some payments with transactions on my sandbox API. I followed the doc here https://developer.paypal.com/docs/api/payments/v1/#payment_create and inserted the request body in postman but I get a 404 error. I am not using the deprecated endpoint. Can someone help?
v1/payments is a deprecated API.
Use the current v2/checkout/orders API, documented here.
Impossible to advise on the reason for the 404 without seeing a log of your request and response, but make sure you are successfully obtaining an access token first. There is a postman collection at https://www.postman.com/paypal/

Clueless error 500 on rest paypal payment execution

I'm setting up a paypal payment option on the project i'm working on.
The authorization structure I use is an hybrid client + server REST.
The client generates the token as expected, after the user clicks "Pay now" on the paypal page.
Then the server receives its data (paymentID and payerID). So, i just ask for a bearer token (or use the one i had stored) and reach the
POST /payments/payment/{payment_id}/execute
endpoint, with no body at all.
Everything works fine, until the REST request, since it gives me a 500 error and no explanation at all of what I could have done wrong. Just in case some PayPal developers are reading this post, i'll also leave the debug id:
d78e7ca9e79b2
Another strange thing is that the
GET /payments/payment/{payment_id}/
request is working fine, also giving me as HATEOAS endpoint, the execute link, identical as the one I use. Did i miss something, in the execute call, so?

Paypal Express Checkout through Braintree SDK suddenly fails (missing facilitator REST API App?)

We implemented PayPal express checkout through the Braintree SDK (js v3) because this allows us to use our own HTML button whereas we would have to use the provided PayPal buttons if we were using the REST API.
Everything was working fine within our live setup until yesterday. Code was changed neither on the client nor on the server.
However, I did delete two REST API apps within the PayPal developer dashboard which were no longer needed since we had decided to go down the Braintree JS SDK path.
After that, express checkouts started throwing AuthenticationErrors.
Generating client tokens on our server still works. Performing the actual checkout fails on tokenization.
I receive the following exception:
{
"paymentResource": {
"errorName": "invalid_client",
"errorMessage": "Client Authentication failed",
"errorDetails": null,
"debugId": "84b227241374e",
"paypalHttpStatus": 401
}
}
The whole setup works using the test access_token btw :/
My current assumption is that the Braintree SDK access_token is somehow coupled to the default REST API App (email-facilitator#domain.tld). I deleted this default REST API App.
I found the following FAQ article which I believe proves the assumption might be correct: https://www.paypal-knowledge.com/infocenter/index?page=content&id=FAQ1938&expand=true&locale=en_US
We now switched to a different PayPal account as we could not figure out what was going wrong. Without changing any code except for the new access_token, everything started working again.
Has anyone experienced this or something similar before?
Does anyone know how I can either
Delete the Braintree Account or regenerate it (which will hopefully restore the link to my new REST API App)? or
Restore the link between my Braintree SDK access_token and my REST API app?
If something was unclear or if I can provide more context somewhere please let me know!
As Brian K correctly noted, the solution was to contact the PayPal technical support at paypal-techsupport.com/app/ask and ask for the deleted REST API app to be reinstated.
Everything is back to normal now.

Rest PayPal API Internal Service Error

Were getting a lot of #INTERNAL_SERVICE_ERROR's through the rest PayPal API. To get more details about the error we have been going the PayPal Tech Support. We've been able to fix some of the issues but it is taking us a lot longer than we would like. I was wondering if there was an API call that I could make that would give me the full details of the error or DebugID?
I am not sure how you are currently consuming the API, but https://developer.paypal.com/webapps/developer/docs/api/ specs the error object which has the debug_id, the PayPal internal identifier used for correlation purposes. The error object has information link and error_details object which has the detailed reasons for the error
If you are using an sdk to consume, it is possible to get the debug_id in your logs: https://github.com/paypal/rest-api-sdk-nodejs#debugging and https://github.com/paypal/rest-api-sdk-python#create-payment show ways to do that in Python and Node.
I myself am looking for the same information. But it appears the debug ID is only so Paypal support can correlate the error to a transaction event. Technically there is no other information associated with the Debug ID.
See Receiving INTERNAL_SERVICE_ERROR REST API

Receiving INTERNAL_SERVICE_ERROR REST API

Using REST API, sandbox and attempting to get bearer token. Receiving the following error
{"name":"INTERNAL_SERVICE_ERROR","information_link":"https://api.sandbox.paypal.com/docs/api/#INTERNAL_SERVICE_ERROR","debug_id":"5a235c510522b"}
How can I find out what the debug id means?
The 'debug_id' is an internal identifier we can use to pull up the request within PayPal.
You may see our classic API calls refer to this as the 'correlationID'.
Unfortunately I'm not finding anything in our system for this debug_id. Can you log a ticket (www.paypal.com/mts) or email me (address in profile) with details of the call, including your full HTTP request (minus credentials) and the resources you tried to access, as well as the full HTTP response?
I suggest we close this answer as it's not strictly programming-related, but I can continue working on this via mail / ticket with you.
By the way; if you're using the 4111111111111111 credit card: this card number is currently inoperable in the Sandbox environment and may throw 'internal service error' type responses as well. You can use any other card number instead.