HomeAboutDevelopersTest AccountModulesPartnersContactSign Up

API Credentials

Enter your credentials to personalize all code examples on this page. Values are stored locally in your browser only.

Developer Hub

API Documentation

Everything you need to integrate Quantum Gateway into your application. Five integration methods, comprehensive code examples, and real-time testing.

Quick Start
Process a charge in 5 lines
Secure by Default
TLS 1.2+, PCI Level 1
Sandbox Ready

Integration Methods

Authentication

Authentication varies by integration method. All methods require your gwlogin. Most also require a key — either RestrictKey or GatewayKey depending on the API.

API MethodEndpointAuth Fields
Non-Interactive tqgwdbe.php gwlogin + RestrictKey
Interactive qgwdbe.php gwlogin + optional RestrictKey
Inline Frame (ILF) Embedded iframe API UserName + API Key
Web Order Form web_order.php gwlogin
XML Requester xml_requester.php GatewayLogin + GatewayKey
Auth.net Emulation authnet_aim.php x_login + x_tran_key
Security Note

Never expose your RestrictKey or GatewayKey in client-side code. The Non-Interactive API, XML Requester, and Auth.net Emulation must be called server-side only.

XML API Key Types

The XML Requester uses GatewayKey for authentication, but which key you use depends on the operation:

  • VaultKey — AddUpdateCustomer, CreateTransaction, CustomerRemove, SearchVault, VaultCreateRecurring, etc.
  • RestrictKey — ProcessSingleTransaction, SearchTransactions, ShowTransactionDetails, RecurringHistory, etc.

Personalize Code Examples

Click the "Configure API Keys" button in the bottom-right corner to enter your credentials. All code examples on this page will automatically update with your actual values instead of placeholders.

How it works
  • • Credentials are stored in your browser's localStorage — never sent anywhere
  • • When set, values appear in green in code examples
  • • When not set, placeholder values are shown
  • • Use the "Clear All" button to remove stored credentials

Non-Interactive API (Transparent)

Server-to-server processing. The customer never leaves your site. You collect card data and POST directly to the Quantum Gateway endpoint. Best for full checkout control.

POST https://secure.quantumgateway.dev/cgi/tqgwdbe.php

Required Parameters

ParameterTypeDescription
gwlogin requiredstringYour Gateway Login ID
amount requiredstringCharge amount (e.g., "19.95")
BADDR1 requiredstringBilling address
BZIP1 requiredstringBilling zip code
BCUST_EMAIL requiredstringCustomer email address

Optional Parameters

ParameterTypeDescription
RestrictKey optionalstringAPI restrict key (if enabled in settings)
trans_method optionalstringCC (default) or EFT
trans_type optionalstringSee transaction types below. Default: uses Processing Settings
ccnum conditionalstringCredit card number — required if trans_method is CC
ccmo conditionalstringExpiration month (2-digit, e.g., "12") — required if trans_method is CC
ccyr conditionalstringExpiration year (4-digit, e.g., "2026") — required if trans_method is CC
CVV2 optionalstringCard verification value
aba conditionalstringUS Bank Account Routing Number — required if trans_method is EFT
checkacct conditionalstringUS Bank Account Checking Account Number — required if trans_method is EFT
EFTType conditionalstringWEB, PPD, CCD — required if trans_method is EFT
BCITY conditionalstringBilling City — required if trans_method is EFT
BNAME optionalstringBilling name (e.g., "John Doe")
BSTATE conditionalstringBilling State, 2 character postal code — required if trans_method is EFT
company optionalstringBilling Company
cust_id optionalstringCustomer ID
FNAME conditionalstringBilling First Name — required if trans_method is EFT
LNAME conditionalstringBilling Last Name — required if trans_method is EFT
override_email_customer optionalstringSend customer receipt email: Y or N
override_trans_email optionalstringSend merchant transaction email: Y or N
phone conditionalstringBilling Phone Number — required if trans_method is EFT
transID optionalstringTransaction ID (required for VOID and PREVIOUS_SALE)
Dsep optionalstringData separator (from Processing Config)
MAXMIND optionalstring1=use MaxMind (default), 2=don't use

Transaction Types (trans_type)

ValueDescription
CREDITCharge using default Processing Settings (AVS/CVV2 enforced)
SALESCharge, bypasses Processing Settings (no AVS/CVV2 checks)
AUTH_CAPTUREAuthorize — if AVS/CVV2 pass, converted to a sale
AUTH_ONLYAuthorize only, bypasses Processing Settings
RETURNRefund (requires full CC info)
VOIDVoid a transaction (requires transID)
PREVIOUS_SALEForce a previous authorization (requires transID)
DEBITDebit a bank account, EFT only

Response Format

Response is a comma-separated string with quoted values:

200 — Approved Response
"APPROVED","019452","65735","Y","M","0.3"
200 — Declined Response
"DECLINED","019452","65735","Y","M","0.3","Auth Declined","200"

Fields: "result", "authcode", "transID", "AVS Response", "CVV Response", "MaxMind Score"[, "decline_reason", "Error Code"]

Example: Charge a Card

curl -X POST https://secure.quantumgateway.dev/cgi/tqgwdbe.php \
  -d "gwlogin=YOUR_GATEWAY_LOGIN" \
  -d "RestrictKey=YOUR_RESTRICT_KEY" \
  -d "trans_method=CC" \
  -d "trans_type=CREDIT" \
  -d "amount=49.99" \
  -d "ccnum=4111111111111111" \
  -d "ccmo=12" \
  -d "ccyr=2026" \
  -d "CVV2=123" \
  -d "BNAME=John+Doe" \
  -d "BADDR1=123+Main+St" \
  -d "BZIP1=90210" \
  -d "BCUST_EMAIL=john@example.com" \
  -d "override_email_customer=Y" \
  -d "override_trans_email=Y"
<?php
$ch = curl_init('https://secure.quantumgateway.dev/cgi/tqgwdbe.php');

$data = [
    'gwlogin'                 => 'YOUR_GATEWAY_LOGIN',
    'RestrictKey'             => 'YOUR_RESTRICT_KEY',
    'trans_method'            => 'CC',
    'trans_type'              => 'CREDIT',
    'amount'                  => '49.99',
    'ccnum'                   => '4111111111111111',
    'ccmo'                    => '12',
    'ccyr'                    => '2026',
    'CVV2'                    => '123',
    'BNAME'                   => 'John Doe',
    'BADDR1'                  => '123 Main St',
    'BZIP1'                   => '90210',
    'BCUST_EMAIL'             => 'john@example.com',
    'override_email_customer' => 'Y',
    'override_trans_email'    => 'Y',
];

curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => http_build_query($data),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_SSL_VERIFYPEER => true,
]);

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

// Parse comma-separated response (values are quoted)
// "APPROVED","019452","65735","Y","M","0.3"
$parts = str_getcsv($response);
$status   = $parts[0] ?? '';  // APPROVED or DECLINED
$authCode = $parts[1] ?? '';  // Authorization code
$transId  = $parts[2] ?? '';  // Transaction ID
$avs      = $parts[3] ?? '';  // AVS response
$cvv      = $parts[4] ?? '';  // CVV response
$maxScore = $parts[5] ?? '';  // MaxMind score

echo "Status: $status\n";
echo "Transaction ID: $transId\n";
echo "Auth Code: $authCode\n";
import requests
import csv
from io import StringIO

url = "https://secure.quantumgateway.dev/cgi/tqgwdbe.php"

payload = {
    "gwlogin": "YOUR_GATEWAY_LOGIN",
    "RestrictKey": "YOUR_RESTRICT_KEY",
    "trans_method": "CC",
    "trans_type": "CREDIT",
    "amount": "49.99",
    "ccnum": "4111111111111111",
    "ccmo": "12",
    "ccyr": "2026",
    "CVV2": "123",
    "BNAME": "John Doe",
    "BADDR1": "123 Main St",
    "BZIP1": "90210",
    "BCUST_EMAIL": "john@example.com",
    "override_email_customer": "Y",
    "override_trans_email": "Y",
}

response = requests.post(url, data=payload)

# Parse comma-separated quoted response
reader = csv.reader(StringIO(response.text))
parts = next(reader)
status    = parts[0]  # APPROVED or DECLINED
auth_code = parts[1]  # Authorization code
trans_id  = parts[2]  # Transaction ID

print(f"Status: {status}")
print(f"Transaction ID: {trans_id}")
print(f"Auth Code: {auth_code}")
const https = require('https');
const querystring = require('querystring');

const data = querystring.stringify({
  gwlogin: 'YOUR_GATEWAY_LOGIN',
  RestrictKey: 'YOUR_RESTRICT_KEY',
  trans_method: 'CC',
  trans_type: 'CREDIT',
  amount: '49.99',
  ccnum: '4111111111111111',
  ccmo: '12',
  ccyr: '2026',
  CVV2: '123',
  BNAME: 'John Doe',
  BADDR1: '123 Main St',
  BZIP1: '90210',
  BCUST_EMAIL: 'john@example.com',
  override_email_customer: 'Y',
  override_trans_email: 'Y',
});

const req = https.request({
  hostname: 'secure.quantumgateway.dev',
  path: '/cgi/tqgwdbe.php',
  method: 'POST',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Content-Length': Buffer.byteLength(data),
  },
}, (res) => {
  let body = '';
  res.on('data', (chunk) => body += chunk);
  res.on('end', () => {
    // Parse: "APPROVED","019452","65735","Y","M","0.3"
    const parts = body.match(/"([^"]*)"/g)?.map(s => s.replace(/"/g, '')) || [];
    const [status, authCode, transId, avs, cvv, maxScore] = parts;
    console.log(`Status: ${status}`);
    console.log(`Transaction ID: ${transId}`);
    console.log(`Auth Code: ${authCode}`);
  });
});

req.write(data);
req.end();
require 'net/http'
require 'uri'
require 'csv'

uri = URI('https://secure.quantumgateway.dev/cgi/tqgwdbe.php')

params = {
  'gwlogin'                 => 'YOUR_GATEWAY_LOGIN',
  'RestrictKey'             => 'YOUR_RESTRICT_KEY',
  'trans_method'            => 'CC',
  'trans_type'              => 'CREDIT',
  'amount'                  => '49.99',
  'ccnum'                   => '4111111111111111',
  'ccmo'                    => '12',
  'ccyr'                    => '2026',
  'CVV2'                    => '123',
  'BNAME'                   => 'John Doe',
  'BADDR1'                  => '123 Main St',
  'BZIP1'                   => '90210',
  'BCUST_EMAIL'             => 'john@example.com',
  'override_email_customer' => 'Y',
  'override_trans_email'    => 'Y',
}

response = Net::HTTP.post_form(uri, params)

# Parse comma-separated quoted response
parts = CSV.parse_line(response.body)
status    = parts[0]  # APPROVED or DECLINED
auth_code = parts[1]  # Authorization code
trans_id  = parts[2]  # Transaction ID

puts "Status: #{status}"
puts "Transaction ID: #{trans_id}"
puts "Auth Code: #{auth_code}"
using System.Net.Http;

var client = new HttpClient();

var content = new FormUrlEncodedContent(new Dictionary<string, string>
{
    ["gwlogin"]                 = "YOUR_GATEWAY_LOGIN",
    ["RestrictKey"]             = "YOUR_RESTRICT_KEY",
    ["trans_method"]            = "CC",
    ["trans_type"]              = "CREDIT",
    ["amount"]                  = "49.99",
    ["ccnum"]                   = "4111111111111111",
    ["ccmo"]                    = "12",
    ["ccyr"]                    = "2026",
    ["CVV2"]                    = "123",
    ["BNAME"]                   = "John Doe",
    ["BADDR1"]                  = "123 Main St",
    ["BZIP1"]                   = "90210",
    ["BCUST_EMAIL"]             = "john@example.com",
    ["override_email_customer"] = "Y",
    ["override_trans_email"]    = "Y",
});

var response = await client.PostAsync(
    "https://secure.quantumgateway.dev/cgi/tqgwdbe.php", content);
var body = await response.Content.ReadAsStringAsync();

// Parse: "APPROVED","019452","65735","Y","M","0.3"
var parts = body.Split(',').Select(s => s.Trim('"')).ToArray();
var status   = parts[0];  // APPROVED or DECLINED
var authCode = parts[1];  // Authorization code
var transId  = parts[2];  // Transaction ID

Console.WriteLine($"Status: {status}");
Console.WriteLine($"Transaction ID: {transId}");
Console.WriteLine($"Auth Code: {authCode}");

Example: Void a Transaction

curl -X POST https://secure.quantumgateway.dev/cgi/tqgwdbe.php \
  -d "gwlogin=YOUR_GATEWAY_LOGIN" \
  -d "RestrictKey=YOUR_RESTRICT_KEY" \
  -d "trans_type=VOID" \
  -d "transID=65735" \
  -d "amount=49.99" \
  -d "BADDR1=123+Main+St" \
  -d "BZIP1=90210" \
  -d "BCUST_EMAIL=john@example.com" \
  -d "override_email_customer=N" \
  -d "override_trans_email=N"
