Overview
This guide provides comprehensive testing information for the Ionic Payment Gateway, including test card numbers, amounts, credentials, and scenarios to verify your integration.Test Mode
Enabling Test Mode
You can enable test mode in two ways: Option 1: Via Merchant Dashboard Enable test mode in your merchant control panel: Options > Settings > Transaction Options > Test Mode. This affects all transactions for your account. Option 2: Per-Transaction Parameter Add thetest_mode parameter to individual API requests:
- Transactions are processed but not settled
- No actual funds are transferred
- Test card numbers should be used
- Results appear in your test transaction reports
Test Credentials
API Security Keys
All API requests require authentication using your security key:| Credential | Value |
|---|---|
| security_key | Your API security key |
| API Endpoint | https://api.ionicfi.com/api/transact.php |
Generate API security keys from the merchant control panel under Settings > Security Keys. You can create separate keys for testing and production environments.
Three Step Redirect Testing
For Three Step Redirect integration testing:| Credential | Value |
|---|---|
| Username | demo |
| Password | password |
Test Card Numbers
Basic Test Cards
Use these card numbers for standard testing scenarios:- Visa
- Mastercard
- American Express
- Discover
- JCB
- Diners Club
| Card Number | CVV | Expiration | Result |
|---|---|---|---|
4111111111111111 | 999 | Any future date | Approved - Standard approval |
4000000000000002 | Any | Any future date | Declined - Generic decline |
4000000000000010 | 999 | Any future date | Approved - With full AVS match |
4000000000000028 | Any | Any future date | Declined - Insufficient funds |
4000000000000036 | Any | Any future date | Declined - Do not honor |
4000000000000044 | Any | Any future date | Declined - Card expired |
4000000000000051 | Any | Any future date | Declined - Invalid card number |
AVS/CVV Testing Cards
Test Address Verification System and Card Verification Value responses:| Card Number | AVS Response | CVV Response | Description |
|---|---|---|---|
4111111111111111 | X | M | Full match (address + ZIP + CVV) |
4000000000000002 | N | N | No match (address, ZIP, or CVV) |
4242424242424242 | Y | M | Address + 5-digit ZIP match, CVV match |
4000000000000101 | A | M | Address match only, CVV match |
4000000000000200 | Z | M | ZIP match only, CVV match |
4000000000000085 | N | M | No address match, CVV match |
4000000000000093 | Y | N | Address + ZIP match, CVV fail |
Use these cards to test your fraud prevention rules and AVS/CVV validation logic.
Partial Approval Testing
Test partial approval scenarios:| Card Number | Requested Amount | Approved Amount | Description |
|---|---|---|---|
4000000000000259 | $100.00 | $50.00 | Partial approval - 50% |
4000000000000267 | $100.00 | $75.00 | Partial approval - 75% |
Test Amounts
Use specific amounts to trigger different response scenarios:Amount-Based Testing
| Amount Pattern | Response | Description |
|---|---|---|
x.00 | Approved | Any amount ending in .00 |
x.01 | Declined | Any amount ending in .01 |
x.02 | Error | Any amount ending in .02 (processing error) |
x.05 | Approved | AVS mismatch (AVS=N) |
x.10 | Partial Approval | Approved for $50.00 |
x.27 | Declined | Insufficient funds |
x.51 | Declined | Do not honor |
Specific Test Amounts
ACH/eCheck Testing
Test Bank Accounts
Use these routing and account numbers for ACH testing:- Approved
- Declined
Routing Number:
123456789Account Numbers:| Account Number | Result |
|---|---|
9876543210 | Approved |
1111111111 | Approved |
2222222222 | Approved |
SEC Codes for Testing
| SEC Code | Description | Test Scenario |
|---|---|---|
WEB | Internet-initiated | Online checkout |
PPD | Prearranged Payment | Recurring billing |
TEL | Telephone-initiated | Phone orders |
CCD | Corporate Credit/Debit | B2B payments |
3D Secure Testing
Test Cards for 3DS Authentication
- Successful Authentication
- Failed Authentication
- Challenge Flow
| Card Number | 3DS Result | Description |
|---|---|---|
4000000000001000 | Authenticated | Full 3DS authentication successful |
4000000000001091 | Authenticated | Frictionless flow (no challenge) |
Fraud Detection Testing
Kount Testing
Test fraud detection with specific email patterns:| Email Pattern | Fraud Score | Risk Level | Action |
|---|---|---|---|
[email protected] | 10 | Low | Approve |
[email protected] | 50 | Medium | Review |
[email protected] | 90 | High | Decline |
[email protected] | 95 | Critical | Escalate |
Velocity Testing
Test velocity rules with rapid transactions:Digital Wallet Testing
Apple Pay Testing
Test Device Requirements:- Safari browser on macOS or iOS device
- Test Apple Pay account configured in Wallet
- Add test card
4111111111111111to Apple Wallet - Use in test environment for Apple Pay transactions
Google Pay Testing
Test Device Requirements:- Chrome browser or Android device
- Test Google Pay account
- Add test card
5424000000000015to Google Pay - Use test merchant ID provided by gateway
Customer Vault Testing
Test Customer IDs
Pre-configured test customer vault IDs:| Customer Vault ID | Payment Method | Details |
|---|---|---|
TEST_CUSTOMER_1 | Visa | •••• 1111, Exp: 12/25 |
TEST_CUSTOMER_2 | Mastercard | •••• 0015, Exp: 12/25 |
TEST_CUSTOMER_3 | ACH | Account ••••3210 |
Recurring Billing Testing
Test Subscription Scenarios
| Scenario | Configuration | Expected Result |
|---|---|---|
| Successful Recurring | plan_payments=3, day_frequency=1 | Charges on Day 1, 2, 3 |
| Failed Payment | Use card ending in .01 amount | First charge fails |
| Expired Card | Set ccexp to past date | Card declined after expiration |
Webhook Testing
Trigger Test Webhooks
Manual Testing:- Go to Merchant Control Panel > Webhooks > Test Events
- Select event type to test
- Click “Send Test Webhook”
Test Webhook Payloads
Example Test Webhook:Testing Checklist
Before going live, verify these scenarios:Basic Transactions
Basic Transactions
- Successful sale transaction
- Successful authorization
- Successful capture
- Successful void
- Successful refund
- Declined transaction handling
- Error handling
Payment Methods
Payment Methods
- Visa transactions
- Mastercard transactions
- American Express transactions
- Discover transactions
- ACH/eCheck transactions
- Apple Pay (if applicable)
- Google Pay (if applicable)
Fraud Prevention
Fraud Prevention
- AVS validation
- CVV validation
- Fraud score handling
- Velocity checks
- Address mismatch scenarios
Advanced Features
Advanced Features
- Customer Vault storage
- Customer Vault transactions
- Recurring billing setup
- Recurring payment processing
- 3D Secure authentication (if applicable)
- Partial approvals
- Level II/III data (if applicable)
Integration Points
Integration Points
- Webhook receipt and processing
- Webhook signature verification
- Query API transaction lookup
- Error logging
- Timeout handling
- Retry logic
User Experience
User Experience
- Clear error messages
- Payment form validation
- Loading states
- Success confirmation
- Receipt generation
- Email notifications
Testing Best Practices
Test All Scenarios
Test both success and failure paths to ensure proper error handling
Use Test Mode
Always use test credentials and never real payment information
Verify Webhooks
Ensure webhooks are received and processed correctly
Check Logs
Review transaction logs for any errors or warnings
Test Edge Cases
Try invalid data, timeouts, and network errors
Security Testing
Verify SSL/TLS, signature validation, and data encryption
Common Testing Errors
Invalid Security Key
Invalid Security Key
Error:
INVALID SECURITY KEYCause: Using production key in test mode or vice versaSolution: Use the correct security key for your environmentInvalid Card Number
Invalid Card Number
Error:
INVALID CARD NUMBERCause: Card number fails Luhn validationSolution: Use only the test card numbers provided aboveDuplicate Transaction
Duplicate Transaction
Error:
DUPLICATE TRANSACTIONCause: Same card, amount, and details submitted within duplicate windowSolution: Change amount slightly or wait for duplicate window to expireWebhook Not Received
Webhook Not Received
Problem: Webhooks not arriving at your endpointCauses:
- Firewall blocking gateway IPs
- Invalid SSL certificate
- Endpoint returning non-200 response

