{
  "info": {
    "_postman_id": "tikipay-developer-collection-v1",
    "name": "TikiPay Payment API",
    "description": "Complete TikiPay Payment API collection. Configure base_url and api_key, create a payment, save invoice_id, redirect to payment_url, then verify server-to-server before fulfillment. Webhooks are notifications; Verify is authoritative.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://pay.your-tikipay-domain.com"
    },
    {
      "key": "api_key",
      "value": "YOUR_BRAND_API_KEY"
    },
    {
      "key": "invoice_id",
      "value": "SESSION_ID"
    },
    {
      "key": "transaction_id",
      "value": "TXN123456789"
    }
  ],
  "item": [
    {
      "name": "Native API",
      "item": [
        {
          "name": "Create Invoice",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "API-KEY",
                "value": "{{api_key}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"cus_name\": \"John Doe\",\n  \"cus_email\": \"john@example.com\",\n  \"amount\": 1200,\n  \"success_url\": \"https://merchant.example/payment/success\",\n  \"cancel_url\": \"https://merchant.example/payment/cancel\",\n  \"webhook_url\": \"https://merchant.example/api/tikipay/webhook\",\n  \"metadata\": {\n    \"order_id\": \"ORDER-1001\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/api/payment/create",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "payment",
                "create"
              ]
            }
          }
        },
        {
          "name": "Verify Payment",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "API-KEY",
                "value": "{{api_key}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice_id\": \"{{invoice_id}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/api/payment/verify",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "payment",
                "verify"
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Compatibility Routes",
      "item": [
        {
          "name": "Checkout v2 Create",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "API-KEY",
                "value": "{{api_key}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"full_name\": \"John Doe\",\n  \"email\": \"john@example.com\",\n  \"amount\": 1200,\n  \"redirect_url\": \"https://merchant.example/payment/success\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/api/checkout-v2",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "api",
                "checkout-v2"
              ]
            }
          }
        },
        {
          "name": "V1 Verify",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "API-KEY",
                "value": "{{api_key}}"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"invoice_id\": \"{{invoice_id}}\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{base_url}}/v1/payment/verify",
              "host": [
                "{{base_url}}"
              ],
              "path": [
                "v1",
                "payment",
                "verify"
              ]
            }
          }
        }
      ]
    }
  ]
}