Platform
Test Cards
Reference of test card numbers, sandbox credentials, and test nonces for every payment gateway supported by PaymentHooks.
Overview
When your PaymentHooks account is in test mode, payments are routed to each gateway's sandbox or test environment. Use the card numbers below to simulate successful charges, declines, 3D Secure challenges, and other scenarios without moving real money.
Stripe
Stripe provides deterministic test card numbers. Each number triggers a specific outcome in test mode.
| Card number | Brand | Outcome | CVC |
|---|---|---|---|
| 4242 4242 4242 4242 | Visa | Payment succeeds | Any 3-digit |
| 4000 0000 0000 0002 | Visa | Card declined | Any 3-digit |
| 4000 0025 0000 3155 | Visa | Requires 3D Secure | Any 3-digit |
| 4000 0000 0000 9995 | Visa | Insufficient funds | Any 3-digit |
| 5555 5555 5555 4444 | Mastercard | Payment succeeds | Any 3-digit |
| 3782 822463 10005 | Amex | Payment succeeds | Any 4-digit |
| 4000 0000 0000 3220 | Visa | 3DS 2 authentication | Any 3-digit |
| 4000 0000 0000 0077 | Visa | Succeeds then auto-disputes | Any 3-digit |
Razorpay
Razorpay test mode accepts any valid card number. Use these standard numbers or any syntactically valid card.
| Card number | Brand | Outcome | CVC |
|---|---|---|---|
| 4111 1111 1111 1111 | Visa | Payment succeeds | Any 3-digit |
| 5267 3181 8797 5449 | Mastercard | Payment succeeds | Any 3-digit |
- In Razorpay test mode, any valid card number is accepted and always succeeds.
- Use the Razorpay test key (rzp_test_...) to enable test mode.
- OTP on the test checkout page: enter any valid OTP or click 'Success' on the test screen.
PayPal
PayPal uses sandbox accounts instead of test card numbers. Create buyer/seller sandbox accounts in the PayPal Developer Dashboard.
- Create sandbox accounts at developer.paypal.com under Sandbox > Accounts.
- Sandbox buyer email format: [email protected] with the generated password.
- For credit card testing in sandbox, use the card numbers auto-generated for your sandbox buyer account.
- Sandbox transactions never move real funds. Use REST API sandbox endpoint: api-m.sandbox.paypal.com.
Cashfree
Cashfree provides specific test card numbers for success and failure scenarios in test mode.
| Card number | Brand | Outcome | CVC |
|---|---|---|---|
| 4111 1111 1111 1111 | Visa | Payment succeeds | 123 |
| 4000 0000 0000 0002 | Visa | Payment fails | 123 |
| 5555 5555 5555 4444 | Mastercard | Payment succeeds | 123 |
- Use Cashfree test app ID and secret key from the Cashfree Dashboard (test mode).
- Test OTP: 123456 when prompted on the Cashfree test checkout.
- Test expiry: any future date (e.g. 12/30).
Adyen
Adyen provides dedicated test card numbers for different card brands. Use your test merchant account for testing.
| Card number | Brand | Outcome | CVC |
|---|---|---|---|
| 5555 4444 3333 1111 | Mastercard | Payment succeeds | 737 |
| 3742 5101 8720 018 | Amex | Payment succeeds | 7373 |
| 4111 1111 1111 1111 | Visa | Payment succeeds | 737 |
| 4212 3456 7891 0006 | Visa | Requires 3D Secure | 737 |
- Use expiry date 03/30 and CVC 737 (or 7373 for Amex).
- Adyen test environment prefix: use 'Test' merchant account, not the live one.
- Amount-based outcomes: amount ending in 51 triggers 'Refused'; ending in 00 triggers 'Authorised'.
Square
Square provides sandbox-specific card numbers. Use the Square Sandbox application ID and access token.
| Card number | Brand | Outcome | CVC |
|---|---|---|---|
| 4532 0151 1283 0366 | Visa | Payment succeeds (nonce: cnon:card-nonce-ok) | 111 |
| 5105 1051 0510 5100 | Mastercard | Payment succeeds | 111 |
| 6011 0000 0000 0004 | Discover | Payment succeeds | 111 |
- Square sandbox uses test nonces instead of raw card numbers in API calls.
- Success nonce: cnon:card-nonce-ok. Decline nonce: cnon:card-nonce-declined.
- Use sandbox credentials from the Square Developer Dashboard.
Braintree
Braintree test mode uses test nonces for client-side integrations and specific card numbers for server-side testing.
| Card number | Brand | Outcome | CVC |
|---|---|---|---|
| 4111 1111 1111 1111 | Visa | Payment succeeds | Any 3-digit |
| 5555 5555 5555 4444 | Mastercard | Payment succeeds | Any 3-digit |
| 4000 1111 1111 1115 | Visa | Processor declined | Any 3-digit |
- Preferred approach: use test nonces (fake-valid-nonce, fake-processor-declined-nonce).
- Test nonce for success: fake-valid-nonce. Test nonce for decline: fake-processor-declined-nonce.
- Sandbox environment URL: api.sandbox.braintreegateway.com.
PhonePe
PhonePe test mode uses the UAT (User Acceptance Testing) environment. No specific test card numbers are needed.
- Use PhonePe UAT merchant credentials from the PhonePe Developer Portal.
- UAT base URL: api-preprod.phonepe.com/apis/pg-sandbox.
- Test mode auto-completes the payment flow without real bank interaction.
- Callback URL receives test payment status — verify webhook signature with your test salt key.
Paytm
Paytm staging environment accepts test card numbers and test credentials for end-to-end testing.
| Card number | Brand | Outcome | CVC |
|---|---|---|---|
| 4111 1111 1111 1111 | Visa | Payment succeeds | 123 |
| 5243 6800 0000 5765 | Mastercard | Payment succeeds | 123 |
- Use staging MID (Merchant ID) from the Paytm Developer Dashboard.
- Staging host: securegw-stage.paytm.in. Never use the production host for testing.
- Test OTP: 489871 (or as specified in the Paytm staging documentation).
- Test expiry: any future date (e.g. 01/30).
General guidance
These rules apply across all gateways when testing through PaymentHooks in test mode.
| Field | Guidance |
|---|---|
| Expiry date | Use any date in the future (e.g. 12/30). Most gateways do not validate the specific month/year in test mode. |
| CVV / CVC | Use any 3-digit number for Visa and Mastercard (e.g. 123). Use any 4-digit number for American Express (e.g. 1234). |
| Cardholder name | Use any name. Some gateways ignore this field entirely in test mode. |
| Amount-based outcomes | Several gateways support triggering specific outcomes based on the payment amount. Check each gateway's documentation for amount-to-outcome mappings. |
| Postal / ZIP code | Any value is accepted in test mode. Some gateways skip address verification (AVS) entirely during testing. |
| Currency | Test transactions support all currencies that the gateway supports in production. Always use lowercase ISO 4217 codes (e.g. usd, inr, eur). |