{
  "info": {
    "name": "Az.pague API",
    "description": "API REST da Az.pague — Vendas, Assinaturas e Cobranças (Links de Pagamento).",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{api_token}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://sandbox.azpag.dev",
      "type": "string"
    },
    {
      "key": "api_token",
      "value": "",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Vendas",
      "item": [
        {
          "name": "Criar venda (Pix)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Accept", "value": "application/json" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/order",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "order"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"checkout_id\": \"nVfgcG\",\n  \"src\": \"\",\n  \"ref\": \"\",\n  \"customer\": {\n    \"fullname\": \"Elias Heitor Martins\",\n    \"taxvat\": \"73845499222\",\n    \"email\": \"elias@exemplo.com\",\n    \"telephone\": \"6137210648\"\n  },\n  \"address\": {\n    \"postcode\": \"73751-100\",\n    \"street\": \"Rua Quadra 10\",\n    \"number\": \"681\",\n    \"complement\": \"\",\n    \"city\": \"Planaltina\",\n    \"region\": \"GO\",\n    \"district\": \"Setor Norte\"\n  },\n  \"payment\": {\n    \"method\": \"pix\",\n    \"expiration\": 10\n  }\n}"
            }
          }
        },
        {
          "name": "Criar venda (Cartão de Crédito)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Accept", "value": "application/json" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/order",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "order"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"checkout_id\": \"nVfgcG\",\n  \"src\": \"\",\n  \"ref\": \"\",\n  \"customer\": {\n    \"fullname\": \"Elias Heitor Martins\",\n    \"taxvat\": \"73845499222\",\n    \"email\": \"elias@exemplo.com\",\n    \"telephone\": \"6137210648\"\n  },\n  \"address\": {\n    \"postcode\": \"73751-100\",\n    \"street\": \"Rua Quadra 10\",\n    \"number\": \"681\",\n    \"complement\": \"\",\n    \"city\": \"Planaltina\",\n    \"region\": \"GO\",\n    \"district\": \"Setor Norte\"\n  },\n  \"payment\": {\n    \"method\": \"credit\",\n    \"installments\": 1,\n    \"apply_interest\": false,\n    \"card\": {\n      \"number\": \"4444333322221111\",\n      \"holder\": \"Elias Heitor Martins\",\n      \"expiration\": \"01/2029\",\n      \"security\": \"120\"\n    }\n  }\n}"
            }
          }
        },
        {
          "name": "Criar venda (Boleto)",
          "request": {
            "method": "POST",
            "header": [
              { "key": "Accept", "value": "application/json" },
              { "key": "Content-Type", "value": "application/json" }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/order",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "order"]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"checkout_id\": \"nVfgcG\",\n  \"src\": \"\",\n  \"ref\": \"\",\n  \"customer\": {\n    \"fullname\": \"Elias Heitor Martins\",\n    \"taxvat\": \"73845499222\",\n    \"email\": \"elias@exemplo.com\",\n    \"telephone\": \"6137210648\"\n  },\n  \"address\": {\n    \"postcode\": \"73751-100\",\n    \"street\": \"Rua Quadra 10\",\n    \"number\": \"681\",\n    \"complement\": \"\",\n    \"city\": \"Planaltina\",\n    \"region\": \"GO\",\n    \"district\": \"Setor Norte\"\n  },\n  \"payment\": {\n    \"method\": \"bank_slip\"\n  }\n}"
            }
          }
        },
        {
          "name": "Listar vendas",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept", "value": "application/json" }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/order?page=1",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "order"],
              "query": [
                { "key": "page", "value": "1" },
                { "key": "from", "value": "", "disabled": true },
                { "key": "to", "value": "", "disabled": true },
                { "key": "status", "value": "", "disabled": true },
                { "key": "src", "value": "", "disabled": true },
                { "key": "ref", "value": "", "disabled": true },
                { "key": "product_id", "value": "", "disabled": true },
                { "key": "taxvat", "value": "", "disabled": true }
              ]
            }
          }
        },
        {
          "name": "Consultar venda",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept", "value": "application/json" }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/order/:order_number",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "order", ":order_number"],
              "variable": [
                { "key": "order_number", "value": "" }
              ]
            }
          }
        },
        {
          "name": "Listar status disponíveis",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept", "value": "application/json" }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/order/status",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "order", "status"]
            }
          }
        }
      ]
    },
    {
      "name": "Assinaturas",
      "item": [
        {
          "name": "Listar assinaturas",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept", "value": "application/json" }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/subscriber?page=1",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "subscriber"],
              "query": [
                { "key": "page", "value": "1" },
                { "key": "next_charge", "value": "", "disabled": true },
                { "key": "status", "value": "", "disabled": true },
                { "key": "checkout_id", "value": "", "disabled": true },
                { "key": "token", "value": "", "disabled": true },
                { "key": "email", "value": "", "disabled": true }
              ]
            }
          }
        },
        {
          "name": "Consultar assinatura",
          "request": {
            "method": "GET",
            "header": [
              { "key": "Accept", "value": "application/json" }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/subscriber/:token",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "subscriber", ":token"],
              "variable": [
                { "key": "token", "value": "" }
              ]
            }
          }
        },
        {
          "name": "Cancelar assinatura",
          "request": {
            "method": "DELETE",
            "header": [
              { "key": "Accept", "value": "application/json" }
            ],
            "url": {
              "raw": "{{base_url}}/api/v1/subscriber/:token/cancel",
              "host": ["{{base_url}}"],
              "path": ["api", "v1", "subscriber", ":token", "cancel"],
              "variable": [
                { "key": "token", "value": "" }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Cobranças",
      "item": [
        {
          "name": "Avulsa",
          "item": [
            {
              "name": "Criar cobrança",
              "request": {
                "method": "POST",
                "header": [
                  { "key": "Accept", "value": "application/json" },
                  { "key": "Content-Type", "value": "application/json" }
                ],
                "url": {
                  "raw": "{{base_url}}/api/v1/payment-link",
                  "host": ["{{base_url}}"],
                  "path": ["api", "v1", "payment-link"]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"title\": \"Cobrança Maio/2025\",\n  \"description\": \"Mensalidade do plano Premium\",\n  \"amount\": 99.90,\n  \"installments\": 3,\n  \"enable_pix\": true,\n  \"enable_credit\": true,\n  \"enable_bank_slip\": false,\n  \"fee_mode\": \"customer_pay_fee\",\n  \"expired_at\": \"2025-06-30\",\n  \"expire_after_payment\": true,\n  \"reference\": \"INV-2025-05-001\",\n  \"customer_name\": \"Maria Souza\",\n  \"customer_email\": \"maria@exemplo.com\",\n  \"customer_phone\": \"51999990000\",\n  \"customer_document\": \"12345678901\"\n}"
                }
              }
            },
            {
              "name": "Listar cobranças",
              "request": {
                "method": "GET",
                "header": [
                  { "key": "Accept", "value": "application/json" }
                ],
                "url": {
                  "raw": "{{base_url}}/api/v1/payment-link?page=1",
                  "host": ["{{base_url}}"],
                  "path": ["api", "v1", "payment-link"],
                  "query": [
                    { "key": "page", "value": "1" }
                  ]
                }
              }
            },
            {
              "name": "Consultar cobrança",
              "request": {
                "method": "GET",
                "header": [
                  { "key": "Accept", "value": "application/json" }
                ],
                "url": {
                  "raw": "{{base_url}}/api/v1/payment-link/:slug",
                  "host": ["{{base_url}}"],
                  "path": ["api", "v1", "payment-link", ":slug"],
                  "variable": [
                    { "key": "slug", "value": "" }
                  ]
                }
              }
            },
            {
              "name": "Atualizar cobrança",
              "request": {
                "method": "PUT",
                "header": [
                  { "key": "Accept", "value": "application/json" },
                  { "key": "Content-Type", "value": "application/json" }
                ],
                "url": {
                  "raw": "{{base_url}}/api/v1/payment-link/:slug",
                  "host": ["{{base_url}}"],
                  "path": ["api", "v1", "payment-link", ":slug"],
                  "variable": [
                    { "key": "slug", "value": "" }
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"title\": \"Cobrança Atualizada\",\n  \"amount\": 149.90\n}"
                }
              }
            },
            {
              "name": "Remover cobrança",
              "request": {
                "method": "DELETE",
                "header": [
                  { "key": "Accept", "value": "application/json" }
                ],
                "url": {
                  "raw": "{{base_url}}/api/v1/payment-link/:slug",
                  "host": ["{{base_url}}"],
                  "path": ["api", "v1", "payment-link", ":slug"],
                  "variable": [
                    { "key": "slug", "value": "" }
                  ]
                }
              }
            }
          ]
        },
        {
          "name": "Em Lote",
          "item": [
            {
              "name": "Criar cobranças em lote",
              "request": {
                "method": "POST",
                "header": [
                  { "key": "Accept", "value": "application/json" },
                  { "key": "Content-Type", "value": "application/json" }
                ],
                "url": {
                  "raw": "{{base_url}}/api/v1/payment-link-bulk",
                  "host": ["{{base_url}}"],
                  "path": ["api", "v1", "payment-link-bulk"]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Cobranças Maio/2025\",\n  \"title\": \"Mensalidade\",\n  \"description\": \"Mensalidade do plano Premium\",\n  \"enable_pix\": true,\n  \"enable_credit\": true,\n  \"installments\": 3,\n  \"fee_mode\": \"customer_pay_fee\",\n  \"expired_at\": \"2025-06-30\",\n  \"expire_after_payment\": true,\n  \"customers\": [\n    {\n      \"name\": \"Maria Souza\",\n      \"email\": \"maria@exemplo.com\",\n      \"phone\": \"51999990000\",\n      \"document\": \"12345678901\",\n      \"amount\": 99.90,\n      \"reference\": \"INV-2025-05-001\"\n    },\n    {\n      \"name\": \"João Lima\",\n      \"email\": \"joao@exemplo.com\",\n      \"phone\": \"51988887777\",\n      \"document\": \"09876543210\",\n      \"amount\": 149.90,\n      \"reference\": \"INV-2025-05-002\"\n    }\n  ]\n}"
                }
              }
            },
            {
              "name": "Listar lotes",
              "request": {
                "method": "GET",
                "header": [
                  { "key": "Accept", "value": "application/json" }
                ],
                "url": {
                  "raw": "{{base_url}}/api/v1/payment-link-bulk?page=1",
                  "host": ["{{base_url}}"],
                  "path": ["api", "v1", "payment-link-bulk"],
                  "query": [
                    { "key": "page", "value": "1" }
                  ]
                }
              }
            },
            {
              "name": "Consultar lote",
              "request": {
                "method": "GET",
                "header": [
                  { "key": "Accept", "value": "application/json" }
                ],
                "url": {
                  "raw": "{{base_url}}/api/v1/payment-link-bulk/:token",
                  "host": ["{{base_url}}"],
                  "path": ["api", "v1", "payment-link-bulk", ":token"],
                  "variable": [
                    { "key": "token", "value": "" }
                  ]
                }
              }
            },
            {
              "name": "Status do lote",
              "request": {
                "method": "GET",
                "header": [
                  { "key": "Accept", "value": "application/json" }
                ],
                "url": {
                  "raw": "{{base_url}}/api/v1/payment-link-bulk/:token/status",
                  "host": ["{{base_url}}"],
                  "path": ["api", "v1", "payment-link-bulk", ":token", "status"],
                  "variable": [
                    { "key": "token", "value": "" }
                  ]
                }
              }
            },
            {
              "name": "Adicionar clientes ao lote",
              "request": {
                "method": "POST",
                "header": [
                  { "key": "Accept", "value": "application/json" },
                  { "key": "Content-Type", "value": "application/json" }
                ],
                "url": {
                  "raw": "{{base_url}}/api/v1/payment-link-bulk/:token/customers",
                  "host": ["{{base_url}}"],
                  "path": ["api", "v1", "payment-link-bulk", ":token", "customers"],
                  "variable": [
                    { "key": "token", "value": "" }
                  ]
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"customers\": [\n    {\n      \"name\": \"Ana Costa\",\n      \"email\": \"ana@exemplo.com\",\n      \"phone\": \"51977776666\",\n      \"document\": \"11122233344\",\n      \"amount\": 79.90,\n      \"reference\": \"INV-2025-05-003\"\n    }\n  ]\n}"
                }
              }
            },
            {
              "name": "Cancelar lote",
              "request": {
                "method": "POST",
                "header": [
                  { "key": "Accept", "value": "application/json" }
                ],
                "url": {
                  "raw": "{{base_url}}/api/v1/payment-link-bulk/:token/cancel",
                  "host": ["{{base_url}}"],
                  "path": ["api", "v1", "payment-link-bulk", ":token", "cancel"],
                  "variable": [
                    { "key": "token", "value": "" }
                  ]
                }
              }
            }
          ]
        }
      ]
    }
  ]
}
