{
  "item": [
    {
      "id": "5761c71c-33ea-48fa-8411-656ff38bdfcd",
      "name": "Health",
      "description": {
        "content": "",
        "type": "text/plain"
      },
      "item": [
        {
          "id": "b901c859-916c-4662-9284-f2718266056f",
          "name": "Liveness check",
          "request": {
            "name": "Liveness check",
            "description": {
              "content": "Endpoint público sem autenticação. Útil para uptime monitors. Não consulta banco nem gateway.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "health"
              ],
              "host": [
                "{{ALLYA_BASE_URL}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "auth": null
          },
          "response": [
            {
              "id": "3f44c6d9-e22f-4b70-be75-fdadc2c71347",
              "name": "Serviço respondendo.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "health"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": true,\n  \"service\": \"allya-payments\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        }
      ],
      "event": []
    },
    {
      "id": "622a4737-19c1-4107-97dc-6cea6253c65d",
      "name": "Auth",
      "description": {
        "content": "",
        "type": "text/plain"
      },
      "item": [
        {
          "id": "56b72abb-c4c4-451c-b5d2-8969a8e4c54c",
          "name": "Validar API key",
          "request": {
            "name": "Validar API key",
            "description": {
              "content": "Devolve a hierarquia organização → projeto → ambiente atrelada à API key recebida. Bom para confirmar `sk_live_` antes de liberar tráfego real.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "auth",
                "test"
              ],
              "host": [
                "{{ALLYA_BASE_URL}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "auth": null
          },
          "response": [
            {
              "id": "b24379bf-4b89-4533-8845-697944414401",
              "name": "API key válida.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "auth",
                    "test"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"ok\": true,\n  \"organization\": {\n    \"id\": \"string\"\n  },\n  \"project\": {\n    \"id\": \"string\"\n  },\n  \"environment\": {\n    \"id\": \"string\",\n    \"kind\": \"sandbox\"\n  },\n  \"apiKey\": {\n    \"id\": \"string\"\n  }\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "dd3a244d-91d9-4eef-ab83-4b64f048b96e",
              "name": "API key ausente, malformada ou revogada.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "auth",
                    "test"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "Unauthorized",
              "code": 401,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"unauthorized\",\n  \"message\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        }
      ],
      "event": []
    },
    {
      "id": "4ecd6ded-3791-4825-ad6c-30e3a68cacdb",
      "name": "Payments",
      "description": {
        "content": "",
        "type": "text/plain"
      },
      "item": [
        {
          "id": "9aebc00e-24bb-43b1-ba52-a87ffeb884d0",
          "name": "Criar pagamento",
          "request": {
            "name": "Criar pagamento",
            "description": {
              "content": "Cria uma cobrança Pix ou cartão. **Idempotente por `externalId`** dentro do ambiente: retentar com o mesmo valor devolve a cobrança já existente sem criar nova no gateway. Cartão usa checkout hospedado — a Allya nunca recebe número/CVV.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "payments"
              ],
              "host": [
                "{{ALLYA_BASE_URL}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "auth": null,
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"method\": \"pix\",\n  \"externalId\": \"pedido_42\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"pedido_42\",\n    \"source\": \"checkout\"\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "id": "b7e09059-60cc-4f05-9f9e-a855b1797355",
              "name": "Pagamento criado (ou já existente quando `externalId` é repetido).",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"method\": \"pix\",\n  \"externalId\": \"pedido_42\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"pedido_42\",\n    \"source\": \"checkout\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Created",
              "code": 201,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"id\": \"string\",\n  \"status\": \"failed\",\n  \"method\": \"card\",\n  \"gateway\": \"pagarme\",\n  \"amount\": 9513,\n  \"currency\": \"string\",\n  \"externalId\": null,\n  \"gatewayRef\": null,\n  \"customer\": {\n    \"name\": null,\n    \"email\": \"string\",\n    \"documentLast4\": \"string\"\n  },\n  \"checkoutUrl\": null,\n  \"pix\": {\n    \"qrCode\": \"string\",\n    \"qrCodeText\": \"string\"\n  },\n  \"card\": {\n    \"brand\": \"string\",\n    \"last4\": \"string\"\n  }\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "71e306b3-b33d-4ebe-8b8c-f1cecb46c808",
              "name": "Body inválido — `invalid_json` ou `invalid_input`.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"method\": \"pix\",\n  \"externalId\": \"pedido_42\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"pedido_42\",\n    \"source\": \"checkout\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Bad Request",
              "code": 400,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"invalid_json\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "ff35d1cb-4da7-4ed3-a7fd-fa32a01ee685",
              "name": "API key inválida.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"method\": \"pix\",\n  \"externalId\": \"pedido_42\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"pedido_42\",\n    \"source\": \"checkout\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Unauthorized",
              "code": 401,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"unauthorized\",\n  \"message\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "3f615c32-8ccc-4c5d-bce8-6c86e831d582",
              "name": "Billing da plataforma bloqueia a chamada.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"method\": \"pix\",\n  \"externalId\": \"pedido_42\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"pedido_42\",\n    \"source\": \"checkout\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Payment Required",
              "code": 402,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"string\",\n  \"message\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "828514e8-4043-4cc6-9ff5-96e5b4b8ba61",
              "name": "Sem regra de roteamento, gateway desativado, sem credenciais, ou método não suportado pelo gateway resolvido.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"method\": \"pix\",\n  \"externalId\": \"pedido_42\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"pedido_42\",\n    \"source\": \"checkout\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Conflict",
              "code": 409,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"no_routing_rule\",\n  \"message\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "bc20310c-1374-48f2-9bd6-88198f476ac2",
              "name": "Limite por API key excedido — consulte `Retry-After`.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"method\": \"pix\",\n  \"externalId\": \"pedido_42\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"pedido_42\",\n    \"source\": \"checkout\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Too Many Requests",
              "code": 429,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"rate_limit_exceeded\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "1e9a3ddd-109b-4c22-bf3b-93071cdebbc8",
              "name": "Erro inesperado da Allya.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"method\": \"pix\",\n  \"externalId\": \"pedido_42\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"pedido_42\",\n    \"source\": \"checkout\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Internal Server Error",
              "code": 500,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"internal_error\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "e013c08f-26c0-4258-8424-906de8d29146",
              "name": "Gateway retornou erro ou timeout. Seguro retentar (idempotência por `externalId`).",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"method\": \"pix\",\n  \"externalId\": \"pedido_42\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"pedido_42\",\n    \"source\": \"checkout\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Bad Gateway",
              "code": 502,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"gateway_error\",\n  \"provider\": \"abacate_pay\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "id": "7036b561-ad7c-4187-844d-85cae8a5661a",
          "name": "Buscar pagamento por externalId",
          "request": {
            "name": "Buscar pagamento por externalId",
            "description": {
              "content": "Consulta idempotente: retorna o pagamento cadastrado com o `externalId` informado, sem chamar o gateway. Use para conferir antes de fazer um `POST` retry.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "payments"
              ],
              "host": [
                "{{ALLYA_BASE_URL}}"
              ],
              "query": [
                {
                  "disabled": false,
                  "key": "externalId",
                  "value": "string",
                  "description": "(Required) Identificador idempotente enviado na criação."
                }
              ],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "auth": null
          },
          "response": [
            {
              "id": "6b22b477-1f67-44f8-bc97-059d56c59172",
              "name": "Pagamento encontrado.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [
                    {
                      "key": "externalId",
                      "value": "string"
                    }
                  ],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"id\": \"string\",\n  \"status\": \"failed\",\n  \"method\": \"card\",\n  \"gateway\": \"pagarme\",\n  \"amount\": 9513,\n  \"currency\": \"string\",\n  \"externalId\": null,\n  \"gatewayRef\": null,\n  \"customer\": {\n    \"name\": null,\n    \"email\": \"string\",\n    \"documentLast4\": \"string\"\n  },\n  \"checkoutUrl\": null,\n  \"pix\": {\n    \"qrCode\": \"string\",\n    \"qrCodeText\": \"string\"\n  },\n  \"card\": {\n    \"brand\": \"string\",\n    \"last4\": \"string\"\n  }\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "c65be7d8-a7c7-4c29-a50d-5cb198dffe28",
              "name": "Query `externalId` ausente.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [
                    {
                      "key": "externalId",
                      "value": "string"
                    }
                  ],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "Bad Request",
              "code": 400,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"missing_query\",\n  \"message\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "31119738-6f08-4961-bfd7-fe62cbf39c5a",
              "name": "API key inválida.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [
                    {
                      "key": "externalId",
                      "value": "string"
                    }
                  ],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "Unauthorized",
              "code": 401,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"unauthorized\",\n  \"message\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "6120f4ae-6797-484a-bfae-dfca1a24e442",
              "name": "Nenhum pagamento com esse `externalId` no ambiente.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [
                    {
                      "key": "externalId",
                      "value": "string"
                    }
                  ],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "Not Found",
              "code": 404,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"not_found\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "id": "106015d1-50eb-4d09-a147-de7c651148d3",
          "name": "Consultar pagamento",
          "request": {
            "name": "Consultar pagamento",
            "description": {
              "content": "Lê o pagamento direto do banco da Allya — **não consulta o gateway**. Para forçar reconciliação com o gateway, use `POST /v1/payments/{id}/sync`.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "payments",
                ":id"
              ],
              "host": [
                "{{ALLYA_BASE_URL}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "string",
                  "key": "id",
                  "description": "(Required) ID público com prefixo `pay_`."
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "auth": null
          },
          "response": [
            {
              "id": "18e5ae32-690f-44d1-adf7-7728d0239b58",
              "name": "Pagamento encontrado.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"id\": \"string\",\n  \"status\": \"failed\",\n  \"method\": \"card\",\n  \"gateway\": \"pagarme\",\n  \"amount\": 9513,\n  \"currency\": \"string\",\n  \"externalId\": null,\n  \"gatewayRef\": null,\n  \"customer\": {\n    \"name\": null,\n    \"email\": \"string\",\n    \"documentLast4\": \"string\"\n  },\n  \"checkoutUrl\": null,\n  \"pix\": {\n    \"qrCode\": \"string\",\n    \"qrCodeText\": \"string\"\n  },\n  \"card\": {\n    \"brand\": \"string\",\n    \"last4\": \"string\"\n  }\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "2dc76e03-b33b-4c27-a4a5-1b342725568e",
              "name": "Parâmetro `id` vazio.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "Bad Request",
              "code": 400,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"invalid_id\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "6301ef4a-3650-4799-89a9-050480a7ee27",
              "name": "API key inválida.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "Unauthorized",
              "code": 401,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"unauthorized\",\n  \"message\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "6002cd29-b097-412e-beb1-1bf53af28604",
              "name": "ID não existe no ambiente.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "Not Found",
              "code": 404,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"not_found\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "id": "0fb82913-0f04-4732-9016-b5a47c39d44d",
          "name": "Cancelar pagamento",
          "request": {
            "name": "Cancelar pagamento",
            "description": {
              "content": "Cancela uma cobrança de cartão ainda não paga. **Não é refund**: pagamentos pagos retornam `409 cannot_cancel_paid`. Pix expira sozinho — `cannot_cancel_pix` é retornado para tentativas em Pix.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "payments",
                ":id",
                "cancel"
              ],
              "host": [
                "{{ALLYA_BASE_URL}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "string",
                  "key": "id",
                  "description": "(Required) ID público com prefixo `pay_`."
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "auth": null
          },
          "response": [
            {
              "id": "4f312c3b-50a5-476b-b7a6-eb1369751ca4",
              "name": "Cancelamento confirmado. Resposta é o pagamento com `status: canceled`.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "cancel"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"id\": \"string\",\n  \"status\": \"failed\",\n  \"method\": \"card\",\n  \"gateway\": \"pagarme\",\n  \"amount\": 9513,\n  \"currency\": \"string\",\n  \"externalId\": null,\n  \"gatewayRef\": null,\n  \"customer\": {\n    \"name\": null,\n    \"email\": \"string\",\n    \"documentLast4\": \"string\"\n  },\n  \"checkoutUrl\": null,\n  \"pix\": {\n    \"qrCode\": \"string\",\n    \"qrCodeText\": \"string\"\n  },\n  \"card\": {\n    \"brand\": \"string\",\n    \"last4\": \"string\"\n  }\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "a3fe6ca5-ba64-4451-8d5a-4092f4afad04",
              "name": "`id` vazio ou método `cannot_cancel_pix`.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "cancel"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "Bad Request",
              "code": 400,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"invalid_id\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "eda76a4a-f25f-493f-8212-4a3995cc9e8b",
              "name": "API key inválida.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "cancel"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "Unauthorized",
              "code": 401,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"unauthorized\",\n  \"message\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "b905660c-8822-4a65-af66-5625eea77679",
              "name": "Pagamento não existe.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "cancel"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "Not Found",
              "code": 404,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"not_found\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "301d2bda-953a-4275-8cbe-cc7d275d8a15",
              "name": "Conflito de estado — já pago, já cancelado, status incompatível, ou faltam dados para cancelar.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "cancel"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "Conflict",
              "code": 409,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"cannot_cancel_paid\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "5c28d303-8425-4b92-90fc-ec8c08813bd9",
              "name": "Limite por API key excedido — consulte `Retry-After`.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "cancel"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "Too Many Requests",
              "code": 429,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"rate_limit_exceeded\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "630cace8-7203-4d11-9adb-c8f3e5b08e21",
              "name": "Erro inesperado da Allya.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "cancel"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "Internal Server Error",
              "code": 500,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"internal_error\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "8d9a2d95-7f78-45cf-a4dc-d4f721fceb0c",
              "name": "Adapter do gateway não implementa cancel.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "cancel"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "Not Implemented",
              "code": 501,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"not_implemented\",\n  \"action\": \"string\",\n  \"provider\": \"abacate_pay\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "54a5a85a-14e9-42ed-8e64-259eb4921d65",
              "name": "Gateway retornou erro ou timeout.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "cancel"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "Bad Gateway",
              "code": 502,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"gateway_error\",\n  \"provider\": \"abacate_pay\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "id": "e5a87564-ace9-4915-9b49-37bc6dca7157",
          "name": "Reconciliar pagamento com o gateway",
          "request": {
            "name": "Reconciliar pagamento com o gateway",
            "description": {
              "content": "Consulta o gateway na hora, atualiza o status local e dispara webhook outbound se houve mudança. Use quando suspeitar que um webhook foi perdido ou para recuperar o QR Pix do Asaas após a 2ª chamada falhar.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "payments",
                ":id",
                "sync"
              ],
              "host": [
                "{{ALLYA_BASE_URL}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "string",
                  "key": "id",
                  "description": "(Required) ID público com prefixo `pay_`."
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "auth": null
          },
          "response": [
            {
              "id": "54670643-a119-473f-99d6-d89602ed92fa",
              "name": "Pagamento sincronizado — resposta no mesmo formato de `GET /v1/payments/{id}`.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "sync"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"id\": \"string\",\n  \"status\": \"failed\",\n  \"method\": \"card\",\n  \"gateway\": \"pagarme\",\n  \"amount\": 9513,\n  \"currency\": \"string\",\n  \"externalId\": null,\n  \"gatewayRef\": null,\n  \"customer\": {\n    \"name\": null,\n    \"email\": \"string\",\n    \"documentLast4\": \"string\"\n  },\n  \"checkoutUrl\": null,\n  \"pix\": {\n    \"qrCode\": \"string\",\n    \"qrCodeText\": \"string\"\n  },\n  \"card\": {\n    \"brand\": \"string\",\n    \"last4\": \"string\"\n  }\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "434e49e2-0ebc-4f3f-8a73-6dba6db8f4e1",
              "name": "`id` vazio.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "sync"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "Bad Request",
              "code": 400,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"invalid_id\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "c3e9dcd8-c94e-4e71-b7fa-8494dfd64e0d",
              "name": "API key inválida.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "sync"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "Unauthorized",
              "code": 401,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"unauthorized\",\n  \"message\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "b715c097-f1d9-43a4-8abc-d7eefdf070c9",
              "name": "Pagamento não existe no ambiente.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "sync"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "Not Found",
              "code": 404,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"not_found\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "31fb353b-0e38-444b-848f-81bbd136fd87",
              "name": "Pagamento sem `gatewayRef` ou gateway sem credenciais.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "sync"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "Conflict",
              "code": 409,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"missing_gateway_ref\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "0a0e51de-0ac0-42fe-8607-8c8026a8e29f",
              "name": "Limite por API key excedido — consulte `Retry-After`.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "sync"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "Too Many Requests",
              "code": 429,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"rate_limit_exceeded\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "5a61dc7c-5f11-47f4-a292-9b7fecda38f2",
              "name": "Erro inesperado da Allya.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "sync"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "Internal Server Error",
              "code": 500,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"internal_error\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "8d3d2dff-b79f-4592-8110-2a54803a1241",
              "name": "Adapter do gateway ainda não implementa sync.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "sync"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "Not Implemented",
              "code": 501,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"not_implemented\",\n  \"action\": \"string\",\n  \"provider\": \"abacate_pay\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "b7f752b3-a7a7-4afd-9c68-3f5e02006717",
              "name": "Gateway retornou erro ou timeout.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "payments",
                    ":id",
                    "sync"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `pay_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {}
              },
              "status": "Bad Gateway",
              "code": 502,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"gateway_error\",\n  \"provider\": \"abacate_pay\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        }
      ],
      "event": []
    },
    {
      "id": "a9ab67f2-ca19-4060-a306-845e346da360",
      "name": "Subscriptions",
      "description": {
        "content": "",
        "type": "text/plain"
      },
      "item": [
        {
          "id": "7a8f748f-d5b8-49df-8fdd-98ddbf49dd23",
          "name": "Criar assinatura recorrente",
          "request": {
            "name": "Criar assinatura recorrente",
            "description": {
              "content": "Cria uma assinatura cobrada via cartão. **Idempotente por `externalId`** dentro do ambiente. No Pagar.me, o campo `gateway.pagarme.planId` é **obrigatório** (Plan deve existir antes na API do Pagar.me).",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "subscriptions"
              ],
              "host": [
                "{{ALLYA_BASE_URL}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "auth": null,
            "body": {
              "mode": "raw",
              "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"interval\": \"monthly\",\n  \"trialDays\": 7,\n  \"externalId\": \"assinatura_cliente_42_plano_pro_mensal\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"assinatura_cliente_42\",\n    \"plan\": \"pro_mensal\"\n  },\n  \"gateway\": {\n    \"pagarme\": {\n      \"planId\": \"plan_XnB8eYvR7K1aZ4Qm\"\n    }\n  }\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "id": "af75cdf4-7a44-4b09-ab13-4982a3358584",
              "name": "Assinatura criada (ou já existente quando `externalId` é repetido).",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"interval\": \"monthly\",\n  \"trialDays\": 7,\n  \"externalId\": \"assinatura_cliente_42_plano_pro_mensal\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"assinatura_cliente_42\",\n    \"plan\": \"pro_mensal\"\n  },\n  \"gateway\": {\n    \"pagarme\": {\n      \"planId\": \"plan_XnB8eYvR7K1aZ4Qm\"\n    }\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Created",
              "code": 201,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"id\": \"string\",\n  \"status\": \"active\",\n  \"method\": \"pix\",\n  \"gateway\": \"asaas\",\n  \"amount\": 4142,\n  \"currency\": \"string\",\n  \"interval\": \"yearly\",\n  \"trialDays\": 3322,\n  \"trialEndsAt\": null,\n  \"nextBillingAt\": null,\n  \"cancelAtPeriodEnd\": true,\n  \"canceledAt\": \"string\",\n  \"externalId\": null,\n  \"gatewayRef\": null,\n  \"checkoutUrl\": \"string\",\n  \"customer\": {\n    \"name\": \"string\",\n    \"email\": null,\n    \"documentLast4\": null\n  },\n  \"createdAt\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "0d1848eb-a970-44d5-b767-f5fa2fb4b1f3",
              "name": "Body inválido.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"interval\": \"monthly\",\n  \"trialDays\": 7,\n  \"externalId\": \"assinatura_cliente_42_plano_pro_mensal\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"assinatura_cliente_42\",\n    \"plan\": \"pro_mensal\"\n  },\n  \"gateway\": {\n    \"pagarme\": {\n      \"planId\": \"plan_XnB8eYvR7K1aZ4Qm\"\n    }\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Bad Request",
              "code": 400,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"invalid_json\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "5efcf3ce-6496-4577-92f7-6a5a2e93d036",
              "name": "API key inválida.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"interval\": \"monthly\",\n  \"trialDays\": 7,\n  \"externalId\": \"assinatura_cliente_42_plano_pro_mensal\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"assinatura_cliente_42\",\n    \"plan\": \"pro_mensal\"\n  },\n  \"gateway\": {\n    \"pagarme\": {\n      \"planId\": \"plan_XnB8eYvR7K1aZ4Qm\"\n    }\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Unauthorized",
              "code": 401,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"unauthorized\",\n  \"message\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "ee3d8cda-e8e0-4df0-97a5-3408ad5b57fa",
              "name": "Billing da plataforma bloqueia a chamada.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"interval\": \"monthly\",\n  \"trialDays\": 7,\n  \"externalId\": \"assinatura_cliente_42_plano_pro_mensal\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"assinatura_cliente_42\",\n    \"plan\": \"pro_mensal\"\n  },\n  \"gateway\": {\n    \"pagarme\": {\n      \"planId\": \"plan_XnB8eYvR7K1aZ4Qm\"\n    }\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Payment Required",
              "code": 402,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"string\",\n  \"message\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "2ae24550-1939-4704-a8bb-8a2ebe6f9c54",
              "name": "Sem roteamento, gateway sem credenciais, método não suportado ou ação ausente no adapter.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"interval\": \"monthly\",\n  \"trialDays\": 7,\n  \"externalId\": \"assinatura_cliente_42_plano_pro_mensal\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"assinatura_cliente_42\",\n    \"plan\": \"pro_mensal\"\n  },\n  \"gateway\": {\n    \"pagarme\": {\n      \"planId\": \"plan_XnB8eYvR7K1aZ4Qm\"\n    }\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Conflict",
              "code": 409,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"no_routing_rule\",\n  \"message\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "307e1926-eab6-4f94-979d-8f23acf23830",
              "name": "Limite por API key excedido — consulte `Retry-After`.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"interval\": \"monthly\",\n  \"trialDays\": 7,\n  \"externalId\": \"assinatura_cliente_42_plano_pro_mensal\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"assinatura_cliente_42\",\n    \"plan\": \"pro_mensal\"\n  },\n  \"gateway\": {\n    \"pagarme\": {\n      \"planId\": \"plan_XnB8eYvR7K1aZ4Qm\"\n    }\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Too Many Requests",
              "code": 429,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"rate_limit_exceeded\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "868430f0-e884-4aae-997e-7fe8848bcae4",
              "name": "Erro inesperado da Allya.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"interval\": \"monthly\",\n  \"trialDays\": 7,\n  \"externalId\": \"assinatura_cliente_42_plano_pro_mensal\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"assinatura_cliente_42\",\n    \"plan\": \"pro_mensal\"\n  },\n  \"gateway\": {\n    \"pagarme\": {\n      \"planId\": \"plan_XnB8eYvR7K1aZ4Qm\"\n    }\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Internal Server Error",
              "code": 500,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"internal_error\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "11c32217-5d6a-43f3-b3c4-1eaa4ca1958b",
              "name": "Gateway retornou erro ou timeout.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"amount\": 4990,\n  \"currency\": \"BRL\",\n  \"interval\": \"monthly\",\n  \"trialDays\": 7,\n  \"externalId\": \"assinatura_cliente_42_plano_pro_mensal\",\n  \"customer\": {\n    \"name\": \"Cliente Teste\",\n    \"email\": \"cliente@example.com\",\n    \"document\": \"00000000000\",\n    \"phone\": \"11999999999\"\n  },\n  \"metadata\": {\n    \"orderId\": \"assinatura_cliente_42\",\n    \"plan\": \"pro_mensal\"\n  },\n  \"gateway\": {\n    \"pagarme\": {\n      \"planId\": \"plan_XnB8eYvR7K1aZ4Qm\"\n    }\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Bad Gateway",
              "code": 502,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"gateway_error\",\n  \"provider\": \"abacate_pay\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "id": "254dadbc-1777-4092-be54-640292e2a4ac",
          "name": "Buscar assinatura por externalId",
          "request": {
            "name": "Buscar assinatura por externalId",
            "description": {
              "content": "Consulta idempotente por `externalId` — não chama o gateway.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "subscriptions"
              ],
              "host": [
                "{{ALLYA_BASE_URL}}"
              ],
              "query": [
                {
                  "disabled": false,
                  "key": "externalId",
                  "value": "string",
                  "description": "(Required) "
                }
              ],
              "variable": []
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "auth": null
          },
          "response": [
            {
              "id": "0607eb9b-ccb6-4e41-b2aa-770935fd88eb",
              "name": "Assinatura encontrada.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [
                    {
                      "key": "externalId",
                      "value": "string"
                    }
                  ],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"id\": \"string\",\n  \"status\": \"active\",\n  \"method\": \"pix\",\n  \"gateway\": \"asaas\",\n  \"amount\": 4142,\n  \"currency\": \"string\",\n  \"interval\": \"yearly\",\n  \"trialDays\": 3322,\n  \"trialEndsAt\": null,\n  \"nextBillingAt\": null,\n  \"cancelAtPeriodEnd\": true,\n  \"canceledAt\": \"string\",\n  \"externalId\": null,\n  \"gatewayRef\": null,\n  \"checkoutUrl\": \"string\",\n  \"customer\": {\n    \"name\": \"string\",\n    \"email\": null,\n    \"documentLast4\": null\n  },\n  \"createdAt\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "a5c1d5fa-deb3-467c-a08b-70a3c563cd0d",
              "name": "Query `externalId` ausente.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [
                    {
                      "key": "externalId",
                      "value": "string"
                    }
                  ],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "Bad Request",
              "code": 400,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"missing_query\",\n  \"message\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "22d9a7c8-1559-4cc9-a6e5-8b1e0a832e6f",
              "name": "API key inválida.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [
                    {
                      "key": "externalId",
                      "value": "string"
                    }
                  ],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "Unauthorized",
              "code": 401,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"unauthorized\",\n  \"message\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "ecf1c9f0-bff9-4cff-be94-e836d28593ba",
              "name": "Nenhuma assinatura com esse `externalId` no ambiente.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [
                    {
                      "key": "externalId",
                      "value": "string"
                    }
                  ],
                  "variable": []
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "Not Found",
              "code": 404,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"not_found\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "id": "8c1d6e3e-38ce-4e49-8ecd-9593960ee8af",
          "name": "Consultar assinatura",
          "request": {
            "name": "Consultar assinatura",
            "description": {
              "content": "Lê a assinatura direto do banco da Allya. Não há `sync` para assinaturas hoje.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "subscriptions",
                ":id"
              ],
              "host": [
                "{{ALLYA_BASE_URL}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "string",
                  "key": "id",
                  "description": "(Required) ID público com prefixo `sub_`."
                }
              ]
            },
            "header": [
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "GET",
            "auth": null
          },
          "response": [
            {
              "id": "36b4d332-014f-412c-8ec2-df389ec5ef61",
              "name": "Assinatura encontrada.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions",
                    ":id"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `sub_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"id\": \"string\",\n  \"status\": \"active\",\n  \"method\": \"pix\",\n  \"gateway\": \"asaas\",\n  \"amount\": 4142,\n  \"currency\": \"string\",\n  \"interval\": \"yearly\",\n  \"trialDays\": 3322,\n  \"trialEndsAt\": null,\n  \"nextBillingAt\": null,\n  \"cancelAtPeriodEnd\": true,\n  \"canceledAt\": \"string\",\n  \"externalId\": null,\n  \"gatewayRef\": null,\n  \"checkoutUrl\": \"string\",\n  \"customer\": {\n    \"name\": \"string\",\n    \"email\": null,\n    \"documentLast4\": null\n  },\n  \"createdAt\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "7b001cff-2aa5-4327-a666-ebc64d8ce97d",
              "name": "API key inválida.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions",
                    ":id"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `sub_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "Unauthorized",
              "code": 401,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"unauthorized\",\n  \"message\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "60c4ae12-4c3d-4a59-a243-735924df9c09",
              "name": "Assinatura não existe.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions",
                    ":id"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `sub_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "Not Found",
              "code": 404,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"not_found\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "728d93a9-cc45-489e-a487-ae988a622bcc",
              "name": "Erro inesperado da Allya.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions",
                    ":id"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `sub_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "GET",
                "body": {}
              },
              "status": "Internal Server Error",
              "code": 500,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"internal_error\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        },
        {
          "id": "5c0001eb-a633-4160-beac-7ebcfc04f1f2",
          "name": "Cancelar assinatura",
          "request": {
            "name": "Cancelar assinatura",
            "description": {
              "content": "Cancela imediatamente (`atPeriodEnd=false`, default) ou ao fim do ciclo corrente (`atPeriodEnd=true`). Restrições por gateway: Abacate Pay e Pagar.me não suportam `atPeriodEnd=true`.",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "v1",
                "subscriptions",
                ":id",
                "cancel"
              ],
              "host": [
                "{{ALLYA_BASE_URL}}"
              ],
              "query": [],
              "variable": [
                {
                  "disabled": false,
                  "type": "any",
                  "value": "string",
                  "key": "id",
                  "description": "(Required) ID público com prefixo `sub_`."
                }
              ]
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "auth": null,
            "body": {
              "mode": "raw",
              "raw": "{\n  \"atPeriodEnd\": false\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "id": "f114e8a8-05b8-4598-9d60-344319312c59",
              "name": "Cancelamento confirmado.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions",
                    ":id",
                    "cancel"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `sub_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"atPeriodEnd\": false\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"id\": \"string\",\n  \"status\": \"active\",\n  \"method\": \"pix\",\n  \"gateway\": \"asaas\",\n  \"amount\": 4142,\n  \"currency\": \"string\",\n  \"interval\": \"yearly\",\n  \"trialDays\": 3322,\n  \"trialEndsAt\": null,\n  \"nextBillingAt\": null,\n  \"cancelAtPeriodEnd\": true,\n  \"canceledAt\": \"string\",\n  \"externalId\": null,\n  \"gatewayRef\": null,\n  \"checkoutUrl\": \"string\",\n  \"customer\": {\n    \"name\": \"string\",\n    \"email\": null,\n    \"documentLast4\": null\n  },\n  \"createdAt\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "38886216-dbb5-47e9-8b3e-676950982bdc",
              "name": "Body inválido.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions",
                    ":id",
                    "cancel"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `sub_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"atPeriodEnd\": false\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Bad Request",
              "code": 400,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"invalid_json\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "88755a16-d93a-4e8f-a534-084a1a02924a",
              "name": "API key inválida.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions",
                    ":id",
                    "cancel"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `sub_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"atPeriodEnd\": false\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Unauthorized",
              "code": 401,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"unauthorized\",\n  \"message\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "a9ae0ca1-c735-4b4c-8b56-d4c69e1cfec9",
              "name": "Assinatura não existe.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions",
                    ":id",
                    "cancel"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `sub_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"atPeriodEnd\": false\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Not Found",
              "code": 404,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"not_found\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "a5aca240-2d1d-40f3-9148-e65fff4ab62b",
              "name": "Já cancelada, sem `gatewayRef`, gateway sem credenciais, ou ação não suportada pelo gateway.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions",
                    ":id",
                    "cancel"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `sub_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"atPeriodEnd\": false\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Conflict",
              "code": 409,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"already_canceled\",\n  \"status\": \"string\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "a0d7bf48-caf4-4f64-9691-ac418e0281c9",
              "name": "Erro inesperado da Allya.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions",
                    ":id",
                    "cancel"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `sub_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"atPeriodEnd\": false\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Internal Server Error",
              "code": 500,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"internal_error\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "c401fd69-af6b-483d-8a36-d7a4182e4739",
              "name": "Gateway retornou erro ou timeout.",
              "originalRequest": {
                "url": {
                  "path": [
                    "v1",
                    "subscriptions",
                    ":id",
                    "cancel"
                  ],
                  "host": [
                    "{{ALLYA_BASE_URL}}"
                  ],
                  "query": [],
                  "variable": [
                    {
                      "disabled": false,
                      "type": "any",
                      "value": "string",
                      "key": "id",
                      "description": "(Required) ID público com prefixo `sub_`."
                    }
                  ]
                },
                "header": [
                  {
                    "description": {
                      "content": "Added as a part of security scheme: bearer",
                      "type": "text/plain"
                    },
                    "key": "Authorization",
                    "value": "Bearer <token>"
                  },
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"atPeriodEnd\": false\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Bad Gateway",
              "code": 502,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"error\": \"gateway_error\",\n  \"provider\": \"abacate_pay\"\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        }
      ],
      "event": []
    }
  ],
  "event": [],
  "variable": [
    {
      "type": "string",
      "value": "https://payments-api.allyasolutions.com",
      "key": "ALLYA_BASE_URL"
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{ALLYA_API_KEY}}"
      }
    ]
  },
  "info": {
    "_postman_id": "4d5fa64b-35c8-41e3-be8b-ea264353c7d2",
    "name": "Allya Payments API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": {
      "content": "API pública da Allya Payments. Use `Authorization: Bearer sk_test_...` em sandbox ou `sk_live_...` em produção. Schemas e rotas são gerados a partir dos schemas Zod do código — qualquer divergência quebra o typecheck.\n\nContact Support:\n Name: Allya Payments",
      "type": "text/plain"
    }
  }
}