<?php
$ch = curl_init('https://secure.quantumgateway.dev/cgi/tqgwdbe.php');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POSTFIELDS     => http_build_query([
        'gwlogin'                 => 'YOUR_GATEWAY_LOGIN',
        'RestrictKey'             => 'YOUR_RESTRICT_KEY',
        'trans_type'              => 'VOID',
        'transID'                 => '65735',
        'amount'                  => '49.99',
        'BADDR1'                  => '123 Main St',
        'BZIP1'                   => '90210',
        'BCUST_EMAIL'             => 'john@example.com',
        'override_email_customer' => 'N',
        'override_trans_email'    => 'N',
    ]),
]);
$response = curl_exec($ch);
curl_close($ch);

$parts = str_getcsv($response);
echo "Void Status: {$parts[0]}\n";

Interactive API (QGWdbe)

Submit a form to the QGW hosted checkout page. You collect some data, then redirect the customer to Quantum Gateway for payment processing. After processing, the customer is redirected back to your approved or declined URL.

POST https://secure.quantumgateway.dev/cgi/qgwdbe.php

Required Parameters

ParameterTypeDescription
gwlogin requiredstringGateway Login ID
amount requiredstringCharge amount (e.g., "19.00")
BADDR1 requiredstringBilling address (for AVS)
BZIP1 requiredstringBilling zip code (for AVS)
post_return_url_approved requiredstringRedirect URL on approval
post_return_url_declined requiredstringRedirect URL on decline

Optional Parameters

ParameterDescription
RestrictKeyAPI restrict key (if enabled)
trans_methodCC or EFT
ccnum, ccmo, ccyr, CVV2Pre-fill card data (optional — QGW page will collect if missing)
ResponseMethodGET or POST (default POST)
BCUST_EMAILCustomer email
FNAME, LNAMECustomer first/last name
BCITYBilling City
BSTATEBilling State, 2 character postal code
phoneBilling Phone Number
companyBilling Company
invoice_num, invoice_descriptionInvoice details
bg_color, txt_colorCheckout page colors (RGB)
company_logoURL to your logo
page_heading, payment_headingCustomize checkout page text

Response (POST/GET back to your URL)

After processing, QGW redirects the customer to your approved or declined URL with these fields:

FieldDescription
trans_resultAPPROVED or DECLINED
transIDTransaction ID
authCodeAuthorization code
amountAmount charged
avs_result, cvv2_resultAVS and CVV verification results
max_scoreMaxMind fraud score
decline_reason, errorcodeReason if declined
md5_hashIf Enabled in Processing Settings
cust_idCustomer ID if one was submitted
ccnumLast 4 of the credit card number used
RecurrIDRecurring ID if RID was submitted

Example: HTML Checkout Form

<form method="POST" action="https://secure.quantumgateway.dev/cgi/qgwdbe.php">
  <input type="hidden" name="gwlogin" value="YOUR_GATEWAY_LOGIN">
  <input type="hidden" name="RestrictKey" value="YOUR_RESTRICT_KEY">
  <input type="hidden" name="amount" value="29.99">
  <input type="hidden" name="post_return_url_approved"
         value="https://yoursite.com/approved">
  <input type="hidden" name="post_return_url_declined"
         value="https://yoursite.com/declined">
  <input type="hidden" name="ResponseMethod" value="POST">
  <input type="hidden" name="override_email_customer" value="Y">
  <input type="hidden" name="override_trans_email" value="Y">

  <!-- Customer fills in these fields -->
  <label>Name:</label>
  <input type="text" name="BNAME">

  <label>Address:</label>
  <input type="text" name="BADDR1">

  <label>Zip:</label>
  <input type="text" name="BZIP1">

  <label>Email:</label>
  <input type="email" name="BCUST_EMAIL">

  <button type="submit">Pay Now</button>
</form>
<?php
// approved.php — Handle the response from QGW
// QGW POSTs back with transaction details

$result     = $_POST['trans_result'] ?? '';
$transId    = $_POST['transID'] ?? '';
$authCode   = $_POST['authCode'] ?? '';
$amount     = $_POST['amount'] ?? '';
$avsResult  = $_POST['avs_result'] ?? '';
$cvvResult  = $_POST['cvv2_result'] ?? '';
$maxScore   = $_POST['max_score'] ?? '';

if ($result === 'APPROVED') {
    echo "Payment successful!\n";
    echo "Transaction ID: $transId\n";
    echo "Auth Code: $authCode\n";
    echo "Amount: $$amount\n";
} else {
    $reason = $_POST['decline_reason'] ?? 'Unknown';
    echo "Payment declined: $reason\n";
}

Inline Frame (ILF)

Use an inline frame to process transactions or update SecureVault customers without the need to ever touch, transmit or store any cardholder (credit card) data on the merchant's Web site or have any such data pass through the merchant's servers or network. The primary benefit is a substantially streamlined process for PCI compliance.

To make things easier for integration we have a PHP script with all the functions you need. There are also several examples to look at.

Methods

MethodDescription
(Empty)Processing Single Transaction
CustomerEditCustomer Edit — Payment and profile information
CustomerEditPaymentCustomer Edit Payment — Payment information (CC/EFT)
CustomerEditProfileCustomer Edit Profile
CustomerAddCustomer Add
RecurringCustomerEditRecurring Customer Edit

CSS Overrides

ParameterDescription
ilf_bg_colorBackground color
ilf_API_FontFamilyFont family
ilf_API_FontSizeFont size
ilf_text_colorText color
ilf_API_FromFieldFontSizeForm field font size
ilf_API_FromFieldTextColorForm field text color
ilf_API_FromFieldBgColorForm field background color

Button Options (only available with Style 6)

ParameterDescription
ilf_button_nameButton label text
ilf_button_colorButton text color
ilf_button_bg_colorButton background color
ilf_button_border_colorButton border color
ilf_button_hover_colorButton hover color

Example

$extrapars2 .= "&ilf_bg_color=#fff";
$extrapars2 .= "&ilf_API_FontFamily=Arial, Helvetica, sans-serif";
$extrapars2 .= "&ilf_API_FontSize=12px";
$extrapars2 .= "&ilf_text_color=#000000";

$extrapars2 .= "&ilf_API_FromFieldFontSize=12px";
$extrapars2 .= "&ilf_API_FromFieldTextColor=#000000";
$extrapars2 .= "&ilf_API_FromFieldBgColor=#ffffff";
$extrapars2 .= "&ilf_button_name=Pay";
$extrapars2 .= "&ilf_button_color=#ffffff";
$extrapars2 .= "&ilf_button_bg_color=#8b4d50";
$extrapars2 .= "&ilf_button_border_color=#8b4d50";
$extrapars2 .= "&ilf_button_hover_color=#fff";

