{
  "info": {
    "name": "OTP Wire API",
    "_postman_id": "6f4d4a31-ec0b-458f-b4de-2c3896c52c1f",
    "description": "Core OTP Wire SDK, admin auth, wallet, and public webhook requests.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    { "key": "baseUrl", "value": "https://api.otpwire.com/api" },
    { "key": "adminEmail", "value": "owner@qverify.test" },
    { "key": "adminPassword", "value": "Qverify123!" },
    { "key": "adminToken", "value": "" },
    { "key": "apiKey", "value": "qv_live_demo_local_otp_1234567890abcdef" },
    { "key": "requestId", "value": "" },
    { "key": "webhookVerifyToken", "value": "change-me" }
  ],
  "item": [
    {
      "name": "SDK",
      "item": [
        {
          "name": "Send OTP",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" },
              { "key": "Authorization", "value": "Bearer {{apiKey}}" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"channel\": \"whatsapp\",\n  \"recipient\": \"+966512345678\",\n  \"purpose\": \"login\",\n  \"number_of_digits\": 6,\n  \"otp_format\": \"numeric\",\n  \"expiry_seconds\": 300,\n  \"template_key\": \"default_whatsapp_otp\",\n  \"locale\": \"en\",\n  \"reference_id\": \"postman-send-001\"\n}"
            },
            "url": "{{baseUrl}}/sdk/v1/sendOTP"
          }
        },
        {
          "name": "Verify OTP",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" },
              { "key": "Authorization", "value": "Bearer {{apiKey}}" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"request_id\": \"{{requestId}}\",\n  \"otp\": \"123456\"\n}"
            },
            "url": "{{baseUrl}}/sdk/v1/verifyOTP"
          }
        },
        {
          "name": "Resend OTP",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" },
              { "key": "Authorization", "value": "Bearer {{apiKey}}" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"request_id\": \"{{requestId}}\"\n}"
            },
            "url": "{{baseUrl}}/sdk/v1/resendOTP"
          }
        }
      ]
    },
    {
      "name": "Admin Auth",
      "item": [
        {
          "name": "Login",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"email\": \"{{adminEmail}}\",\n  \"password\": \"{{adminPassword}}\"\n}"
            },
            "url": "{{baseUrl}}/v1/admin/auth/login"
          }
        },
        {
          "name": "Current User",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Authorization", "value": "Bearer {{adminToken}}" }
            ],
            "url": "{{baseUrl}}/v1/admin/me"
          }
        }
      ]
    },
    {
      "name": "Wallet",
      "item": [
        {
          "name": "Create Checkout Session",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" },
              { "key": "Authorization", "value": "Bearer {{adminToken}}" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 100,\n  \"currency\": \"gbp\"\n}"
            },
            "url": "{{baseUrl}}/v1/admin/wallet/topups/checkout-session"
          }
        },
        {
          "name": "Wallet Snapshot",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Authorization", "value": "Bearer {{adminToken}}" }
            ],
            "url": "{{baseUrl}}/v1/admin/wallet"
          }
        }
      ]
    },
    {
      "name": "Public",
      "item": [
        {
          "name": "Contact Lead",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Content-Type", "value": "application/json" }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"name\": \"Aisha Noor\",\n  \"email\": \"aisha@example.com\",\n  \"company\": \"Northwind\",\n  \"phone\": \"+971501234567\",\n  \"message\": \"We need WhatsApp OTP for account verification.\"\n}"
            },
            "url": "{{baseUrl}}/v1/public/contact"
          }
        },
        {
          "name": "WhatsApp Webhook Verify",
          "request": {
            "method": "GET",
            "url": "{{baseUrl}}/v1/public/whatsapp/webhook?hub.mode=subscribe&hub.verify_token={{webhookVerifyToken}}&hub.challenge=challenge-token"
          }
        }
      ]
    }
  ]
}

