A PayPal sandbox test card is a fake card number that PayPal generates inside its Developer Dashboard so you can test checkout flows without touching a real card or moving real money. The numbers come from your own sandbox test accounts, they work only in the PayPal sandbox environment, and they can never be charged in live mode.

If you build or maintain a store, a subscription flow, or a billing integration, you will run into this quickly: you need a successful payment, then a declined one, then a refund, all before a customer ever sees the button. That is the job the PayPal sandbox test card does.

What the sandbox test card actually is

The sandbox is a copy of the PayPal payment flow that runs on PayPal's testing servers. Test accounts inside it behave like buyer and seller accounts but have no link to a bank. PayPal attaches one or more card numbers to those test accounts, and each card comes with an expiration date and a card security code you can read on screen.

Because nothing is funded, the card exists purely to return a result to your code: approved, declined, or an error your integration should handle.

Where to find your test card numbers

  1. Sign in to the PayPal Developer Dashboard with the account that owns your app.
  2. Open Testing Tools and then Sandbox Accounts.
  3. Pick a buyer test account and choose View/Edit Account.
  4. Look at the payment methods section for the generated card, expiration date, and CSC.
  5. Repeat with a second buyer account if you want distinct cards for separate test scenarios.

Cards are tied to the test account that owns them. They do not carry over to a new app, and a card deleted from a test account stops working right away.

How to run a test payment

  1. Switch your API credentials from live to sandbox in your PayPal app settings.
  2. Trigger your checkout from your test storefront.
  3. Log in with the sandbox buyer account, not your personal PayPal login.
  4. Enter the sandbox test card number, expiration date, and CSC exactly as listed.
  5. Confirm the result in the Dashboard and in your own order records.

Run the same flow a second time with a different test account so you can compare an approved order with a declined one and check that your error messaging is readable.

Why a sandbox test card gets declined

  • The card was entered in live mode, where it does not exist.
  • The app is pointing at live credentials while the browser session uses a sandbox login.
  • The test card expired, since generated cards carry a fixed date.
  • The buyer account was regenerated, which invalidates the old card data.
  • The billing address or CSC does not match what PayPal expects for that test account.

Sandbox cards versus real card numbers

Never paste a real card number into a test environment. Card industry rules treat test and staging systems as out of scope for cardholder data, and storing live numbers there creates a compliance problem with no benefit. Sandbox cards are designed precisely to remove that need: they mimic the fields, the validation, and the response codes while staying worthless to anyone who finds them.

If someone offers to sell you a "PayPal sandbox card," remember that PayPal issues them free with a developer account. A paid number is either a copy of a publicly documented test value or a real card being passed off as a test one, and neither belongs in your integration.

Quick checklist

  • Use the Developer Dashboard as your only source of test cards.
  • Keep sandbox and live credentials in separate configuration files.
  • Test approval, decline, refund, and cancellation paths before launch.
  • Clear test cards out of your code before you ship to production.