{
  "info": {
    "name": "Medipay merchant API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Merchant API for Medipay. Set {{baseUrl}} and {{apiKey}} in your environment."
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://portal.medipayuk.co.uk"
    },
    {
      "key": "apiKey",
      "value": "mp_live_..."
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "item": [
    {
      "name": "List payments",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{baseUrl}}/api/v1/payments?limit=25",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "payments"
          ],
          "query": [
            {
              "key": "limit",
              "value": "25"
            }
          ]
        }
      }
    },
    {
      "name": "Revenue summary",
      "request": {
        "method": "GET",
        "url": {
          "raw": "{{baseUrl}}/api/v1/summary",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "summary"
          ]
        }
      }
    },
    {
      "name": "Create pay link",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"amount_pence\": 6500,\n  \"reference\": \"Hygiene appointment\"\n}"
        },
        "url": {
          "raw": "{{baseUrl}}/api/v1/paylinks",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "paylinks"
          ]
        }
      }
    }
  ]
}