cygma.cloud. This eGift reference also lives at cygma.cloud/egift.All APIs →eGift API
Full eGiftSolutions Message Spec (G1) — sell, redeem, void, top-up, reissue, loyalty points, and terminal management. Bearer-key authenticated, idempotent retries, optional MSR swipe input. Gift-card track data isn’t PCI-scoped — TLS is sufficient.
Specification: eGiftSolutions Message Format API · Version G1. Where these docs and the upstream spec disagree, trust upstream.
Introduction
The eGift API is the EPI wrapper over the eGiftSolutions stored-value + loyalty network. Integrate over a clean REST surface — JSON endpoints under https://www.egift.online/api/egift/v1/*, Bearer-key auth.
A “Terminal Type” (assigned during certification by eGiftSolutions support) identifies your integration on every request. The 15-digit Terminal ID is a composite: MID(7) + LID(4) + TID(4) — e.g. 000123400010001 = merchant 0001234, location 0001, terminal 0001.
Card numbers are digits only. Strip whitespace and hyphens before sending — the API rejects formatted PANs with a 400. The official SDK handles this for you.
Quickstart
- Get your API key from the merchant portal — starts with
egw_followed by 32 hex characters. - Call
POST /api/egift/v1/balancewhen a customer enters a gift card code. - Call
POST /api/egift/v1/redeemat order placement. If cancelled later, callPOST /api/egift/v1/void.
For reload / top-up flows (coffee shops, loyalty), use POST /api/egift/v1/add-value.
curl -X POST https://www.egift.online/api/egift/v1/balance \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "8609609666096223"
}'Authentication
Every request needs an Authorization: Bearer egw_<your-key>header. Each merchant has one key (plus optionally anegw_test_*sandbox key); the key resolves server-side to the merchant’s 15-digit gateway credentials (MID + LID + TID). Keys are minted and revoked from the ISO360 staff panel.
Authorization: Bearer egw_1a2b3c4d5e6f7890abcdef1234567890
Transaction-type table
Reference table of every transaction code defined by the spec. The Future Use column marks ops that are reserved in the spec but not yet enabled in production by eGiftSolutions — they round-trip but may decline.
| Code | Transaction | Category | Future |
|---|---|---|---|
| 001 | Card balance inquiry | Gift card | |
| 002 | Redeem | Gift card | |
| 003 | Add value | Gift card | |
| 004 | Void | Gift card | |
| 005 | Card activation | Gift card | |
| 006 | Deactivation with refund | Gift card | |
| 007 | Deactivation without refund | Gift card | |
| 008 | Reissue card | Gift card | |
| 009 | Store credit | Gift card | |
| 012 | Tip adjust | Gift card | |
| 014 | Balance transfer | Gift card | |
| 022 | Expiration date adjust | Gift card | Future |
| 200 | Card history | Gift card | |
| 020 | Add points | Loyalty | |
| 021 | Redeem points | Loyalty | |
| 023 | Point balance inquiry | Loyalty | |
| 024 | Activate points | Loyalty | Future |
| 025 | Point refund | Loyalty | Future |
| 026 | Point balance transfer | Loyalty | Future |
| 027 | Void points | Loyalty | Future |
| 210 | Point history | Loyalty | Future |
| 010 | Sign-On (terminal session) | Management | Future |
| 011 | Sign-Off (terminal session) | Management | Future |
| 301 | Sign in (cashier) | Management | Future |
| 302 | Sign out (cashier) | Management | Future |
| 303 | Change PIN | Management | Future |
| 118 | Customer service (Text field) | Terminal |
MSR / track data
Every endpoint that accepts a card accepts either cardNumber (key-entered) OR raw track1 / track2 from an MSR. Pass exactly one set. The spec ignores Track 3 entirely and prefers Track 2 when both are provided. Set track2FormatCode = 1 (or any non-zero) when sending raw swipe data; 0 means terminal-formatted.
Gift-card track data is not PCI-scoped — these are merchant-issued stored-value SVCs, not real interchange credentials. TLS is sufficient.
// Track 2 swipe — most common from MSR readers
{
"track2": ";8609609666096223=29121011000000000000?"
}
// Track 1 swipe
{
"track1": "%B8609609666096223^GIFT/CARD ^29121010000000000000?"
}Gift card transactions
Stored-value operations on issued gift cards — balance, redeem, top-up, void, activate, reissue, deactivate, store credit, tip adjust, balance transfer, expiration adjust, history.
Balance inquiry
Returns dollar and point balance for any of the merchant’s eGiftSolutions cards. No transaction is recorded — informational only (Result Code 501).
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The gift card number (PAN) or MSR/track data. |
curl -X POST https://www.egift.online/api/egift/v1/balance \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "8609609666096223"
}'Redeem
Deducts transaction amount, or remaining balance, whichever is smaller, from stored card balance. Returns the balance left. You can adjust a tip on the fly (aka Counter Tip or Tip in Transaction) by putting the primary amount in amountCents and the tip in tipCents.
Pass an Idempotency-Key header. Without one, a network flake on retry can deduct twice. See Idempotency.
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The gift card number. |
amountCentsrequired | integer | Amount to redeem, in cents. Capped at the remaining balance. |
tipCentsoptional | integer | Optional counter-tip added to this redemption, in cents. |
orderRefoptional | string | Your order/reference id, echoed on the transaction. |
curl -X POST https://www.egift.online/api/egift/v1/redeem \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "8609609666096223",
"amountCents": 1500,
"tipCents": 0,
"orderRef": "ORDER-1042"
}'Add value
Adds transaction amount to stored card balance. If card is already active, transaction is possible — otherwise, perform an Activation (code 005) first.
Add Value transactions may NOT be voided. The spec recommends reversing an Add Value with a Redeem against the same card for the same amount, since real cash / credit was exchanged for stored balance.
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The gift card number (must already be active). |
amountCentsrequired | integer | Amount to add to the balance, in cents. |
orderRefoptional | string | Your order/reference id. |
curl -X POST https://www.egift.online/api/egift/v1/add-value \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "8609609666096223",
"amountCents": 1000,
"orderRef": "ORDER-1042"
}'Void
Reverses a specific transaction. Internally flags the transaction voided so it cannot be voided more than once. The original Transaction ID is required — pass it as transactionId.
You may NOT void Add Value (003) or Activation (005) transactions. To reverse an Activation, deactivate the card (007); to reverse an Add Value, redeem the same amount back.
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The gift card number. |
transactionIdrequired | string | The id of the transaction to reverse. |
curl -X POST https://www.egift.online/api/egift/v1/void \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "8609609666096223",
"transactionId": "A1B2C3"
}'Activate card
Like Add Value but also creates a new card record in the database. Only valid on a card that has never been activated — if the card already exists, the gateway declines with code 013 (Card Already Active) and you should switch to Add Value (003).
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The new gift card number to activate. |
amountCentsrequired | integer | Opening balance to load, in cents. |
curl -X POST https://www.egift.online/api/egift/v1/activate \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "6265555707036131",
"amountCents": 1000
}'Deactivate card (with refund)
Changes card status to inactive, zeroes the balance. Use this when reversing an Activation — the spec’s recommended way to “void” the activation since 005 is un-voidable.
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The gift card number to deactivate. |
refundoptional | boolean | true refunds the remaining balance (code 006); false / omitted deactivates with no refund (code 007). |
curl -X POST https://www.egift.online/api/egift/v1/deactivate \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "8609609666096223",
"refund": true
}'Deactivate card (no refund)
Changes card status to inactive but does NOT zero the balance. The remaining balance is returned in Amount 2 so the cashier can issue a cash / credit refund to the customer. Card stays deactivated.
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The gift card number to deactivate. |
refundoptional | boolean | Pass false (or omit) for the no-refund variant (code 007). |
curl -X POST https://www.egift.online/api/egift/v1/deactivate \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "8609609666096223",
"refund": false
}'Reissue card
Like Deactivate (006) but also creates a new card record in the database and transfers the old card’s balance to it. Used when issuing a replacement card.
| Field | Type | Description |
|---|---|---|
oldCardNumberrequired | string | The existing card whose balance moves. |
newCardNumberrequired | string | The new replacement card to create + load. |
curl -X POST https://www.egift.online/api/egift/v1/reissue \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"oldCardNumber": "8609609666096223",
"newCardNumber": "8609609666096248"
}'Store credit
Functionally identical to Add Value / Activation, but records the load as Store Credit. Add Value / Activation assume cash or credit was tendered into the business; Store Credit assumes goods came back in exchange for merchandise credit. Affects reporting only — also used for promotional / donation loads where no money is taken in.
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The gift card number to load. |
amountCentsrequired | integer | Store-credit amount to load, in cents. |
curl -X POST https://www.egift.online/api/egift/v1/store-credit \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "6265555707036131",
"amountCents": 1500
}'Tip adjust
Modifies a specific previous redemption — updates the tip and total. Requires the original Transaction ID (transactionId) plus the new tip. Restaurant flow: tip card on the receipt at end of meal, then the POS posts a tip adjust before close-of-day.
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The gift card number. |
originalTransactionIdrequired | string | The redemption transaction to adjust. |
tipCentsrequired | integer | The tip to add, in cents. |
curl -X POST https://www.egift.online/api/egift/v1/tip-adjust \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "8609609666096223",
"originalTransactionId": "A1B2C3",
"tipCents": 200
}'Balance transfer
Like Reissue (008), but the receiving card already exists on the gateway. Pass the existing source card, an already-activated destination card, and optionally an amount — the gateway debits the source by that amount and credits the destination the same. Returns the new balances on both sides.
| Field | Type | Description |
|---|---|---|
fromCardNumberrequired | string | The existing card supplying the balance (12–19 digits). |
toCardNumberrequired | string | The destination card — must already exist on the gateway. For a fresh pool card, call /activate with amountCents: 0 first. |
amountCentsoptional | integer | Partial transfer amount in cents. Omit to move the entire source balance (source ends at $0.00). |
idempotencyKeyoptional | string | Replay protection — a repeat within 24h returns the original response without re-hitting the gateway. |
Common use cases
- Partial gift to a recipient. Customer wants to send
$10of their$25balance to a friend. Activate a fresh pool card at$0, then transfer withamountCents: 1000. Source ends at$15, recipient card at$10. - Full balance move (damaged stripe replacement).A card’s mag stripe is damaged. Key-enter the bad card as the source, swipe the replacement as the destination, and omit
amountCentsto move the entire balance off the old card in one call.
curl -X POST https://www.egift.online/api/egift/v1/balance-transfer \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"fromCardNumber": "8609609666096223",
"toCardNumber": "8609609666096248",
"amountCents": 2500
}'Expiration date adjust
Modifies a specific card to update its expiration date to the default or specified value. Future implementation — round-trips today but the upstream gateway may not enforce the change yet.
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The gift card number. |
newExpirationoptional | string | New expiry as YYYYMMDD. Omit to reset to the account default. |
curl -X POST https://www.egift.online/api/egift/v1/expiration-adjust \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "8609609666096223",
"newExpiration": "20271231"
}'Card history
Returns the card’s transaction history for a specific date range as a JSON array. Used primarily to print a card-history receipt.
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The gift card number. |
fromDaterequired | string | Range start, YYYYMMDD. |
toDaterequired | string | Range end, YYYYMMDD. |
curl -X POST https://www.egift.online/api/egift/v1/history \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "8609609666096223",
"fromDate": "20260101",
"toDate": "20260201"
}'Sell — issue a new card
Charges a buyer's credit card on the merchant's processing MID and emails a PDF gift card to the recipient. Wraps an Activation under the hood plus the payment leg.
Sell a gift card
Issue a new card to a recipient. Charges the buyer’s credit card on the merchant’s Cygma processing MID and emails a PDF gift card to the recipient. Under the hood: payment leg → Activate (005) on a freshly-minted card number.
| Field | Type | Description |
|---|---|---|
amountCentsrequired | integer | Face value to load on the new card, in cents. |
buyer.namerequired | string | Purchaser name (shown on the receipt). |
buyer.emailrequired | string | Purchaser email — receives the payment receipt. |
recipient.namerequired | string | Who the card is issued to. |
recipient.emailrequired | string | Recipient email — receives the PDF gift card. |
recipient.messageoptional | string | Optional personal note printed on the card. |
card.numberrequired | string | Buyer's card PAN charged for the purchase. |
card.expMonthrequired | string | Two-digit expiry month. |
card.expYearrequired | string | Four-digit expiry year. |
card.cvvrequired | string | Card security code. |
card.street1optional | string | Billing street for AVS. |
card.postalCodeoptional | string | Billing ZIP for AVS. |
{
"amountCents": 5000,
"buyer": { "name": "Jane Doe", "email": "jane@example.com" },
"recipient": { "name": "John Smith", "email": "john@example.com",
"message": "Happy birthday!" },
"card": {
"number": "4242424242424242",
"expMonth": "12",
"expYear": "2030",
"cvv": "123",
"street1": "412 W State St",
"postalCode": "83702"
}
}Loyalty
Point-based loyalty operations on the same card. Amounts are unsigned point counts (not cents). Same card can carry both dollar balance and point balance simultaneously.
Add points
Adds transaction amount to stored card point total. Loyalty implementation only. Pass the point amount as a plain integerpoints field.
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The loyalty card number. |
pointsrequired | integer | Points to add (plain count, not cents). |
orderRefoptional | string | Your order/reference id, echoed on the transaction. |
curl -X POST https://www.egift.online/api/egift/v1/loyalty/add-points \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "8609609666096223",
"points": 150,
"orderRef": "ORDER-1042"
}'Redeem points
Deducts transaction amount from stored point total. Loyalty implementation only. Decline 101 (Insufficient Funds) applies to points the same as dollars — the wrapper sets balance to zero and returns a partial-redemption hint, leaving the terminal to split-pay if you support that flow.
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The loyalty card number. |
pointsrequired | integer | Points to redeem (plain count, not cents). |
orderRefoptional | string | Your order/reference id, echoed on the transaction. |
curl -X POST https://www.egift.online/api/egift/v1/loyalty/redeem-points \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "8609609666096223",
"points": 500,
"orderRef": "ORDER-1042"
}'Point balance inquiry
Returns point total only. Loyalty implementation only — does NOT return the dollar balance. Use code 001 if you need both (it returns dollar balance and the upstream gateway includes a separate point line in the Text field on loyalty-enabled accounts).
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The loyalty card number to inquire. |
curl -X POST https://www.egift.online/api/egift/v1/loyalty/balance \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "8609609666096223"
}'Activate points
Loyalty equivalent of card Activation (005) — creates a new loyalty-enabled card and seeds it with a starting point balance. Future Use per the spec: round-trips today, may decline at the upstream gateway until enabled for your merchant.
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The new loyalty card number to create. |
pointsrequired | integer | Starting point balance to seed. |
curl -X POST https://www.egift.online/api/egift/v1/loyalty/activate \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "6265555707036131",
"points": 500
}'Point refund
Reverse a point redemption — restores points to the card balance. Future Use per the spec; behaves like a Void (004) over loyalty points. The original Transaction ID identifies the redemption being refunded.
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The loyalty card number. |
originalTransactionIdrequired | string | The redemption transaction to reverse. |
pointsrequired | integer | Points to restore to the card. |
curl -X POST https://www.egift.online/api/egift/v1/loyalty/refund \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "8609609666096223",
"originalTransactionId": "H7J8K9",
"points": 500
}'Point balance transfer
Move the entire point balance from one card to another (both must already exist). Future Use per the spec.
| Field | Type | Description |
|---|---|---|
fromCardNumberrequired | string | The card supplying the points. |
toCardNumberrequired | string | The destination card (must already exist). |
curl -X POST https://www.egift.online/api/egift/v1/loyalty/transfer \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"fromCardNumber": "8609609666096223",
"toCardNumber": "8609609666096248"
}'Void points
Reverse an Add Points (020) or Redeem Points (021) transaction — flags it voided so it cannot be voided more than once. Pass the original transaction ID as transactionId. Future Use.
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The loyalty card number. |
transactionIdrequired | string | The Add/Redeem Points transaction to void. |
curl -X POST https://www.egift.online/api/egift/v1/loyalty/void \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "8609609666096223",
"transactionId": "G6H7J8"
}'Point history
Loyalty equivalent of Card History (200) — returns point movements over a date range as a JSON array. Future Use.
| Field | Type | Description |
|---|---|---|
cardNumberrequired | string | The loyalty card number. |
fromDaterequired | string | Range start, YYYYMMDD. |
toDaterequired | string | Range end, YYYYMMDD. |
curl -X POST https://www.egift.online/api/egift/v1/loyalty/history \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cardNumber": "8609609666096223",
"fromDate": "20260101",
"toDate": "20260201"
}'Management Tools
Terminal session + cashier identity. Sign-On / Sign-Off track terminal sessions; Sign in / Sign out + Change PIN scope to individual cashier IDs. All five are marked Future Use in the spec — round-trip today, behavior may be a no-op at the gateway until enabled.
Sign in
Cashier sign-in with or without a PIN. Records the cashier as the active operator on the terminal so subsequent transactions attribute to them in reporting. The session is tied to the Terminal ID; sign-out (302) or sign-on (010) by another cashier ends it.
| Field | Type | Description |
|---|---|---|
cashierIdrequired | string | The cashier / operator id becoming active. |
pinoptional | string | Optional PIN — the spec allows sign-in with or without one. |
Future Use per the spec. The upstream gateway accepts the request and returns Result 501 (informational) — full session tracking depends on a per-merchant enable flag at eGiftSolutions.
curl -X POST https://www.egift.online/api/egift/v1/management/sign-in \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cashierId": "0042",
"pin": "1234"
}'Sign out
End the active cashier session. reasonCode is required. Used for shift-management reporting — at end-of-shift the POS issues a sign-out before close-of-day.
| Field | Type | Description |
|---|---|---|
cashierIdrequired | string | The cashier / operator id signing out. |
reasonCoderequired | string | Why the session ended — 01 end of shift, 02 break, 03 manager override, 04 forced, 99 other. |
Future Use per the spec.
curl -X POST https://www.egift.online/api/egift/v1/management/sign-out \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cashierId": "0042",
"reasonCode": "01"
}'Change PIN
Rotate a cashier’s PIN. Both old and new PIN are required. Used by self-service password rotation built into POS systems.
| Field | Type | Description |
|---|---|---|
cashierIdrequired | string | The cashier whose PIN is changing. |
oldPinrequired | string | The current PIN. |
newPinrequired | string | The replacement PIN. |
Future Use per the spec.
curl -X POST https://www.egift.online/api/egift/v1/management/change-pin \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{
"cashierId": "0042",
"oldPin": "1234",
"newPin": "8675"
}'Sign-On (terminal session)
Open a terminal-level sessionwith the gateway. Distinct from Sign in (301), which scopes to a cashier — Sign-On scopes to the device itself. Some terminal-based integrations issue Sign-On at boot and Sign-Off at shutdown to bracket their activity for the gateway’s session log.
Future Use per the spec.
curl -X POST https://www.egift.online/api/egift/v1/management/sign-on \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{}'Sign-Off (terminal session)
Close the active terminal session. Pair with Sign-On (010). Useful for terminals that want explicit session boundaries for reconciliation.
Future Use per the spec.
curl -X POST https://www.egift.online/api/egift/v1/management/sign-off \
-H "Authorization: Bearer egw_xxx" \
-H "Content-Type: application/json" \
-d '{}'Codes, errors, sandbox, SDK
Everything you need on hand at integration time — full decline / result code tables from §10 and §11 of the spec, the REST status code map, the companion field-override spreadsheet summary, sandbox rules, and the SDK.
Decline / error codes (§10)
Returned as the declineCode on a failed request. For successful transactions it is 000 — every non-zero code means the gateway rejected the request. Match these against your error UI.
| Code | Message | Meaning |
|---|---|---|
| 000 | No Error | Transaction approved. |
| 001 | Invalid Account Id | Operation failed — no such card. |
| 002 | Account Not Active | Operation failed — card not active. |
| 003 | Invalid Currency | Operation failed — wrong currency. |
| 004 | Invalid Account Type | Cannot operate in this Group (wrong Group ID). |
| 005 | Invalid Vendor Id | Cannot operate in this Store (wrong Store ID). |
| 006 | Empty Password | Operation failed — missing password. |
| 007 | Password Not Correct | Operation failed — wrong password. Try again. |
| 008 | Too Many Wrong Passwords | Operation failed — call for support. |
| 009 | Card Already Active | Activation rejected — use Add Value (003) instead. |
| 010 | Transaction Already Canceled | Void rejected — transaction already voided. |
| 011 | Transaction Not Found | Transaction ID not valid. |
| 012 | Card Expired | Card has passed its expiration date. |
| 013 | Server Error | Call merchant support. |
| 014 | Card Cannot Be Activated | Bad check digit on card number. |
| 015 | Invalid Terminal ID | Terminal ID not in the database — check MID+LID+TID composite. |
| 016 | Malformed Request | Request is malformed; declined. |
| 100 | No Funds; Declined | No funds on card; declined. |
| 101 | Insufficient Funds | Partial: gateway zeroes balance, terminal may split-pay the remainder. |
Result message codes (§11)
The top-level outcome of the request. Drives the high-level branch on your side — success, decline, info, void.
| Code | Message | Meaning |
|---|---|---|
| 501 | Informational — non-monetary | Approved but no money / points moved. Used by Balance Inquiry, Customer Service Request, etc. |
| 502 | Success | Monetary transaction approved and committed. |
| 503 | Declined | See Decline Reason field for the specific code. |
| 902 | Voided by Host | Transaction voided server-side — usually a fraud / risk hold. |
REST status codes
The API maps the gateway result + decline code into a familiar HTTP envelope. The original decline code is preserved on the response body so you can branch on it directly.
| Status | Meaning |
|---|---|
| 400 | Bad JSON, missing field, schema mismatch, or G1 decline 016 (malformed). |
| 401 | Missing / wrong / revoked bearer key. |
| 402 | Payment declined — G1 declines 002 / 100 / 101. |
| 404 | Card or transaction not found — G1 declines 001 / 011. |
| 409 | Conflict — already-voided (010), already-active (009), expired (012). |
| 422 | Bad card check digit (014) or invalid Terminal ID (015). |
| 502 | Gateway error (013) or upstream timeout. |
{ "ok": false, "message": "Human-readable reason.", "declineCode": "100" }Field companion spec
The G1 Message Formats Companion is the source of truth for which fields each transaction overrides. Most of the 26 input fields stay identical across every transaction — only a handful of fields (Transaction Code, Amount 1, Amount 2, Text) actually vary by op. The table below captures every override verbatim from the companion. A blank cell (“—”) means the field carries its default treatment from §9 of the spec.
Per-transaction overrides
| Transaction | Code | Amount 1 | Amount 2 | Text |
|---|---|---|---|---|
| Balance inq | 1 | Optional, ignored | — | — |
| Redeem | 2 | Transaction amount in cents | Tip amt | — |
| Add value | 3 | — | Optional, ignored | — |
| Void trans | 4 | — | — | Tran # to void |
| Activate card | 5 | — | — | — |
| Deact w/refund | 6 | — | — | — |
| Deact no refund | 7 | — | — | — |
| Reissue card | 8 | — | — | 2nd card |
| Store credit | 9 | — | — | — |
| Tip Adjust | 12 | — | — | Tran # to adj |
| Balance transfer | 14 | — | — | 2nd card |
| Exp Date Adjust * | 22 | — | — | (Opt) Date |
| Add points | 20 | # Points × 100 | — | — |
| Redeem points | 21 | — | — | — |
| Point bal inq | 23 | — | — | — |
| Activate points * | 24 | # Points × 100 | — | — |
| Point refund * | 25 | — | — | — |
| Point bal xfer * | 26 | — | — | 2nd card |
| Void points * | 27 | — | — | Tran # to void |
| History | 200 | — | — | Req. Params |
| Point history * | 210 | — | — | — |
| Sign On * | 10 | Reserved code for future trans | — | Reserved |
| Sign Off * | 11 | — | — | — |
| Customer Svc | 118 | Optional, ignored | — | Req. Type |
* = Future Use per the spec. Cells marked “—” mean the field carries its default treatment from §9 of the spec (no per-transaction override). Sign On notes “Reserved code for future trans” in Amount 1, History packs the from/to date range into Text RS-delimited (see the History section above), and Customer Svc packs a request type code in Text (1=Help, 2=Paper, 4=Cards).
Idempotency
Every monetary endpoint (redeem, void, add-value, activate, tip-adjust, all loyalty operations) accepts an Idempotency-Key header. First call processes normally; retries within 24h return the cached response without re-hitting the gateway. Use <orderRef>-<operation>as the key so retries across multiple ops don’t collide.
Idempotency-Key: ORDER-1042-redeem Idempotency-Key: ORDER-1042-void Idempotency-Key: ORDER-1042-points
Sandbox
Ask your ISO360 rep for a test key. egw_test_<32-hex>keys route to a deterministic stub — no gateway calls, no real balances move. Card-number suffix drives the outcome; loyalty calls return synthesized point balances with the same deterministic suffix rules (last 4 digits × 10 = point balance).
// Card-suffix rules in test mode: ending 0000 → 404 not found (G1 decline 001) ending 1111 → 402 insufficient balance (G1 decline 100) ending 4242 → success, starting balance $50.00 ending 4111 → success, starting balance $100.00 anything else → success, starting balance $25.00
JavaScript SDK
A tiny universal client at https://www.egift.online/egift-sdk.js — works in browsers AND Node ≥18.
TypeScript types at https://www.egift.online/egift-sdk.d.ts.
<script src="https://www.egift.online/egift-sdk.js"></script>
<script>
const eg = new EGift({ apiKey: "egw_..." });
const balance = await eg.balance("8609609666096223");
</script>Try it
Paste your API key, pick an endpoint, and call the live API. Request goes from this page to the same URL your cart will use — what you see here is what your integration will do.
POST https://www.egift.online/api/egift/v1/balancecurl -X POST https://www.egift.online/api/egift/v1/balance \
-H "Authorization: Bearer egw_..." \
-H "Content-Type: application/json" \
-d '{
"cardNumber": ""
}'⚠️ Uses YOUR live API key against the production gateway. Use a test card from your pool or an egw_test_* key.