iglooX DocsDevelopers

Guide

Loyalty programs

Use merchant loyalty-programs/search to find program settings, including programs with no customer balances. Use merchant or customer loyalty-balances/search to find the balances a customer has. Both support page and cursor pagination. The shared top-up action adds stored value, issues a voucher batch, adds stamps or points, or manually credits cashback according to the selected program type. Cursor searches return all records in scope in UUID order; use page searches for optional filters. For a known balance UUID, use GET /loyalty-balances/{uuid}.

Program page searches accept filters.query, filters.types and filters.include_archived fields. For example, {"filters":{"types":["voucher"],"include_archived":false}} finds voucher programs that are not archived. Program availability and customer-tier eligibility are checked when adding benefits, so those conditions do not hide program settings from search.

Balance page searches also accept filters.include_archived, independently of filters.states. Set it to false to hide balances from archived programs. Both program and balance searches include archived programs by default. To find balances that can currently be used, send {"filters":{"states":["available"]}}. The redemption request still checks the customer's PIN and any order-specific conditions, including the voucher saving, eligible spend and outlet.

To find remaining funds, vouchers, stamps or points, use filters.has_positive_balance: true. This includes positive balances that are archived, expired or not yet usable. Use false for zero and negative balances, or leave it out for both.

Filter a balance's expiry with filters.expires_at, for example:

{
  "filters": {
    "has_positive_balance": true,
    "expires_at": {
      "from": "2026-11-01T00:00:00Z",
      "to": "2026-12-01T00:00:00Z"
    }
  }
}

This finds positive balances expiring during November: the start is included and the end is excluded. Either bound can be omitted or null. Supplying a bound excludes balances without expiry. These page-search filters combine with customer, program, type, outlet and state filters.

Configuration and issuance

Choose stored_value, voucher, stamp, point or cashback when creating a program and supply the matching configuration. The type cannot be changed after creation. When editing, leave out the configuration to keep the current settings; supplying it replaces the complete object, including optional settings. Read the latest settings before editing; the endpoint does not reject a save merely because another editor has changed the program. Vouchers already issued keep their benefit, currency and exact validity dates. Their outlet restrictions, minimum eligible spend and stackability follow the current program. Renames appear on existing balances and in new messages. Dates are displayed in the merchant's current timezone without changing when the vouchers actually start or expire.

Example voucher configuration on program creation:

{
  "name": "Welcome vouchers",
  "type": "voucher",
  "voucher_configuration": {
    "calculation": {
      "type": "fixed",
      "fixed_value": { "amount": 1000, "currency": "SGD" }
    },
    "minimum_eligible_spend": { "amount": 2000, "currency": "SGD" },
    "validity_period_in_days": 30,
    "is_stackable": false,
    "total_issuance_limit": 1000,
    "customer_issuance_limit": 2
  }
}

Choose either a fixed fixed_expires_at date or a validity_period_in_days. An optional fixed_usable_from delays when vouchers can be used. A rolling validity period starts when the vouchers are issued, measured in 24-hour UTC days; delaying usability does not extend expiry. Expiry must be after both issuance and the usable-from time. A voucher can be used at its start time, but not at or after its expiry.

POST /merchants/{uuid}/loyalty-balances/top-up adds stored value with amount, or issues vouchers with quantity. Both require the merchant outlet_uuid where the action takes place and accept an optional reason. Payments are handled separately. Kiosk requests include a four-digit staff_pin for either type. Each voucher issuance creates a new batch, even if the customer already has vouchers from the program:

{
  "customer_uuid": "00000000-0000-0000-0000-000000000001",
  "loyalty_program_uuid": "00000000-0000-0000-0000-000000000002",
  "quantity": 2,
  "outlet_uuid": "00000000-0000-0000-0000-000000000004",
  "reason": "Welcome offer",
  "merchant_reference": "welcome-001"
}

Stored-value top-ups and voucher issuance check program availability, customer-tier eligibility and archive status. Once issued, changes to availability or tier do not affect the vouchers. Archiving the program blocks redemption for both types. An otherwise usable balance reports state: "archived" and zero available_balance. Lifetime issuance limits count all units issued, including those later redeemed, revoked or expired; these actions do not free up the allowance.

