{
  "info": {
    "name": "Payment API",
    "description": "Direct payment API for server-to-server card processing.\n\nSet `baseUrl` and `apiKey` collection variables before sending requests.\n\n- Live: `/api/v1/payment/*`\n- Test: `/api/v1/test/payment/*`",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.example.com"
    },
    {
      "key": "apiKey",
      "value": "zentra_xxxxxxxxxxxxxxxx"
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "item": [
    {
      "name": "Live",
      "item": [
        {
          "name": "Create payment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"first_name\": \"John\",\n  \"last_name\": \"Doe\",\n  \"line1\": \"123 Main Street\",\n  \"country\": \"US\",\n  \"state\": \"NY\",\n  \"city\": \"New York\",\n  \"postal_code\": \"10001\",\n  \"ip_address\": \"192.168.1.100\",\n  \"email\": \"john.doe@example.com\",\n  \"phone\": \"+19876543210\",\n  \"amount\": \"100.50\",\n  \"currency\": \"USD\",\n  \"card_number\": \"4242424242424242\",\n  \"card_expiry_month\": \"01\",\n  \"card_expiry_year\": \"2028\",\n  \"card_cvv\": \"123\",\n  \"return_url\": \"https://yoursite.com/payment/return\",\n  \"merchant_transaction_id\": \"ORDER-12345\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/v1/payment/create",
              "host": ["{{baseUrl}}"],
              "path": ["api", "v1", "payment", "create"]
            },
            "description": "Charge a card and create a live transaction record."
          },
          "response": []
        },
        {
          "name": "Payment status",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"merchant_transaction_id\": \"ORDER-12345\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/v1/payment/status",
              "host": ["{{baseUrl}}"],
              "path": ["api", "v1", "payment", "status"]
            },
            "description": "Look up a live transaction by your merchant_transaction_id."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Test",
      "item": [
        {
          "name": "Create payment (success)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"first_name\": \"John\",\n  \"last_name\": \"Doe\",\n  \"line1\": \"123 Main Street\",\n  \"country\": \"US\",\n  \"state\": \"NY\",\n  \"city\": \"New York\",\n  \"postal_code\": \"10001\",\n  \"ip_address\": \"192.168.1.100\",\n  \"email\": \"john.doe@example.com\",\n  \"phone\": \"+19876543210\",\n  \"amount\": \"100.50\",\n  \"currency\": \"USD\",\n  \"card_number\": \"4242424242424242\",\n  \"card_expiry_month\": \"01\",\n  \"card_expiry_year\": \"2028\",\n  \"card_cvv\": \"123\",\n  \"return_url\": \"https://yoursite.com/payment/return\",\n  \"merchant_transaction_id\": \"ORDER-12345\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/v1/test/payment/create",
              "host": ["{{baseUrl}}"],
              "path": ["api", "v1", "test", "payment", "create"]
            },
            "description": "Test mode — card 4242424242424242 returns success immediately."
          },
          "response": []
        },
        {
          "name": "Create payment (3DS)",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"first_name\": \"John\",\n  \"last_name\": \"Doe\",\n  \"line1\": \"123 Main Street\",\n  \"country\": \"US\",\n  \"state\": \"NY\",\n  \"city\": \"New York\",\n  \"postal_code\": \"10001\",\n  \"ip_address\": \"192.168.1.100\",\n  \"email\": \"john.doe@example.com\",\n  \"phone\": \"+19876543210\",\n  \"amount\": \"200.00\",\n  \"currency\": \"USD\",\n  \"card_number\": \"4000000000003220\",\n  \"card_expiry_month\": \"01\",\n  \"card_expiry_year\": \"2028\",\n  \"card_cvv\": \"123\",\n  \"return_url\": \"https://yoursite.com/payment/return\",\n  \"merchant_transaction_id\": \"ORDER-3DS-001\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/v1/test/payment/create",
              "host": ["{{baseUrl}}"],
              "path": ["api", "v1", "test", "payment", "create"]
            },
            "description": "Test mode — card 4000000000003220 triggers 3DS authentication (returns 3ds_url)."
          },
          "response": []
        },
        {
          "name": "Payment status",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"merchant_transaction_id\": \"ORDER-12345\"\n}"
            },
            "url": {
              "raw": "{{baseUrl}}/api/v1/test/payment/status",
              "host": ["{{baseUrl}}"],
              "path": ["api", "v1", "test", "payment", "status"]
            },
            "description": "Look up a test transaction by your merchant_transaction_id."
          },
          "response": []
        }
      ]
    }
  ]
}
