API Documentation
Everything you need to integrate Quantum Gateway into your application. Five integration methods, comprehensive code examples, and real-time testing.
Integration Methods
Server-to-server. Customer never leaves your site. Full control over the checkout experience.
tqgwdbe.php
Collect data on your site, process through QGW hosted checkout page. Handles redirects.
qgwdbe.php
Quick-start form for simple buy buttons. Minimal code required. Hosted checkout.
web_order.php
Full programmatic XML API — vault, transactions, recurring, search. Enterprise-grade.
xml_requester.php
Embed a payment frame on your site. Card data never touches your server — simplifies PCI compliance.
Drop-in replacement for Authorize.Net AIM. Change the URL and you're done.
authnet_aim.php
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 Method | Endpoint | Auth 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 |
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.
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.
- • 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.
https://secure.quantumgateway.dev/cgi/tqgwdbe.php
Required Parameters
| Parameter | Type | Description |
|---|---|---|
| gwlogin required | string | Your Gateway Login ID |
| amount required | string | Charge amount (e.g., "19.95") |
| BADDR1 required | string | Billing address |
| BZIP1 required | string | Billing zip code |
| BCUST_EMAIL required | string | Customer email address |
Optional Parameters
| Parameter | Type | Description |
|---|---|---|
| RestrictKey optional | string | API restrict key (if enabled in settings) |
| trans_method optional | string | CC (default) or EFT |
| trans_type optional | string | See transaction types below. Default: uses Processing Settings |
| ccnum conditional | string | Credit card number — required if trans_method is CC |
| ccmo conditional | string | Expiration month (2-digit, e.g., "12") — required if trans_method is CC |
| ccyr conditional | string | Expiration year (4-digit, e.g., "2026") — required if trans_method is CC |
| CVV2 optional | string | Card verification value |
| aba conditional | string | US Bank Account Routing Number — required if trans_method is EFT |
| checkacct conditional | string | US Bank Account Checking Account Number — required if trans_method is EFT |
| EFTType conditional | string | WEB, PPD, CCD — required if trans_method is EFT |
| BCITY conditional | string | Billing City — required if trans_method is EFT |
| BNAME optional | string | Billing name (e.g., "John Doe") |
| BSTATE conditional | string | Billing State, 2 character postal code — required if trans_method is EFT |
| company optional | string | Billing Company |
| cust_id optional | string | Customer ID |
| FNAME conditional | string | Billing First Name — required if trans_method is EFT |
| LNAME conditional | string | Billing Last Name — required if trans_method is EFT |
| override_email_customer optional | string | Send customer receipt email: Y or N |
| override_trans_email optional | string | Send merchant transaction email: Y or N |
| phone conditional | string | Billing Phone Number — required if trans_method is EFT |
| transID optional | string | Transaction ID (required for VOID and PREVIOUS_SALE) |
| Dsep optional | string | Data separator (from Processing Config) |
| MAXMIND optional | string | 1=use MaxMind (default), 2=don't use |
Transaction Types (trans_type)
| Value | Description |
|---|---|
| CREDIT | Charge using default Processing Settings (AVS/CVV2 enforced) |
| SALES | Charge, bypasses Processing Settings (no AVS/CVV2 checks) |
| AUTH_CAPTURE | Authorize — if AVS/CVV2 pass, converted to a sale |
| AUTH_ONLY | Authorize only, bypasses Processing Settings |
| RETURN | Refund (requires full CC info) |
| VOID | Void a transaction (requires transID) |
| PREVIOUS_SALE | Force a previous authorization (requires transID) |
| DEBIT | Debit a bank account, EFT only |
Response Format
Response is a comma-separated string with quoted values:
"APPROVED","019452","65735","Y","M","0.3"
"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.
https://secure.quantumgateway.dev/cgi/qgwdbe.php
Required Parameters
| Parameter | Type | Description |
|---|---|---|
| gwlogin required | string | Gateway Login ID |
| amount required | string | Charge amount (e.g., "19.00") |
| BADDR1 required | string | Billing address (for AVS) |
| BZIP1 required | string | Billing zip code (for AVS) |
| post_return_url_approved required | string | Redirect URL on approval |
| post_return_url_declined required | string | Redirect URL on decline |
Optional Parameters
| Parameter | Description |
|---|---|
| RestrictKey | API restrict key (if enabled) |
| trans_method | CC or EFT |
| ccnum, ccmo, ccyr, CVV2 | Pre-fill card data (optional — QGW page will collect if missing) |
| ResponseMethod | GET or POST (default POST) |
| BCUST_EMAIL | Customer email |
| FNAME, LNAME | Customer first/last name |
| BCITY | Billing City |
| BSTATE | Billing State, 2 character postal code |
| phone | Billing Phone Number |
| company | Billing Company |
| invoice_num, invoice_description | Invoice details |
| bg_color, txt_color | Checkout page colors (RGB) |
| company_logo | URL to your logo |
| page_heading, payment_heading | Customize 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:
| Field | Description |
|---|---|
| trans_result | APPROVED or DECLINED |
| transID | Transaction ID |
| authCode | Authorization code |
| amount | Amount charged |
| avs_result, cvv2_result | AVS and CVV verification results |
| max_score | MaxMind fraud score |
| decline_reason, errorcode | Reason if declined |
| md5_hash | If Enabled in Processing Settings |
| cust_id | Customer ID if one was submitted |
| ccnum | Last 4 of the credit card number used |
| RecurrID | Recurring 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
| Method | Description |
|---|---|
| (Empty) | Processing Single Transaction |
| CustomerEdit | Customer Edit — Payment and profile information |
| CustomerEditPayment | Customer Edit Payment — Payment information (CC/EFT) |
| CustomerEditProfile | Customer Edit Profile |
| CustomerAdd | Customer Add |
| RecurringCustomerEdit | Recurring Customer Edit |
CSS Overrides
| Parameter | Description |
|---|---|
| ilf_bg_color | Background color |
| ilf_API_FontFamily | Font family |
| ilf_API_FontSize | Font size |
| ilf_text_color | Text color |
| ilf_API_FromFieldFontSize | Form field font size |
| ilf_API_FromFieldTextColor | Form field text color |
| ilf_API_FromFieldBgColor | Form field background color |
Button Options (only available with Style 6)
| Parameter | Description |
|---|---|
| ilf_button_name | Button label text |
| ilf_button_color | Button text color |
| ilf_button_bg_color | Button background color |
| ilf_button_border_color | Button border color |
| ilf_button_hover_color | Button 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.
https://secure.quantumgateway.dev/cgi/web_order.php
Required Parameters
| Parameter | Type | Description |
|---|---|---|
| gwlogin required | string | Gateway Login ID |
| post_return_url required | string | Return URL (or use post_return_url_approved + post_return_url_declined) |
| item_description required | string | Item description |
| item_qty required | integer | Quantity (total = qty × cost) |
| item_cost required | string | Price per item (e.g., "19.95") |
Checkout Customization (Optional)
| Parameter | Description |
|---|---|
| company_logo | URL to your logo image |
| bg_color | Background color (RGB) |
| txt_color | Text color (RGB) |
| page_heading | Browser page title |
| payment_heading | Checkout heading text |
| skip_shipping_info | Hide shipping address fields |
| header_receipt | Custom receipt header |
| footer_receipt | Custom 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>.
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
| RequestType | Key | Description |
|---|---|---|
| ProcessSingleTransaction | RestrictKey | Direct charge, auth, void, return |
| AddUpdateCustomer | VaultKey | Add or update customer in vault |
| CreateTransaction | VaultKey | Charge a vault customer |
| CurrentBatch | RestrictKey | Show current unsettled batch |
| CustomerRemove | VaultKey | Remove customer from vault |
| CustomerTransactionHistory | RestrictKey | View the payment history of a customer |
| ExpiringRecurringCustomers | RestrictKey | Show expiring recurring customers |
| ExpiringVaultCustomers | VaultKey | Show expiring vault customers |
| RecurringHistory | RestrictKey | View recurring history for a customer |
| ResubmitTransaction | RestrictKey | Resubmit by TransactionID |
| SearchRecurring | RestrictKey | Search recurring |
| SearchTransactions | RestrictKey | Search transaction history |
| SearchVault | VaultKey | Search vault customers |
| ShowRecurringCustomer | RestrictKey | Show a recurring customer |
| ShowTransactionDetails | RestrictKey | Get full transaction details |
| ShowVaultDetails | VaultKey | Show a vault customer |
| UpdateRecurringCustomer | RestrictKey | Update a recurring customer |
| VaultCreateRecurring | VaultKey | Add vault customer to recurring |
ProcessSingleTransaction
Direct charge, authorization, void, or return. Uses RestrictKey for GatewayKey.
| Field | Values | Notes |
|---|---|---|
| TransactionType required | CREDIT or DEBIT | Credit card or debit |
| PaymentType required | CC or EFT | Payment method |
| Amount required | Numeric | Charge amount |
| ProcessType | SALES, AUTH_CAPTURE, AUTH_ONLY, RETURN, VOID, PREVIOUS_SALE | Default: SALES |
| CreditCardNumber | string | Card number |
| ExpireMonth, ExpireYear | string | Expiration date |
| CVV2 | string | Card verification value |
| TransactionID | string | Required for VOID and PREVIOUS_SALE |
| FirstName, LastName, Address, City, State, ZipCode | string | Billing info |
| EmailAddress | string | Customer 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')}")
SearchTransactions
Search your transaction history by date, status, customer info, and more. Uses RestrictKey.
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>SearchTransactions</RequestType>
<StartDate>2026-03-01</StartDate>
<EndDate>2026-03-29</EndDate>
<TransactionStatus>APPROVED</TransactionStatus>
</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);
foreach ($xmlResp->Transaction as $txn) {
echo "ID: {$txn->TransactionID} | ";
echo "Amount: {$txn->Amount} | ";
echo "Status: {$txn->Status}\n";
}
↩️ 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.
https://secure.quantumgateway.dev/cgi/authnet_aim.php
Required Parameters
| Parameter | Type | Description |
|---|---|---|
| x_login required | string | Gateway Login (same as gwlogin) |
| x_tran_key required | string | RestrictKey |
| x_amount required | string | Charge amount |
| x_card_num required | string | Credit card number |
| x_exp_date required | string | Expiration: mmyy, mm-yyyy, yyyy-mm, mm/yyyy, or yyyy/mm |
| x_method required | string | CC |
| x_type required | string | Transaction type (see below) |
Transaction Types (x_type)
| Value | Description |
|---|---|
| AUTH_CAPTURE | Authorize and capture in one step |
| AUTH_ONLY | Authorize only |
| CREDIT | Credit/charge |
| SALES | Sale (bypasses processing settings) |
| RETURN | Refund |
| VOID | Void (requires x_trans_id) |
| PRIOR_AUTH_CAPTURE | Capture a previous auth (requires x_trans_id) |
Optional Parameters
| Parameter | Description |
|---|---|
| x_card_code | CVV code |
| x_trans_id | Transaction ID (for VOID or PRIOR_AUTH_CAPTURE) |
| x_delim_char | Response delimiter (default |, also ~ or ,) |
| x_encap_char | Response encapsulation character |
| x_first_name, x_last_name | Customer name |
| x_address, x_city, x_state, x_zip | Billing address |
| x_email | Customer email |
| x_invoice_num, x_description | Invoice details |
| x_cust_id | Customer ID |
Response Format
Pipe-delimited by default (matches Auth.net AIM format):
1|1|1|This transaction has been approved.|A12345|Y|65735|...|M
| Position | Field | Notes |
|---|---|---|
| 1 | Response Code | 1=Approved, 2=Declined, 3=Error |
| 2 | Response Subcode | 1, 2, or 3 |
| 3 | Response Reason Code | 1, 2, or 3 |
| 4 | Response Reason Text | Decline reason if declined |
| 5 | Approval Code | 6-digit authorization code |
| 6 | AVS Result | Standard AVS response codes |
| 7 | Transaction ID | QGW transaction ID |
| 39 | Card Code Response | CVV 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]}");
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.