Successful paid top-ups are credited even if the program becomes archived or unavailable after payment starts. Tier credits targeting an archived or unavailable program are skipped; the order or tier assignment still completes. Skipped credits are not retried automatically.

Balances and receipts

LoyaltyBalance.type tells you how to read the amounts. Stored value and cashback use Money for balance and available_balance; vouchers, stamps and points use integer counts. balance is the recorded amount or quantity, including stock that cannot currently be used. For every type, available_balance is zero unless state is available. This includes stored value and cashback below the minimum redemption, even when the recorded balance is positive. Zero and negative balances report insufficient_balance even when their expiry has passed. An available balance is a candidate for redemption; the request still checks the PIN, requested amount and applicable order conditions.

Each balance includes a nested loyalty_program with the current name, description, outlets and configuration, so no separate program lookup is needed. Its identifier is loyalty_program.uuid. Read the current minimum redemption from loyalty_program.stored_value_configuration.minimum_redemption_per_order or loyalty_program.cashback_configuration.minimum_redemption_per_order. For both monetary pools, usable_from is the balance's creation time and does not change with later credits. For vouchers, use terms.calculation for the issued benefit and loyalty_program.voucher_configuration for the current minimum eligible spend and stackability. Do not substitute the current program calculation for an existing voucher's issued benefit. The balance carries its issued currency_code and the merchant's current timezone. Its resolved validity dates are the balance's top-level usable_from and expires_at. Retrieve customer balances through the paginated inventory endpoints; searches return existing wallets and voucher batches.

Receipts keep the loyalty_program_type, customer/program/balance UUIDs, signed balance_delta, balance_after and balance_expires_at_after recorded when the action completed. These values do not change with later activity. Fetch the balance separately when you need its current state. Stored-value, stamp, point and cashback receipts include their ledger entries; voucher receipts include the quantity or redemption details for the action. Top-up and issuance receipts include the optional reason (null when none was supplied), while revocation and reversal receipts include their required reason. Every receipt includes the recorded outlet_uuid; reversals retain the original operation's outlet. Ledger entries include a compact loyalty_program reference with its UUID, current name and immutable type, plus loyalty_program_type to distinguish money, vouchers, stamps and points. The name is current display context, including when an entry appears inside a receipt; it can change after a program is renamed. Recorded deltas, balances and expiry values remain unchanged. Paid stored-value top-ups, tier benefits and standalone expiry changes are available through ledger search. Expiry processed during a stamp, point or cashback capture/void also has a source-linked expiration receipt, available through operation history.

Redemption and correction

Every redemption requires loyalty_balance_uuid, the customer's current redemption_pin, outlet_uuid and amount. The outlet must belong to the merchant and be permitted by the current program; an empty program outlet list allows all current and future merchant outlets. This applies to stored value, vouchers, stamps, points and cashback. For vouchers, amount is the actual saving and eligible_spend is the remaining eligible spend:

{
  "loyalty_balance_uuid": "00000000-0000-0000-0000-000000000003",
  "redemption_pin": "1234",
  "outlet_uuid": "00000000-0000-0000-0000-000000000004",
  "merchant_reference": "redeem-001",
  "amount": { "amount": 1000, "currency": "SGD" },
  "eligible_spend": { "amount": 3000, "currency": "SGD" }
}

Find the customer by registered mobile number with POST /merchants/{uuid}/customers/lookup, then retrieve their vouchers through POST /customers/{uuid}/loyalty-balances/search. Staff select a balance and use the customer's current PIN for redemption. The customer does not need to present a voucher, barcode or QR code.

Both stored-value and voucher redemption return loyalty_balance_expired when a positive balance has expired.

The client calculates the discount and decides which items qualify. Eligible spend excludes taxes, service charges, tips and top-ups. Send the remaining eligible spend immediately before each voucher, after earlier discounts and vouchers. The API validates that saving and spend are positive and use the issued currency, that the saving does not exceed the supplied spend, and that the current program minimum spend and issued benefit limits are met. For percentage benefits, it also checks the issued percentage of the supplied eligible spend, rounded half up to the currency’s minor unit and limited by any issued cap. Smaller actual savings are accepted; the API does not verify which items made up the supplied eligible spend. Each voucher redemption uses one whole unit, even when the saving is below its fixed value. An empty outlet list allows any of the merchant's outlets, including for kiosk requests.

