Paypal REST API INSTRUMENT_DECLINED error recovery - paypal

I'm using Paypal REST to process payments.
Recently I've got INSTRUMENT_DECLINED error from my user.
User has been billed from his credit card and redirected to Success endpoint.
API returned INSTRUMENT_DECLINED error, so my UI has shown Error 500.
I can't see the payment in paypal admin ui.
User lost his money. He feels upset.
It seems to be a common problem, handled well in Classic API:
https://developer.paypal.com/docs/classic/express-checkout/ht_ec_fundingfailure10486/
So in Classic API if I get an error, I just redirect a user back to Paypal, so that Paypal guides him. Paypal knows what happened and what to do, it's ok.
But I can't find any docs about processing error recovery in REST API.
Should I hack into classic express checkout with my REST-gathered data?
Or is there any proper way to make the good user experience in case of a problem on paypal's side?

Related

Paypal Express Checkout NVP unable to processes order with this account

I am trying to implement Paypal Express checkout with my site.
I am able to generate the token using the "SetExpressCheckout" API call, and the user is redirected to the Paypal login page.
However, once the user logs in, they get the following error:
We're not able to process your payment using your PayPal account at this time. Please try again later.
This only happens on the live production. When using the sandbox everything seems to work.
I would really appreciate any suggestions as to what may be causing this and how to fix it, TIA!

Website Payment Pro Hosted Page Solution

I need to implement Website Payment Pro hosted page solution for my UK client.
After the discussion with the PayPal team and looking through the tech guide I did the following:
Call BMCreateButton API (end point url -https://api-3t.sandbox.paypal.com/nvp) to get the EMAILLINK
Redirect user to EMAILINK(securepayments.sandbox.paypal.com/webapps/HostedSoleSolutionApp/webflow/sparta/hostedSoleSolutionProcess?hosted_button_id=HSSS-jsCeH.xi9R3Q........) for the PP hosted page
User completes the payment at the hosted page
After the payment completion user is redirected back to my confirmation page.
In the response I only see 'tx' (TransactionId) and CSCMATCH(=M).
There is no PNREF or other status param which tells me if payment is 'AUTHORIZED', 'DECLINE' , 'CANCELLED' or any error message'.
I am comparing this solution with the payflow gateway hosted page solution (which is not available in UK) wherein i receive enough of the response params to make proper decision at my end after receiving the response.
Please advise.
PayPal's Website Payments Pro has ways for you to get this information, but they look very different from the Payflow product.
(The Payflow product was built by a different company that was later acquired by PayPal, which is why the two products look entirely different.)
The "PayPal way" to get this information is to use IPNs to securely verify the payment information. Some PayPal products also support PDT (https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/paymentdatatransfer/), which is basically the same as IPN except that you post to PayPal to get the verification rather than waiting for PayPal to post to you.
See also this integration guide, specifically chapter 7 "order processing", which explains how to do this:
https://www.paypalobjects.com/webstatic/en_GB/developer/docs/pdf/hostedsolution_uk.pdf
The separate round-trip to PayPal is to prevent someone from constructing a false transaction ID (and status information) and posting to your return URL to try to convince you they made a payment when they had not in fact done so.

Paypal Error: Dispatch Error

I set up the RESTful API for PayPal in .NET, using their sample. It kinda works... I did manage to create a payment, but when I use the approval URL, it always says: dispatch error.
What could be the problem?
As I found out, the problem was: I was logged in with my paypal account. I used the same browser instance for reading documents, checking my PayPal account AND testing. Bad idea. PayPal assumes, that you want to pay with your merchant account.
Solution: use a different browser, or turn on your private mode in the browser. (You can also clear your cache, but as soon as you log in to PayPal to check the payment, you are back to square one.)

Credit Card payments not working Paypal

Hi I am implementing paypal API on my website where different vendors come and sell their products.Currently I am using sandbox environment.Payments are working perfectly using paypal account but payments are not working using Credit Card.Getting following error:
We are sorry, we are experiencing temporary difficulties. Please try again later. If this error occurred while making a payment, avoid duplicate payments by checking your Account Overview before resending a payment.
For some browsers, this problem can be resolved by clearing or
deleting cookies.
Message 6838
Any ideas?
If this is an issue that is happening with every transaction, make certain that you are using live credentials with live endpoints.
If you are using Express Checkout make certain you have the correct API Signature credentials.
Below are two links for going live and correct API Endpoints:
PayPal Developer Site, Going Live
API Endpoints
If this is happening on only a handful of transactions it may be a technical issue.You can submit a ticket to PayPal Merchant Technical Support

Check if PayPal API/Service is available/up

I am integrating PayPal into a Java payment service and was wondering if there is easy way to tell if PayPal API is up and running. I checked the documentation and found the error code 10101 - This API Temporarily Unavailable but couldn't find a method that should be used to poll the service. The idea is if the API is down I won't show PayPal as available payment option. The actual integration is Express checkout.
It's very, very rare that Paypal live APIs go down (in 2009 PayPal was doing $3,000 per second in transactions so a downtime costs them LOTS of money). I don't know that I would make an API call just to see if it's down. Just handle the errors when they happen.