Part of the Cygma developer platform. Every API — payments, gift cards, and card-present terminals — is centralized at cygma.cloud. This eGift reference also lives at cygma.cloud/egift.All APIs →
Stored-value gift cards · Loyalty · JSON over HTTPS

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.

Overview

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.

3 steps

Quickstart

  1. Get your API key from the merchant portal — starts with egw_ followed by 32 hex characters.
  2. Call POST /api/egift/v1/balance when a customer enters a gift card code.
  3. Call POST /api/egift/v1/redeem at order placement. If cancelled later, call POST /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"
}'
Bearer key

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
Every G1 transaction code

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.

CodeTransactionCategoryFuture
001Card balance inquiryGift card
002RedeemGift card
003Add valueGift card
004VoidGift card
005Card activationGift card
006Deactivation with refundGift card
007Deactivation without refundGift card
008Reissue cardGift card
009Store creditGift card
012Tip adjustGift card
014Balance transferGift card
022Expiration date adjustGift cardFuture
200Card historyGift card
020Add pointsLoyalty
021Redeem pointsLoyalty
023Point balance inquiryLoyalty
024Activate pointsLoyaltyFuture
025Point refundLoyaltyFuture
026Point balance transferLoyaltyFuture
027Void pointsLoyaltyFuture
210Point historyLoyaltyFuture
010Sign-On (terminal session)ManagementFuture
011Sign-Off (terminal session)ManagementFuture
301Sign in (cashier)ManagementFuture
302Sign out (cashier)ManagementFuture
303Change PINManagementFuture
118Customer service (Text field)Terminal
Swiped cards

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?"
}
01
Surface 1 of 4

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.

13 transaction codes · 001–014 + 022 + 200
POST /api/egift/v1/balance · G1 code 001

Balance inquiry

Returns dollar and point balance for any of the merchant’s eGiftSolutions cards. No transaction is recorded — informational only (Result Code 501).

FieldTypeDescription
cardNumberrequiredstringThe 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"
}'
POST /api/egift/v1/redeem · G1 code 002

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.

FieldTypeDescription
cardNumberrequiredstringThe gift card number.
amountCentsrequiredintegerAmount to redeem, in cents. Capped at the remaining balance.
tipCentsoptionalintegerOptional counter-tip added to this redemption, in cents.
orderRefoptionalstringYour 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"
}'
POST /api/egift/v1/add-value · G1 code 003

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.

FieldTypeDescription
cardNumberrequiredstringThe gift card number (must already be active).
amountCentsrequiredintegerAmount to add to the balance, in cents.
orderRefoptionalstringYour 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"
}'
POST /api/egift/v1/void · G1 code 004

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.

FieldTypeDescription
cardNumberrequiredstringThe gift card number.
transactionIdrequiredstringThe 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"
}'
POST /api/egift/v1/activate · G1 code 005

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).

FieldTypeDescription
cardNumberrequiredstringThe new gift card number to activate.
amountCentsrequiredintegerOpening 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
}'
POST /api/egift/v1/deactivate · G1 code 006

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.

FieldTypeDescription
cardNumberrequiredstringThe gift card number to deactivate.
refundoptionalbooleantrue 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
}'
POST /api/egift/v1/deactivate · G1 code 007

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.

FieldTypeDescription
cardNumberrequiredstringThe gift card number to deactivate.
refundoptionalbooleanPass 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
}'
POST /api/egift/v1/reissue · G1 code 008

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.

FieldTypeDescription
oldCardNumberrequiredstringThe existing card whose balance moves.
newCardNumberrequiredstringThe 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"
}'
POST /api/egift/v1/store-credit · G1 code 009

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.

FieldTypeDescription
cardNumberrequiredstringThe gift card number to load.
amountCentsrequiredintegerStore-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
}'
POST /api/egift/v1/tip-adjust · G1 code 012

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.

FieldTypeDescription
cardNumberrequiredstringThe gift card number.
originalTransactionIdrequiredstringThe redemption transaction to adjust.
tipCentsrequiredintegerThe 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
}'
POST /api/egift/v1/balance-transfer · G1 code 014

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.