Stacking is enforced by the client; the API does not inspect other redemptions on the order. When combining vouchers, every voucher's current program must have is_stackable: true. Apply fixed discounts first, then percentage discounts one at a time to the remaining eligible spend. For example, on SGD 50 of eligible spend, a SGD 10 fixed voucher leaves SGD 40; a subsequent 20% voucher saves SGD 8 and leaves SGD 32. Send eligible_spend of SGD 50 for the first redemption and SGD 40 for the second, with actual savings of SGD 10 and SGD 8 respectively. Each redemption needs its own idempotency key. If you supply merchant_reference, use a different value for each operation. You can then redeem stored value against the remaining amount.

POST /merchants/{uuid}/loyalty-balances/revocation removes the requested unused quantity from loyalty_balance_uuid, with the merchant outlet_uuid where the action takes place and a reason. Vouchers can be revoked while the program is archived, before they become usable or after expiry. More units can be revoked later if the batch still has unused vouchers.

POST /merchants/{uuid}/loyalty-balances/reversal requires the original operation_uuid and a reason for both types. It keeps the original operation's outlet, so no new outlet_uuid is needed. For vouchers, it accepts a redemption only, and restores one unit once, before the original expiry. The saving, spend, outlet and expiry come from the original receipt. A reversal is allowed while archived, and independently revoked units stay revoked. Later outlet or minimum-spend changes do not prevent the correction. Replacement amounts, quantities and other redemption or expiry details in the request are ignored. A stored-value reversal undoes a top-up together with its bonus, or restores a redemption. It does not refund a payment.

All four actions require an Idempotency-Key. After an uncertain response, retry with the same key and identical input, or look up the operation with loyalty-balance-operations/lookup using its operation_uuid or merchant_reference. A successful request can replay after expiry or a PIN reset, provided the caller still has merchant access. Replays do not repeat the balance change, audit entry or confirmation. Changing the input under the same key causes a conflict, even if the changed field would otherwise be ignored. For read-only recovery after a lost response, supply a unique merchant_reference before the original request; otherwise, use an exact replay to recover the operation UUID. merchant_reference identifies one operation within the merchant. It does not replace the idempotency key.

Reporting and WhatsApp

For both program types, dashboard active_customers counts customers with a balance they can currently use. Outstanding amounts still include positive, unexpired stored value held in archived programs or below the redemption minimum.

Operation search lists receipts for the supported API balance actions. Use the customer’s ledger search for balance movements, including paid top-ups, tier benefits and processed stored-value expirations. A voucher reaching its expiry time changes its usability without creating a ledger movement; read current validity and state from the balance.

Dashboard order metrics, customer activity and has_order_history follow the selected outlets; loyalty figures always cover the merchant. has_order_history says nothing about whether loyalty activity exists. Use loyalty_program_type to read the dashboard summary. Stored value reports monetary totals. Vouchers always report a non-null quantity_summary, including zero counts when appropriate: lifetime_issued_quantity counts all vouchers ever issued, issued_quantity counts issuance in the selected report period, and the stock/status quantities describe what remains now. Redemption, revocation, reversal and expiry do not reduce the lifetime count. Savings are grouped by currency in redemption_summaries. Reversals count in the period when they happen. For example, redeeming SGD 10 and SGD 9, then reversing SGD 10, gives gross savings of SGD 19, reversed savings of SGD 10 and net savings of SGD 9. Different currencies are kept separate.

After successful issuance, the platform can send one quantity summary; after redemption, it can confirm the recorded saving and currency. The “View My Balance” reply shows recorded stored-value amounts with any redemption restriction, and a limited list of vouchers ordered by expiry. Stored-value replies identify expired or archived funds and explain the minimum when it prevents redemption. Top-up options are limited to programs currently available to the customer's tier. It includes vouchers that are not yet usable or are blocked by archive, and leaves out used, expired and fully revoked stock. Messages can be sent as text or with an image header. Successful replays do not send duplicate confirmations. Delivery is best effort: HTTP success does not confirm WhatsApp delivery or template approval.

