Sandbox Environment
Test your integration thoroughly in our sandbox environment before going live. No real money, no risk. Our sandbox works exactly like production - same API, same behavior:Sandbox Features
No Real Money
Process test payments without financial risk
Test Cards
Use pre-defined test card numbers for success, decline, and 3DS scenarios
Full Feature Parity
All production features available in sandbox
Faster Processing
Instant processing for rapid testing
| Payment method | Sandbox testing | Feature guide |
|---|---|---|
| SPEI | Mock transfers can auto-complete; use webhook simulators for STP/OPM | SPEI Transfers |
| PayCash | Does not auto-complete; use the PayCash simulator | PayCash Payments |
| CIE Cash Net | Does not auto-complete; use the CIE Cash Net simulator | CIE Cash Net Payments |
Test Cards
Use these cards to test different scenarios:Successful Payments
| Card Number | Brand | Behavior |
|---|---|---|
4000000000002503 | Visa | Successful payment |
5200000000002151 | Mastercard | Successful payment |
For 3D Secure (3DS) testing, see the complete 3DS testing guide which includes specific test cards and amount thresholds for different 3DS scenarios.
Failed Payments
In sandbox, declines are triggered by the transaction amount, not the card number. You can use any of the test card numbers listed under “Successful Payments” (or a generic test card) — what determines the response is the amount you submit.How it works
The amount must end in two specific digits that map to a known decline reason. Use a base amount of 9000.xx wherexx is the response code you want to trigger. The same trigger amounts apply to all supported currencies (MXN, USD) in sandbox.
- Amounts in the API are submitted as integers in the smallest currency unit (cents).
- Example (MXN): to trigger “Expired card” (code
33), submitamount: 900033withcurrency: "MXN"(= 9000.33 MXN). - Example (USD): to trigger “No sufficient funds” (code
51), submitamount: 900051withcurrency: "USD"(= 9000.51 USD).
This amount-based trigger mechanism is only available in sandbox. In production, the same amounts are processed normally and will not generate synthetic declines.
Any other amount that does not match an entry below will be approved. To test a successful payment, use any amount that does not end in one of the listed two-digit codes.
Decline trigger amounts
| Amount (MXN) | API value (cents) | Decline reason |
|---|---|---|
| 9000.01 | 900001 | Refer to card issuer |
| 9000.02 | 900002 | Refer to special conditions for card issuer |
| 9000.03 | 900003 | Invalid merchant |
| 9000.04 | 900004 | Pick-up card |
| 9000.05 | 900005 | Do not honor |
| 9000.06 | 900006 | Error |
| 9000.07 | 900007 | Pick-up card, special condition |
| 9000.09 | 900009 | Request in progress (duplicate) |
| 9000.12 | 900012 | Invalid transaction |
| 9000.13 | 900013 | Invalid amount |
| 9000.14 | 900014 | Invalid card number (no such number) |
| 9000.15 | 900015 | No such issuer |
| 9000.17 | 900017 | Customer cancellation |
| 9000.22 | 900022 | Suspected malfunction |
| 9000.30 | 900030 | Format error |
| 9000.31 | 900031 | Bank not supported by switch |
| 9000.33 | 900033 | Expired card |
| 9000.34 | 900034 | Suspected fraud |
| 9000.35 | 900035 | Card acceptor contact acquirer |
| 9000.36 | 900036 | Restricted card |
| 9000.37 | 900037 | Card acceptor call acquirer security |
| 9000.38 | 900038 | Allowable PIN tries exceeded |
| 9000.39 | 900039 | No credit account |
| 9000.40 | 900040 | Command rejected |
| 9000.41 | 900041 | Lost card |
| 9000.43 | 900043 | Stolen card, pick-up |
| 9000.51 | 900051 | No sufficient funds |
| 9000.54 | 900054 | Expired card |
| 9000.55 | 900055 | Incorrect personal identification number |
| 9000.56 | 900056 | No card record |
| 9000.57 | 900057 | Transaction not permitted to cardholder |
| 9000.58 | 900058 | Transaction not permitted to terminal |
| 9000.61 | 900061 | Exceeds withdrawal amount limit |
| 9000.62 | 900062 | Restricted card |
| 9000.65 | 900065 | Exceeds withdrawal frequency limit |
| 9000.68 | 900068 | Response received too late |
Test Card Details
For all test cards:- Expiry Date: Any future date (e.g., 12/2025)
- CVC: Any 3 digits (e.g., 123)
- Billing Address: Any valid address
Test 3D Secure
Test the complete 3DS authentication flow using specific test cards and amount thresholds.Trigger 3DS Challenge
Use amounts >= 100,000 cents (1,000 MXN) with the 3DS test card:3DS Test Cards:
4000000000002503with amount >= 100,000 cents triggers full 3DS challenge4000000000002701with amount >= 100,000 cents triggers frictionless 3DS4000000000002701with amount < 100,000 cents skips 3DS entirely
Complete Authentication
When prompted for a verification code in sandbox, use:Complete 3DS Guide
Learn how to implement 3D Secure authentication
Test Refunds
Refunds process instantly in sandbox (instead of 5-10 days in production):Common Test Scenarios
Scenario 1: Successful Card Payment
COMPLETED, payment successful.
Scenario 2: Declined Payment
Trigger a decline by submitting one of the amounts listed in the Failed Payments table. Any test card works — the amount is what determines the response. The example below triggersExpired card (code 33) by submitting amount: 900033 (= 9000.33 MXN):
FAILED with Expired card reason.
To test a different decline reason, change the last two digits of the amount field to match the desired code from the table.
Same scenario in USD
The same trigger amounts work for any supported currency. The example below triggersNo sufficient funds (code 51) in USD by submitting amount: 900051 with currency: "USD":
FAILED with No sufficient funds reason.
Scenario 3: 3DS Authentication Flow
- Create payment with 3DS card
- Receive
PAYER_AUTHENTICATION_CHALLENGE_REQUIREDstatus - Display authentication challenge
- Customer enters code
123456 - Validate authentication
- Payment completes
Scenario 4: Save & Reuse Card
Scenario 5: Idempotency Test
Send the same request twice with sameexternalId:
Integration Testing Checklist
Test these scenarios before going live:Card Payment Processing
Card Payment Processing
- ✅ Successful payment with Visa
- ✅ Successful payment with Mastercard
- ✅ Successful payment with Amex
- ✅ Declined payment handling
- ✅ Expired card error
- ✅ Invalid CVC error
3D Secure Authentication
3D Secure Authentication
- ✅ Trigger 3DS challenge
- ✅ Display authentication iframe
- ✅ Handle successful authentication
- ✅ Handle failed authentication
- ✅ Handle authentication timeout
Saved Payment Methods
Saved Payment Methods
- ✅ Save card during payment
- ✅ Charge saved card
- ✅ Handle expired saved card
- ✅ Update saved card
Refunds
Refunds
- ✅ Full refund
- ✅ Partial refund
- ✅ Multiple partial refunds
- ✅ Handle refund errors
Error Handling
Error Handling
- ✅ Network errors
- ✅ Validation errors
- ✅ Declined payments
- ✅ Rate limiting
- ✅ Retry logic
Performance Testing
Test your integration under load:Go Live Checklist
Ready to switch to production?Get Production Credentials
Contact support@cheqpay.com for live API keys.
Going Live Guide
Complete production readiness checklist
Need Help?
API Reference
View complete API documentation
Error Handling
Learn how to handle errors
Best Practices
Follow recommended patterns
Contact Support
Get help from our team