An Authorize.net test card is a card number published by Authorize.net for use in its sandbox environment. It has the same length, prefix, and checksum as a real card, so the gateway accepts it during a test transaction while no actual money moves. Test cards work only in a sandbox account and are rejected by a live payment gateway.

What an Authorize.net test card actually is

The sandbox is a separate copy of the gateway that behaves like the live one but settles nothing. Because the sandbox still validates card numbers before it sends a request, you cannot type in random digits. Each test card is a valid number that passes the Luhn check the gateway runs on the card field, which lets you exercise the same code path your production integration uses.

Authorize.net assigns a documented behavior to each test card and to specific test values for address and card code checks. One card returns an approval, others return declines or specific response codes, so you can build error handling around real responses instead of guessing.

Authorize.net test card numbers by brand

These numbers appear in Authorize.net and processor testing documentation. They are published for sandbox use only.

  • Visa: 4007000000027 and 4012888818888
  • Mastercard: 5424000000000015
  • American Express: 370000000000002
  • Discover: 6011000000000012
  • JCB: 3088000000000017
  • Diners Club: 38000000000006 (14 digits)

If you need a decline or a particular response code rather than an approval, use the full test card table in the developer documentation instead of the short list above.

Details you can usually leave alone in the sandbox

Test transactions do not require matching personal information, but the fields still have to be filled with something plausible.

  • Expiration date: any date in the future. The sandbox checks format, not validity.
  • Card code: any three digits, or four digits for American Express.
  • Billing address and ZIP: any well formed US address, unless you are testing a specific address verification response.
  • Amount: any value that fits your test scenario, including refunds and partial captures.

How to run a test transaction

  1. Sign in to your sandbox account at the Authorize.net testing site, not your live merchant interface.
  2. Confirm your API login ID and transaction key come from the sandbox account. Mixing live credentials with test cards is the most frequent cause of failures.
  3. Submit a payment with one of the test card numbers, a future expiration date, and a card code.
  4. Check the response in the transaction detail view, then repeat with a refund, a void, and a decline case.
  5. Log the response codes your integration receives and make sure each one maps to a message a customer can understand.

Test cards versus live cards

Live cards do not work in a sandbox account, and test cards do not work against a production gateway. The environments use different credentials, different endpoints, and different databases, so a passing sandbox test says nothing about your live merchant account configuration. Before you launch, run one real transaction with a card you own and a small amount, then refund it.

Common problems with test transactions

  • Using live API credentials in a test script, which returns an authentication error rather than a card response.
  • Storing sandbox URLs in the production configuration file, or the reverse.
  • Assuming every test card approves. Some are designed to return declines, and that is intentional.
  • Testing only the happy path, then discovering that expired card, insufficient funds, and card code failures are unhandled.
  • Forgetting that email receipts and customer notifications may still be sent from the sandbox, so use addresses you control.

A short session with the right Authorize.net test card covers approvals, refunds, voids, and declines in an hour. That is enough to trust your checkout before real money is involved.