Reference guide · updated for 2026

PayPal sandbox test cards work differently than you'd expect.

PayPal's sandbox doesn't rely on a small fixed list of numbers the way Stripe does — it accepts any card number that passes the Luhn checksum. Here's how that actually works, and where a generator fits in.

Ad unit — 728×90 placeholder

How PayPal's Sandbox Testing Actually Works

PayPal's own developer support documentation and community team confirm it directly: the sandbox environment doesn't check a submitted card number against a reserved list the way Stripe does. Instead, it validates the number using the Luhn checksum — the same public formula real card issuers use — and generally accepts anything that passes.

That's why PayPal ships its own built-in "Credit Card Generator" tool for developers. It exists specifically because sandbox testing here is about generating plausible, unique numbers, not memorizing a fixed table of special ones.

FieldWhat to use
Expiration dateAny future date
CVV — Visa, Mastercard, Discover, Diners123 (or any 3 digits)
CVV — American Express1234 (or any 4 digits)
Ad unit — in-content responsive placeholder

Why Reusing the Same Test Card Causes Problems

The number 4111 1111 1111 1111 is probably the most widely known "test card" on the internet — which is exactly the problem. It's reused by so many developers worldwide that PayPal's fraud detection has been documented to flag and reject it outright, returning a generic processing error that has nothing to do with your integration.

PayPal's own guidance in that situation is straightforward: stop using the famous shared number, and generate a fresh one instead. This is precisely the gap a bulk generator like Luhnly closes — every number is unique, so you're not competing with millions of other developers' test traffic for the same handful of digits.

In practice: because PayPal validates on the Luhn checksum rather than a reserved list, numbers generated by Luhnly are structurally the same kind of data PayPal's own generator produces. Always confirm against PayPal's current sandbox documentation before relying on this in an automated test suite, since processor behavior can change.

Simulating Declines and Errors

PayPal handles this differently from Stripe, too. Rather than encoding the scenario into the card number itself, PayPal's Expanded Checkout testing tools let you enter a documented rejection trigger string into the cardholder's name field — for example, CCREJECT-REFUSED — alongside an otherwise normal test card number. The sandbox reads that trigger and returns the matching decline response.

The full list of trigger codes and the scenarios they simulate is maintained directly in PayPal's official card testing documentation — worth bookmarking, since PayPal updates this list independently of the card numbers themselves.

Generate test card numbers →

Frequently Asked Questions

Can I use a Luhnly-generated number with PayPal's sandbox?

Yes, generally. Unlike Stripe, PayPal's sandbox is documented to accept any card number that passes the Luhn checksum, rather than requiring one from a small fixed list. A Luhn-valid generator like Luhnly can produce usable PayPal sandbox test cards directly.

Why does PayPal recommend against reusing the same test card number?

Widely shared numbers like 4111 1111 1111 1111 are used by so many developers worldwide that PayPal's fraud detection sometimes flags and blocks them. PayPal's own documentation recommends generating fresh, unique card numbers instead — which is exactly what a bulk generator is for.

How do I simulate a declined payment in PayPal's sandbox?

PayPal doesn't encode the scenario in the card number the way Stripe does. Instead, you enter a documented rejection trigger string (such as CCREJECT-REFUSED) in the cardholder's name field alongside a normal test card number, which simulates the corresponding decline response. See PayPal's official documentation for the complete, current list.