Skip to main content

Overview

The Payment API enables merchants to submit payment transactions directly to the gateway via HTTP POST requests over SSL connections. This integration method provides complete control over the customer experience and payment flow.
The communication method used to send messages to the Payment Gateway’s server is the standard HTTP protocol over an SSL connection.

API Endpoint

POST https://api.ionicfi.com/api/transact.php

Transaction Types

The Payment API supports comprehensive transaction operations:
Transactions submitted and immediately flagged for settlement. Use for immediate payment processing.Type: sale

Authentication

All API requests require authentication using your API Security Key:
Keep your security_key secure and never expose it in client-side code.
security_key=YOUR_API_SECURITY_KEY
You can generate new keys from the merchant control panel: Settings > Security Keys

Payment Methods

Submit credit and debit card transactions using these variables:
ccnumber=4111111111111111
ccexp=1225
cvv=999
Required Variables:
  • ccnumber - Card number (numeric)
  • ccexp - Expiration date (MMYY format)
  • cvv - Security code (recommended for better approval rates)
Process electronic check transactions:
checkname=John Doe
checkaba=123456789
checkaccount=987654321
account_type=checking
sec_code=WEB
Required Variables:
  • checkname - Account holder name
  • checkaba - Bank routing number
  • checkaccount - Account number
  • account_type - checking or savings
  • sec_code - Entry class (PPD, WEB, TEL, CCD)
Accept Apple Pay and Google Pay:Apple Pay:
applepay_payment_data=ENCRYPTED_TOKEN_HEX_STRING
Google Pay:
googlepay_payment_data=ENCRYPTED_PAYLOAD
Use tokens from Collect.js:
payment_token=TOKEN_FROM_COLLECTJS
Credit card and electronic check variables cannot be submitted in the same request.

Response Format

Transaction responses are returned in the HTTP response body using query string format:
variable1=value1&variable2=value2&variable3=value3

Key Response Variables

VariableDescriptionValues
responseTransaction approval status1=approved, 2=declined, 3=error
responsetextDescription of transaction resultText description
transactionidGateway transaction identifierUnique ID
amount_authorizedAuthorization amountNumeric

Advanced Features

Level II/III Processing

Enhanced data fields for corporate purchasing and detailed line items

Recurring Subscriptions

Plan-based or custom subscription management

Customer Vault

Secure credential storage compliant with PCI standards

Partial Payments

Split-tender transactions with settlement controls

3D Secure

Enhanced authentication with cardholder_auth, cavv, and xid parameters

Payment Facilitator

Submerchant routing and identification fields

Example Request

<?php
$url = "https://api.ionicfi.com/api/transact.php";

$data = array(
    "security_key" => "YOUR_API_KEY",
    "type" => "sale",
    "ccnumber" => "4111111111111111",
    "ccexp" => "1225",
    "cvv" => "999",
    "amount" => "10.00",
    "first_name" => "John",
    "last_name" => "Doe",
    "address1" => "123 Main St",
    "city" => "New York",
    "state" => "NY",
    "zip" => "10001"
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);

$response = curl_exec($ch);
curl_close($ch);

parse_str($response, $result);
print_r($result);
?>

Important Restrictions

  • Duplicate transaction checking is configurable via the dup_seconds parameter
  • Some processors impose field requirements beyond documented minimums
  • Base64-encoded fields (signatures, 3DS data) require proper URL encoding

Next Steps