Stamp and point purchase confirmations combine base and bonus earning into one total per program. A mixed purchase sends one stamp confirmation and one point confirmation, each only when that mechanic awards a positive quantity. The definitions are stamp_earning_confirmation / {{stamp_earning_summary}} and point_earning_confirmation / {{point_earning_summary}}. Exchange confirmations use stamp_exchange_confirmation / {{stamp_exchange_summary}} or point_exchange_confirmation / {{point_exchange_summary}}; they include the quantity cost and voucher program name. An exchange does not also send an issuance confirmation. Manual additions reuse top_up_confirmation; direct discounts reuse redemption_confirmation and describe the full unit cost and monetary saving. Removals, purchase voids and redemption reversals stay silent. Tier-upgrade and tier-gift notifications, including signup gifts, are deferred.

{{top_up_amount}} describes the stored value (including bonuses), manual cashback credit or manual stamp or point quantity added. {{redemption_amount}} describes the amount redeemed from stored value or cashback, or the saving recorded for a voucher or direct stamp or point redemption; stamps and points also describe the full quantity cost used.

{{loyalty_balances_list}} lists stored-value and cashback monetary pools, remaining unexpired vouchers, and stamp and point pools including zero and expired pools, with status and expiry. {{loyalty_balance}} describes the recorded stored-value or cashback amount with its redemption status, or the unexpired voucher, stamp or point quantity held for the selected loyalty balance.

Stamp and point balance replies show type-appropriate units, status and expiry, retaining empty and expired pools. They do not list reward options or promise reward eligibility. Confirmations follow a successful mutation and are not repeated by successful HTTP or source-order replays. Delivery uses the existing service-window and approved-template rules and remains best effort; there is no delivery outbox or automatic retry. The merchant must configure the connection; outside the service window, sending requires an approved submission for the current template body. New defaults and local validation do not constitute provider approval.

Stamps and loyalty points

Stamps and points have identical behavior. Both use quantity_configuration, option quantity_cost, integer balances and integer operation deltas. The immutable program type distinguishes them everywhere, including balance projections, receipts, ledger entries, order activity, evaluation program references and dashboard summaries. There are no public stamp_configuration, point_configuration, stamp_cost or point_cost fields.

Create a point program with, for example:

{
  "name": "Loyalty points",
  "type": "point",
  "quantity_configuration": {
    "earning_mode": "spend_interval",
    "spend_interval": { "amount": 100, "currency": "SGD" },
    "validity_period_in_days": 365,
    "earning_bonuses": [],
    "exchange_options": [],
    "redemption_options": []
  }
}

order earning grants one unit for a positive eligible purchase meeting its configured minimum. spend_interval floors eligible spend divided by the interval, without carrying any remainder to later purchases. product_quantity sums matching direct-line paid quantities and floors once per program; modifiers do not earn separately. Product capture requires paid_quantity on direct lines with a non-null product_reference. POS custom items may use product_reference: null, with or without paid_quantity; those lines do not earn product-quantity units. Mixed purchases still earn on matching catalog lines, and custom-only purchases are accepted with zero product-quantity awards. Other earning modes and tier spend continue normally. Null references remain in stored purchase facts and replay checksums. Order and interval modes, and product mode with earning bonuses, require an explicit eligible_amount, including zero. Positive base awards can receive the single greatest qualifying bonus for the resulting customer tier; bonuses do not stack or repeat. All applicable stamp and point programs evaluate independently on the same purchase. Tier gifts use quantity and the same shared pool, bypass tier eligibility while retaining archive/availability checks, and remain retained after purchase voids.

The first order capture freezes each applicable program's configuration, tier and award, including zero awards. quantity_evaluated remains true after any evaluation, including zero; quantity_activity contains only actual movements with loyalty_program_type. Order reads expose quantity_evaluations, with observed_quantity, awarded_quantity, invalidated_quantity, deducted_quantity and undeducted_quantity. A new request key does not recalculate an already captured purchase. Historical capture retries return the original capture movements, including after void. A full void invalidates the original award and recovers at most the unexpired pool, bonus first and then base, with separate entries. Zero recovery is terminal; shortfalls never reduce later credits. Void retries return only original void activity. Producers must prevent merges of quantity-evaluated orders, including frozen zero results; false alone is not atomic permission to merge.

