GLODIPAY IFRAME CARD API SPECIFICATION
VERSION 2.0.0
Table of Contents
- Introduction
- Endpoints
- Signature
- POST PAYMENT
- TRANSACTION QUERY
- NOTIFICATION
- Simulating Payments
Use the Test environment. No real charges are made.
| Without 3DS | 4111 1111 1111 1111 | 01/30 | 029 | — |
| Without 3DS | 5555 5555 5555 4444 | 01/30 | 029 | — |
| 3DS Payment | 4012 8888 8888 1881 | 01/30 | 029 | Success: 123456 / Fail: 111111 |
| 3DS Payment | 5111 1111 1111 1118 | 01/30 | 029 | Success: 123456 / Fail: 111111 |
| 3DS Payment | 4141 4141 4141 4141 | 12/30 | 123 | Success: 123456 / Fail: 111111 |
- Appendix
- Status Values
- Status Codes
- Currency Codes
- Country Codes
- Card Types
- Code Examples
- PHP
- Node.js
Introduction
This document describes the GLODIPAY iFrame Card API v2, which allows merchants to embed GLODIPAY's hosted card input form inside their own web page using an HTML <iframe>.
Flow overview:
- Merchant server sends a POST request to
/v2/card/iframeto create a card session. - GLODIPAY returns a signed, temporary URL pointing to a hosted card input form.
- Merchant embeds this URL inside an
<iframe>on their checkout page. - Buyer enters card details on the GLODIPAY-hosted form within the iframe.
- GLODIPAY processes the payment and sends the result via IPN to
notificationUrl, then redirects the buyer tocallbackUrlorerrorUrl.
The merchant's page maintains its layout while GLODIPAY handles the card data securely. The card session URL expires at the time specified by expiresAt (default: 24 hours).
Endpoints
| Test | Get it from the API Keys page of the Sandbox Merchant Dashboard |
| Production | Get it from the API Keys page of the Merchant Dashboard |
Signature
All requests must include a signature (RSA with MD5). Query responses, callback payloads and IPN payloads from GLODIPAY include a signature so you can verify them.
Generating a Signature (Merchant -> GLODIPAY)
Sign request payloads with your RSA Private Key (obtained from the Merchant Dashboard).
GLODIPAY rebuilds the canonical string from the body it receives: it only removes signature, then sorts and trims. It does not drop empty fields or stringify nested data, so send exactly the payload you signed.
Steps:
- Collect all request parameters except
signature. Remove keys with empty string ornullvalues. - Convert object/array values (e.g.
metadata,browserDetails) to JSON strings. - Sort the keys in natural ascending order (
SORT_NATURAL/localeComparewithnumeric: true). - Trim whitespace from all string values (recursive).
- Serialize to JSON string with all non-ASCII Unicode characters escaped to
\uXXXX(RFC 8259). - Sign with
md5WithRSAEncryptionusing your RSA Private Key. - Base64-encode the binary output.
Verifying a Signature (GLODIPAY -> Merchant)
Verify GLODIPAY responses and webhooks with the RSA Public Key (available in the Portal).
Steps:
- Separate
signaturefrom the payload. - Sort the remaining top-level keys in natural ascending order. Do not filter or stringify: values are already strings, empty fields are already omitted, and nested objects (
fees,metadata,paymentMethodDetails) stay as objects. - Trim all string values (recursive).
- Serialize to JSON string with all non-ASCII Unicode characters escaped to
\uXXXX(RFC 8259). - Verify with
md5WithRSAEncryptionusing your RSA Public Key. - Return value
1= valid.
Note (Node.js): Convert all numeric values to strings before sorting/serializing. Escape forward slashes in the JSON string: .replace(///g, '/').
Note (Unicode / RFC 8259): The JSON payload must escape all non-ASCII Unicode characters (e.g., "a with accent" must become "\u00e1") before signing -- this is required by RFC 8259. In PHP,
json_encode($data)does this by default -- do not useJSON_UNESCAPED_UNICODE. In Node.js,JSON.stringify()does not escape Unicode by default -- apply:.replace(/[^\\x00-\\x7F]/g, c => "\\u" + c.charCodeAt(0).toString(16).padStart(4, "0"))after serializing.
POST PAYMENT
Create a card iframe session. GLODIPAY returns a signed URL to a hosted card input form that the merchant embeds in an <iframe>.
Endpoint: POST /v2/card/iframe
Method: POST
Content-Type: application/x-www-form-urlencoded
Request Parameters
| merchantId | String(1,50) | M | Merchant's ID |
| orderRef | String(1,250) | M | Your transaction reference |
| amount | Float | M | Invoice amount. Up to 2 decimal places. Must be within the amount limits of your merchant account (default 1-2000) |
| currency | String(3) | M | ISO 4217 currency code supported by your assigned payment providers. E.g. USD |
| cancelUrl | String(1,300) | M | URL to redirect buyer on cancellation. |
| callbackUrl | String(1,300) | M | URL to redirect buyer after successful payment. Outside sandbox it must resolve to a public internet address. |
| notificationUrl | String(1,300) | M | Your server endpoint to receive IPN webhooks. Outside sandbox it must resolve to a public internet address. |
| errorUrl | String(1,300) | M | URL to redirect buyer on error. |
| orderDescription | String(max:3000) | O | Short description of the order. HTML tags are removed |
| metadata | String (JSON) | O | JSON-encoded string of key-value pairs. Returned in IPN and query responses |
| paymentMethod | String | O | Always set to card by the gateway |
| feeBySeller | Number(0-100) | O | Percentage of processing fee paid by merchant. 0 = buyer pays 100%. Up to 2 decimal places |
| billingEmail | String(max:255) | O | Buyer email address; must be a valid email |
| billingCountry | String | O | ISO 3166-1 alpha-2 country code |
| billingFirstName | String(max:255) | O | Billing first name |
| billingLastName | String(max:255) | O | Billing last name |
| billingStreet1 | String(max:255) | O | Billing street address line 1 |
| billingStreet2 | String(max:255) | O | Billing street address line 2 |
| billingCity | String(max:255) | O | Billing city |
| billingState | String(2,255) | O | Billing state / province |
| billingPostalCode | String(max:25) | O | Postal / ZIP code |
| billingPhoneCountryCode | String(max:10) | O | Phone country code |
| billingPhoneNumber | String(max:20) | O | Phone number |
| customerIp | String | O | IP address of the customer; must be a valid IP |
| websiteUrl | String(max:300) | O | Merchant website URL |
| brandName | String(1,255) | O | Override the brand name shown on the card form |
| colorMode | String(1,255) | O | Up to 3 colors separated by ---. E.g. #2e7d32---#e8f5e9---#81c784 |
| logoSource | String(1,255) | O | Override the logo shown on the card form |
| signature | String(max:750) | M | RSA-MD5 signature. See Signature |
| expiresAt | String | O | Session expiry, UTC, format YYYY-MM-DDTHH:mm:ss.ffffffZ (6-digit microseconds). E.g. 2025-09-14T14:03:42.102862Z. Default: 24 hours |
M = Mandatory, O = Optional. Callback, notification, cancel and error URLs also accept the snake_case names
callback_url,notification_url,cancel_url,error_url.
Example Request
{
"merchantId": "1100000123",
"orderRef": "ORDER-001",
"amount": "100.00",
"currency": "USD",
"paymentMethod": "card",
"callbackUrl": "https://yoursite.com/callback",
"notificationUrl": "https://yoursite.com/webhook",
"cancelUrl": "https://yoursite.com/cancel",
"errorUrl": "https://yoursite.com/error",
"orderDescription": "Test order",
"billingFirstName": "John",
"billingLastName": "Doe",
"billingStreet1": "123 Main St",
"billingStreet2": "",
"billingCity": "New York",
"billingEmail": "john@example.com",
"billingState": "NY",
"billingCountry": "US",
"billingPostalCode": "10001",
"billingPhoneCountryCode": "1",
"billingPhoneNumber": "5551234567",
"cardNumber": "4111111111111111",
"cardMonth": "12",
"cardYear": "30",
"cardSecurityCode": "123",
"websiteUrl": "https://yoursite.com",
"signature": "base64-encoded-signature"
}
Response
Content-Type: application/json
| status | String | created |
| transactionId | String (ULID) | GLODIPAY transaction ID |
| url | String | Signed URL to the hosted card input form -- embed this in an <iframe/> |
| message | String | Human-readable message |
Example -- Success:
{
"status": "created",
"transactionId": "01jza90dy6w82dfrrqvadn5vs4",
"url": "https://payment.gpayprocessing.com/v2/card-iframe/01jza90dy6w82dfrrqvadn5vs4?...",
"message": "Iframe card created successfully"
}
Example -- Error (HTTP 200):
{
"status": "error",
"transactionId": null,
"paymentLink": null,
"message": "No active payment service providers found. Please contact support."
}
Error messages and request errors are the same as the Checkout API (except the payment-link message). Signature, merchant status and domain errors are returned as JSON only when connectionMode: API is sent in the request.
Embedding the iFrame
After receiving the url, embed it on your page:
<iframe
src="{url}"
width="100%"
height="600"
frameborder="0"
scrolling="no"
allowtransparency="true">
</iframe>
The session expires at expiresAt; the transaction then moves to expired. Do not store or share the URL beyond the current checkout session.
The card form can only be embedded on your registered websites (the website in your KYB profile and the active domains of your merchant account). In sandbox it can be embedded anywhere.
TRANSACTION QUERY
Query the current status and full details of a transaction.
Endpoint: POST /v2/checkout/query
Method: POST
Content-Type: application/json
Request
| transactionId | String (ULID) | M | GLODIPAY transaction ID |
| signature | String(max:750) | M | RSA-MD5 signature |
Response
Content-Type: application/json
| merchantId | String | Merchant's ID |
| transactionId | String | GLODIPAY transaction ID (ULID) |
| transactionNumber | String | GLODIPAY human-readable transaction number |
| ref | String | Merchant's orderRef |
| currency | String | ISO 4217 currency code |
| amount | String | Invoice amount |
| paidAmount | String | Amount actually charged to buyer (including buyer fees) |
| settlementAmount | String | Amount to be settled to merchant |
| estimationSettlementAt | ISO 8601 datetime | Estimated settlement datetime |
| fees | JSON | Fee breakdown. See fees Object |
| status | String | Transaction status. See Status Values |
| statusCode | String | Numeric status code as a string. See Status Codes |
| metadata | JSON | metadata from the original session, decoded to an object (values as strings) |
| paymentMethodDetails | JSON | Payment method used. See paymentMethodDetails Object |
| transactionCreatedAt | ISO 8601 datetime | Transaction creation time in GLODIPAY system |
| originalTransactionCreatedAt | ISO 8601 datetime | Transaction creation time at the PSP |
| signature | String | RSA-MD5 signature -- verify with GLODIPAY public key |
The transaction object is returned at the top level (no status/data wrapper), without message and descriptor. All values are strings; empty fields are omitted. If you send the ID of the first attempt (group ID), the latest attempt is returned.
Errors (HTTP 200, no status field, first error only):
{
"errors": [
{ "field": "signature", "message": "signature is invalid." }
]
}
transactionId / signature | Validation message | Missing field, transactionId not a ULID, signature over 750 characters |
signature | signature is invalid. | Signature check failed |
null | Merchant status is {status} | Merchant account not active |
NOTIFICATION
GLODIPAY sends an HTTP POST to your notificationUrl when a transaction reaches a terminal state.
Method: POST
Content-Type: application/json
Delivery: Timeout 15 seconds (5 seconds to connect). notificationUrl must resolve to a public address. No automatic retry: a notification counts as delivered only when you return {"returnCode":"100"}; any other response or a timeout is recorded and not re-sent on a schedule. Use Transaction Query to recover a missed result, and handle duplicates idempotently.
Value format: every value is sent as a string (e.g. "100.00", "6"). Fields that are empty, null or zero are omitted.
Payload
| merchantId | String | M | Merchant's ID |
| transactionId | String | M | GLODIPAY transaction ID (ULID) |
| transactionNumber | String | M | GLODIPAY human-readable transaction number |
| ref | String | M | Merchant's orderRef |
| currency | String | M | ISO 4217 currency code |
| amount | String | M | Invoice amount |
| paidAmount | String | O | Amount actually charged to buyer (including buyer fees) |
| settlementAmount | String | O | Amount to be settled to merchant |
| estimationSettlementAt | ISO 8601 datetime | O | Estimated settlement datetime |
| fees | JSON | O | Fee breakdown. See fees Object |
| paymentMethodDetails | JSON | O | Payment method used. See paymentMethodDetails Object |
| status | String | M | Transaction status. See Status Values |
| statusCode | String | M | Numeric status code as a string. See Status Codes |
| metadata | JSON | O | Key-value pairs from the original session |
| message | String | O | Human-readable status message |
| descriptor | String | O | Transaction descriptor |
| transactionCreatedAt | ISO 8601 datetime | M | Transaction creation time in GLODIPAY system |
| originalTransactionCreatedAt | ISO 8601 datetime | M | Transaction creation time at the PSP |
| signature | String | M | RSA-MD5 signature -- verify with GLODIPAY public key |
fees Object
| buyer | String | Buyer-facing fee amount |
| seller | String | Merchant fee amount |
| rolling | String | Rolling reserve amount |
| operate | String | Total operating fees (processor + GLODIPAY + partner) |
| estimationRollingReleaseAt | ISO 8601 datetime | Estimated rolling reserve release datetime |
paymentMethodDetails Object
| displayName | String | Payment method label |
| group | String | Payment method group type |
| family | String | Payment method family type |
| type | String | Payment method type |
{type} | JSON | Optional. Payment method-specific details. Key equals the type value (e.g. card). Omitted when the provider returns no details. See card Object below. |