Retrieve a Transaction

GET /api/transactions/:orderId — look up a transaction's details.

Endpoint

Fetch a transaction by its orderId — the value returned at init time and included in every webhook. The lookup is scoped to the app your API key belongs to.

GET /api/transactions/:orderId
Host: pay.iconeht.com
x-api-key: YOUR_API_KEY

Example

const res = await icone.getTransaction("V1StGXR8_Z5jdHi6B-myT");
if (!res.error) {
  console.log(res.transaction!.status);        // "success"
  console.log(res.transaction!.paymentMethod);  // "moncash"
}

Response

{
  "error": false,
  "transaction": {
    "orderId": "V1StGXR8_Z5jdHi6B-myT",
    "referenceId": "order_1024",
    "action": "purchase",
    "status": "success",
    "amount": 2500,
    "currency": "htg",
    "paymentAmount": 2500,
    "paymentCurrency": "htg",
    "exchangeRate": 1,
    "paymentMethod": "moncash",
    "codStatus": "none",
    "codAmount": 0,
    "prepaidAmount": 0,
    "environment": "live",
    "items": [
      { "name": "T-shirt", "quantity": 1, "unitPrice": 2500, "currency": "htg" }
    ]
  }
}

status is one of pending, success or failed. For pay-on-delivery orders, codStatus tracks the cash lifecycle. A missing transaction returns 404.