Web Order Form

The simplest integration method. Create a buy button or embeddable order form that posts to QGW's hosted checkout. No shopping cart needed — just specify item details and QGW handles the rest.

POST https://secure.quantumgateway.dev/cgi/web_order.php

Required Parameters

ParameterTypeDescription
gwlogin requiredstringGateway Login ID
post_return_url requiredstringReturn URL (or use post_return_url_approved + post_return_url_declined)
item_description requiredstringItem description
item_qty requiredintegerQuantity (total = qty × cost)
item_cost requiredstringPrice per item (e.g., "19.95")

Checkout Customization (Optional)

ParameterDescription
company_logoURL to your logo image
bg_colorBackground color (RGB)
txt_colorText color (RGB)
page_headingBrowser page title
payment_headingCheckout heading text
skip_shipping_infoHide shipping address fields
header_receiptCustom receipt header
footer_receiptCustom receipt footer

Example: Buy Button

<!-- Simple Buy Button -->
<form method="POST" action="https://secure.quantumgateway.dev/cgi/web_order.php">
  <input type="hidden" name="gwlogin" value="YOUR_GATEWAY_LOGIN">
  <input type="hidden" name="post_return_url_approved"
         value="https://yoursite.com/thank-you">
  <input type="hidden" name="post_return_url_declined"
         value="https://yoursite.com/payment-failed">
  <input type="hidden" name="item_description" value="Premium Widget">
  <input type="hidden" name="item_qty" value="1">
  <input type="hidden" name="item_cost" value="49.95">
  <input type="hidden" name="ResponseMethod" value="POST">
  <button type="submit">Buy Now — $49.95</button>
</form>
<!-- Customized Web Order Form -->
<form method="POST" action="https://secure.quantumgateway.dev/cgi/web_order.php">
  <input type="hidden" name="gwlogin" value="YOUR_GATEWAY_LOGIN">
  <input type="hidden" name="post_return_url_approved"
         value="https://yoursite.com/thank-you">
  <input type="hidden" name="post_return_url_declined"
         value="https://yoursite.com/payment-failed">

  <!-- Item details -->
  <input type="hidden" name="item_description" value="Annual Subscription">
  <input type="hidden" name="item_qty" value="1">
  <input type="hidden" name="item_cost" value="99.00">

  <!-- Customize the checkout page -->
  <input type="hidden" name="company_logo"
         value="https://yoursite.com/logo.png">
  <input type="hidden" name="bg_color" value="F5F5F5">
  <input type="hidden" name="txt_color" value="333333">
  <input type="hidden" name="page_heading" value="My Store Checkout">
  <input type="hidden" name="payment_heading" value="Complete Your Order">
  <input type="hidden" name="skip_shipping_info" value="Y">

  <!-- Email settings -->
  <input type="hidden" name="override_email_customer" value="Y">
  <input type="hidden" name="override_trans_email" value="Y">

  <button type="submit">Subscribe — $99.00/yr</button>
</form>

XML Requester

The full programmatic XML API. Supports transactions, vault management, recurring billing, and search operations. All requests use an XML body wrapped in <QGWRequest>.

POST https://secure.quantumgateway.dev/cgi/xml_requester.php

Request Structure

<QGWRequest>
  <Authentication>
    <GatewayLogin>YOUR_GATEWAY_LOGIN</GatewayLogin>
    <GatewayKey>YOUR_GATEWAY_KEY</GatewayKey>
  </Authentication>
  <Request>
    <RequestType>...</RequestType>
    <!-- Request-specific fields -->
  </Request>
</QGWRequest>

Available Request Types

RequestTypeKeyDescription
ProcessSingleTransactionRestrictKeyDirect charge, auth, void, return
AddUpdateCustomerVaultKeyAdd or update customer in vault
CreateTransactionVaultKeyCharge a vault customer
CurrentBatchRestrictKeyShow current unsettled batch
CustomerRemoveVaultKeyRemove customer from vault
CustomerTransactionHistoryRestrictKeyView the payment history of a customer
ExpiringRecurringCustomersRestrictKeyShow expiring recurring customers
ExpiringVaultCustomersVaultKeyShow expiring vault customers
RecurringHistoryRestrictKeyView recurring history for a customer
ResubmitTransactionRestrictKeyResubmit by TransactionID
SearchRecurringRestrictKeySearch recurring
SearchTransactionsRestrictKeySearch transaction history
SearchVaultVaultKeySearch vault customers
ShowRecurringCustomerRestrictKeyShow a recurring customer
ShowTransactionDetailsRestrictKeyGet full transaction details
ShowVaultDetailsVaultKeyShow a vault customer
UpdateRecurringCustomerRestrictKeyUpdate a recurring customer
VaultCreateRecurringVaultKeyAdd vault customer to recurring

ProcessSingleTransaction

Direct charge, authorization, void, or return. Uses RestrictKey for GatewayKey.

FieldValuesNotes
TransactionType requiredCREDIT or DEBITCredit card or debit
PaymentType requiredCC or EFTPayment method
Amount requiredNumericCharge amount
ProcessTypeSALES, AUTH_CAPTURE, AUTH_ONLY, RETURN, VOID, PREVIOUS_SALEDefault: SALES
CreditCardNumberstringCard number
ExpireMonth, ExpireYearstringExpiration date
CVV2stringCard verification value
TransactionIDstringRequired for VOID and PREVIOUS_SALE
FirstName, LastName, Address, City, State, ZipCodestringBilling info
EmailAddressstringCustomer email
curl -X POST https://secure.quantumgateway.dev/cgi/xml_requester.php \
  -H "Content-Type: application/xml" \
  -d '<QGWRequest>
  <Authentication>
    <GatewayLogin>YOUR_GATEWAY_LOGIN</GatewayLogin>
    <GatewayKey>YOUR_RESTRICT_KEY</GatewayKey>
  </Authentication>
  <Request>
    <RequestType>ProcessSingleTransaction</RequestType>
    <TransactionType>CREDIT</TransactionType>
    <PaymentType>CC</PaymentType>
    <ProcessType>AUTH_CAPTURE</ProcessType>
    <Amount>75.00</Amount>
    <CreditCardNumber>4111111111111111</CreditCardNumber>
    <ExpireMonth>12</ExpireMonth>
    <ExpireYear>2026</ExpireYear>
    <CVV2>123</CVV2>
    <FirstName>John</FirstName>
    <LastName>Doe</LastName>
    <Address>123 Main St</Address>
    <ZipCode>90210</ZipCode>
    <EmailAddress>john@example.com</EmailAddress>
  </Request>
