Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DoExpressCheckoutPayment or /execute transactions are always pending. Why?

Tags:

paypal

When I integrate PayPal with my sandbox test account, all transactions I create via the DoExpressCheckoutPayment API call, or PayPal's new /execute REST call are pending and I have to manually accept them, or I have to wait 3-5 days. Why?

like image 821
Robert Avatar asked Dec 08 '22 13:12

Robert


1 Answers

This would occur for both live and test transactions and depends on several factors.

PayPal will set the transaction to a 'pending' state if:

  1. The currency you are sending the transaction in is not a currently configured currency on your account
  2. 'Payment review' is enabled on your sandbox test account
  3. PayPal deems the live transaction requires manual review by a PayPal analyst
  4. The live or test transactions flags one of the Fraud Management Filters you have set up in your account, and the default action for the filter is set to 'Review'.
  5. Your buyer uses a non-instant funding source

1:

This usually happens if you create a US PayPal test account, and send transactions in GBP or EUR (or any other non-USD currency).

By default US accounts are configured to accept USD and asks you - the merchant - if you want to accept transactions in any other currency. For non-US accounts, they are typically configured to accept payments in USD and the currency of the country you're registered in (i.e., USD and GBP for British accounts, USD and EUR for Irish accounts).

If you want to change this behaviour, log into your live or test account, go to the profile, 'Payment receiving preferences', and change from "Ask me" to "No, accept them and convert them to [your primary currency]."

PayPal payment receiving preferences - accept currency screen

Alternatively you can go to 'Currencies' and open a new currency balance within your account.

2:

In order to ease the testing of pending transactions, PayPal's developer site allows you to enable specific sandbox (seller) accounts for 'payment review'.
Payment review will mean that all transactions sent to that account will be held for manual review. When payment review is switched off, all transactions are released and are completed.
This is functionality intended to simulate the live behaviour as explained in point #3.

You can enable or disable payment review via https://developer.paypal.com > Applications > Sandbox accounts > Click the little arrow for the business account > Profile > Settings.

PayPal developer site payment review toggle

3:

For live transactions, PayPal may opt to hold transactions for manual review.
This is more of a policy question, so I won't delve too deeply into it, but essentially PayPal deems it more risky than other transactions, thus requiring manual review by a PayPal analyst.
Once this review is completed, the payment is either completed or denied.
It's good practice to integrate with PayPal Instant Payment Notification, so you are notified whenever an action occurs on this transaction.

4:

PayPal offers a product for PayPal Website Payments Pro accounts called 'Fraud Management Filters'.
This products lets you selectively apply filters to your Pro transactions (those initiated via the DoDirectPayment API call).
For example, you might want to automatically deny or review all transactions where the IP address is known to be risky.
If you have enabled this filter, and the transaction triggers this filters, the transaction may be set to pending until such time you take an action on the transaction (either rejecting or accepting it).

For more information about PayPal's fraud management filters, I highly suggest reading the Fraud Management Filters guide at our developer site.

5:

Your buyer might have used a non-instant funding source such as a bank transfer or eCheck.
This may take 3-5 business days to clear and for the transaction to be marked as 'completed'.
If you're integrated with PayPal IPN, you will receive IPN message at the time of the transaction having been completed.

like image 171
Robert Avatar answered Jan 17 '23 12:01

Robert