FieldTypeDescription
fromCardNumberrequiredstringThe existing card supplying the balance (12–19 digits).
toCardNumberrequiredstringThe destination card — must already exist on the gateway. For a fresh pool card, call /activate with amountCents: 0 first.
amountCentsoptionalintegerPartial transfer amount in cents. Omit to move the entire source balance (source ends at $0.00).
idempotencyKeyoptionalstringReplay 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 $10 of their $25 balance to a friend. Activate a fresh pool card at $0, then transfer with amountCents: 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 amountCents to 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
}'
POST /api/egift/v1/expiration-adjust · G1 code 022 · Future Use

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.

FieldTypeDescription
cardNumberrequiredstringThe gift card number.
newExpirationoptionalstringNew 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"
}'
POST /api/egift/v1/history · G1 code 200

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.

FieldTypeDescription
cardNumberrequiredstringThe gift card number.
fromDaterequiredstringRange start, YYYYMMDD.
toDaterequiredstringRange 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"
}'
02
Surface 2 of 4

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.

EPI-only convenience endpoint
POST /api/egift/v1/sell

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.

FieldTypeDescription
amountCentsrequiredintegerFace value to load on the new card, in cents.
buyer.namerequiredstringPurchaser name (shown on the receipt).
buyer.emailrequiredstringPurchaser email — receives the payment receipt.
recipient.namerequiredstringWho the card is issued to.
recipient.emailrequiredstringRecipient email — receives the PDF gift card.
recipient.messageoptionalstringOptional personal note printed on the card.
card.numberrequiredstringBuyer's card PAN charged for the purchase.
card.expMonthrequiredstringTwo-digit expiry month.
card.expYearrequiredstringFour-digit expiry year.
card.cvvrequiredstringCard security code.
card.street1optionalstringBilling street for AVS.
card.postalCodeoptionalstringBilling 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"
  }
}
03
Surface 3 of 4

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.

8 transaction codes · 020–027 + 210
POST /api/egift/v1/loyalty/add-points · G1 code 020

Add points

Adds transaction amount to stored card point total. Loyalty implementation only. Pass the point amount as a plain integerpoints field.

FieldTypeDescription
cardNumberrequiredstringThe loyalty card number.
pointsrequiredintegerPoints to add (plain count, not cents).
orderRefoptionalstringYour 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"
}'
POST /api/egift/v1/loyalty/redeem-points · G1 code 021

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.

FieldTypeDescription
cardNumberrequiredstringThe loyalty card number.
pointsrequiredintegerPoints to redeem (plain count, not cents).
orderRefoptionalstringYour 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"
}'
POST /api/egift/v1/loyalty/balance · G1 code 023

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).

FieldTypeDescription
cardNumberrequiredstringThe 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"
}'
POST /api/egift/v1/loyalty/activate · G1 code 024 · Future Use

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.

FieldTypeDescription
cardNumberrequiredstringThe new loyalty card number to create.
pointsrequiredintegerStarting 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
}'
POST /api/egift/v1/loyalty/refund · G1 code 025 · Future Use

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.

FieldTypeDescription
cardNumberrequiredstringThe loyalty card number.
originalTransactionIdrequiredstringThe redemption transaction to reverse.
pointsrequiredintegerPoints 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
}'
POST /api/egift/v1/loyalty/transfer · G1 code 026 · Future Use

Point balance transfer

Move the entire point balance from one card to another (both must already exist). Future Use per the spec.

FieldTypeDescription
fromCardNumberrequiredstringThe card supplying the points.
toCardNumberrequiredstringThe 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"
}'
POST /api/egift/v1/loyalty/void · G1 code 027 · Future Use

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.

FieldTypeDescription
cardNumberrequiredstringThe loyalty card number.
transactionIdrequiredstringThe 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"
}'
POST /api/egift/v1/loyalty/history · G1 code 210 · Future Use

Point history

Loyalty equivalent of Card History (200) — returns point movements over a date range as a JSON array. Future Use.

FieldTypeDescription
cardNumberrequiredstringThe loyalty card number.
fromDaterequiredstringRange start, YYYYMMDD.
toDaterequiredstringRange 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"
}'
04
Surface 4 of 4

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.

5 transaction codes · 010, 011, 301, 302, 303
POST /api/egift/v1/management/sign-in · G1 code 301 · Future Use

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.

