Skip to content

Step 5: Track Results

Use webhooks for updates and these reads for browser returns, missing notifications, or on-demand checks.

Request headers

All three GET endpoints use these headers. Sign an empty body.

FieldTypeRequiredDescription
X-Api-KeystringYesYour API key; keep it on your backend.
X-TimestampstringYesCurrent Unix time in seconds; within five minutes of server time.
X-NoncestringYesFresh identifier for every request, including retries.
X-SignaturestringYesv1= followed by the request's HMAC signature.

Follow API Key Authentication. Sign the exact body, or an empty body for bodyless requests, and the sorted query when present.

Get order detail

http
GET https://api.iimmpact.com/v2/orders/{order_id}

Path fields

FieldTypeRequiredDescription
order_idstringYesOrder ID from creation. No query fields.

Request example

bash
curl "https://api.iimmpact.com/v2/orders/$ORDER_ID" \
  --header "X-Api-Key: $API_KEY" \
  --header "X-Timestamp: $TIMESTAMP" \
  --header "X-Nonce: $NONCE" \
  --header "X-Signature: v1=$SIGNATURE"

Response fields

Fields below are inside data.

FieldTypeDescription
order_idstringOrder identifier.
external_referencestringYour order reference.
statusstringpayment_pending, payment_processing, transaction_processing, or completed.
currencystringMYR.
items_subtotalstringFrozen item sale subtotal.
itemsarrayOne row per unit purchased; see item fields below.
latest_payment_idstring or nullPayment ID of the most recent collection attempt; null when no payment has been created. Use it to resolve a 409 conflict or read the current payment without a stored ID.
refundsarrayOrder-level refunds; empty when none exist.
metadataobjectReturned when supplied on order creation; omitted otherwise.
created_atstringRFC3339 order creation time.
updated_atstringRFC3339 time of the latest public change, including fulfillment/refund changes.

Item fields

Each item is one unit of a purchased product. An order with quantity: 3 produces three rows. Rows exist from order creation; fulfillment fields appear once dispatch starts.

FieldTypeDescription
productstringProduct code.
product_namestringProduct display name.
accountstringRecipient's account number or identifier.
amountstringRequested topup face value for this unit.
unit_pricestringTwo-place sale price; may differ from face value.
statusstringawaiting_payment, accepted, processing, successful, or failed.
refidstring or nullFulfillment reference; null until dispatch.
status_codeintegerTransaction result code, such as 20 for success; present after dispatch.
snstringSerial number, when the product returns one.
pinstringRedemption PIN, when the product returns one.
expirystringProvider expiry text, when the product returns one; not necessarily RFC3339.
coststringMerchant-only wholesale cost with original decimal precision, after dispatch.
remarksstringResult text, when the provider returns it.
notestringInstructions, when the product returns them.
voucherlinkstringRedemption URL, when the product returns one.
timestampstringRFC3339 fulfillment-entry time, after dispatch.

Order detail has no payer identity, payment fees, or redirect destination. Authorize customer access, exclude wholesale cost from customer responses, and redact PINs and voucher links from logs.

Response example — 200

json
{
  "data": {
    "order_id": "ord_example",
    "external_reference": "ORD-00042",
    "status": "completed",
    "currency": "MYR",
    "items_subtotal": "100.00",
    "latest_payment_id": "pay_example",
    "items": [
      {
        "product": "TNB",
        "product_name": "Tenaga Nasional Berhad",
        "account": "220012345679",
        "amount": "60.00",
        "unit_price": "60.00",
        "status": "successful",
        "status_code": 20,
        "refid": "ORD-00042-1",
        "cost": "58.1234",
        "timestamp": "2026-09-14T10:10:43+08:00"
      },
      {
        "product": "TNB",
        "product_name": "Tenaga Nasional Berhad",
        "account": "220012345678",
        "amount": "40.00",
        "unit_price": "40.00",
        "status": "failed",
        "status_code": 52,
        "refid": "ORD-00042-2",
        "cost": "39.1250",
        "remarks": "Invalid Account No",
        "timestamp": "2026-09-14T10:10:44+08:00"
      }
    ],
    "refunds": [
      {
        "refund_id": "ref_example",
        "order_id": "ord_example",
        "payment_id": "pay_example",
        "external_reference": "ORD-00042",
        "currency": "MYR",
        "amount": "40.00",
        "reason": "failed_fulfillment",
        "status": "successful",
        "review_reason": null,
        "created_at": "2026-09-14T10:15:20+08:00",
        "updated_at": "2026-09-14T10:18:00+08:00"
      }
    ],
    "created_at": "2026-09-14T10:00:00+08:00",
    "updated_at": "2026-09-14T10:18:00+08:00"
  }
}

