Reference guide
PayPal Test Cards: Sandbox Card Numbers, Decline Triggers and 3D Secure
The card numbers PayPal gives you for sandbox testing, how to make a card payment decline on purpose, which cards drive each 3D Secure outcome, and how to force API errors your integration has to handle.
Checked against PayPal’s card testing documentation on . PayPal adds and retires test cards; confirm a number there before you depend on it.
How to use PayPal test cards
PayPal's test cards are for card payments in the sandbox: Expanded Checkout (advanced card fields) and saved payment methods. No money moves. Before you enter one, check that:
- Your integration runs in sandbox mode, with a sandbox client ID, and calls the
api-m.sandbox.paypal.comendpoints. - You enter a future expiration date and a 3-digit CVV, or a 4-digit CVV for American Express.
Paying with a PayPal wallet in the sandbox is different: the buyer logs in with a sandbox personal account and the payment lands in a sandbox business account. PayPal creates one of each the first time you log into the Developer Dashboard, and you can add more under Testing Tools > Sandbox Accounts.
Never test with real card details. Test cards are only accepted by the sandbox, and a real card entered there isn't charged, so it tells you nothing about how live payments behave.
PayPal sandbox test card numbers
These static numbers succeed in Expanded Checkout and in saved payment method flows.
| Card type | Test number |
|---|---|
| Visa | 4012888888881881 |
| Visa | 4005519200000004 |
| Visa | 4012000033330026 |
| Visa | 4012000077777777 |
| Visa | 4217651111111119 |
| Visa | 4500600000000061 |
| Visa | 4772129056533503 |
| Visa | 4915805038587737 |
| Mastercard | 2223000048400011 |
| American Express | 371449635398431 |
| American Express | 376680816376961 |
| Diners Club | 36461510000039 |
| Diners Club | 36461510000013 |
| Maestro | 6304000000000000 |
| Maestro | 5063516945005047 |
| China UnionPay (CUP) | 6200680000000004 |
| China UnionPay (CUP) | 6200680000000038 |
| JCB | 3636500000000260 |
| JCB | 3636500000000989 |
When you need more numbers, use the credit card generator on PayPal's card testing page. A generated card can be used directly in a card payment or added to a sandbox account as one of its payment methods.
Declined payments: rejection triggers
PayPal doesn't use a separate card number per decline reason. Instead, you pay with a normal test card (PayPal suggests the Visa 4012 8888 8888 1881) and put a rejection trigger where the cardholder's name goes:
- In a checkout form: type the trigger into the First Name or Name on Card field.
- Through the Orders API: set the card's name, or
address_line_1, to the trigger in thepayment_sourceof your create order call.
| Scenario | Trigger | Processor response code | Description |
|---|---|---|---|
| Card refused | CCREJECT-REFUSED | 0500 | DO_NOT_HONOR |
| Fraudulent card | CCREJECT-SF | 9500 | SUSPECTED_FRAUD; don't retry the same card |
| Card expired | CCREJECT-EC | 5400 | EXPIRED_CARD |
| Luhn check fails | CCREJECT-IRC | 5180 | INVALID_OR_RESTRICTED_CARD; don't retry the same card |
| Insufficient funds | CCREJECT-IF | 5120 | INSUFFICIENT_FUNDS |
| Card lost or stolen | CCREJECT-LS | 9520 | LOST_OR_STOLEN; don't retry the same card |
| Card not valid | CCREJECT-IA | 1330 | INVALID_ACCOUNT |
| Card declined | CCREJECT-BANK_ERROR | 5100 | GENERIC_DECLINE |
| CVC check fails | CCREJECT-CVV_F | 00N7 | CVV2_FAILURE_POSSIBLE_RETRY_WITH_CVV |
Triggers are case-sensitive. Every rejection returns the AVS code G (globally unavailable) and the CVV code P (not processed).
A declined card doesn't fail the API call. The order can still come back withstatusCOMPLETEDwhile the capture inside it isDECLINED, so readpurchase_units[].payments.captures[].statusandprocessor_response.response_coderather than the order's top-level status.
3D Secure test cards
Plain test cards don't produce a meaningful 3D Secure result. To test authentication, create an order with one of PayPal's 3D Secure test cards and pass SCA_ALWAYS as the verification.method to force 3D Secure. Follow the payer-action link in the response (the sandbox approves the order when you visit it), then get the order and check its authentication_result.
| Scenario | Visa | Mastercard | Expected authentication_result |
|---|---|---|---|
| Successful frictionless | 4868719196829038 | 5329879707824603 | liability_shift POSSIBLE, authentication_status Y |
| Failed frictionless | 4868719158130060 | 5329879769571910 | liability_shift NO, authentication_status N |
| Attempts stand-in frictionless | 4868719581920723 | 5329879715396727 | liability_shift POSSIBLE, authentication_status A |
| Unavailable frictionless | 4868719033482561 | 5329879705777613 | liability_shift NO, authentication_status U |
| Rejected frictionless | 4868719081564153 | 5319541865518409 | liability_shift NO, authentication_status R |
| Not available on lookup | 4868719488651967 | 5329879714462553 | liability_shift NO, enrollment_status U |
| Successful step-up (challenge) | 4868719166101368 | 5329879735316929 | liability_shift POSSIBLE, authentication_status Y |
| Failed step-up (challenge) | 4868719181895556 | 5329879768013724 | liability_shift NO, authentication_status N |
| Step-up unavailable | 4868719557718580 | 5329879734808405 | liability_shift NO, authentication_status U |
Every scenario except "not available on lookup" also returns enrollment_status Y. PayPal lists the same scenarios with Discover, JCB, Diners and CUP cards for the US, and local cards for Great Britain, China, Australia, France, Germany, Italy, Japan, Mexico and Spain (not every country has every scenario), on its 3D Secure test scenarios page.
The cards above only work for purchases. Saving a card with 3D Secure through the Payment Method Tokens v3 API uses a separate set (for example 4000000000002701 for a successful no-challenge authentication on Visa), and those cards need an expiration month of 01 and a year three years from now. Don't mix the two sets: each only works for its own flow.
Forcing API errors with PayPal-Mock-Response
Some failures don't come from the card at all: a duplicate invoice ID, an authorization that can't be captured, a refund that's refused. To make the sandbox return one of those, add the PayPal-Mock-Response header to the call with the error code you want:
PayPal-Mock-Response: {"mock_application_codes": "DUPLICATE_INVOICE_ID"}
The header works on Orders API v2 calls (create, update, show, authorize, capture) and Payments API v2 calls (show, capture and void an authorization, show and refund a capture, show a refund). The codes you can mock are the ones in PayPal's Orders API and Payments API error message references. Without the header, the sandbox returns its real response.
What to test with them before going live
PayPal's own pre-launch checklist for card payments comes down to these flows, each run in the sandbox with a test card:
- Accept a payment: pay on your checkout page with a test card, confirm the order was processed, then log into the sandbox business account and check the payment shows in its activity.
- Decline a payment: repeat with a rejection trigger in the name field and check your page shows the decline message, and that the API response carries the matching processor response code.
- Authenticate with 3D Secure: use a 3D Secure test card with
SCA_ALWAYSand check theauthentication_resultmatches the scenario. - Authorize and capture: create an order with intent
AUTHORIZE, authorize it, capture the authorization and check the capture isCOMPLETED. - Void: authorize an order, then void the authorization before it's fully captured.
- Refund: refund a fully captured payment and check the response has a refund ID and status
COMPLETED.
The order of those calls matters as much as the card. See PayPal capture, authorize and void flows in order processing and, for saved cards, PayPal advanced credit card payments and vaulting flow.
What PayPal test cards don't cover
A test card decides how one card payment ends. It doesn't make the sandbox behave like production:
- The sandbox leaves out some live features, so a flow that passes there can still fail in production. PayPal sandbox limitations that break integration testing lists the gaps.
- Webhooks arrive on PayPal's schedule and can be retried, so handlers need to cope with late and repeated events. See PayPal webhook event reliability and retry behavior.
- Sandbox accounts and orders keep their state between runs, which makes CI results drift. PayPal sandbox vs stateful simulator for CI pipelines compares the options.
Testing Stripe or Adyen as well? The equivalent lists are in Stripe test cards and Adyen test cards.
Frequently asked questions
What is the PayPal test credit card number?
PayPal publishes several. A common choice is the Visa 4012 8888 8888 1881, which it also suggests for decline testing. Use any future expiration date and any 3-digit CVV (4 digits for American Express), in sandbox mode only.
What expiry date and CVV do PayPal test cards use?
Any future expiration date and any 3-digit CVV, or a 4-digit CVV for American Express. The exception is the 3D Secure cards for saving payment methods, which need month 01 and a year three years from now.
How do I make a PayPal sandbox card payment decline?
Pay with a normal test card and enter a rejection trigger, such as CCREJECT-IF for insufficient funds, in the First Name or Name on Card field, or as the card name in an Orders API call. Triggers are case-sensitive.
Do PayPal test cards work in live mode?
No. They only work in the sandbox, with a sandbox client ID calling api-m.sandbox.paypal.com.
Sources
Related in Payment Flow Testing
- PayPal Sandbox Limitations That Break Integration Testing
Sandbox success doesn't guarantee production readiness without strategic gap testing.
- PayPal Capture, Authorize, and Void Flows in Order Processing
Understanding PayPal's state machine prevents payment failures during order processing.
- PayPal Advanced Credit Card Payments and Vaulting Flow
PayPal saves cards as reusable tokens for subscriptions and free trials.
- PayPal Sandbox vs Stateful Simulator for CI Pipelines
Use a stateful simulator alongside PayPal's sandbox for reliable CI testing.
- PayPal Webhook Event Reliability and Retry Behavior
Build webhook handlers that tolerate late, duplicate, and out-of-order PayPal events.