Skip to main content

Overview

This guide provides comprehensive testing information for the Ionic Payment Gateway, including test card numbers, amounts, credentials, and scenarios to verify your integration.
Never use real payment information in test mode. Always use the test credentials and card numbers provided below.

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 the test_mode parameter to individual API requests:
test_mode=1
When test mode is enabled:
  • Transactions are processed but not settled
  • No actual funds are transferred
  • Test card numbers should be used
  • Results appear in your test transaction reports
Always enable test mode during development and testing. Disable it or set test_mode=0 for live transactions.

Test Credentials

API Security Keys

All API requests require authentication using your security key:
CredentialValue
security_keyYour API security key
API Endpointhttps://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:
CredentialValue
Usernamedemo
Passwordpassword

Test Card Numbers

Basic Test Cards

Use these card numbers for standard testing scenarios:
Card NumberCVVExpirationResult
4111111111111111999Any future dateApproved - Standard approval
4000000000000002AnyAny future dateDeclined - Generic decline
4000000000000010999Any future dateApproved - With full AVS match
4000000000000028AnyAny future dateDeclined - Insufficient funds
4000000000000036AnyAny future dateDeclined - Do not honor
4000000000000044AnyAny future dateDeclined - Card expired
4000000000000051AnyAny future dateDeclined - Invalid card number
Use 4111111111111111 as your primary test card for successful transactions.

AVS/CVV Testing Cards

Test Address Verification System and Card Verification Value responses:
Card NumberAVS ResponseCVV ResponseDescription
4111111111111111XMFull match (address + ZIP + CVV)
4000000000000002NNNo match (address, ZIP, or CVV)
4242424242424242YMAddress + 5-digit ZIP match, CVV match
4000000000000101AMAddress match only, CVV match
4000000000000200ZMZIP match only, CVV match
4000000000000085NMNo address match, CVV match
4000000000000093YNAddress + 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 NumberRequested AmountApproved AmountDescription
4000000000000259$100.00$50.00Partial approval - 50%
4000000000000267$100.00$75.00Partial approval - 75%
Example:
ccnumber=4000000000000259
amount=100.00
# Response: amount_authorized=50.00, partial_payment_balance=50.00

Test Amounts

Use specific amounts to trigger different response scenarios:

Amount-Based Testing

Amount PatternResponseDescription
x.00ApprovedAny amount ending in .00
x.01DeclinedAny amount ending in .01
x.02ErrorAny amount ending in .02 (processing error)
x.05ApprovedAVS mismatch (AVS=N)
x.10Partial ApprovalApproved for $50.00
x.27DeclinedInsufficient funds
x.51DeclinedDo not honor

Specific Test Amounts

amount=25.00
# Response: response=1, responsetext=SUCCESS

ACH/eCheck Testing

Test Bank Accounts

Use these routing and account numbers for ACH testing:
Routing Number: 123456789Account Numbers:
Account NumberResult
9876543210Approved
1111111111Approved
2222222222Approved
checkname=John Doe
checkaba=123456789
checkaccount=9876543210
account_type=checking
sec_code=WEB
amount=50.00

SEC Codes for Testing

SEC CodeDescriptionTest Scenario
WEBInternet-initiatedOnline checkout
PPDPrearranged PaymentRecurring billing
TELTelephone-initiatedPhone orders
CCDCorporate Credit/DebitB2B payments

3D Secure Testing

Test Cards for 3DS Authentication

Card Number3DS ResultDescription
4000000000001000AuthenticatedFull 3DS authentication successful
4000000000001091AuthenticatedFrictionless flow (no challenge)
Expected Response:
{
  "authenticated": true,
  "cardholder_auth": "Y",
  "eci": "05",
  "cavv": "AAABCZIhcQAAAABZlyFxAAAAAAA=",
  "xid": "ABC123XYZ..."
}

Fraud Detection Testing

Kount Testing

Test fraud detection with specific email patterns:
Email PatternFraud ScoreRisk LevelAction
[email protected]10LowApprove
[email protected]50MediumReview
[email protected]90HighDecline
[email protected]95CriticalEscalate
Example:
email=[email protected]
# Kount returns score: 90 (High Risk)

Velocity Testing

Test velocity rules with rapid transactions:
# First transaction
amount=10.00
# Approved

# Second transaction (within 1 minute)
amount=10.00
# May trigger velocity check based on your rules

Digital Wallet Testing

Apple Pay Testing