Order states

StatusMeaning
payment_pendingUnpaid and awaiting payment; no order-age cutoff.
payment_processingCollection or cancellation is unresolved.
transaction_processingWinning collection verified; fulfillment is in progress.
completedAll units have final results, including any failures. Refunds may still be pending.

Get payment detail

http
GET https://api.iimmpact.com/v2/payments/{payment_id}

Path fields

FieldTypeRequiredDescription
payment_idstringYesPayment ID retained from creation, browser return, or events. No query fields.

Request example

bash
curl "https://api.iimmpact.com/v2/payments/$PAYMENT_ID" \
  --header "X-Api-Key: $API_KEY" \
  --header "X-Timestamp: $TIMESTAMP" \
  --header "X-Nonce: $NONCE" \
  --header "X-Signature: v1=$SIGNATURE"

Response fields

Returns the payment schema inside data, with current status and action. Refunds are read from the order. A failed payment still returns HTTP 200.

Response example — 200

json
{
  "data": {
    "payment_id": "pay_example",
    "order_id": "ord_example",
    "external_reference": "ORD-00042",
    "customer_external_id": "CUS-1042",
    "status": "pending",
    "currency": "MYR",
    "payment_method_code": "CARD",
    "customer_fee_percent": "50.00",
    "fee": {
      "type": "percentage",
      "value": "1.70"
    },
    "totals": {
      "items_subtotal": "100.00",
      "fee": {
        "total": "1.70",
        "customer": "0.85",
        "merchant": "0.85"
      },
      "payment_total": "100.85"
    },
    "action": {
      "type": "redirect",
      "url": "https://payments.example/checkout/session"
    },
    "created_at": "2026-09-14T10:05:00+08:00",
    "updated_at": "2026-09-14T10:05:00+08:00"
  }
}

For a failed payment, action is null and the following fields change or appear inside data (excerpt):

json
{
  "status": "failed",
  "action": null,
  "failure": {
    "code": "collection_failed",
    "message": "Payment collection failed."
  },
  "updated_at": "2026-09-14T10:06:00+08:00"
}

List orders

http
GET https://api.iimmpact.com/v2/orders

Query fields

FieldTypeRequiredDescription
external_referencestringNoExact order reference.
statusstringNoOne order state.
created_fromstringNoInclusive RFC3339 start.
created_tostringNoExclusive RFC3339 end, later than start.
limitintegerNo1–100; defaults to 20.
cursorstringNoUse next_cursor from the previous response to get the next page.

Date ranges are at most 90 days; one bound implies a 90-day range. With neither bound, all dates are eligible. Results are newest first by creation time then order ID. Keep filters and limit unchanged when paging; percent-encode values, including + in timezone offsets.

Unfiltered history includes all orders in your account. Keep customer-to-order ownership in your backend and authorize customer-facing reads; the payer on a payment does not establish order ownership.

Request example

bash
curl 'https://api.iimmpact.com/v2/orders?external_reference=ORD-00042&limit=20' \
  --header "X-Api-Key: $API_KEY" \
  --header "X-Timestamp: $TIMESTAMP" \
  --header "X-Nonce: $NONCE" \
  --header "X-Signature: v1=$SIGNATURE"

Response fields

FieldTypeDescription
data.ordersarrayOrder summaries; empty when none match.
orders[].order_idstringOrder identifier.
orders[].external_referencestringYour order reference.
orders[].statusstringCurrent order state.
orders[].currencystringMYR.
orders[].items_subtotalstringFrozen item sale subtotal.
orders[].successful_payment_totalstring or nullWinning collection total; null until paid, unchanged by refunds.
orders[].created_atstringRFC3339 creation time.
orders[].updated_atstringRFC3339 latest public order change.
data.next_cursorstring or nullNext page cursor; null on the final page.

Response example — 200

json
{
  "data": {
    "orders": [
      {
        "order_id": "ord_example",
        "external_reference": "ORD-00042",
        "status": "completed",
        "currency": "MYR",
        "items_subtotal": "100.00",
        "successful_payment_total": "100.85",
        "created_at": "2026-09-14T10:00:00+08:00",
        "updated_at": "2026-09-14T10:18:00+08:00"
      }
    ],
    "next_cursor": null
  }
}

Read errors

HTTPCodeAction
400invalid_cursorRestart pagination with valid filters.
404order_not_found, payment_not_foundCheck the resource ID; foreign resources also return 404.
422validation_errorCorrect IDs, filters, or date bounds.

See shared errors. Retry reads with bounded backoff and fresh HMAC headers; routine polling is not required.

IIMMPACT API Documentation