</QGWRequest>'
<?php
$xml = '<QGWRequest>
  <Authentication>
    <GatewayLogin>YOUR_GATEWAY_LOGIN</GatewayLogin>
    <GatewayKey>YOUR_RESTRICT_KEY</GatewayKey>
  </Authentication>
  <Request>
    <RequestType>ProcessSingleTransaction</RequestType>
    <TransactionType>CREDIT</TransactionType>
    <PaymentType>CC</PaymentType>
    <ProcessType>AUTH_CAPTURE</ProcessType>
    <Amount>75.00</Amount>
    <CreditCardNumber>4111111111111111</CreditCardNumber>
    <ExpireMonth>12</ExpireMonth>
    <ExpireYear>2026</ExpireYear>
    <CVV2>123</CVV2>
    <FirstName>John</FirstName>
    <LastName>Doe</LastName>
    <Address>123 Main St</Address>
    <ZipCode>90210</ZipCode>
    <EmailAddress>john@example.com</EmailAddress>
  </Request>
</QGWRequest>';

$ch = curl_init('https://secure.quantumgateway.dev/cgi/xml_requester.php');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => $xml,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['Content-Type: application/xml'],
]);

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

$xmlResp = simplexml_load_string($response);
echo "Result: " . $xmlResp->Result . "\n";
echo "TransID: " . $xmlResp->TransactionID . "\n";
echo "AuthCode: " . $xmlResp->AuthCode . "\n";
import requests
import xml.etree.ElementTree as ET

xml_body = """<QGWRequest>
  <Authentication>
    <GatewayLogin>YOUR_GATEWAY_LOGIN</GatewayLogin>
    <GatewayKey>YOUR_RESTRICT_KEY</GatewayKey>
  </Authentication>
  <Request>
    <RequestType>ProcessSingleTransaction</RequestType>
    <TransactionType>CREDIT</TransactionType>
    <PaymentType>CC</PaymentType>
    <ProcessType>AUTH_CAPTURE</ProcessType>
    <Amount>75.00</Amount>
    <CreditCardNumber>4111111111111111</CreditCardNumber>
    <ExpireMonth>12</ExpireMonth>
    <ExpireYear>2026</ExpireYear>
    <CVV2>123</CVV2>
    <FirstName>John</FirstName>
    <LastName>Doe</LastName>
    <Address>123 Main St</Address>
    <ZipCode>90210</ZipCode>
    <EmailAddress>john@example.com</EmailAddress>
  </Request>
</QGWRequest>"""

resp = requests.post(
    "https://secure.quantumgateway.dev/cgi/xml_requester.php",
    data=xml_body,
    headers={"Content-Type": "application/xml"}
)

root = ET.fromstring(resp.text)
print(f"Result: {root.findtext('Result')}")
print(f"TransID: {root.findtext('TransactionID')}")
print(f"AuthCode: {root.findtext('AuthCode')}")
const https = require('https');

const xml = `<QGWRequest>
  <Authentication>
    <GatewayLogin>YOUR_GATEWAY_LOGIN</GatewayLogin>
    <GatewayKey>YOUR_RESTRICT_KEY</GatewayKey>
  </Authentication>
  <Request>
    <RequestType>ProcessSingleTransaction</RequestType>
    <TransactionType>CREDIT</TransactionType>
    <PaymentType>CC</PaymentType>
    <ProcessType>AUTH_CAPTURE</ProcessType>
    <Amount>75.00</Amount>
    <CreditCardNumber>4111111111111111</CreditCardNumber>
    <ExpireMonth>12</ExpireMonth>
    <ExpireYear>2026</ExpireYear>
    <CVV2>123</CVV2>
    <FirstName>John</FirstName>
    <LastName>Doe</LastName>
    <Address>123 Main St</Address>
    <ZipCode>90210</ZipCode>
    <EmailAddress>john@example.com</EmailAddress>
  </Request>
</QGWRequest>`;

const req = https.request({
  hostname: 'secure.quantumgateway.dev',
  path: '/cgi/xml_requester.php',
  method: 'POST',
  headers: {
    'Content-Type': 'application/xml',
    'Content-Length': Buffer.byteLength(xml),
  },
}, (res) => {
  let body = '';
  res.on('data', (c) => body += c);
  res.on('end', () => {
    // Parse XML response
    const getTag = (tag) => {
      const m = body.match(new RegExp(`<${tag}>(.+?)</${tag}>`));
      return m ? m[1] : '';
    };
    console.log(`Result: ${getTag('Result')}`);
    console.log(`TransID: ${getTag('TransactionID')}`);
    console.log(`AuthCode: ${getTag('AuthCode')}`);
  });
});

req.write(xml);
req.end();
require 'net/http'
require 'uri'
require 'rexml/document'

uri = URI('https://secure.quantumgateway.dev/cgi/xml_requester.php')

xml = '<QGWRequest>
  <Authentication>
    <GatewayLogin>YOUR_GATEWAY_LOGIN</GatewayLogin>
    <GatewayKey>YOUR_RESTRICT_KEY</GatewayKey>
  </Authentication>
  <Request>
    <RequestType>ProcessSingleTransaction</RequestType>
    <TransactionType>CREDIT</TransactionType>
    <PaymentType>CC</PaymentType>
    <ProcessType>AUTH_CAPTURE</ProcessType>
    <Amount>75.00</Amount>
    <CreditCardNumber>4111111111111111</CreditCardNumber>
    <ExpireMonth>12</ExpireMonth>
    <ExpireYear>2026</ExpireYear>
    <CVV2>123</CVV2>
    <FirstName>John</FirstName>
    <LastName>Doe</LastName>
    <Address>123 Main St</Address>
    <ZipCode>90210</ZipCode>
    <EmailAddress>john@example.com</EmailAddress>
  </Request>
</QGWRequest>'

http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
req = Net::HTTP::Post.new(uri.path, {'Content-Type' => 'application/xml'})
req.body = xml
response = http.request(req)

doc = REXML::Document.new(response.body)
puts "Result: #{doc.root.elements['Result']&.text}"
puts "TransID: #{doc.root.elements['TransactionID']&.text}"
using System.Net.Http;
using System.Xml.Linq;

var client = new HttpClient();

