{
  "issue": "#629",
  "flow": "E",
  "title": "建分派給 Channel 的收款單 → Supplier LINE 通知 → Supply Channel 自動結算",
  "newmanVersion": "6.2.3",
  "sourceVersion": "68faee0f47e945ef8c1ef480584d313cb672f78b",
  "status": "passed",
  "startedAt": "2026-11-19T05:20:13.469Z",
  "finishedAt": "2026-11-19T05:20:30.779Z",
  "totals": {
    "steps": 14,
    "assertions": 31,
    "failures": 0
  },
  "receiver": {
    "kind": "SUPPLY_CHANNEL",
    "ownership": "CARDHOLDER"
  },
  "terminal": {
    "orderStatus": "COMPLETED"
  },
  "outbox": {
    "id": 1,
    "eventType": "DEPOSIT_COMPLETED",
    "payloadChecked": [
      "eventType",
      "agentOrderId",
      "orderNo",
      "orderStatus",
      "actualAmount"
    ]
  },
  "steps": [
    {
      "index": 1,
      "name": "Superadmin 登入",
      "collection": "BO",
      "method": "POST",
      "path": "/public/v2/login",
      "status": 200,
      "code": 2000,
      "requestId": "f225d620-9eac-4d7f-b3ea-515331f26259",
      "assertions": {
        "total": 1,
        "failed": 0
      }
    },
    {
      "index": 2,
      "name": "建立 Agent",
      "collection": "BO",
      "method": "POST",
      "path": "/bo/v2/agents",
      "status": 200,
      "code": null,
      "requestId": "d49cad6f-9bee-480f-b6d6-234e996a1b7c",
      "assertions": {
        "total": 1,
        "failed": 0
      }
    },
    {
      "index": 3,
      "name": "發行 Agent API credential",
      "collection": "BO",
      "method": "PUT",
      "path": "/bo/v2/agents/{{agentId}}/credentials/externalOrderApi",
      "status": 200,
      "code": null,
      "requestId": "16965794-1061-4f43-a5e8-52759ba45fbd",
      "assertions": {
        "total": 1,
        "failed": 0
      }
    },
    {
      "index": 4,
      "name": "建立 Supplier 與預設 Gateway",
      "collection": "BO",
      "method": "POST",
      "path": "/bo/v2/suppliers",
      "status": 200,
      "code": null,
      "requestId": "e2d23023-329e-44e4-8cda-233036853516",
      "assertions": {
        "total": 2,
        "failed": 0
      }
    },
    {
      "index": 5,
      "name": "建立 LINE notification source",
      "collection": "BO",
      "method": "POST",
      "path": "/bo/v2/notificationProviderSources",
      "status": 201,
      "code": null,
      "requestId": "e85100bc-a9a8-4466-8585-b71e82e02ed3",
      "assertions": {
        "total": 1,
        "failed": 0
      }
    },
    {
      "index": 6,
      "name": "啟用 LINE notification source",
      "collection": "BO",
      "method": "PUT",
      "path": "/bo/v2/notificationProviderSources/{{sourceId}}/status",
      "status": 204,
      "code": null,
      "requestId": "2e70e55e-b5c7-4feb-8779-a77bf85c42f8",
      "assertions": {
        "total": 0,
        "failed": 0
      }
    },
    {
      "index": 7,
      "name": "發行 Supplier LINE credential",
      "collection": "BO",
      "method": "POST",
      "path": "/bo/v2/suppliers/{{supplierId}}/lineCredentials",
      "status": 200,
      "code": null,
      "requestId": "7d5b818a-a1e2-40c3-8e09-51aebc73f19c",
      "assertions": {
        "total": 1,
        "failed": 0
      }
    },
    {
      "index": 8,
      "name": "建立 Supply Channel",
      "collection": "BO",
      "method": "POST",
      "path": "/bo/v2/suppliers/{{supplierId}}/supplyChannels",
      "status": 200,
      "code": null,
      "requestId": "8c77f155-7225-4744-96c4-61bc3891751d",
      "assertions": {
        "total": 1,
        "failed": 0
      }
    },
    {
      "index": 9,
      "name": "Agent 分配 Supply Channel",
      "collection": "BO",
      "method": "POST",
      "path": "/bo/v2/agents/{{agentId}}/supplyChannelAllocations",
      "status": 200,
      "code": null,
      "requestId": "6d0f9164-b83f-43a2-9964-a5a98cf738b1",
      "assertions": {
        "total": 1,
        "failed": 0
      }
    },
    {
      "index": 10,
      "name": "OGP 建收款單",
      "collection": "OGP",
      "method": "POST",
      "path": "/v1/agentApi/depositOrder/assign",
      "status": 200,
      "code": 2000,
      "requestId": "56171430-078d-4a53-9de8-f7f795653aa7",
      "assertions": {
        "total": 5,
        "failed": 0
      }
    },
    {
      "index": 11,
      "name": "Supplier LINE 入款通知",
      "collection": "LINE",
      "method": "POST",
      "path": "/v2/external/transactions",
      "status": 200,
      "code": 2000,
      "requestId": "6af16450-cbad-4479-95e9-2cfdc0773369",
      "assertions": {
        "total": 3,
        "failed": 0
      }
    },
    {
      "index": 12,
      "name": "OGP 查收款單終態",
      "collection": "OGP",
      "method": "GET",
      "path": "/v1/agentApi/depositOrder/{{agentOrderId}}",
      "status": 200,
      "code": 2000,
      "requestId": "ed929ff0-2c6b-4e82-9bb2-dc08e46e2fd9",
      "assertions": {
        "total": 4,
        "failed": 0
      }
    },
    {
      "index": 13,
      "name": "查 callback outbox 列表",
      "collection": "BO",
      "method": "GET",
      "path": "/bo/v2/agentCallbackOutbox/page",
      "status": 200,
      "code": null,
      "requestId": "cd97b07c-70a6-49fb-8844-1db803bd7735",
      "assertions": {
        "total": 3,
        "failed": 0
      }
    },
    {
      "index": 14,
      "name": "查 callback outbox 明細",
      "collection": "BO",
      "method": "GET",
      "path": "/bo/v2/agentCallbackOutbox/{{id}}",
      "status": 200,
      "code": null,
      "requestId": "6cd53423-978e-45bc-be2e-8e1c468aaf44",
      "assertions": {
        "total": 7,
        "failed": 0
      }
    }
  ]
}
