{
  "info": {
    "_postman_id": "c073d3b9-0d83-4781-9fd1-a5a6f5f808ae",
    "name": "Infinihash BaaS — Rails, Settlement & Managed Escrow",
    "description": "COMPLY / MOVE / HOLD.\n\nSet the collection variables `base_url`, `tenant_api_key`, `internal_token`.\n\nMoney-moving requests send `Idempotency-Key: {{$guid}}` — replace it with a FIXED value to test replay (same key + same body returns the original response with `Idempotent-Replay: true`; same key + different body returns 409).\n\nFolders 6-8 are the three scripted demos from ticket #10074.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://rails-api.infinihash.com"
    },
    {
      "key": "tenant_api_key",
      "value": "ihb_REPLACE_ME"
    },
    {
      "key": "internal_token",
      "value": "REPLACE_ME"
    },
    {
      "key": "tenant_id",
      "value": ""
    },
    {
      "key": "invoice_id",
      "value": ""
    },
    {
      "key": "customer_id",
      "value": ""
    },
    {
      "key": "escrow_ref",
      "value": "HOLD-DEMO-1"
    }
  ],
  "item": [
    {
      "name": "0. Health & docs",
      "item": [
        {
          "name": "Health",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/health",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "health"
              ]
            }
          }
        },
        {
          "name": "OpenAPI",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/docs",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "docs"
              ]
            }
          }
        },
        {
          "name": "Demo overview (public, read-only)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/demo/overview",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "demo",
                "overview"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "1. Admin — provisioning",
      "item": [
        {
          "name": "Create tenant",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/tenants",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "tenants"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"slug\": \"demo-co\",\n  \"legalName\": \"Demo Co, LLC\",\n  \"industry\": \"general\",\n  \"walletChain\": \"tron\",\n  \"walletAddr\": \"TXdemoCleanWallet0001\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Mint tenant API key",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/tenants/{{tenant_id}}/keys",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "tenants",
                "{{tenant_id}}",
                "keys"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"label\": \"postman\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Register webhook endpoint",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/tenants/{{tenant_id}}/webhooks",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "tenants",
                "{{tenant_id}}",
                "webhooks"
              ]
            },
            "description": "Returns the signing secret ONCE. Verify X-Infinihash-Signature: t=<unix>,v1=HMAC_SHA256(secret, \"<t>.<rawBody>\").",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://webhook.example/hook\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Create fee rule",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/fee-rules",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "fee-rules"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tenantId\": null,\n  \"industry\": \"general\",\n  \"pctBps\": 250,\n  \"flatCents\": 0,\n  \"floorCents\": 0,\n  \"minAmount\": 0\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "2. MOVE — invoicing & settlement",
      "item": [
        {
          "name": "Create invoice",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/invoices",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "invoices"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"number\": \"DEMO-0001\",\n  \"customerId\": \"{{customer_id}}\",\n  \"terms\": \"Net 14\",\n  \"lineItems\": [\n    {\n      \"description\": \"Consulting\",\n      \"quantity\": 1,\n      \"unitCents\": 500000\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Send invoice",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/invoices/{{invoice_id}}/send",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "invoices",
                "{{invoice_id}}",
                "send"
              ]
            }
          }
        },
        {
          "name": "Get invoice",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/invoices/{{invoice_id}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "invoices",
                "{{invoice_id}}"
              ]
            }
          }
        },
        {
          "name": "Pay invoice (MONEY-MOVING, idempotent)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/invoices/{{invoice_id}}/pay",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "invoices",
                "{{invoice_id}}",
                "pay"
              ]
            },
            "description": "Drives created->collecting->screening->screened->converting->settling->completed. Replay with the same key to prove no double settle.",
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amountCents\": 500000\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Settlement history (audit trail)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/settlements/REPLACE_SETTLEMENT_ID/history",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "settlements",
                "REPLACE_SETTLEMENT_ID",
                "history"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "3. HOLD — Managed Escrow",
      "item": [
        {
          "name": "Create escrow (manual release)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reference\": \"{{escrow_ref}}\",\n  \"amountCents\": 1000000,\n  \"rail\": \"stablecoin\",\n  \"releaseRule\": \"manual\",\n  \"buyerRef\": \"buyer-1\",\n  \"sellerRef\": \"seller-1\",\n  \"payoutChain\": \"tron\",\n  \"payoutAddress\": \"TXdemoSellerWallet0001\",\n  \"refundAddress\": \"TXdemoBuyerWallet0001\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Create escrow (milestone)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reference\": \"HOLD-MILESTONE-1\",\n  \"amountCents\": 2000000,\n  \"releaseRule\": \"milestone\",\n  \"payoutAddress\": \"TXdemoSellerWallet0001\",\n  \"milestones\": [\n    {\n      \"seq\": 0,\n      \"description\": \"Phase 1 delivered\",\n      \"amountCents\": 1000000\n    },\n    {\n      \"seq\": 1,\n      \"description\": \"Phase 2 delivered\",\n      \"amountCents\": 1000000\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Create escrow (dual approval)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reference\": \"HOLD-DUAL-1\",\n  \"amountCents\": 2500000,\n  \"releaseRule\": \"dual_approval\",\n  \"requiredApprovals\": 2,\n  \"payoutAddress\": \"TXdemoSellerWallet0001\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Create escrow (compliance gate)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reference\": \"HOLD-COMPLY-1\",\n  \"amountCents\": 1500000,\n  \"releaseRule\": \"compliance_gate\",\n  \"payoutAddress\": \"TXdemoSellerWallet0001\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Fund escrow",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow/{{escrow_ref}}/fund",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow",
                "{{escrow_ref}}",
                "fund"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amountCents\": 1000000\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Check release conditions (dry run)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow/{{escrow_ref}}/conditions",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow",
                "{{escrow_ref}}",
                "conditions"
              ]
            }
          }
        },
        {
          "name": "Complete milestone",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow/HOLD-MILESTONE-1/milestones/REPLACE_MILESTONE_ID/complete",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow",
                "HOLD-MILESTONE-1",
                "milestones",
                "REPLACE_MILESTONE_ID",
                "complete"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"note\": \"signed off\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Record approval",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow/HOLD-DUAL-1/approvals",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow",
                "HOLD-DUAL-1",
                "approvals"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"approverRef\": \"ops@tenant.example\",\n  \"decision\": \"approve\",\n  \"note\": \"ok\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Release escrow",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow/{{escrow_ref}}/release",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow",
                "{{escrow_ref}}",
                "release"
              ]
            },
            "description": "409 with unmet[] if the release rule or the fail-closed compliance gate is not satisfied; the escrow parks in release_pending.",
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Refund escrow",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow/HOLD-DUAL-1/refund",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow",
                "HOLD-DUAL-1",
                "refund"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"condition failed\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Expire escrow (unfunded only)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow/HOLD-COMPLY-1/expire",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow",
                "HOLD-COMPLY-1",
                "expire"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Get escrow + history",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow/{{escrow_ref}}",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow",
                "{{escrow_ref}}"
              ]
            }
          }
        },
        {
          "name": "List escrows",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "4. Webhooks & review queue",
      "item": [
        {
          "name": "Delivery tracking",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/webhooks/deliveries?status=failed",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "webhooks",
                "deliveries"
              ],
              "query": [
                {
                  "key": "status",
                  "value": "failed"
                }
              ]
            }
          }
        },
        {
          "name": "Force retry sweep",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/webhooks/sweep",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "webhooks",
                "sweep"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"limit\": 50,\n  \"force\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Manual review queue",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/review-queue",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "review-queue"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "5. Reconciliation & flags",
      "item": [
        {
          "name": "Recon export (JSON, range)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/recon?from=2026-08-01T00:00:00Z&to=2026-08-31T23:59:59Z&format=json",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "recon"
              ],
              "query": [
                {
                  "key": "from",
                  "value": "2026-08-01T00:00:00Z"
                },
                {
                  "key": "to",
                  "value": "2026-08-31T23:59:59Z"
                },
                {
                  "key": "format",
                  "value": "json"
                }
              ]
            }
          }
        },
        {
          "name": "Recon export (CSV)",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/recon?format=csv",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "recon"
              ],
              "query": [
                {
                  "key": "format",
                  "value": "csv"
                }
              ]
            }
          }
        },
        {
          "name": "Daily close CSV",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/recon/daily?date=2026-08-03&format=csv",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "recon",
                "daily"
              ],
              "query": [
                {
                  "key": "date",
                  "value": "2026-08-03"
                },
                {
                  "key": "format",
                  "value": "csv"
                }
              ]
            }
          }
        },
        {
          "name": "Get feature flags",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/flags",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "flags"
              ]
            }
          }
        },
        {
          "name": "Disable a vendor rail",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/flags",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "flags"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"key\": \"vendor.conversion.bridge\",\n  \"enabled\": false,\n  \"note\": \"kill switch\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "Re-enable a vendor rail",
          "request": {
            "method": "PUT",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/flags",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "flags"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"key\": \"vendor.conversion.bridge\",\n  \"enabled\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "6. DEMO A — onboard -> invoice -> screen -> convert -> settle",
      "item": [
        {
          "name": "A1 create tenant",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/tenants",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "tenants"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"slug\": \"pilot-co\",\n  \"legalName\": \"Pilot Co, LLC\",\n  \"industry\": \"general\",\n  \"walletChain\": \"tron\",\n  \"walletAddr\": \"TXpilotCleanWallet01\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "A2 mint key",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/tenants/{{tenant_id}}/keys",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "tenants",
                "{{tenant_id}}",
                "keys"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"label\": \"pilot\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "A3 register webhook",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/tenants/{{tenant_id}}/webhooks",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "tenants",
                "{{tenant_id}}",
                "webhooks"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://webhook.example/pilot\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "A4 create invoice",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/invoices",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "invoices"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"number\": \"PILOT-0001\",\n  \"customerId\": \"{{customer_id}}\",\n  \"lineItems\": [\n    {\n      \"description\": \"Services\",\n      \"quantity\": 1,\n      \"unitCents\": 750000\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "A5 send invoice",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/invoices/{{invoice_id}}/send",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "invoices",
                "{{invoice_id}}",
                "send"
              ]
            }
          }
        },
        {
          "name": "A6 pay -> full spine",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/invoices/{{invoice_id}}/pay",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "invoices",
                "{{invoice_id}}",
                "pay"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "A7 replay the SAME key (no double settle)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/invoices/{{invoice_id}}/pay",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "invoices",
                "{{invoice_id}}",
                "pay"
              ]
            },
            "description": "Set Idempotency-Key to the SAME value used in A6. Expect the identical body plus Idempotent-Replay: true.",
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "A8 audit trail",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/settlements/REPLACE_SETTLEMENT_ID/history",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "settlements",
                "REPLACE_SETTLEMENT_ID",
                "history"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "7. DEMO B — escrow create -> fund -> condition met -> release",
      "item": [
        {
          "name": "B1 create milestone escrow",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reference\": \"DEMO-B\",\n  \"amountCents\": 1000000,\n  \"releaseRule\": \"milestone\",\n  \"payoutAddress\": \"TXpilotSellerWallet1\",\n  \"refundAddress\": \"TXpilotBuyerWallet1\",\n  \"milestones\": [\n    {\n      \"description\": \"Goods delivered\",\n      \"amountCents\": 1000000\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "B2 fund",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow/DEMO-B/fund",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow",
                "DEMO-B",
                "fund"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "B3 release BEFORE condition (expect 409)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow/DEMO-B/release",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow",
                "DEMO-B",
                "release"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "B4 complete milestone",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow/DEMO-B/milestones/REPLACE_MILESTONE_ID/complete",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow",
                "DEMO-B",
                "milestones",
                "REPLACE_MILESTONE_ID",
                "complete"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "B5 release (expect 200)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow/DEMO-B/release",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow",
                "DEMO-B",
                "release"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "B6 escrow + history",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow/DEMO-B",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow",
                "DEMO-B"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "8. DEMO C — failure path: screening fail -> no release -> refund",
      "item": [
        {
          "name": "C1 create escrow with a BLOCKED payout address",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reference\": \"DEMO-C\",\n  \"amountCents\": 500000,\n  \"releaseRule\": \"manual\",\n  \"payoutAddress\": \"TXBLOCKEDsanctionedWallet\",\n  \"refundAddress\": \"TXpilotBuyerWallet1\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "C2 fund",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow/DEMO-C/fund",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow",
                "DEMO-C",
                "fund"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "C3 release (expect 409, compliance gate)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow/DEMO-C/release",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow",
                "DEMO-C",
                "release"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "C4 review queue shows it",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{internal_token}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/admin/review-queue",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "admin",
                "review-queue"
              ]
            }
          }
        },
        {
          "name": "C5 refund the buyer",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Idempotency-Key",
                "value": "{{$guid}}"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow/DEMO-C/refund",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow",
                "DEMO-C",
                "refund"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"reason\": \"sanctions screen failed\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "C6 confirm refunded, never released",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{tenant_api_key}}"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/api/v1/escrow/DEMO-C",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "v1",
                "escrow",
                "DEMO-C"
              ]
            }
          }
        }
      ]
    }
  ]
}