var xml = @"<QGWRequest>
  <Authentication>
    <GatewayLogin>YOUR_GATEWAY_LOGIN</GatewayLogin>
    <GatewayKey>YOUR_RESTRICT_KEY</GatewayKey>
  </Authentication>
  <Request>
    <RequestType>ProcessSingleTransaction</RequestType>
    <TransactionType>CREDIT</TransactionType>
    <PaymentType>CC</PaymentType>
    <ProcessType>AUTH_CAPTURE</ProcessType>
    <Amount>75.00</Amount>
    <CreditCardNumber>4111111111111111</CreditCardNumber>
    <ExpireMonth>12</ExpireMonth>
    <ExpireYear>2026</ExpireYear>
    <CVV2>123</CVV2>
    <FirstName>John</FirstName>
    <LastName>Doe</LastName>
    <Address>123 Main St</Address>
    <ZipCode>90210</ZipCode>
    <EmailAddress>john@example.com</EmailAddress>
  </Request>
</QGWRequest>";

var content = new StringContent(xml, System.Text.Encoding.UTF8, "application/xml");
var response = await client.PostAsync(
    "https://secure.quantumgateway.dev/cgi/xml_requester.php", content);
var body = await response.Content.ReadAsStringAsync();

var doc = XDocument.Parse(body);
Console.WriteLine($"Result: {doc.Root?.Element("Result")?.Value}");
Console.WriteLine($"TransID: {doc.Root?.Element("TransactionID")?.Value}");
Console.WriteLine($"AuthCode: {doc.Root?.Element("AuthCode")?.Value}");
<QGWRequest>
  <ResponseSummary>
    <RequestType>ProcessSingleTransaction</RequestType>
    <Status>Success</Status>
    <StatusDescription>Request was successful.</StatusDescription>
    <ResultCount>1</ResultCount>
    <TimeStamp>2026-04-01 15:20:53</TimeStamp>
  </ResponseSummary>
  <Result>
    <TransactionID>495349</TransactionID>
    <Status>APPROVED</Status>
    <StatusDescription>Transaction is APPROVED</StatusDescription>
    <CustomerID>N0IMhtJRamCDzX1l</CustomerID>
    <TransactionType></TransactionType>
    <FirstName>Edward</FirstName>
    <LastName>Miller</LastName>
    <Address>202 Pine St</Address>
    <ZipCode>60601</ZipCode>
    <City>Chesapeake</City>
    <State>IL</State>
    <Country></Country>
    <EmailAddress>fsuhztuqag@cdgcommerce.com</EmailAddress>
    <CreditCardNumber>5439</CreditCardNumber>
    <ExpireMonth>12</ExpireMonth>
    <ExpireYear>30</ExpireYear>
    <Amount>6.94</Amount>
    <TransactionDate>2026-04-01</TransactionDate>
    <PaymentType>CC</PaymentType>
    <CardType>VI</CardType>
    <AVSResponseCode>N</AVSResponseCode>
    <AuthorizationCode>TAS201</AuthorizationCode>
  </Result>
</QGWRequest>

AddUpdateCustomer (Vault)

Add or update a customer's card securely in the Quantum Gateway vault for future charges. Uses VaultKey for GatewayKey. If the customer already exists, their information will be updated.

curl -X POST https://secure.quantumgateway.dev/cgi/xml_requester.php \
  -H "Content-Type: application/xml" \
  -d '<QGWRequest>
  <Authentication>
    <GatewayLogin>YOUR_GATEWAY_LOGIN</GatewayLogin>
    <GatewayKey>YOUR_VAULT_KEY</GatewayKey>
  </Authentication>
  <Request>
    <RequestType>AddUpdateCustomer</RequestType>
    <PaymentType>CC</PaymentType>
    <CreditCardNumber>4111111111111111</CreditCardNumber>
    <ExpireMonth>12</ExpireMonth>
    <ExpireYear>2026</ExpireYear>
    <FirstName>Jane</FirstName>
    <LastName>Smith</LastName>
    <Address>456 Oak Ave</Address>
    <ZipCode>90210</ZipCode>
    <EmailAddress>jane@example.com</EmailAddress>
    <CustomerID>CUST-001</CustomerID>
  </Request>
</QGWRequest>'
<?php
$xml = '<QGWRequest>
  <Authentication>
    <GatewayLogin>YOUR_GATEWAY_LOGIN</GatewayLogin>
    <GatewayKey>YOUR_VAULT_KEY</GatewayKey>
  </Authentication>
  <Request>
    <RequestType>AddUpdateCustomer</RequestType>
    <PaymentType>CC</PaymentType>
    <CreditCardNumber>4111111111111111</CreditCardNumber>
    <ExpireMonth>12</ExpireMonth>
    <ExpireYear>2026</ExpireYear>
    <FirstName>Jane</FirstName>
    <LastName>Smith</LastName>
    <Address>456 Oak Ave</Address>
    <ZipCode>90210</ZipCode>
    <EmailAddress>jane@example.com</EmailAddress>
    <CustomerID>CUST-001</CustomerID>
  </Request>
</QGWRequest>';

$ch = curl_init('https://secure.quantumgateway.dev/cgi/xml_requester.php');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => $xml,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['Content-Type: application/xml'],
]);

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

$xmlResp = simplexml_load_string($response);
echo "Result: " . $xmlResp->Result . "\n";
echo "Vault Customer ID: " . $xmlResp->CustomerVaultID . "\n";
import requests
import xml.etree.ElementTree as ET

xml_body = """<QGWRequest>
  <Authentication>
    <GatewayLogin>YOUR_GATEWAY_LOGIN</GatewayLogin>
    <GatewayKey>YOUR_VAULT_KEY</GatewayKey>
  </Authentication>
  <Request>
    <RequestType>AddUpdateCustomer</RequestType>
    <PaymentType>CC</PaymentType>
    <CreditCardNumber>4111111111111111</CreditCardNumber>
    <ExpireMonth>12</ExpireMonth>
    <ExpireYear>2026</ExpireYear>
    <FirstName>Jane</FirstName>
    <LastName>Smith</LastName>
    <Address>456 Oak Ave</Address>
    <ZipCode>90210</ZipCode>
    <EmailAddress>jane@example.com</EmailAddress>
    <CustomerID>CUST-001</CustomerID>
  </Request>
</QGWRequest>"""

resp = requests.post(
    "https://secure.quantumgateway.dev/cgi/xml_requester.php",
    data=xml_body,
    headers={"Content-Type": "application/xml"}
)

root = ET.fromstring(resp.text)
print(f"Result: {root.findtext('Result')}")
print(f"Vault Customer ID: {root.findtext('CustomerVaultID')}")

CreateTransaction (Charge Vault Customer)

Charge a customer stored in the vault without re-entering card details. Uses VaultKey.

