{
  "info": {
    "_postman_id": "merchant-sit-collection-v1",
    "name": "Moko Afrika \u2014 IMT Remittance API (Merchant)",
    "description": "## Moko Afrika \u2014 IMT Remittance API (Merchant)\n\nSingle canonical collection for merchants integrating with the IMT Remittance API as an aggregator partner (MTO, bank, fintech).\n\n### What it covers\n- Authentication (Basic for API + JWT for merchant dashboard)\n- `POST /account-lookup` \u2014 pre-flight beneficiary name lookup (mandatory step in standard IMT flow)\n- `POST /outbound` \u2014 payout flow (currently disabled)\n- `GET /transactions` + `/transaction/status` + `/transactions/<ref>/timeline`\n- FX rates, wallet balance/history\n- Merchant dashboard self-service (password, IP whitelist, callback URLs, settlements)\n\n### Recommended flow\n1. `POST /account-lookup` \u2192 display `subscriber_name` to your end-user \u2192 obtain explicit confirmation\n2. `POST /inbound` with the confirmed name in `expected_receiver_name`\n3. Wait for webhook on your registered `callback_url`\n4. Optionally call `GET /transactions/<ref>/timeline` for full event audit\n\n### Error codes (excerpt)\n- `RMT-1005 MISSING_FIELD` \u2014 `expected_receiver_name` not provided in /inbound\n- `RMT-3001 INSUFFICIENT_BALANCE` \u2014 wallet under amount + commission\n- `RMT-4005 TELCO_VALIDATION_FAILED` \u2014 telco rejected the MSISDN\n- `RMT-4006 NAME_MISMATCH` \u2014 `expected_receiver_name` doesn't match telco record (response payload includes both names for retry)\n\n\n\n**v2.1 (2026-08-13):** All /inbound requests updated for the 8 new hard-required KYC fields (BCC RTS Art.66 Instr.15 + FATF R.16). Added test cases TC-INB-KYC-001 to TC-INB-KYC-008 covering RMT-1005 / 1015 / 1016 / 1017 / 1018 error paths + a full-compliance happy path with optional sender_msisdn and reason_details.\n\n**v2.2 (2026-08-14):** `reason_of_transaction` enum extended from 11 to 23 values (added: INVESTMENT, CONSTRUCTION, RENT, GENERAL, FUEL, REPAIRS, PERSONAL_CARE, FOOD_AND_GROCERIES, TRANSPORT, SHOPPING, ENTERTAINMENT, DONATIONS). Aligns with Wakapay's purposeOfTransfer set. TC-INB-KYC-005 negative case switched from SHOPPING (now valid) to UNKNOWN_PURPOSE.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "00. Health Check",
      "description": "",
      "item": [
        {
          "name": "[TC-HLT-001] Health check",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/health",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "health"
              ]
            },
            "auth": {
              "type": "noauth"
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Health response has status\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json).to.have.property(\"status\");",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "01. Authentication",
      "description": "",
      "item": [
        {
          "name": "[SETUP] Merchant Login - Get JWT (RUN THIS FIRST)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/merchant/login",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "merchant",
                "login"
              ]
            },
            "auth": {
              "type": "noauth"
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"{{merchant_email}}\",\n  \"password\": \"{{merchant_password}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Login successful with access_token\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"success\");",
                  "    pm.expect(json.data).to.have.property(\"access_token\");",
                  "    pm.expect(json.data).to.have.property(\"merchant_code\");",
                  "    pm.expect(json.data).to.have.property(\"company_name\");",
                  "    pm.expect(json.data).to.have.property(\"wallets\");",
                  "    pm.expect(json.data.wallets).to.be.an(\"array\");",
                  "});",
                  "",
                  "if (pm.response.code === 200) {",
                  "    var jsonData = pm.response.json();",
                  "    if (jsonData.data && jsonData.data.access_token) {",
                  "        pm.collectionVariables.set(\"merchant_jwt\", jsonData.data.access_token);",
                  "        pm.collectionVariables.set(\"merchant_code\", jsonData.data.merchant_code);",
                  "        console.log(\"Merchant JWT and merchant_code stored successfully\");",
                  "    }",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-AUTH-001] API key auth - valid Basic credentials on /inbound",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            },
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"SIT-AUTH001-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sending_country\": \"FRA\",\n  \"sender_city\": \"Paris\",\n  \"current_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"permanent_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"profession\": \"Engineer\",\n  \"identity_number\": \"FR1234567890\",\n  \"document_issue_date\": \"2018-01-01\",\n  \"document_expiration_date\": \"2028-01-01\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiving_country\": \"COD\",\n  \"callback_url\": \"https://merchant.example.com/callback\",\n  \"provider_name\": \"Paypal\",\n  \"expected_receiver_name\": \"Marie Kabeya\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Auth passes - status is 202 or 200\", function () {",
                  "    pm.expect(pm.response.code).to.be.oneOf([200, 202]);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Merchant authenticated via Basic auth\", function () {",
                  "    var json = pm.response.json();",
                  "    // Should NOT get RMT-2003 auth error",
                  "    if (json.error) {",
                  "        pm.expect(json.error.code).to.not.eql(\"RMT-2003\");",
                  "    }",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-AUTH-003] Dashboard JWT - Get balance with valid Bearer",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/balance",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "balance"
              ]
            },
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{merchant_jwt}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Status is success\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"success\");",
                  "});",
                  "",
                  "pm.test(\"Has wallets array\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.data).to.have.property(\"wallets\");",
                  "    pm.expect(json.data.wallets).to.be.an(\"array\");",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-AUTH-002] API key auth - invalid api_secret (expect 401)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            },
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "sk_live_WRONG_SECRET_12345",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"SIT-AUTH002-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sending_country\": \"FRA\",\n  \"sender_city\": \"Paris\",\n  \"current_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"permanent_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"profession\": \"Engineer\",\n  \"identity_number\": \"FR1234567890\",\n  \"document_issue_date\": \"2018-01-01\",\n  \"document_expiration_date\": \"2028-01-01\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiving_country\": \"COD\",\n  \"callback_url\": \"https://merchant.example.com/callback\",\n  \"provider_name\": \"Paypal\",\n  \"expected_receiver_name\": \"Marie Kabeya\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 401\", function () {",
                  "    pm.response.to.have.status(401);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Error code is RMT-2003\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.error.code).to.eql(\"RMT-2003\");",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "02. Inbound Remittance",
      "description": "",
      "item": [
        {
          "name": "[TC-INB-001] Happy path - M-Pesa USD inbound",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            },
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"SIT-INB-MPESA-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sending_country\": \"FRA\",\n  \"sender_city\": \"Paris\",\n  \"current_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"permanent_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"profession\": \"Engineer\",\n  \"identity_number\": \"FR1234567890\",\n  \"document_issue_date\": \"2018-01-01\",\n  \"document_expiration_date\": \"2028-01-01\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiving_country\": \"COD\",\n  \"callback_url\": \"https://merchant.example.com/callback\",\n  \"provider_name\": \"Paypal\",\n  \"expected_receiver_name\": \"Marie Kabeya\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 202\", function () {",
                  "    pm.response.to.have.status(202);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Transaction accepted\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"accepted\");",
                  "    pm.expect(json.data).to.have.property(\"transaction_id\");",
                  "    pm.expect(json.data).to.have.property(\"reference\");",
                  "    pm.expect(json.data).to.have.property(\"amount\");",
                  "    pm.expect(json.data).to.have.property(\"currency\");",
                  "    pm.expect(json.data).to.have.property(\"operator\");",
                  "});",
                  "",
                  "if (pm.response.code === 202) {",
                  "    var json = pm.response.json();",
                  "    pm.collectionVariables.set(\"last_txn_id\", json.data.transaction_id);",
                  "    pm.collectionVariables.set(\"last_reference\", json.data.reference);",
                  "    console.log(\"Stored transaction_id: \" + json.data.transaction_id);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-INB-008] Happy path - Airtel inbound",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            },
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_airtel}}\",\n  \"reference\": \"SIT-INB-AIRTEL-{{$timestamp}}\",\n  \"operator\": \"airtel\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sending_country\": \"FRA\",\n  \"sender_city\": \"Paris\",\n  \"current_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"permanent_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"profession\": \"Engineer\",\n  \"identity_number\": \"FR1234567890\",\n  \"document_issue_date\": \"2018-01-01\",\n  \"document_expiration_date\": \"2028-01-01\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiving_country\": \"COD\",\n  \"callback_url\": \"https://merchant.example.com/callback\",\n  \"provider_name\": \"Paypal\",\n  \"expected_receiver_name\": \"Marie Kabeya\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 202\", function () {",
                  "    pm.response.to.have.status(202);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Transaction accepted\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"accepted\");",
                  "    pm.expect(json.data).to.have.property(\"transaction_id\");",
                  "    pm.expect(json.data).to.have.property(\"reference\");",
                  "    pm.expect(json.data).to.have.property(\"amount\");",
                  "    pm.expect(json.data).to.have.property(\"currency\");",
                  "    pm.expect(json.data).to.have.property(\"operator\");",
                  "});",
                  "",
                  "if (pm.response.code === 202) {",
                  "    var json = pm.response.json();",
                  "    pm.collectionVariables.set(\"last_txn_id\", json.data.transaction_id);",
                  "    pm.collectionVariables.set(\"last_reference\", json.data.reference);",
                  "    console.log(\"Stored transaction_id: \" + json.data.transaction_id);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-INB-009] Happy path - Orange inbound (will fail CONFIG_ERROR if no Orange channel)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            },
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_orange}}\",\n  \"reference\": \"SIT-INB-ORANGE-{{$timestamp}}\",\n  \"operator\": \"orange\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sending_country\": \"FRA\",\n  \"sender_city\": \"Paris\",\n  \"current_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"permanent_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"profession\": \"Engineer\",\n  \"identity_number\": \"FR1234567890\",\n  \"document_issue_date\": \"2018-01-01\",\n  \"document_expiration_date\": \"2028-01-01\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiving_country\": \"COD\",\n  \"callback_url\": \"https://merchant.example.com/callback\",\n  \"provider_name\": \"Paypal\",\n  \"expected_receiver_name\": \"Marie Kabeya\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "// Orange channel may not be configured for this test merchant.",
                  "// Expected: either 202 accepted or CONFIG_ERROR."
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-INB-006] Inbound CDF with FX conversion",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            },
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 28000,\n  \"currency\": \"CDF\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"SIT-INB-CDF-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sending_country\": \"FRA\",\n  \"sender_city\": \"Paris\",\n  \"current_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"permanent_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"profession\": \"Engineer\",\n  \"identity_number\": \"FR1234567890\",\n  \"document_issue_date\": \"2018-01-01\",\n  \"document_expiration_date\": \"2028-01-01\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiving_country\": \"COD\",\n  \"callback_url\": \"https://merchant.example.com/callback\",\n  \"provider_name\": \"Paypal\",\n  \"expected_receiver_name\": \"Marie Kabeya\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 202\", function () {",
                  "    pm.response.to.have.status(202);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Transaction accepted\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"accepted\");",
                  "    pm.expect(json.data).to.have.property(\"transaction_id\");",
                  "    pm.expect(json.data).to.have.property(\"reference\");",
                  "    pm.expect(json.data).to.have.property(\"amount\");",
                  "    pm.expect(json.data).to.have.property(\"currency\");",
                  "    pm.expect(json.data).to.have.property(\"operator\");",
                  "});",
                  "",
                  "if (pm.response.code === 202) {",
                  "    var json = pm.response.json();",
                  "    pm.collectionVariables.set(\"last_txn_id\", json.data.transaction_id);",
                  "    pm.collectionVariables.set(\"last_reference\", json.data.reference);",
                  "    console.log(\"Stored transaction_id: \" + json.data.transaction_id);",
                  "}"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-INB-002] Negative - Missing amount field",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            },
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"SIT-INB-MPESA-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sending_country\": \"FRA\",\n  \"sender_city\": \"Paris\",\n  \"current_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"permanent_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"profession\": \"Engineer\",\n  \"identity_number\": \"FR1234567890\",\n  \"document_issue_date\": \"2018-01-01\",\n  \"document_expiration_date\": \"2028-01-01\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiving_country\": \"COD\",\n  \"callback_url\": \"https://merchant.example.com/callback\",\n  \"provider_name\": \"Paypal\",\n  \"expected_receiver_name\": \"Marie Kabeya\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 400\", function () {",
                  "    pm.response.to.have.status(400);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Status is error\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"error\");",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-INB-003] Negative - Invalid operator",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            },
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"SIT-INB-BADOP-{{$timestamp}}\",\n  \"operator\": \"unknown\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sending_country\": \"FRA\",\n  \"sender_city\": \"Paris\",\n  \"current_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"permanent_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"profession\": \"Engineer\",\n  \"identity_number\": \"FR1234567890\",\n  \"document_issue_date\": \"2018-01-01\",\n  \"document_expiration_date\": \"2028-01-01\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiving_country\": \"COD\",\n  \"callback_url\": \"https://merchant.example.com/callback\",\n  \"provider_name\": \"Paypal\",\n  \"expected_receiver_name\": \"Marie Kabeya\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 400\", function () {",
                  "    pm.response.to.have.status(400);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Status is error\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"error\");",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-INB-005] Duplicate thirdparty_reference - idempotency check",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            },
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"{{last_reference}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sending_country\": \"FRA\",\n  \"sender_city\": \"Paris\",\n  \"current_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"permanent_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"profession\": \"Engineer\",\n  \"identity_number\": \"FR1234567890\",\n  \"document_issue_date\": \"2018-01-01\",\n  \"document_expiration_date\": \"2028-01-01\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiving_country\": \"COD\",\n  \"callback_url\": \"https://merchant.example.com/callback\",\n  \"provider_name\": \"Paypal\",\n  \"expected_receiver_name\": \"Marie Kabeya\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Duplicate reference detected\", function () {",
                  "    // Expect 409 Conflict or original transaction returned",
                  "    pm.expect(pm.response.code).to.be.oneOf([409, 200, 202]);",
                  "    var json = pm.response.json();",
                  "    if (pm.response.code === 409) {",
                  "        pm.expect(json.status).to.eql(\"error\");",
                  "        console.log(\"Idempotency: duplicate correctly rejected\");",
                  "    } else {",
                  "        console.log(\"Idempotency: original transaction returned or accepted\");",
                  "    }",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "Check transaction status (uses last created txn)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/transaction/status?transaction_id={{last_txn_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "transaction",
                "status"
              ],
              "query": [
                {
                  "key": "transaction_id",
                  "value": "{{last_txn_id}}"
                }
              ]
            },
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{merchant_jwt}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () { pm.response.to.have.status(200); });",
                  "pm.test(\"Response is valid JSON\", function () { pm.response.to.be.json; });",
                  "pm.test(\"Transaction has expected fields\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.data).to.have.property(\"transaction_id\");",
                  "    pm.expect(json.data).to.have.property(\"status\");",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-INB-NAME-004] Match \u2014 happy path (expect 202 with subscriber_name)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"TEST-INB-NAME-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"Jemasa\",\n  \"sender_last_name\": \"TOMATALA\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sending_country\": \"FRA\",\n  \"sender_city\": \"Paris\",\n  \"current_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"permanent_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"profession\": \"Engineer\",\n  \"identity_number\": \"FR1234567890\",\n  \"document_issue_date\": \"2018-01-01\",\n  \"document_expiration_date\": \"2028-01-01\",\n  \"receiver_first_name\": \"Henock\",\n  \"receiver_last_name\": \"BARAKAEL\",\n  \"receiver_nationality\": \"COD\",\n  \"receiving_country\": \"COD\",\n  \"provider_name\": \"Paypal\",\n  \"callback_url\": \"https://merchant.example.com/callback\",\n  \"expected_receiver_name\": \"Henock BARAKAEL\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            },
            "description": "When expected_receiver_name matches the telco record, /inbound returns 202 and includes the canonical `subscriber_name` from the telco in data \u2014 convenient for the merchant to display/log the authoritative name.",
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "[TC-INB-NAME-001] Missing expected_receiver_name (expect 400 RMT-1005)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"TEST-INB-NAME-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"Jemasa\",\n  \"sender_last_name\": \"TOMATALA\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sending_country\": \"FRA\",\n  \"sender_city\": \"Paris\",\n  \"current_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"permanent_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"profession\": \"Engineer\",\n  \"identity_number\": \"FR1234567890\",\n  \"document_issue_date\": \"2018-01-01\",\n  \"document_expiration_date\": \"2028-01-01\",\n  \"receiver_first_name\": \"Henock\",\n  \"receiver_last_name\": \"BARAKAEL\",\n  \"receiver_nationality\": \"COD\",\n  \"receiving_country\": \"COD\",\n  \"provider_name\": \"Paypal\",\n  \"callback_url\": \"https://merchant.example.com/callback\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            },
            "description": "Strict mode (default) refuses /inbound when expected_receiver_name is absent. The error response includes a `field` pointer and a `telco_name_hint` so the merchant can retry without re-running /account-lookup.",
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "[TC-INB-NAME-002] Name mismatch (expect 422 RMT-4006)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"TEST-INB-NAME-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"Jemasa\",\n  \"sender_last_name\": \"TOMATALA\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sending_country\": \"FRA\",\n  \"sender_city\": \"Paris\",\n  \"current_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"permanent_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"profession\": \"Engineer\",\n  \"identity_number\": \"FR1234567890\",\n  \"document_issue_date\": \"2018-01-01\",\n  \"document_expiration_date\": \"2028-01-01\",\n  \"receiver_first_name\": \"Henock\",\n  \"receiver_last_name\": \"BARAKAEL\",\n  \"receiver_nationality\": \"COD\",\n  \"receiving_country\": \"COD\",\n  \"provider_name\": \"Paypal\",\n  \"callback_url\": \"https://merchant.example.com/callback\",\n  \"expected_receiver_name\": \"Jane Doe\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            },
            "description": "Fuzzy match: case-insensitive, accent-folded, order-independent, tolerates 1 missing middle name and up to 2 char typos per token. Wildly different names return 422 with both names in the payload.",
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "[TC-INB-KYC-001] Missing sender_birthplace (expect RMT-1005)",
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "pm.variables.set('expected_code', 'RMT-1005');"
                ],
                "type": "text/javascript"
              }
            },
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test('expected status', function () {",
                  "    pm.expect(pm.response.code).to.be.oneOf([400, 422]);",
                  "});",
                  "pm.test('expected error code', function () {",
                  "    const body = pm.response.json();",
                  "    pm.expect(body.error.code).to.eql(pm.variables.get('expected_code'));",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"SIT-INB-MPESA-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"identity_number\": \"FR1234567890\",\n  \"sending_country\": \"FRA\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"receiving_country\": \"COD\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\",\n  \"expected_receiver_name\": \"Marie Kabeya\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            }
          },
          "response": []
        },
        {
          "name": "[TC-INB-KYC-002] Missing receiver_birthdate (expect RMT-1005)",
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "pm.variables.set('expected_code', 'RMT-1005');"
                ],
                "type": "text/javascript"
              }
            },
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test('expected status', function () {",
                  "    pm.expect(pm.response.code).to.be.oneOf([400, 422]);",
                  "});",
                  "pm.test('expected error code', function () {",
                  "    const body = pm.response.json();",
                  "    pm.expect(body.error.code).to.eql(pm.variables.get('expected_code'));",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"SIT-INB-MPESA-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"identity_number\": \"FR1234567890\",\n  \"sending_country\": \"FRA\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"receiving_country\": \"COD\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\",\n  \"expected_receiver_name\": \"Marie Kabeya\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            }
          },
          "response": []
        },
        {
          "name": "[TC-INB-KYC-003] Missing receiver_document_type (expect RMT-1005)",
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "pm.variables.set('expected_code', 'RMT-1005');"
                ],
                "type": "text/javascript"
              }
            },
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test('expected status', function () {",
                  "    pm.expect(pm.response.code).to.be.oneOf([400, 422]);",
                  "});",
                  "pm.test('expected error code', function () {",
                  "    const body = pm.response.json();",
                  "    pm.expect(body.error.code).to.eql(pm.variables.get('expected_code'));",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"SIT-INB-MPESA-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"identity_number\": \"FR1234567890\",\n  \"sending_country\": \"FRA\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"receiving_country\": \"COD\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\",\n  \"expected_receiver_name\": \"Marie Kabeya\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            }
          },
          "response": []
        },
        {
          "name": "[TC-INB-KYC-004] Invalid sender_document_type enum (expect RMT-1015)",
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "pm.variables.set('expected_code', 'RMT-1015');"
                ],
                "type": "text/javascript"
              }
            },
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test('expected status', function () {",
                  "    pm.expect(pm.response.code).to.be.oneOf([400, 422]);",
                  "});",
                  "pm.test('expected error code', function () {",
                  "    const body = pm.response.json();",
                  "    pm.expect(body.error.code).to.eql(pm.variables.get('expected_code'));",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"SIT-INB-MPESA-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"ID_CARD\",\n  \"identity_number\": \"FR1234567890\",\n  \"sending_country\": \"FRA\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"receiving_country\": \"COD\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\",\n  \"expected_receiver_name\": \"Marie Kabeya\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            }
          },
          "response": []
        },
        {
          "name": "[TC-INB-KYC-005] Invalid reason_of_transaction enum (expect RMT-1016)",
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "pm.variables.set('expected_code', 'RMT-1016');"
                ],
                "type": "text/javascript"
              }
            },
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test('expected status', function () {",
                  "    pm.expect(pm.response.code).to.be.oneOf([400, 422]);",
                  "});",
                  "pm.test('expected error code', function () {",
                  "    const body = pm.response.json();",
                  "    pm.expect(body.error.code).to.eql(pm.variables.get('expected_code'));",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"SIT-INB-MPESA-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"identity_number\": \"FR1234567890\",\n  \"sending_country\": \"FRA\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"receiving_country\": \"COD\",\n  \"reason_of_transaction\": \"UNKNOWN_PURPOSE\",\n  \"source_of_funds\": \"SALARY\",\n  \"expected_receiver_name\": \"Marie Kabeya\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            }
          },
          "response": []
        },
        {
          "name": "[TC-INB-KYC-006] Invalid source_of_funds enum (expect RMT-1017)",
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "pm.variables.set('expected_code', 'RMT-1017');"
                ],
                "type": "text/javascript"
              }
            },
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test('expected status', function () {",
                  "    pm.expect(pm.response.code).to.be.oneOf([400, 422]);",
                  "});",
                  "pm.test('expected error code', function () {",
                  "    const body = pm.response.json();",
                  "    pm.expect(body.error.code).to.eql(pm.variables.get('expected_code'));",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"SIT-INB-MPESA-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"identity_number\": \"FR1234567890\",\n  \"sending_country\": \"FRA\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"receiving_country\": \"COD\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"CRYPTO\",\n  \"expected_receiver_name\": \"Marie Kabeya\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            }
          },
          "response": []
        },
        {
          "name": "[TC-INB-KYC-007] Both receiver_current_address and receiver_permanent_address missing (expect RMT-1018)",
          "event": [
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "pm.variables.set('expected_code', 'RMT-1018');"
                ],
                "type": "text/javascript"
              }
            },
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test('expected status', function () {",
                  "    pm.expect(pm.response.code).to.be.oneOf([400, 422]);",
                  "});",
                  "pm.test('expected error code', function () {",
                  "    const body = pm.response.json();",
                  "    pm.expect(body.error.code).to.eql(pm.variables.get('expected_code'));",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"SIT-INB-MPESA-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"identity_number\": \"FR1234567890\",\n  \"sending_country\": \"FRA\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiving_country\": \"COD\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\",\n  \"expected_receiver_name\": \"Marie Kabeya\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            }
          },
          "response": []
        },
        {
          "name": "[TC-INB-KYC-008] Happy path \u2014 full compliance payload (all optionals included)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test('status is 202', function () {",
                  "    pm.expect(pm.response.code).to.eql(202);",
                  "});",
                  "pm.test('response is accepted', function () {",
                  "    const body = pm.response.json();",
                  "    pm.expect(body.status).to.eql('accepted');",
                  "});"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"SIT-INB-MPESA-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sender_birthplace\": \"Paris\",\n  \"sender_document_type\": \"PASSPORT\",\n  \"identity_number\": \"FR1234567890\",\n  \"sending_country\": \"FRA\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiver_birthdate\": \"1990-08-22\",\n  \"receiver_document_type\": \"NATIONAL_ID\",\n  \"receiver_document_number\": \"CD-NAT-990822-4567\",\n  \"receiver_current_address\": \"Avenue Kabambare 12, Gombe, Kinshasa\",\n  \"receiving_country\": \"COD\",\n  \"reason_of_transaction\": \"FAMILY_SUPPORT\",\n  \"source_of_funds\": \"SALARY\",\n  \"expected_receiver_name\": \"Marie Kabeya\",\n  \"sender_msisdn\": \"256770000001\",\n  \"reason_details\": \"monthly family support\",\n  \"sender_middle_name\": \"Robert\",\n  \"receiver_middle_name\": \"Josephine\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "02b. Account Lookup",
      "description": "POST /api/v1/remittance/account-lookup \u2014 Pre-validate a receiver MSISDN before submitting the actual inbound.\n\nNo need to send `operator` \u2014 it's auto-detected from the DRC phone prefix:\n\u2022 81 / 82 / 83 / 86 \u2192 mpesa (Vodacom)\n\u2022 97 / 98 / 99 \u2192 airtel\n\u2022 80 / 84 / 85 / 89 \u2192 orange (not yet supported, returns 400)\n\nIf the prefix is non-DRC or unmapped, pass `operator` explicitly to override.\n\nReturns subscriber_name (when the operator provides it) + response_code + response_desc.\nFree, no debit, rate-limited 60/min per merchant_code.",
      "item": [
        {
          "name": "[TC-LKP-001] Account lookup (operator auto-detected from prefix)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/account-lookup",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "account-lookup"
              ]
            },
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"amount\": \"100\",\n  \"currency\": \"CDF\",\n  \"receiver_first_name\": \"Jeanette\",\n  \"receiver_last_name\": \"Lukombo\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_msisdn\": \"243819214761\",\n  \"sender_country_code\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"reference\": \"SIT-LKP-{{$timestamp}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Most common case: partner sends just customer_number + amount/currency + sender/receiver names. The operator is inferred from the DRC phone prefix.\n\nFor Airtel-only lookups you can omit the receiver_*_name and sender_*_name fields \u2014 Airtel doesn't require them."
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status code is 200 (valid) or 422 (invalid subscriber)', function () {",
                  "    pm.expect([200, 422]).to.include(pm.response.code);",
                  "});",
                  "pm.test('Response has the standard lookup payload', function () {",
                  "    var j = pm.response.json();",
                  "    pm.expect(j.status).to.eql('success');",
                  "    pm.expect(j.data).to.have.property('valid');",
                  "    pm.expect(j.data).to.have.property('operator');",
                  "    pm.expect(j.data).to.have.property('subscriber_name');",
                  "    pm.expect(j.data).to.have.property('response_code');",
                  "    pm.expect(j.data.lookup_reference).to.match(/^LOOKUP-/);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-LKP-002] Override operator explicitly (skip auto-detect)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/account-lookup",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "account-lookup"
              ]
            },
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"operator\": \"airtel\",\n  \"customer_number\": \"{{test_phone_airtel}}\",\n  \"amount\": \"10\",\n  \"currency\": \"USD\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Pass `operator` explicitly when you need to override the prefix-based detection (rare)."
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status code is 200 or 422', function () {",
                  "    pm.expect([200, 422]).to.include(pm.response.code);",
                  "});",
                  "pm.test('Operator is airtel', function () {",
                  "    pm.expect(pm.response.json().data.operator).to.eql('airtel');",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-LKP-003] Unknown DRC prefix \u2192 400 IMT-1002",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/account-lookup",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "account-lookup"
              ]
            },
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"customer_number\": \"243601234567\",\n  \"amount\": \"100\",\n  \"currency\": \"USD\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Prefix 60 is not a DRC mobile-money operator \u2192 IMT-1002 'Could not infer operator from msisdn prefix'. Partner should pass operator explicitly or fix the number."
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status code is 400', function () { pm.response.to.have.status(400); });",
                  "pm.test('Error code is IMT-1002', function () { pm.expect(pm.response.json().error.code).to.eql('IMT-1002'); });"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "02c. Transaction Timeline",
      "description": "Per-transaction event timeline (received, screening, FX, telco validate, switch send, telco callback). Same data merchants see in the dashboard drawer.",
      "item": [
        {
          "name": "[TC-TLN-001] Get timeline for last txn",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/transactions/{{last_txn_id}}/timeline",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "transactions",
                "{{last_txn_id}}",
                "timeline"
              ]
            },
            "description": "Returns `summary` (final status, duration_s) + `events[]` ordered chronologically. Each event has kind, status (ok|warn|fail|info), title, ts, detail{}.",
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "03. Outbound Remittance",
      "description": "",
      "item": [
        {
          "name": "[TC-OUT-001] Outbound M-Pesa (currently disabled - expect 403)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/outbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "outbound"
              ]
            },
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 1,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"SIT-OUT-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sending_country\": \"FRA\",\n  \"sender_city\": \"Paris\",\n  \"current_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"permanent_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"profession\": \"Engineer\",\n  \"identity_number\": \"FR1234567890\",\n  \"document_issue_date\": \"2018-01-01\",\n  \"document_expiration_date\": \"2028-01-01\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiving_country\": \"COD\",\n  \"callback_url\": \"https://merchant.example.com/callback\",\n  \"provider_name\": \"Paypal\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 403\", function () {",
                  "    pm.response.to.have.status(403);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Outbound not yet available\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.error.code).to.eql(\"RMT-9001\");",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-OUT-002] Insufficient wallet balance (expect 402 or 403)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/outbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "outbound"
              ]
            },
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 999999999,\n  \"currency\": \"USD\",\n  \"customer_number\": \"{{test_phone_mpesa}}\",\n  \"reference\": \"SIT-OUT002-{{$timestamp}}\",\n  \"operator\": \"mpesa\",\n  \"sender_first_name\": \"John\",\n  \"sender_last_name\": \"Doe\",\n  \"sender_nationality\": \"FRA\",\n  \"sender_birthdate\": \"1985-05-15\",\n  \"sending_country\": \"FRA\",\n  \"sender_city\": \"Paris\",\n  \"current_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"permanent_address\": \"10 rue de la Paix, 75001 Paris\",\n  \"profession\": \"Engineer\",\n  \"identity_number\": \"FR1234567890\",\n  \"document_issue_date\": \"2018-01-01\",\n  \"document_expiration_date\": \"2028-01-01\",\n  \"receiver_first_name\": \"Marie\",\n  \"receiver_last_name\": \"Kabeya\",\n  \"receiver_nationality\": \"COD\",\n  \"receiving_country\": \"COD\",\n  \"callback_url\": \"https://merchant.example.com/callback\",\n  \"provider_name\": \"Paypal\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Insufficient funds or outbound disabled\", function () {",
                  "    pm.expect(pm.response.code).to.be.oneOf([402, 403]);",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"error\");",
                  "    console.log(\"Rejection: \" + json.error.code + \" - \" + json.error.message);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "04. FX Rates",
      "description": "",
      "item": [
        {
          "name": "[TC-FX-002] Public FX rate (no auth required)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/rate?currency=CDF",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "rate"
              ],
              "query": [
                {
                  "key": "currency",
                  "value": "CDF"
                }
              ]
            },
            "auth": {
              "type": "noauth"
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Rate response has data\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json).to.have.property(\"data\");",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-FX-001] Live FX rate USD/CDF (triggers live fetch)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/rate/live?currency=CDF",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "rate",
                "live"
              ],
              "query": [
                {
                  "key": "currency",
                  "value": "CDF"
                }
              ]
            },
            "auth": {
              "type": "noauth"
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-FX-012] Multi-currency - UGX rate",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/rate/live?currency=UGX",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "rate",
                "live"
              ],
              "query": [
                {
                  "key": "currency",
                  "value": "UGX"
                }
              ]
            },
            "auth": {
              "type": "noauth"
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "05. Wallet Management",
      "description": "",
      "item": [
        {
          "name": "[TC-WAL-001] Get wallet balance",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/balance",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "balance"
              ]
            },
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{merchant_jwt}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Status is success\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"success\");",
                  "});",
                  "",
                  "pm.test(\"Wallets returned with balance fields\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.data.wallets).to.be.an(\"array\");",
                  "    if (json.data.wallets.length > 0) {",
                  "        var w = json.data.wallets[0];",
                  "        pm.expect(w).to.have.property(\"balance\");",
                  "        pm.expect(w).to.have.property(\"available\");",
                  "        pm.expect(w).to.have.property(\"reserved\");",
                  "        pm.expect(w).to.have.property(\"wallet_code\");",
                  "    }",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-WAL-002] Wallet history",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/wallet/history?wallet_code={{wallet_code}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "wallet",
                "history"
              ],
              "query": [
                {
                  "key": "wallet_code",
                  "value": "{{wallet_code}}"
                }
              ]
            },
            "auth": {
              "type": "noauth"
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Status is success\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"success\");",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "06. Merchant Dashboard",
      "description": "",
      "item": [
        {
          "name": "[TC-DSH-002] Change merchant password",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/merchant/change-password",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "merchant",
                "change-password"
              ]
            },
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{merchant_jwt}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"old_password\": \"{{merchant_password}}\",\n  \"new_password\": \"MokoTestNew2026!\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Status is success\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"success\");",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-DSH-003] List transactions",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/transactions?page=1&limit=20",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "transactions"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1"
                },
                {
                  "key": "limit",
                  "value": "20"
                }
              ]
            },
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{merchant_jwt}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Status is success\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"success\");",
                  "});",
                  "",
                  "pm.test(\"Transactions array returned\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.data).to.have.property(\"transactions\");",
                  "    pm.expect(json.data.transactions).to.be.an(\"array\");",
                  "    pm.expect(json.data).to.have.property(\"total\");",
                  "    pm.expect(json.data).to.have.property(\"page\");",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-DSH-004] Regenerate API secret (CAUTION: invalidates current api_secret)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/merchant/secret",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "merchant",
                "secret"
              ]
            },
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{merchant_jwt}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"merchant_code\": \"{{merchant_code}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Status is success\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"success\");",
                  "});",
                  "",
                  "pm.test(\"New secret returned\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.data).to.have.property(\"merchant_secret\");",
                  "    // Store the new secret",
                  "    pm.collectionVariables.set(\"api_secret\", json.data.merchant_secret);",
                  "    console.log(\"New API secret stored: \" + json.data.merchant_secret);",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-DSH-005] List IP whitelist",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/merchant/whitelist",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "merchant",
                "whitelist"
              ]
            },
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{merchant_jwt}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Status is success\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"success\");",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-DSH-005] Add IP to whitelist",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/merchant/whitelist",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "merchant",
                "whitelist"
              ]
            },
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{merchant_jwt}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ip_address\": \"1.2.3.4\",\n  \"label\": \"SIT test IP\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Status is success\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"success\");",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-DSH-005] Remove IP from whitelist",
          "request": {
            "method": "DELETE",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/merchant/whitelist",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "merchant",
                "whitelist"
              ]
            },
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{merchant_jwt}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"ip_address\": \"1.2.3.4\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Status is success\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"success\");",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-DSH-006] List callback URLs",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/merchant/callback",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "merchant",
                "callback"
              ]
            },
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{merchant_jwt}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Status is success\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"success\");",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-DSH-006] Update callback URL",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/merchant/callback",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "merchant",
                "callback"
              ]
            },
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{merchant_jwt}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"channel\": \"mpesa\",\n  \"direction\": \"inbound\",\n  \"callback_url\": \"https://merchant.example.com/cb\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Status is success\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"success\");",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-DSH-008] Submit go-live request",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/merchant/go-live",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "merchant",
                "go-live"
              ]
            },
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{merchant_jwt}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});"
                ]
              }
            }
          ]
        },
        {
          "name": "[TC-DSH-007] List settlements",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/settlement/list?merchant_code={{merchant_code}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "settlement",
                "list"
              ],
              "query": [
                {
                  "key": "merchant_code",
                  "value": "{{merchant_code}}"
                }
              ]
            },
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 200\", function () {",
                  "    pm.response.to.have.status(200);",
                  "});",
                  "",
                  "pm.test(\"Response is valid JSON\", function () {",
                  "    pm.response.to.be.json;",
                  "});",
                  "",
                  "pm.test(\"Status is success\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"success\");",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "07. Error Handling",
      "description": "",
      "item": [
        {
          "name": "[TC-ERR-002] Malformed JSON in request body (expect 400, not 500)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/remittance/inbound",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "remittance",
                "inbound"
              ]
            },
            "auth": {
              "type": "basic",
              "basic": [
                {
                  "key": "username",
                  "value": "{{merchant_code}}",
                  "type": "string"
                },
                {
                  "key": "password",
                  "value": "{{api_secret}}",
                  "type": "string"
                }
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{invalid json here;;;",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [],
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test(\"Status code is 400 (not 500)\", function () {",
                  "    pm.response.to.have.status(400);",
                  "});",
                  "",
                  "pm.test(\"Clear error message returned\", function () {",
                  "    var json = pm.response.json();",
                  "    pm.expect(json.status).to.eql(\"error\");",
                  "    console.log(\"Error: \" + json.error.message);",
                  "});"
                ]
              }
            }
          ]
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "base_url",
      "value": "https://staging.remittance.gofreshpay.com",
      "type": "string"
    },
    {
      "key": "merchant_code",
      "value": "MKA-IJDD-113X",
      "type": "string"
    },
    {
      "key": "api_secret",
      "value": "sk_live_JhA0kr7QSQah0UzdzlDeMnKIU97BFNTr",
      "type": "string"
    },
    {
      "key": "merchant_email",
      "value": "finaltest@moko.com",
      "type": "string"
    },
    {
      "key": "merchant_password",
      "value": "MokoTest2026",
      "type": "string"
    },
    {
      "key": "merchant_jwt",
      "value": "",
      "type": "string"
    },
    {
      "key": "test_phone_mpesa",
      "value": "0828254066",
      "type": "string"
    },
    {
      "key": "test_phone_airtel",
      "value": "999964415",
      "type": "string"
    },
    {
      "key": "test_phone_orange",
      "value": "0891234567",
      "type": "string"
    },
    {
      "key": "wallet_code",
      "value": "wc_mpesa_usd_test1",
      "type": "string"
    },
    {
      "key": "last_txn_id",
      "value": "",
      "type": "string"
    },
    {
      "key": "last_reference",
      "value": "",
      "type": "string"
    }
  ]
}