FieldTypeDescription
cashierIdrequiredstringThe cashier / operator id becoming active.
pinoptionalstringOptional 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"
}'
POST /api/egift/v1/management/sign-out · G1 code 302 · Future Use

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.

FieldTypeDescription
cashierIdrequiredstringThe cashier / operator id signing out.
reasonCoderequiredstringWhy 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"
}'
POST /api/egift/v1/management/change-pin · G1 code 303 · Future Use

Change PIN

Rotate a cashier’s PIN. Both old and new PIN are required. Used by self-service password rotation built into POS systems.

FieldTypeDescription
cashierIdrequiredstringThe cashier whose PIN is changing.
oldPinrequiredstringThe current PIN.
newPinrequiredstringThe 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"
}'
POST /api/egift/v1/management/sign-on · G1 code 010 · Future Use

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 '{}'
POST /api/egift/v1/management/sign-off · G1 code 011 · Future Use

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 '{}'
05
Reference

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 codes · Result codes · Companion spec
Gateway decline codes

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.

CodeMessageMeaning
000No ErrorTransaction approved.
001Invalid Account IdOperation failed — no such card.
002Account Not ActiveOperation failed — card not active.
003Invalid CurrencyOperation failed — wrong currency.
004Invalid Account TypeCannot operate in this Group (wrong Group ID).
005Invalid Vendor IdCannot operate in this Store (wrong Store ID).
006Empty PasswordOperation failed — missing password.
007Password Not CorrectOperation failed — wrong password. Try again.
008Too Many Wrong PasswordsOperation failed — call for support.
009Card Already ActiveActivation rejected — use Add Value (003) instead.
010Transaction Already CanceledVoid rejected — transaction already voided.
011Transaction Not FoundTransaction ID not valid.
012Card ExpiredCard has passed its expiration date.
013Server ErrorCall merchant support.
014Card Cannot Be ActivatedBad check digit on card number.
015Invalid Terminal IDTerminal ID not in the database — check MID+LID+TID composite.
016Malformed RequestRequest is malformed; declined.
100No Funds; DeclinedNo funds on card; declined.
101Insufficient FundsPartial: gateway zeroes balance, terminal may split-pay the remainder.
Top-level outcome

Result message codes (§11)

The top-level outcome of the request. Drives the high-level branch on your side — success, decline, info, void.

CodeMessageMeaning
501Informational — non-monetaryApproved but no money / points moved. Used by Balance Inquiry, Customer Service Request, etc.
502SuccessMonetary transaction approved and committed.
503DeclinedSee Decline Reason field for the specific code.
902Voided by HostTransaction voided server-side — usually a fraud / risk hold.
HTTP-side mapping

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.

StatusMeaning
400Bad JSON, missing field, schema mismatch, or G1 decline 016 (malformed).
401Missing / wrong / revoked bearer key.
402Payment declined — G1 declines 002 / 100 / 101.
404Card or transaction not found — G1 declines 001 / 011.
409Conflict — already-voided (010), already-active (009), expired (012).
422Bad card check digit (014) or invalid Terminal ID (015).
502Gateway error (013) or upstream timeout.
{ "ok": false, "message": "Human-readable reason.", "declineCode": "100" }
G1 Message Formats Companion · per-transaction field overrides

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

TransactionCodeAmount 1Amount 2Text
Balance inq1Optional, ignored
Redeem2Transaction amount in centsTip amt
Add value3Optional, ignored
Void trans4Tran # to void
Activate card5
Deact w/refund6
Deact no refund7
Reissue card82nd card
Store credit9
Tip Adjust12Tran # to adj
Balance transfer142nd card
Exp Date Adjust *22(Opt) Date
Add points20# Points × 100
Redeem points21
Point bal inq23
Activate points *24# Points × 100
Point refund *25
Point bal xfer *262nd card
Void points *27Tran # to void
History200Req. Params
Point history *210
Sign On *10Reserved code for future transReserved
Sign Off *11
Customer Svc118Optional, ignoredReq. 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).

Safe retries

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
egw_test_ keys

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
Browser + Node ≥18

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>
Live test bed

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/balance
Equivalent cURL
curl -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.