curl -X POST https://secure.quantumgateway.dev/cgi/xml_requester.php \
  -H "Content-Type: application/xml" \
  -d '<QGWRequest>
  <Authentication>
    <GatewayLogin>YOUR_GATEWAY_LOGIN</GatewayLogin>
    <GatewayKey>YOUR_VAULT_KEY</GatewayKey>
  </Authentication>
  <Request>
    <RequestType>CreateTransaction</RequestType>
    <CustomerVaultID>12345</CustomerVaultID>
    <Amount>50.00</Amount>
    <InvoiceNumber>INV-2026-001</InvoiceNumber>
    <InvoiceDescription>Monthly service fee</InvoiceDescription>
  </Request>
</QGWRequest>'
<?php
$xml = '<QGWRequest>
  <Authentication>
    <GatewayLogin>YOUR_GATEWAY_LOGIN</GatewayLogin>
    <GatewayKey>YOUR_VAULT_KEY</GatewayKey>
  </Authentication>
  <Request>
    <RequestType>CreateTransaction</RequestType>
    <CustomerVaultID>12345</CustomerVaultID>
    <Amount>50.00</Amount>
    <InvoiceNumber>INV-2026-001</InvoiceNumber>
    <InvoiceDescription>Monthly service fee</InvoiceDescription>
  </Request>
</QGWRequest>';

$ch = curl_init('https://secure.quantumgateway.dev/cgi/xml_requester.php');
curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => $xml,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER     => ['Content-Type: application/xml'],
]);

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

$xmlResp = simplexml_load_string($response);
echo "Result: " . $xmlResp->Result . "\n";
echo "TransID: " . $xmlResp->TransactionID . "\n";
import requests
import xml.etree.ElementTree as ET

xml_body = """<QGWRequest>
  <Authentication>
    <GatewayLogin>YOUR_GATEWAY_LOGIN</GatewayLogin>
    <GatewayKey>YOUR_VAULT_KEY</GatewayKey>
  </Authentication>
  <Request>
    <RequestType>CreateTransaction</RequestType>
    <CustomerVaultID>12345</CustomerVaultID>
    <Amount>50.00</Amount>
    <InvoiceNumber>INV-2026-001</InvoiceNumber>
    <InvoiceDescription>Monthly service fee</InvoiceDescription>
  </Request>
</QGWRequest>"""

resp = requests.post(
    "https://secure.quantumgateway.dev/cgi/xml_requester.php",
    data=xml_body,
    headers={"Content-Type": "application/xml"}
)

root = ET.fromstring(resp.text)
print(f"Result: {root.findtext('Result')}")
print(f"TransID: {root.findtext('TransactionID')}")

↩️ Void & Return (XML)

Void a transaction or process a return via the XML API. Both use ProcessSingleTransaction with the appropriate ProcessType.

# VOID a transaction via XML
curl -X POST https://secure.quantumgateway.dev/cgi/xml_requester.php \
  -H "Content-Type: application/xml" \
  -d '<QGWRequest>
  <Authentication>
    <GatewayLogin>YOUR_GATEWAY_LOGIN</GatewayLogin>
    <GatewayKey>YOUR_RESTRICT_KEY</GatewayKey>
  </Authentication>
  <Request>
    <RequestType>ProcessSingleTransaction</RequestType>
    <TransactionType>CREDIT</TransactionType>
    <PaymentType>CC</PaymentType>
    <ProcessType>VOID</ProcessType>
    <TransactionID>65735</TransactionID>
    <Amount>49.99</Amount>
  </Request>
</QGWRequest>'
# RETURN (refund) via XML — requires full card info
curl -X POST https://secure.quantumgateway.dev/cgi/xml_requester.php \
  -H "Content-Type: application/xml" \
  -d '<QGWRequest>
  <Authentication>
    <GatewayLogin>YOUR_GATEWAY_LOGIN</GatewayLogin>
    <GatewayKey>YOUR_RESTRICT_KEY</GatewayKey>
  </Authentication>
  <Request>
    <RequestType>ProcessSingleTransaction</RequestType>
    <TransactionType>CREDIT</TransactionType>
    <PaymentType>CC</PaymentType>
    <ProcessType>RETURN</ProcessType>
    <Amount>49.99</Amount>
    <CreditCardNumber>4111111111111111</CreditCardNumber>
    <ExpireMonth>12</ExpireMonth>
    <ExpireYear>2026</ExpireYear>
    <FirstName>John</FirstName>
    <LastName>Doe</LastName>
    <Address>123 Main St</Address>
    <ZipCode>90210</ZipCode>
  </Request>
</QGWRequest>'

Authorize.Net AIM Emulation

Drop-in replacement for Authorize.Net AIM integrations. If you have an existing Auth.net integration, just change the endpoint URL to start processing through Quantum Gateway.

POST https://secure.quantumgateway.dev/cgi/authnet_aim.php

Required Parameters

ParameterTypeDescription
x_login requiredstringGateway Login (same as gwlogin)
x_tran_key requiredstringRestrictKey
x_amount requiredstringCharge amount
x_card_num requiredstringCredit card number
x_exp_date requiredstringExpiration: mmyy, mm-yyyy, yyyy-mm, mm/yyyy, or yyyy/mm
x_method requiredstringCC
x_type requiredstringTransaction type (see below)

Transaction Types (x_type)

ValueDescription
AUTH_CAPTUREAuthorize and capture in one step
AUTH_ONLYAuthorize only
CREDITCredit/charge
SALESSale (bypasses processing settings)
RETURNRefund
VOIDVoid (requires x_trans_id)
PRIOR_AUTH_CAPTURECapture a previous auth (requires x_trans_id)

Optional Parameters

ParameterDescription
x_card_codeCVV code
x_trans_idTransaction ID (for VOID or PRIOR_AUTH_CAPTURE)
x_delim_charResponse delimiter (default |, also ~ or ,)
x_encap_charResponse encapsulation character
x_first_name, x_last_nameCustomer name
x_address, x_city, x_state, x_zipBilling address
x_emailCustomer email
x_invoice_num, x_descriptionInvoice details
x_cust_idCustomer ID

Response Format

Pipe-delimited by default (matches Auth.net AIM format):

200 — Approved (pipe-delimited)
1|1|1|This transaction has been approved.|A12345|Y|65735|...|M
PositionFieldNotes
1Response Code1=Approved, 2=Declined, 3=Error
2Response Subcode1, 2, or 3
3Response Reason Code1, 2, or 3
4Response Reason TextDecline reason if declined
5Approval Code6-digit authorization code
6AVS ResultStandard AVS response codes
7Transaction IDQGW transaction ID
39Card Code ResponseCVV match result

Example: Auth.net Emulation Charge

