How Razorpay test cards work
Razorpay test cards only work with your test API keys (they start with rzp_test_). No money is deducted. If you use them with live keys you get “card issuer is invalid” or “invalid card input”.
Use any CVV and any future expiry date. In test mode Razorpay shows a mock bank page with Success and Failure buttons. When an OTP is requested, any OTP of 4 to 10 digits succeeds and any shorter OTP fails.
For UPI, use success@razorpay to simulate a successful payment and failure@razorpay for a failed one. These are for domestic one-time payments. In test mode, cancelling a UPI payment still ends in success, so test cancellations in live mode.
Indian cards are subject to RBI rules on card storage and recurring payments, which is why Razorpay keeps separate cards for subscriptions and EMI. Test each payment type you plan to offer with its own cards, and test international cards only if international payments are enabled on your account.
International cards
Use these when international payments are enabled on your account.
| Brand | Number | Result | Copy |
|---|---|---|---|
| Mastercard | 5555 5555 5555 4444 | Succeeds (international) | |
| Mastercard | 5105 1051 0510 5100 | Succeeds (international) | |
| Mastercard | 5104 0600 0000 0008 | Succeeds (international) | |
| Visa | 4012 8888 8888 1881 | Succeeds (international) |
Subscriptions and EMI
Cards for recurring payments (subscriptions) and EMI (instalments).
| Brand | Number | Result | Copy |
|---|---|---|---|
| Visa | 4718 6091 0820 4366 | Subscription payment succeeds | |
| Mastercard | 5104 0155 5555 5558 | Subscription payment succeeds | |
| Mastercard | 5104 0600 0000 0008 | Subscription payment succeeds | |
| Mastercard | 5241 8100 0000 0000 | EMI payment succeeds |
Error scenarios (select “Failure” on the mock bank page)
Start a payment with one of these cards, then click Failure on the mock bank page to get the error shown. Each error has a Visa and a Mastercard card.
| Brand | Number | Result | Copy |
|---|---|---|---|
| Visa | 4100 2800 0009 0000 | payment_timed_out (BAD_REQUEST_ERROR) | |
| Mastercard | 5305 6200 0006 0000 | payment_timed_out (BAD_REQUEST_ERROR) | |
| Visa | 4100 2800 0008 0001 | insufficient_fund (BAD_REQUEST_ERROR) | |
| Mastercard | 5305 6200 0005 0001 | insufficient_fund (BAD_REQUEST_ERROR) | |
| Visa | 4100 2800 0007 0002 | payment_cancelled (BAD_REQUEST_ERROR) | |
| Mastercard | 5305 6200 0004 0002 | payment_cancelled (BAD_REQUEST_ERROR) | |
| Visa | 4100 2800 0006 0003 | card_declined (BAD_REQUEST_ERROR) | |
| Mastercard | 5305 6200 0003 0003 | card_declined (BAD_REQUEST_ERROR) | |
| Visa | 4100 2800 0005 0004 | card_declined (BAD_REQUEST_ERROR) | |
| Mastercard | 5305 6200 0002 0004 | card_declined (BAD_REQUEST_ERROR) | |
| Visa | 4100 2800 0004 0005 | card_declined (BAD_REQUEST_ERROR) | |
| Mastercard | 5305 6200 0001 0005 | card_declined (BAD_REQUEST_ERROR) | |
| Visa | 4100 2800 0003 0006 | card_disabled_for_online_payments (BAD_REQUEST_ERROR) | |
| Mastercard | 5305 6200 0000 0006 | card_disabled_for_online_payments (BAD_REQUEST_ERROR) | |
| Visa | 4100 2800 0001 0008 | card_number_invalid (BAD_REQUEST_ERROR) | |
| Mastercard | 5305 6200 0008 0008 | card_number_invalid (BAD_REQUEST_ERROR) | |
| Visa | 4100 2800 0002 0007 | gateway_technical_error (GATEWAY_ERROR) | |
| Mastercard | 5305 6200 0009 0007 | gateway_technical_error (GATEWAY_ERROR) | |
| Visa | 4100 2800 0000 0009 | authentication_failed (GATEWAY_ERROR) | |
| Mastercard | 5305 6200 0007 0009 | authentication_failed (GATEWAY_ERROR) |
Testing Razorpay payments step by step
- Generate test API keys in the Razorpay Dashboard (test mode).
- Open Checkout with a test order and pay with a domestic card; choose Success on the mock bank page.
- Repeat with each error card and choose Failure to check your handling of each error reason.
- Verify the payment signature on your server and test your webhooks with the test events.
Common errors and fixes
- “Card issuer is invalid”
- You are using test cards with live API keys.
- Error card returns success
- Choose Failure on the mock bank page; the card only sets which error is returned.
- Saved card disappears
- Card tokens in test mode are only valid for 3 days.
Sources
Every number on this page was copied from Razorpay’s official documentation and passes the Luhn check. Checked October 2026; gateways change their test data from time to time, so if a number stops working, check the source:
- Razorpay docs – Test Cards Details to Test Payments and Subscriptions
- Razorpay docs – Test UPI ID Details
Frequently asked questions
What is the Razorpay test card number?
For domestic payments, 4100 2800 0000 1007 (Visa) or 5555 5100 0008 1006 (Mastercard). Use any CVV and any future expiry date.
What OTP should I use in Razorpay test mode?
Any OTP of 4 to 10 digits succeeds. An OTP shorter than 4 digits fails.
What is the Razorpay test UPI ID?
success@razorpay for a successful payment and failure@razorpay for a failed one.
Can I use these test cards on another gateway?
Usually not. Each gateway only recognises its own documented test numbers in its own sandbox. Some numbers, such as 4111 1111 1111 1111, appear in several lists, but the results they trigger differ. For format-only testing on your own forms, use our card generator.