Credit card failed payments in a Sandbox environment

This article explains why a test credit card fails in a Sandbox environment with PayPal APIs.

Affected products and versions

Issue

When using a test Visa credit card 4111 1111 1111 1111 from PayPal, sometimes it fails due to PayPal fraud policies with the following error::

Error happened when processing the request. Please try again later.

Cause

This error is displayed when PayPal flags a specific test credit card number for fraud. This happens because it is a test credit card number used by everyone around the world testing with PayPal APIs.

Solution

Use another test credit card. To generate mock credit cards you can use for testing:

  1. Go to the PayPal Developer Portal Credit Card Generator page.
  2. Log in to the PayPal Developer Portal Dashboard.
  3. Generate a test credit card.
recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a