Skip to main content

Server-to-Server Card API

Ask AI

Submit card details directly from your server to charge the buyer without redirecting them to an external payment page.

Endpoint: POST /v2/card/api Content-Type: application/json

This endpoint requires PCI DSS compliance on your server, as raw card data passes through your systems.


Request Parameters

FieldTypeRequiredDescription
merchantIdString(1–50)MMerchant's ID. E.g. 1100000123
orderRefString(1–250)MUnique transaction reference per merchant. E.g. ORDER-2026-001
amountFloatMInvoice amount. Minimum: 1. Up to 2 decimal places. E.g. 100.00
currencyString(3)MISO 4217 currency code. E.g. USD
paymentMethodStringMMust be card
callbackUrlString(1–300)MRedirect URL after successful payment. Must be https. E.g. https://yoursite.com/return. See Callback URL
notificationUrlString(1–300)MYour server endpoint for IPN webhooks. Must be https. E.g. https://yoursite.com/webhook
cancelUrlString(1–300)MRedirect URL on cancellation. Must be https. E.g. https://yoursite.com/cancel
errorUrlString(1–300)MRedirect URL on error. Must be https. E.g. https://yoursite.com/error
cardNumberString(12–19)MCard number. E.g. 4111111111111111
cardMonthStringMExpiry month. E.g. 12
cardYearStringMExpiry year (2-digit). E.g. 30
cardSecurityCodeString(3–4)MCVV / CVC. E.g. 123
billingFirstNameString(max:255)MBilling first name. E.g. John
billingLastNameString(max:255)MBilling last name. E.g. Doe
billingEmailString(max:255)MBuyer email address. E.g. john.doe@example.com
billingStreet1String(max:255)MBilling street address line 1. E.g. 123 Main St
billingStreet2String(max:255)OBilling street address line 2. E.g. Suite 4B
billingCityString(max:255)MBilling city. E.g. New York
billingStateString(2–255)CBilling state / province. Required when billingCountry is US or CA. E.g. NY
billingCountryStringMISO 3166-1 alpha-2 country code. E.g. US. See Country Codes
billingPostalCodeString(max:25)MPostal / ZIP code. E.g. 10001
billingPhoneCountryCodeString(max:10)OPhone country code. E.g. 1 for US
billingPhoneNumberString(max:30)MPhone number. E.g. 5551234567
customerIpStringMIP address of the customer. E.g. 203.0.113.42
orderDescriptionString(max:3000)MShort description of the order. E.g. Order #2026-001
metadataJSONOKey-value pairs returned in IPN and query responses. E.g. {"orderId":"12345"}
transactionDocumentsJSONOSupporting documents for the transaction. E.g. [{"type":"invoice","url":"https://yoursite.com/inv.pdf"}]
feeBySellerNumber(0–100)O% of processing fee paid by merchant. 0 = buyer pays 100%. E.g. 50
websiteUrlString(max:300)OMerchant website URL. E.g. https://yoursite.com
expiresAtStringOSession expiry in ISO 8601 format. Default: 24 hours. E.g. 2026-04-22T10:00:00+00:00
browserDetailsJSONMBrowser fingerprint. See browserDetails Object
signatureString(max:750)MRSA-MD5 signature. See Signature

M = Mandatory, O = Optional, C = Conditional


browserDetails Object

Required on every S2S card request. Can be submitted as a JSON object (nested) or a JSON-encoded string. Keys are snake_case as listed below; camelCase keys are accepted and normalized.

