{
  "info": {
    "name": "VeloraPay Merchant API Staging",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "Staging request collection for the VeloraPay merchant payment path. Create the integration, API key, and webhook endpoint in Merchant Dashboard before using these requests."
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://api.staging.velorapay.com"
    },
    {
      "key": "merchant_api_key",
      "value": "ak_test_example"
    },
    {
      "key": "invoice_ref",
      "value": "EPA-2026-001"
    },
    {
      "key": "session_id",
      "value": "cs_example"
    }
  ],
  "item": [
    {
      "name": "Record invoice lines",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Authorization", "value": "Bearer {{merchant_api_key}}" },
          { "key": "Idempotency-Key", "value": "invoice-{{invoice_ref}}" },
          { "key": "Content-Type", "value": "application/json" }
        ],
        "url": "{{base_url}}/api/v1/invoice-lines",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"invoice_ref\": \"{{invoice_ref}}\",\n  \"currency\": \"GHS\",\n  \"lines\": [\n    { \"code\": \"EPA-PERMIT\", \"name\": \"Permit fee\", \"amount_minor\": 300000 },\n    { \"code\": \"EPA-LEVY\", \"name\": \"Environmental levy\", \"amount_minor\": 7038 }\n  ]\n}"
        }
      }
    },
    {
      "name": "Create checkout session",
      "request": {
        "method": "POST",
        "header": [
          { "key": "Authorization", "value": "Bearer {{merchant_api_key}}" },
          { "key": "Idempotency-Key", "value": "checkout-{{invoice_ref}}" },
          { "key": "Content-Type", "value": "application/json" }
        ],
        "url": "{{base_url}}/api/v1/sessions",
        "body": {
          "mode": "raw",
          "raw": "{\n  \"invoice_ref\": \"{{invoice_ref}}\",\n  \"amount_minor\": 307038,\n  \"currency\": \"GHS\",\n  \"description\": \"EPA permit payment\",\n  \"customer\": { \"name\": \"Kwame Asante\", \"email\": \"kwame@example.com\" },\n  \"callback_url\": \"https://epa.gov.gh/payments/return\"\n}"
        }
      }
    },
    {
      "name": "Get checkout session",
      "request": {
        "method": "GET",
        "header": [
          { "key": "Authorization", "value": "Bearer {{merchant_api_key}}" }
        ],
        "url": "{{base_url}}/api/v1/sessions/{{session_id}}"
      }
    }
  ]
}