curl -X POST https://secure.quantumgateway.dev/cgi/authnet_aim.php \
  -d "x_login=YOUR_GATEWAY_LOGIN" \
  -d "x_tran_key=YOUR_RESTRICT_KEY" \
  -d "x_method=CC" \
  -d "x_type=AUTH_CAPTURE" \
  -d "x_amount=99.95" \
  -d "x_card_num=4111111111111111" \
  -d "x_exp_date=1226" \
  -d "x_card_code=123" \
  -d "x_first_name=John" \
  -d "x_last_name=Doe" \
  -d "x_address=123+Main+St" \
  -d "x_zip=90210" \
  -d "x_email=john@example.com"
<?php
$ch = curl_init('https://secure.quantumgateway.dev/cgi/authnet_aim.php');

$data = [
    'x_login'      => 'YOUR_GATEWAY_LOGIN',
    'x_tran_key'   => 'YOUR_RESTRICT_KEY',
    'x_method'     => 'CC',
    'x_type'       => 'AUTH_CAPTURE',
    'x_amount'     => '99.95',
    'x_card_num'   => '4111111111111111',
    'x_exp_date'   => '1226',
    'x_card_code'  => '123',
    'x_first_name' => 'John',
    'x_last_name'  => 'Doe',
    'x_address'    => '123 Main St',
    'x_zip'        => '90210',
    'x_email'      => 'john@example.com',
];

curl_setopt_array($ch, [
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => http_build_query($data),
    CURLOPT_RETURNTRANSFER => true,
]);

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

// Parse pipe-delimited response
$parts = explode('|', $response);
$responseCode = $parts[0];   // 1=Approved, 2=Declined, 3=Error
$reasonText   = $parts[3];   // Human-readable reason
$authCode     = $parts[4];   // Authorization code
$transId      = $parts[6];   // Transaction ID
$cvvResult    = $parts[38] ?? '';  // CVV result

if ($responseCode === '1') {
    echo "APPROVED — Trans ID: $transId, Auth: $authCode\n";
} else {
    echo "DECLINED — Reason: $reasonText\n";
}
import requests

url = "https://secure.quantumgateway.dev/cgi/authnet_aim.php"

payload = {
    "x_login": "YOUR_GATEWAY_LOGIN",
    "x_tran_key": "YOUR_RESTRICT_KEY",
    "x_method": "CC",
    "x_type": "AUTH_CAPTURE",
    "x_amount": "99.95",
    "x_card_num": "4111111111111111",
    "x_exp_date": "1226",
    "x_card_code": "123",
    "x_first_name": "John",
    "x_last_name": "Doe",
    "x_address": "123 Main St",
    "x_zip": "90210",
    "x_email": "john@example.com",
}

response = requests.post(url, data=payload)

# Parse pipe-delimited response
parts = response.text.split("|")
response_code = parts[0]   # 1=Approved, 2=Declined, 3=Error
reason_text   = parts[3]
auth_code     = parts[4]
trans_id      = parts[6]

if response_code == "1":
    print(f"APPROVED — Trans ID: {trans_id}, Auth: {auth_code}")
else:
    print(f"DECLINED — Reason: {reason_text}")
const https = require('https');
const querystring = require('querystring');

const data = querystring.stringify({
  x_login: 'YOUR_GATEWAY_LOGIN',
  x_tran_key: 'YOUR_RESTRICT_KEY',
  x_method: 'CC',
  x_type: 'AUTH_CAPTURE',
  x_amount: '99.95',
  x_card_num: '4111111111111111',
  x_exp_date: '1226',
  x_card_code: '123',
  x_first_name: 'John',
  x_last_name: 'Doe',
  x_address: '123 Main St',
  x_zip: '90210',
  x_email: 'john@example.com',
});

const req = https.request({
  hostname: 'secure.quantumgateway.dev',
  path: '/cgi/authnet_aim.php',
  method: 'POST',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded',
    'Content-Length': Buffer.byteLength(data),
  },
}, (res) => {
  let body = '';
  res.on('data', (c) => body += c);
  res.on('end', () => {
    const parts = body.split('|');
    const responseCode = parts[0];
    const authCode = parts[4];
    const transId = parts[6];

    if (responseCode === '1') {
      console.log(`APPROVED — Trans ID: ${transId}, Auth: ${authCode}`);
    } else {
      console.log(`DECLINED — Reason: ${parts[3]}`);
    }
  });
});

req.write(data);
req.end();
require 'net/http'
require 'uri'

uri = URI('https://secure.quantumgateway.dev/cgi/authnet_aim.php')

params = {
  'x_login'      => 'YOUR_GATEWAY_LOGIN',
  'x_tran_key'   => 'YOUR_RESTRICT_KEY',
  'x_method'     => 'CC',
  'x_type'       => 'AUTH_CAPTURE',
  'x_amount'     => '99.95',
  'x_card_num'   => '4111111111111111',
  'x_exp_date'   => '1226',
  'x_card_code'  => '123',
  'x_first_name' => 'John',
  'x_last_name'  => 'Doe',
  'x_address'    => '123 Main St',
  'x_zip'        => '90210',
  'x_email'      => 'john@example.com',
}

response = Net::HTTP.post_form(uri, params)

parts = response.body.split('|')
if parts[0] == '1'
  puts "APPROVED — Trans ID: #{parts[6]}, Auth: #{parts[4]}"
else
  puts "DECLINED — Reason: #{parts[3]}"
end
using System.Net.Http;

var client = new HttpClient();

var content = new FormUrlEncodedContent(new Dictionary<string, string>
{
    ["x_login"]      = "YOUR_GATEWAY_LOGIN",
    ["x_tran_key"]   = "YOUR_RESTRICT_KEY",
    ["x_method"]     = "CC",
    ["x_type"]       = "AUTH_CAPTURE",
    ["x_amount"]     = "99.95",
    ["x_card_num"]   = "4111111111111111",
    ["x_exp_date"]   = "1226",
    ["x_card_code"]  = "123",
    ["x_first_name"] = "John",
    ["x_last_name"]  = "Doe",
    ["x_address"]    = "123 Main St",
    ["x_zip"]        = "90210",
    ["x_email"]      = "john@example.com",
});

var response = await client.PostAsync(
    "https://secure.quantumgateway.dev/cgi/authnet_aim.php", content);
var body = await response.Content.ReadAsStringAsync();

var parts = body.Split('|');
if (parts[0] == "1")
    Console.WriteLine($"APPROVED — Trans ID: {parts[6]}, Auth: {parts[4]}");
else
    Console.WriteLine($"DECLINED — Reason: {parts[3]}");
Migrating from Authorize.Net?

Simply change your endpoint URL from https://secure.authorize.net/gateway/transact.dll to https://secure.quantumgateway.dev/cgi/authnet_aim.php and update your x_login and x_tran_key with your Quantum Gateway credentials. Everything else stays the same.