FieldTypeRequiredDescription
accept_headerStringMBrowser Accept header
screen_widthStringMScreen width in pixels
screen_heightStringMScreen height in pixels
screen_color_depthStringMScreen color depth in bits
window_widthStringMViewport width in pixels
window_heightStringMViewport height in pixels
languageStringMBrowser language. E.g. en-US
java_enabledStringM"true" or "false"
user_agentStringMBrowser user agent string
time_zoneStringMUTC offset in hours. E.g. 7 for UTC+7
time_zone_nameStringMIANA timezone name. E.g. Asia/Ho_Chi_Minh
languagesArray<String>OOrdered list of browser preferred languages. E.g. ["vi-VN", "en-US", "en"]
platformString(max:255)OBrowser platform identifier. E.g. Win32, MacIntel, Linux x86_64
cookieEnabledBooleanOIndicates whether cookies are enabled in the browser
onlineBooleanOIndicates whether the browser reports an active network connection
hardwareConcurrencyIntegerONumber of logical CPU cores available to the browser. E.g. 8, 16
deviceMemoryNumberOApproximate device memory in GB reported by the browser. E.g. 4, 8, 16. May be unavailable on some browsers
availWidthIntegerOAvailable screen width excluding OS UI elements such as taskbars and docks
availHeightIntegerOAvailable screen height excluding OS UI elements such as taskbars and docks
currentUrlString(max:2048)OFull URL of the page where the payment request originated
hostnameString(max:255)OHostname (domain) of the current page. E.g. example.com

JavaScript snippet:

document.addEventListener('DOMContentLoaded', () => {
const browserDetails = {
accept_header: "{{ request()->header('Accept', 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8') }}",
screen_width: window.screen.width.toString(),
screen_height: window.screen.height.toString(),
screen_color_depth: window.screen.colorDepth.toString(),
window_width: String(window.innerWidth || document.documentElement.clientWidth || screen.width),
window_height: String(window.innerHeight || document.documentElement.clientHeight || screen.height),
language: navigator.language,
java_enabled: 'false',
user_agent: navigator.userAgent,
time_zone: String(-new Date().getTimezoneOffset() / 60),
time_zone_name: Intl.DateTimeFormat().resolvedOptions().timeZone

// ── Recommended fields (improves approval rate)
languages: navigator.languages,
platform: navigator.platform,
cookieEnabled: navigator.cookieEnabled,
online: navigator.onLine,
hardwareConcurrency: navigator.hardwareConcurrency,
deviceMemory: navigator.deviceMemory || "N/A",
availWidth: screen.availWidth,
availHeight: screen.availHeight,
currentUrl: location.href,
hostname: location.hostname,
};

document.getElementById('browserDetails').value = JSON.stringify(browserDetails, null, 2);
});

Response

All responses from this endpoint are wrapped by the gateway:

{ "status": "...", "message": "...", "data": { ... } }

Success (no 3DS required)

{
"status": "success",
"message": "The transaction has been successfully completed.",
"data": {
"transactionId": "01jwz13qfcx4z61ded3jcj0tf2"
}
}

3DS Authentication Required

{
"status": "redirect",
"message": "Please redirect the user to complete the payment.",
"data": {
"transactionId": "01jwz0ty1640apxvmyzqpvc18a",
"url": "https://payment.gpayprocessing.com/card/3ds/01jwz0ty1640apxvmyzqpvc18a"
}
}

Redirect the buyer to data.url to complete 3DS. After verification, GLODIPAY processes the transaction and sends the result via IPN to notificationUrl and redirects the buyer to callbackUrl.

Pending

{
"status": "pending",
"message": "pending",
"data": {
"transactionId": "01jwz0ty1640apxvmyzqpvc18a"
}
}

Validation Error (HTTP 422)

{
"status": "error",
"message": "Invalid request data.",
"errors": [
{
"field": "billingEmail",
"message": ["The billing email field is required."]
}
]
}

Processing Error (HTTP 400/500)

{
"status": "error",
"message": "No payment provider could process this transaction. Please try again or contact support.",
"data": {
"transactionId": "01jwz0ty1640apxvmyzqpvc18a"
}
}

Auto-Cascade

When enabled, the gateway automatically retries failed charges across multiple providers. Only the final outcome is returned.


IPN Notification

GLODIPAY posts a payment result to your notificationUrl when the transaction reaches a terminal state. See IPN Notifications for the full payload and acknowledgement format.


Transaction Query

Use POST /v2/checkout/query to check the status of a transaction at any time. See Transaction Query.


Source

This page is derived from GLODIPAY_Server_To_Server_API_Specification_v2.

Bookmarks

No bookmarks yet.
Hover over a heading and click to save a section.