Test Device Requirements:
  • Safari browser on macOS or iOS device
  • Test Apple Pay account configured in Wallet
Test Cards in Wallet:
  • Add test card 4111111111111111 to 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
Test Cards:
  • Add test card 5424000000000015 to Google Pay
  • Use test merchant ID provided by gateway

Customer Vault Testing

Test Customer IDs

Pre-configured test customer vault IDs:
Customer Vault IDPayment MethodDetails
TEST_CUSTOMER_1Visa•••• 1111, Exp: 12/25
TEST_CUSTOMER_2Mastercard•••• 0015, Exp: 12/25
TEST_CUSTOMER_3ACHAccount ••••3210
Example:
customer_vault_id=TEST_CUSTOMER_1
type=sale
amount=25.00
# Uses stored Visa ending in 1111

Recurring Billing Testing

Test Subscription Scenarios

ScenarioConfigurationExpected Result
Successful Recurringplan_payments=3, day_frequency=1Charges on Day 1, 2, 3
Failed PaymentUse card ending in .01 amountFirst charge fails
Expired CardSet ccexp to past dateCard declined after expiration
Example Test Subscription:
recurring=add_subscription
plan_amount=29.99
plan_payments=3
day_frequency=1
start_date=20251031
# Creates subscription charging $29.99 for 3 days

Webhook Testing

Trigger Test Webhooks

Manual Testing:
  1. Go to Merchant Control Panel > Webhooks > Test Events
  2. Select event type to test
  3. Click “Send Test Webhook”
Automated Testing: Process test transactions to trigger real webhooks:
# This will trigger transaction.sale.success webhook
type=sale
amount=25.00
ccnumber=4111111111111111
ccexp=1225

Test Webhook Payloads

Example Test Webhook:
{
  "event": "transaction.sale.success",
  "webhook_id": "TEST_WH_123",
  "timestamp": "2025-10-30T10:30:00Z",
  "data": {
    "transaction_id": "TEST_123456789",
    "amount": "25.00",
    "status": "approved"
  },
  "signature": "test_signature_hash"
}

Testing Checklist

Before going live, verify these scenarios:
  • Successful sale transaction
  • Successful authorization
  • Successful capture
  • Successful void
  • Successful refund
  • Declined transaction handling
  • Error handling
  • Visa transactions
  • Mastercard transactions
  • American Express transactions
  • Discover transactions
  • ACH/eCheck transactions
  • Apple Pay (if applicable)
  • Google Pay (if applicable)
  • AVS validation
  • CVV validation
  • Fraud score handling
  • Velocity checks
  • Address mismatch scenarios
  • 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)
  • Webhook receipt and processing
  • Webhook signature verification
  • Query API transaction lookup
  • Error logging
  • Timeout handling
  • Retry logic
  • 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

Error: INVALID SECURITY KEYCause: Using production key in test mode or vice versaSolution: Use the correct security key for your environment
Error: INVALID CARD NUMBERCause: Card number fails Luhn validationSolution: Use only the test card numbers provided above
Error: DUPLICATE TRANSACTIONCause: Same card, amount, and details submitted within duplicate windowSolution: Change amount slightly or wait for duplicate window to expire
Problem: Webhooks not arriving at your endpointCauses:
  • Firewall blocking gateway IPs
  • Invalid SSL certificate
  • Endpoint returning non-200 response
Solution: Check webhook logs in merchant portal

Testing Tools

cURL Examples

curl -X POST https://api.ionicfi.com/api/transact.php \
  -d "security_key=YOUR_API_KEY" \
  -d "test_mode=1" \
  -d "type=sale" \
  -d "ccnumber=4111111111111111" \
  -d "ccexp=1225" \
  -d "cvv=999" \
  -d "amount=25.00" \
  -d "first_name=John" \
  -d "last_name=Doe"

Postman Collection

Import this collection for comprehensive testing:
{
  "info": {
    "name": "Ionic Payment Gateway Tests",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Sale Transaction",
      "request": {
        "method": "POST",
        "url": "https://api.ionicfi.com/api/transact.php",
        "body": {
          "mode": "urlencoded",
          "urlencoded": [
            {"key": "security_key", "value": "{{api_key}}"},
            {"key": "type", "value": "sale"},
            {"key": "ccnumber", "value": "4111111111111111"},
            {"key": "ccexp", "value": "1225"},
            {"key": "cvv", "value": "999"},
            {"key": "amount", "value": "25.00"}
          ]
        }
      }
    }
  ]
}

Next Steps