Each customer/program has one nonnegative pool. A credit clears an expired balance before adding units. Validity starts from processing time, extends the whole pool when later, and never shortens an existing deadline. A pool without expiry stays without expiry; an empty pool takes the current validity. Empty, expired and archived pools remain visible in searches and replies. Reward affordability does not determine baseline availability.

Manual additions use the shared top-up endpoint with positive quantity and a required reason; kiosks also need a staff PIN. Removals use revocation with positive quantity and a required reason, without a staff PIN, and require sufficient unexpired units. Removals remain allowed while archived, outside adding dates or after tier loss. Manual addition/removal receipts use operation_type: adjustment with signed balance_delta.

Voucher exchange uses POST /merchants/{uuid}/loyalty-balances/exchange with loyalty_balance_uuid, exchange_option_uuid, current redemption_pin and outlet_uuid. It atomically deducts the current option's full quantity_cost and issues one voucher batch, linking both receipts. It checks the source archive/outlet, available units and the destination's current issuance eligibility, currency, validity and lifetime limits. Source adding dates and tier loss do not block spending an existing pool. Exchanges cannot be reversed; voucher revocation and manual quantity corrections are separate audited actions.

Direct discounts use the shared redemption endpoint with redemption_option_uuid, actual monetary amount and remaining eligible_spend, plus the balance, PIN and outlet. A smaller saving still consumes the full current quantity_cost. Saving must fit the current fixed or rounded/capped percentage benefit and minimum spend. Receipts freeze option, saving, spend and the pool's original expiry. A full reversal restores the original cost once, strictly before that original deadline, even if the program, PIN, outlets or terms later change. Reversal is allowed while archived, retains a later existing pool expiry, and cannot reclaim an earlier purchase-void shortfall.

Every manual mutation requires a durable Idempotency-Key. Use a unique optional merchant_reference for receipt lookup after an uncertain response; exact successful retries return the stored receipt without repeating mutations, audit entries or messages. New quantity audit events are loyalty.quantity_added, loyalty.quantity_revoked, loyalty.quantity_exchanged, loyalty.quantity_redeemed and loyalty.quantity_redemption_reversed. Earlier stamp audit event identifiers are migrated to their corresponding shared quantity identifiers. Record identities and recorded snapshots retain their original facts. Domain errors use the common quantity_* vocabulary for both mechanics; error responses list the concrete identifiers and statuses.

Dashboard quantity summaries keep stamps and points under separate program rows. Lifetime/base/bonus/tier/manual/exchange/direct-redemption/void/expiry and current stock measures count units; exchange_count counts actions. Monetary savings remain grouped by recorded receipt currency in redemption_summaries, including later reversal periods, and are never combined with unit counts. Source order, action, operation, type and expiry filters apply through the existing balance and history endpoints. Sync continues to return the same typed program, balance and operation resources.

Cashback

Cashback is a distinct program with one monetary pool per customer and program. It is separate from purchased stored value and earns independently alongside other applicable programs.

Create a cashback program with cashback_configuration. For example:

{
  "name": "Everyday cashback",
  "type": "cashback",
  "cashback_configuration": {
    "earning_mode": "order",
    "calculation": {"type": "fixed", "fixed_value": {"amount": 100, "currency": "SGD"}},
    "validity_period_in_days": 30,
    "earning_bonuses": [{
      "minimum_eligible_spend": {"amount": 1000, "currency": "SGD"},
      "bonus_amount": {"amount": 50, "currency": "SGD"},
      "eligible_tiers": []
    }]
  }
}

This awards SGD 1.00 once per qualifying purchase, plus SGD 0.50 when final eligible spend is at least SGD 10.00. The greatest qualifying fixed bonus is awarded once after positive base earning, using the customer's tier after purchase progression. Percentage order earning uses calculation.type: percentage and a string percentage; round half up once to minor units. percentage_cap limits base plus bonus together. Product mode uses earning_mode: product_quantity, selected products and a fixed calculation per whole paid unit: sum matching direct paid quantities before flooring once per program. Two qualifying paid units at SGD 1.00 earn SGD 2.00, without spend proration. An optional minimum eligible spend qualifies the whole order independently.

Capture considers unarchived cashback programs that existed at completion time, within their adding window, and permitted at the source outlet. The customer tier resulting from capture governs whether the calculated entitlement is awarded. An empty program outlet list permits every merchant outlet; the same current list restricts spending existing funds, while manual credits and tier gifts bypass it.

