{
  "info": {
    "name": "Shukria Payments — MPGS API: Retrieve Order",
    "description": "Retrieve the details of an MPGS order. Works for every MPGS flow (Hosted Checkout, Hosted Session, Direct).\n\nSet the collection variables before sending:\n- `merchant_api_key`: the merchant's API key (starts with `shkdirect_`).\n- `order_ref`: the MPGS order id (`pg_transactions.gateway_order_ref`, e.g. `SHK-1042`).",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      { "key": "token", "value": "{{merchant_api_key}}", "type": "string" }
    ]
  },
  "variable": [
    { "key": "base_url", "value": "https://shukriapg.ariticapp.com" },
    { "key": "pg_prefix", "value": "/pgpayments" },
    { "key": "merchant_api_key", "value": "YOUR_MERCHANT_API_KEY" },
    { "key": "order_ref", "value": "SHK-1042" }
  ],
  "item": [
    {
      "name": "Retrieve order",
      "request": {
        "method": "GET",
        "header": [
          { "key": "Accept", "value": "application/json" }
        ],
        "url": {
          "raw": "{{base_url}}{{pg_prefix}}/api/mpgs/order/{{order_ref}}",
          "host": ["{{base_url}}{{pg_prefix}}"],
          "path": ["api", "mpgs", "order", "{{order_ref}}"]
        },
        "description": "Calls MPGS Retrieve Order (`GET order/{orderid}`) for the authenticated merchant.\n\nSuccess returns: amount, creationTime, currency, id, lastUpdatedTime, merchant, merchantAmount, merchantCurrency, result, totalAuthorizedAmount, totalCapturedAmount, totalDisbursedAmount, totalRefundedAmount.\n\nError returns: `{\"result\": \"ERROR\", \"error\": {cause, explanation, field, supportCode, validationType}}`."
      },
      "response": []
    }
  ]
}
