{
  "info": {
    "name": "Fiatsend Partner API",
    "description": "Fiatsend Partner API v1.2.1 — stablecoin-to-mobile-money payouts for Africa.\n\nBase URLs:\n- Sandbox: https://sandbox.fiatsend.com/v1\n- Production: https://api.fiatsend.com/v1",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [{ "key": "token", "value": "{{api_key}}", "type": "string" }]
  },
  "variable": [
    { "key": "base_url", "value": "https://sandbox.fiatsend.com/v1" },
    { "key": "api_key", "value": "your_api_key_here" }
  ],
  "item": [
    {
      "name": "Health",
      "item": [
        {
          "name": "Health Check",
          "request": {
            "method": "GET",
            "url": "{{base_url}}/health",
            "auth": { "type": "noauth" },
            "description": "Check service health and status."
          }
        }
      ]
    },
    {
      "name": "Rates",
      "item": [
        {
          "name": "Get FX Rate",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/rates?from_currency=USDC&to_currency=GHS&amount=100.00",
              "host": ["{{base_url}}"],
              "path": ["rates"],
              "query": [
                { "key": "from_currency", "value": "USDC" },
                { "key": "to_currency", "value": "GHS" },
                { "key": "amount", "value": "100.00" }
              ]
            },
            "description": "Get a real-time quote for converting stablecoins to GHS."
          }
        }
      ]
    },
    {
      "name": "Networks",
      "item": [
        {
          "name": "List Supported Networks",
          "request": {
            "method": "GET",
            "url": "{{base_url}}/supported-networks",
            "description": "Returns all available mobile money networks."
          }
        },
        {
          "name": "Get Transaction Limits",
          "request": {
            "method": "GET",
            "url": "{{base_url}}/limits",
            "description": "Returns transaction limits per KYC tier."
          }
        }
      ]
    },
    {
      "name": "Withdrawals",
      "item": [
        {
          "name": "Create Withdrawal",
          "request": {
            "method": "POST",
            "url": "{{base_url}}/withdrawals",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": \"50.00\",\n  \"currency\": \"USDC\",\n  \"recipient_phone\": \"+233241234567\",\n  \"mobile_network\": \"MTN\",\n  \"reference_id\": \"txn-test-001\",\n  \"metadata\": {\n    \"contractor_id\": \"con_12345\"\n  }\n}"
            },
            "description": "Initiate a stablecoin-to-mobile-money withdrawal."
          }
        },
        {
          "name": "Get Withdrawal Status",
          "request": {
            "method": "GET",
            "url": "{{base_url}}/withdrawals/wd_9f8e7d6c5b4a",
            "description": "Retrieve the current status of a withdrawal."
          }
        },
        {
          "name": "List Transactions",
          "request": {
            "method": "GET",
            "url": {
              "raw": "{{base_url}}/transactions?page=1&per_page=25",
              "host": ["{{base_url}}"],
              "path": ["transactions"],
              "query": [
                { "key": "page", "value": "1" },
                { "key": "per_page", "value": "25" },
                { "key": "status", "value": "", "disabled": true },
                { "key": "from_date", "value": "", "disabled": true },
                { "key": "to_date", "value": "", "disabled": true }
              ]
            },
            "description": "Retrieve a paginated list of transactions."
          }
        }
      ]
    },
    {
      "name": "Webhooks",
      "item": [
        {
          "name": "Register Webhook",
          "request": {
            "method": "POST",
            "url": "{{base_url}}/webhooks",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"url\": \"https://your-app.com/webhooks/fiatsend\",\n  \"events\": [\n    \"withdrawal.completed\",\n    \"withdrawal.failed\",\n    \"withdrawal.processing\"\n  ],\n  \"secret\": \"whsec_your_secret_here\"\n}"
            },
            "description": "Register a URL to receive withdrawal status updates."
          }
        },
        {
          "name": "List Webhooks",
          "request": {
            "method": "GET",
            "url": "{{base_url}}/webhooks",
            "description": "List all registered webhooks."
          }
        },
        {
          "name": "Delete Webhook",
          "request": {
            "method": "DELETE",
            "url": "{{base_url}}/webhooks/wh_example123",
            "description": "Delete a registered webhook."
          }
        }
      ]
    }
  ]
}
