Platform
Gateway Sandbox Cards
Sandbox card numbers, test credentials and test nonces published by each gateway, for when your gateway connection uses that gateway's sandbox credentials.
Overview
These numbers are published by each gateway for its own sandbox environment. They only have an effect when a payment actually reaches the gateway, which happens when your gateway connection is set up with that gateway's sandbox (test) credentials. The gateway's sandbox then decides the outcome: success, decline, 3D Secure challenge, and so on.
- Payments created with
POST /api/v1/paymentsfollow your account mode: in test mode they are routed only to sandbox connections, so these cards work there; in live mode they are routed only to live connections, where these cards are rejected. - Payments made through the payment link direct pay endpoint are routed to your active gateway connections in either account mode, including connections that use sandbox credentials.
- Hosted checkout only calls a gateway when your account is in live mode, and in live mode it only routes to connections set to live. While your account is in test mode, hosted checkout simulates every payment as successful without contacting any gateway, so these cards have no effect there.
Stripe
Stripe provides deterministic test card numbers. Each number triggers a specific outcome when your Stripe connection uses Stripe test-mode keys (sk_test_ / pk_test_).
| 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 0259 | Visa | Succeeds, then disputed as fraudulent | 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.
- Connect Razorpay with your Razorpay test key (rzp_test_...) to reach the Razorpay test environment.
- 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 |
| 3700 0000 0000 002 | 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.
Square
Square provides sandbox-specific card numbers. Use the Square Sandbox application ID and access token.
| Card number | Brand | Outcome | CVC |
|---|---|---|---|
| 4111 1111 1111 1111 | Visa | Payment succeeds | 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 sandbox testing 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.
- The UAT environment simulates the payment flow without real bank interaction.
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 conventions apply to most gateway sandboxes. Where a gateway publishes a specific value, the gateway's value wins.
| Field | Guidance |
|---|---|
| Expiry date | Use any date in the future (e.g. 12/30) unless the gateway specifies one (Adyen uses 03/30). |
| 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 gateway sandboxes ignore this field entirely. |
| 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 | Most sandboxes accept any value. Some skip address verification (AVS) entirely. |
| Currency | Send 3-letter uppercase ISO 4217 codes (e.g. USD, INR, EUR) to PaymentHooks. A gateway sandbox may support fewer currencies than its live environment. |