Every applicable cashback program requires the existing eligible_amount, including explicit zero, before any order, tier, gift or balance mutation. Product mode additionally requires paid quantities on direct catalog lines; custom lines with null product references do not earn product cashback. The producer supplies final eligible spend excluding cashback-funded spend, taxes, charges, tips and top-ups; stored-value payment qualifies. Checkout continues to own basket eligibility, stacking and the remaining amount to pay.

Capture freezes cashback_evaluations, including zero awards. cashback_evaluated stays true after full void. cashback_activity reports actual source-linked Money deltas for that action, including source-linked processed expiry. Capture retries return capture activity even after void; void retries return void activity. A retained HTTP idempotency key returns the original HTTP response, while domain replay creates no new spend change, achievements or messages. Historical orders without cashback evaluations stay unevaluated on retry. Producers must prevent merges involving quantity- or cashback-evaluated purchases, including zero evaluations; false flags alone do not grant atomic merge permission.

Full void invalidates the original base and bonus, recovering at most the current unexpired shared pool, bonus first. invalidated_amount, deducted_amount, undeducted_amount and voided_at distinguish entitlement cancellation, actual recovery and terminal shortfall. Zero recovery is a completed correction. Shortfalls are never recovered from later credits; partial refunds leave captured loyalty unchanged. Deleted customers retain evaluations after their pools/receipts are removed. Tier achievements and gifts remain recorded; their pooled funds can fund recovery of an earlier purchase award.

Manual credit, spending and correction

Use the existing top-up action with positive amount to manually credit cashback. It collects no payment and has no stored-value preset/custom top-up limits. Supply an Idempotency-Key and, optionally, a merchant reference and reason. Kiosk requests require a staff PIN. The outlet must belong to the merchant; addition does not require the program to permit spending there. Archive, adding-window and customer-tier eligibility restrict credit. Cashback is excluded from purchasable bot top-up choices and paid top-up intents.

Redeem with positive amount, the current customer redemption PIN, balance UUID and eligible outlet. Do not supply eligible_spend or redemption_option_uuid for this monetary path. The program must be unarchived, the funds unexpired, and the amount within the available balance and at least the configured redemption minimum. Adding dates and tier eligibility do not restrict existing funds. Recorded balances, currently available amounts and state are distinct; empty, expired, archived and below-minimum pools remain searchable.

Reverse an original manual credit or redemption once through the existing reversal action, supplying the receipt UUID and reason. A credit reversal removes the complete original amount from current unexpired funds without an original-credit deadline. A redemption reversal must occur strictly before the original saved deadline, even if later credits extended the pool. It preserves a later current deadline or restores original validity to an empty pool, without renewal. Current archive, tier, PIN, outlet or earning-option edits do not block an authorized correction. Purchase earning/void/expiration receipts are not manually reversible. Purchase void does not automatically reverse a separate checkout redemption.

Earning, manual credits and tier gifts extend pooled validity using calendar days in the merchant timezone. Clear expired funds first; additions never shorten a positive pool, and an unlimited positive pool remains unlimited. Ordinary spending retains the deadline even when empty; full credit reversal/purchase void clears it when the pool is emptied.

Reporting and messages

Cashback dashboard rows include cashback_summary: base/bonus earning, tier gifts, manual additions/reversals, gross and net redemption, actual base/bonus void recovery, unrecovered invalidation, processed expiry and current outstanding value. Recorded flows use [from, to); shortfalls use evaluation voided_at, including zero recovery without a ledger movement. Outstanding value is current unexpired stock at the supplied evaluation time, not a historical closing balance. Pending expired value is excluded from stock, while expiration flow appears only when processed. Loyalty totals remain merchant-wide when selected outlets filter order activity, with separate program/currency rows. Archived cashback rows retain gross or void activity even when net value and stock are zero.

Positive purchase earning uses cashback_earning_confirmation and {{cashback_earning_summary}}, including base and bonus per program. Manual credit and redemption confirmations use top_up_confirmation and redemption_confirmation. Balance replies list separate monetary pools. Zero awards, replay, void and reversals send no new confirmation.

Search documentation

Search across this documentation site.