{
  "openapi": "3.1.1",
  "info": {
    "title": "CriptoCore API",
    "version": "2.0.0",
    "description": "Integrações financeiras com autenticação Bearer, idempotência, whitelist de IP opcional para saídas, webhooks assinados, callback por operação e polling. Produção: dinheiro real. Não há ambiente sandbox público. Moedas/redes e disponibilidade devem ser consultadas em /assets e /capabilities. Campos monetários e nomenclatura dos recursos são descritos explicitamente em cada schema."
  },
  "servers": [
    {
      "url": "https://criptocore.net/api/v2",
      "description": "Produção"
    }
  ],
  "tags": [
    {
      "name": "Conta"
    },
    {
      "name": "Operações"
    },
    {
      "name": "Depósitos"
    },
    {
      "name": "Extrato e cartões"
    },
    {
      "name": "Webhooks"
    }
  ],
  "security": [
    {
      "ApiKey": []
    }
  ],
  "paths": {
    "/capabilities": {
      "get": {
        "operationId": "get__capabilities",
        "tags": [
          "Conta"
        ],
        "summary": "Consultar capacidades disponíveis",
        "description": "Descubra as modalidades implementadas antes de montar sua integração. Uma capacidade implementada ainda pode sofrer pausa operacional ou limites da conta.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "api_version": {
                          "type": "string",
                          "description": ""
                        },
                        "operations": {
                          "type": "object",
                          "properties": {
                            "pix": {
                              "type": "boolean"
                            },
                            "pixqr": {
                              "type": "boolean"
                            },
                            "boleto": {
                              "type": "boolean"
                            },
                            "card": {
                              "type": "boolean"
                            },
                            "topup": {
                              "type": "boolean"
                            },
                            "crypto_withdrawal": {
                              "const": false
                            }
                          },
                          "required": [
                            "pix",
                            "pixqr",
                            "boleto",
                            "card",
                            "topup",
                            "crypto_withdrawal"
                          ],
                          "additionalProperties": false
                        },
                        "notifications": {
                          "type": "object",
                          "properties": {
                            "webhooks": {
                              "const": true
                            },
                            "callback_url": {
                              "const": true
                            },
                            "polling": {
                              "const": true
                            }
                          },
                          "required": [
                            "webhooks",
                            "callback_url",
                            "polling"
                          ],
                          "additionalProperties": false
                        },
                        "ip_whitelist": {
                          "const": "optional"
                        },
                        "docs": {
                          "type": "string",
                          "description": ""
                        }
                      },
                      "required": [
                        "api_version",
                        "operations",
                        "notifications",
                        "ip_whitelist",
                        "docs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/account": {
      "get": {
        "operationId": "get__account",
        "tags": [
          "Conta"
        ],
        "summary": "Consultar conta e política de IP",
        "description": "Retorna os escopos da chave, IPs permitidos e limite diário compartilhado com o painel. Configurar a whitelist e emitir/revogar credenciais exige a sessão do titular em Desenvolvedores.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Identificador opaco ULID de 26 caracteres.",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                          "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": ""
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "description": ""
                          }
                        },
                        "ip_whitelist": {
                          "type": "object",
                          "properties": {
                            "enabled": {
                              "type": "boolean"
                            },
                            "ips": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "description": ""
                              }
                            }
                          },
                          "required": [
                            "enabled",
                            "ips"
                          ],
                          "additionalProperties": false
                        },
                        "daily_limit": {
                          "type": "object",
                          "properties": {
                            "blocked": {
                              "type": "boolean"
                            },
                            "limitCents": {
                              "type": "integer",
                              "description": ""
                            },
                            "usedCents": {
                              "type": "integer",
                              "description": ""
                            },
                            "remainingCents": {
                              "type": "integer",
                              "description": ""
                            },
                            "resetsAt": {
                              "type": "string",
                              "description": "Data e hora UTC, ISO 8601.",
                              "format": "date-time"
                            }
                          },
                          "required": [
                            "blocked",
                            "limitCents",
                            "usedCents",
                            "remainingCents",
                            "resetsAt"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "id",
                        "name",
                        "scopes",
                        "ip_whitelist",
                        "daily_limit"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/balances": {
      "get": {
        "operationId": "get__balances",
        "tags": [
          "Conta"
        ],
        "summary": "Consultar saldo disponível",
        "description": "Saldo único em USDT. Valores já debitados para operações pendentes não compõem available_micros. Nenhum campo representa saldo reservado fictício.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Balance"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/fees": {
      "get": {
        "operationId": "get__fees",
        "tags": [
          "Conta"
        ],
        "summary": "Consultar tarifas da conta",
        "description": "As tarifas específicas da conta prevalecem. Para conhecer o custo completo de uma operação, use /quotes.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "pix": {
                          "$ref": "#/components/schemas/FeeTerms"
                        },
                        "pixQr": {
                          "$ref": "#/components/schemas/FeeTerms"
                        },
                        "boleto": {
                          "$ref": "#/components/schemas/FeeTerms"
                        },
                        "cardIssue": {
                          "$ref": "#/components/schemas/FeeTerms"
                        },
                        "cardTopup": {
                          "$ref": "#/components/schemas/FeeTerms"
                        },
                        "cardPurchase": {
                          "$ref": "#/components/schemas/FeeTerms"
                        },
                        "brlSpreadPpm": {
                          "type": "integer",
                          "description": "Spread da conversão em ppm."
                        }
                      },
                      "required": [
                        "pix",
                        "pixQr",
                        "boleto",
                        "cardIssue",
                        "cardTopup",
                        "cardPurchase",
                        "brlSpreadPpm"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/market": {
      "get": {
        "operationId": "get__market",
        "tags": [
          "Conta"
        ],
        "summary": "Consultar cotação USDT/BRL",
        "description": "Cotação de mercado informativa. O débito inclui o spread e as tarifas da conta.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "usdt_brl": {
                          "type": "string",
                          "description": ""
                        },
                        "quoted_at": {
                          "type": "string",
                          "description": "Data e hora UTC, ISO 8601.",
                          "format": "date-time"
                        }
                      },
                      "required": [
                        "usdt_brl",
                        "quoted_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/quotes": {
      "post": {
        "operationId": "post__quotes",
        "tags": [
          "Operações"
        ],
        "summary": "Simular custo antes de pagar",
        "description": "Não movimenta saldo nem garante disponibilidade do beneficiário. Use debit_micros como max_debit_micros ao confirmar. A cotação é indicativa; alterações que excedam o teto causam 409 sem débito.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "operation": {
                    "$ref": "#/components/schemas/PaymentInput"
                  }
                },
                "required": [
                  "operation"
                ],
                "additionalProperties": false
              },
              "example": {
                "operation": {
                  "type": "pix",
                  "cents": 10000,
                  "key": "recebedor@example.com",
                  "keyType": "EMAIL"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Quote"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/operations": {
      "post": {
        "operationId": "post__operations",
        "tags": [
          "Operações"
        ],
        "summary": "Criar uma operação financeira",
        "description": "Pix por chave, Pix copia e cola, boleto, emissão ou recarga de cartão. card/topup exigem também cards:write. A whitelist é verificada antes do preparo e novamente na transação financeira. 202 significa aceita, não paga. Consulte GET /operations/{id}. Idempotência por conta: mesma chave e mesmo corpo devolvem a operação; outro corpo gera 409. A chave permanece vinculada à operação, sem expiração automática. Callback, webhooks e polling podem coexistir. Não aceita depósito simulado, compra fictícia ou bloqueio por alternância.\n\nPermissão: `payments:write`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_-]{16,128}$"
            },
            "example": "pedido-1042-pagamento-01"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOperation"
              },
              "example": {
                "operation": {
                  "type": "pix",
                  "cents": 10000,
                  "key": "recebedor@example.com",
                  "keyType": "EMAIL"
                },
                "max_debit_micros": "25000000",
                "reference": "pedido-1042",
                "metadata": {
                  "order_id": "1042"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Repetição idempotente, sem novo débito.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Operation"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "202": {
            "description": "Aceito para processamento assíncrono.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Operation"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "callbacks": {
          "operationUpdates": {
            "{$request.body#/callback_url}": {
              "post": {
                "description": "Assinatura: X-CriptoCore-Signature = t=UNIX,v1=HMAC_SHA256(callback_secret, t + \".\" + corpo_cru). Janela recomendada de 300s. Deduplicar por event.id.",
                "requestBody": {
                  "required": true,
                  "content": {
                    "application/json": {
                      "schema": {
                        "$ref": "#/components/schemas/Event"
                      }
                    }
                  }
                },
                "responses": {
                  "200": {
                    "description": "Recebido e persistido."
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "get__operations",
        "tags": [
          "Operações"
        ],
        "summary": "Listar operações da API",
        "description": "Lista operações criadas pela API, com o último estado observado pelo worker. Consulte o detalhe para atualização imediata. reference permite buscar uma referência do seu sistema.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Identificador opaco ULID de 26 caracteres.",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
              "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
            },
            "description": "next_cursor da página anterior. Ordem decrescente por ID."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "reference",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 128
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Operation"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/operations/{id}": {
      "get": {
        "operationId": "get__operations_id_",
        "tags": [
          "Operações"
        ],
        "summary": "Consultar operação por polling",
        "description": "Atualiza o estado e retorna transações, falhas, devoluções e E2E quando disponíveis. Respeite Retry-After: 5. processing/review não autorizam criar outro pagamento. completed/failed encerram o processamento atual; eventual estorno posterior continua visível.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Identificador opaco ULID de 26 caracteres.",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
              "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Operation"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/pix/decode": {
      "post": {
        "operationId": "post__pix_decode",
        "tags": [
          "Operações"
        ],
        "summary": "Ler Pix copia e cola",
        "description": "Consulta dados do favorecido e o valor exigido pelo QR. cents = null permite escolher valor. Não paga.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "",
                    "minLength": 20,
                    "maxLength": 2000
                  }
                },
                "required": [
                  "code"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "beneficiary": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": ""
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "institution": {
                          "anyOf": [
                            {
                              "type": "string",
                              "description": ""
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "dynamic": {
                          "type": "boolean"
                        },
                        "cents": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "description": ""
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "beneficiary",
                        "institution",
                        "dynamic",
                        "cents"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/boletos/quote": {
      "post": {
        "operationId": "post__boletos_quote",
        "tags": [
          "Operações"
        ],
        "summary": "Consultar boleto",
        "description": "Até 20 consultas por conta por dia, compartilhadas com o painel. Use data.quoteId como quoteId e o valor retornado em cents ao criar a operação.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "",
                    "minLength": 40,
                    "maxLength": 80
                  }
                },
                "required": [
                  "code"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BoletoQuote"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/withdrawals/crypto": {
      "post": {
        "operationId": "post__withdrawals_crypto",
        "tags": [
          "Operações"
        ],
        "summary": "Disponibilidade dos saques cripto",
        "description": "Saques on-chain ainda não estão implementados no CriptoCore. Sempre retorna 409 CRYPTO_WITHDRAWALS_UNAVAILABLE sem débito; com whitelist ativa, IP não permitido retorna 403 antes disso. Consulte /capabilities e withdrawal_enabled em /assets.\n\nPermissão: `payments:write`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Modalidade indisponível, sem débito.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/assets": {
      "get": {
        "operationId": "get__assets",
        "tags": [
          "Depósitos"
        ],
        "summary": "Listar moedas e redes",
        "description": "Use o identificador network exato. Verifique deposit_enabled antes de pedir um endereço. Redes e taxas são consultadas na configuração atual.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Asset"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/deposit-addresses": {
      "post": {
        "operationId": "post__deposit_addresses",
        "tags": [
          "Depósitos"
        ],
        "summary": "Obter endereço de depósito",
        "description": "Operação naturalmente idempotente: reutiliza o endereço ativo da família. Envie apenas a moeda/rede escolhida; não use endereços de outra rede. Quando memo_required=true, o memo/tag é obrigatório. O depósito é convertido em saldo USDT após confirmação e custódia. quote pode ser null; a cotação definitiva ocorre no crédito.\n\nPermissão: `deposits:write`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "asset": {
                    "type": "string",
                    "description": "",
                    "example": "USDT"
                  },
                  "network": {
                    "type": "string",
                    "description": "Consulte /assets."
                  }
                },
                "required": [
                  "asset",
                  "network"
                ],
                "additionalProperties": false
              },
              "example": {
                "asset": "USDT",
                "network": "BSC"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DepositAddress"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/deposits": {
      "get": {
        "operationId": "get__deposits",
        "tags": [
          "Depósitos"
        ],
        "summary": "Listar recebimentos cripto",
        "description": "Inclui recebimentos da conta, inclusive ocultados no painel. Para atualizações, consulte o detalhe, /events ou webhook deposit.updated.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Identificador opaco ULID de 26 caracteres.",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
              "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
            },
            "description": "next_cursor da página anterior. Ordem decrescente por ID."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Deposit"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/deposits/{id}": {
      "get": {
        "operationId": "get__deposits_id_",
        "tags": [
          "Depósitos"
        ],
        "summary": "Acompanhar depósito",
        "description": "Polling a cada 5 segundos ou mais. Só considere disponível quando status=CREDITED. amount é decimal do ativo; creditedMicros é saldo USDT em micros.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Identificador opaco ULID de 26 caracteres.",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
              "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Deposit"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/transactions": {
      "get": {
        "operationId": "get__transactions",
        "tags": [
          "Extrato e cartões"
        ],
        "summary": "Listar extrato da conta",
        "description": "Inclui painel e API. cents e walletDeltaMicros são assinados. Para devolução, consulte o lançamento associado. Não some debited_micros novamente ao saldo retornado.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Identificador opaco ULID de 26 caracteres.",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
              "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
            },
            "description": "next_cursor da página anterior. Ordem decrescente por ID."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Transaction"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/transactions/{id}": {
      "get": {
        "operationId": "get__transactions_id_",
        "tags": [
          "Extrato e cartões"
        ],
        "summary": "Consultar lançamento",
        "description": "Aceita o ID público CH-... ou o cursor_id interno retornado na listagem. Sempre limitado à conta da credencial.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Transaction"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/cards": {
      "get": {
        "operationId": "get__cards",
        "tags": [
          "Extrato e cartões"
        ],
        "summary": "Listar cartões",
        "description": "Retorna dados não sensíveis. Emissão e recarga passam por /operations. PAN/CVV e controles de bloqueio permanecem no painel autenticado.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Card"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/cards/{id}": {
      "get": {
        "operationId": "get__cards_id_",
        "tags": [
          "Extrato e cartões"
        ],
        "summary": "Consultar cartão",
        "description": "Consulta saldo e estado sincronizados pelo processador de pagamentos. Não revela PAN ou CVV.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Identificador opaco ULID de 26 caracteres.",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
              "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Card"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks": {
      "get": {
        "operationId": "get__webhooks",
        "tags": [
          "Webhooks"
        ],
        "summary": "Listar webhooks",
        "description": "Webhooks são opcionais, por conta e compartilhados entre as chaves. Segredos existentes nunca são retornados.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Identificador opaco ULID de 26 caracteres.",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
              "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
            },
            "description": "next_cursor da página anterior. Ordem decrescente por ID."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Webhook"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post__webhooks",
        "tags": [
          "Webhooks"
        ],
        "summary": "Cadastrar webhook",
        "description": "Até 10 por conta. Retorna secret uma única vez. Destino HTTPS público, porta 443; endereços privados e redirecionamentos não são aceitos. Assine apenas os eventos necessários.\n\nPermissão: `webhooks:write`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookInput"
              },
              "example": {
                "url": "https://sua-integracao.example/webhooks/criptocore",
                "description": "Pedidos",
                "events": [
                  "operation.updated",
                  "deposit.updated"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Webhook"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{id}": {
      "get": {
        "operationId": "get__webhooks_id_",
        "tags": [
          "Webhooks"
        ],
        "summary": "Consultar webhook",
        "description": "Retorna configuração sem o segredo de assinatura.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Identificador opaco ULID de 26 caracteres.",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
              "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Webhook"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch__webhooks_id_",
        "tags": [
          "Webhooks"
        ],
        "summary": "Atualizar webhook",
        "description": "Envie ao menos um campo. A lista events substitui a anterior. enabled=false pausa novos eventos e cancela entregas pendentes. Alterar a URL cancela entregas para o endereço antigo. Entregas já em trânsito podem chegar. Reativar não reproduz eventos passados automaticamente.\n\nPermissão: `webhooks:write`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Identificador opaco ULID de 26 caracteres.",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
              "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "HTTPS público, porta 443, sem credenciais ou fragmento.",
                    "format": "uri",
                    "maxLength": 2048
                  },
                  "description": {
                    "type": "string",
                    "description": "",
                    "maxLength": 160,
                    "default": ""
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "operation.created",
                        "operation.updated",
                        "deposit.updated",
                        "webhook.test"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 4
                  },
                  "enabled": {
                    "type": "boolean",
                    "default": true
                  }
                },
                "required": [],
                "additionalProperties": false,
                "minProperties": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Webhook"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete__webhooks_id_",
        "tags": [
          "Webhooks"
        ],
        "summary": "Remover webhook",
        "description": "Remove a configuração ativa e cancela entregas pendentes. Histórico permanece disponível. Eventos em trânsito podem chegar.\n\nPermissão: `webhooks:write`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Identificador opaco ULID de 26 caracteres.",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
              "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Removido, sem corpo."
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{id}/rotate-secret": {
      "post": {
        "operationId": "post__webhooks_id_rotate_secret",
        "tags": [
          "Webhooks"
        ],
        "summary": "Rotacionar segredo",
        "description": "Retorna o novo segredo uma única vez e atualiza entregas pendentes. Mantenha o segredo anterior por 5 minutos para validar entregas em trânsito.\n\nPermissão: `webhooks:write`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Identificador opaco ULID de 26 caracteres.",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
              "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Identificador opaco ULID de 26 caracteres.",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                          "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
                        },
                        "secret": {
                          "type": "string",
                          "description": ""
                        }
                      },
                      "required": [
                        "id",
                        "secret"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/{id}/test": {
      "post": {
        "operationId": "post__webhooks_id_test",
        "tags": [
          "Webhooks"
        ],
        "summary": "Enviar evento de teste",
        "description": "Enfileira webhook.test apenas neste endpoint ativo, mesmo que esse tipo não esteja nas assinaturas. Não movimenta dinheiro. Consulte /deliveries pelo event_id.\n\nPermissão: `webhooks:write`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Identificador opaco ULID de 26 caracteres.",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
              "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Aceito para processamento assíncrono.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Event"
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/deliveries": {
      "get": {
        "operationId": "get__deliveries",
        "tags": [
          "Webhooks"
        ],
        "summary": "Inspecionar entregas e tentativas",
        "description": "Inclui webhooks e callbacks. Respostas 2xx confirmam entrega. Após falhas, tentativas em 30s, 2min, 10min, 30min, 2h, 6h e 24h, contados desde a tentativa anterior. Até 8 tentativas por ciclo, timeout de 10s. Não há garantia de ordem ou entrega única.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Identificador opaco ULID de 26 caracteres.",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
              "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
            },
            "description": "next_cursor da página anterior. Ordem decrescente por ID."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "webhook_id",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Identificador opaco ULID de 26 caracteres.",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
              "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
            }
          },
          {
            "name": "event_id",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Identificador opaco ULID de 26 caracteres.",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
              "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Delivery"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/deliveries/{id}/retry": {
      "post": {
        "operationId": "post__deliveries_id_retry",
        "tags": [
          "Webhooks"
        ],
        "summary": "Reenviar entrega falhada",
        "description": "Somente failed/canceled, sem tentativa em andamento. Reinicia o ciclo de tentativas para o mesmo event.id. Para webhook, usa URL e segredo atuais. Webhook removido/inativo não pode reenviar. Callback usa o segredo e a URL capturados na operação.\n\nPermissão: `webhooks:write`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Identificador opaco ULID de 26 caracteres.",
              "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
              "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Aceito para processamento assíncrono.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Identificador opaco ULID de 26 caracteres.",
                          "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                          "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
                        },
                        "status": {
                          "const": "pending"
                        }
                      },
                      "required": [
                        "id",
                        "status"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/events": {
      "get": {
        "operationId": "get__events",
        "tags": [
          "Webhooks"
        ],
        "summary": "Consumir eventos por polling",
        "description": "Ordem crescente por sequence. Comece after=0; processe e persista next_cursor somente após salvar os eventos. Retome com after=next_cursor. Cursor e sequence são strings decimais; não converta para Number. Eventos existem mesmo sem webhook. Operações são observadas normalmente a cada 5s; depósitos têm atraso de aproximadamente 1–2 minutos. Transições muito rápidas podem aparecer apenas como estado final.\n\nPermissão: `read`.",
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string",
              "pattern": "^\\d{1,19}$",
              "default": "0"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sucesso.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Event"
                      }
                    },
                    "pagination": {
                      "$ref": "#/components/schemas/Pagination"
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Tempo mínimo até a próxima consulta, quando presente."
              }
            }
          },
          "400": {
            "description": "Validação",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Chave inválida",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Escopo, conta ou IP sem autorização",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Recurso inexistente ou de outra conta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Conflito",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Operação recusada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Limite excedido; respeite Retry-After",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Erro interno; consulte antes de repetir",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Serviço indisponível",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "cc_live_...",
        "description": "Crie uma chave em Painel → Desenvolvedores. Envie somente no cabeçalho Authorization, nunca na URL."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "description": "Código estável para tratamento automático."
              },
              "message": {
                "type": "string",
                "description": "Explicação para humanos."
              },
              "request_id": {
                "type": "string",
                "description": "Envie este identificador ao suporte."
              },
              "details": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field": {
                      "type": "string",
                      "description": ""
                    },
                    "message": {
                      "type": "string",
                      "description": ""
                    }
                  },
                  "required": [
                    "field",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "code",
              "message",
              "request_id"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": false
      },
      "Pagination": {
        "type": "object",
        "properties": {
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "description": "Envie em cursor; para /events, envie em after."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "has_more",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "PaymentInput": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "pix"
              },
              "cents": {
                "type": "integer",
                "description": "Inteiro em centavos de BRL. 10000 = R$ 100,00.",
                "minimum": 1,
                "maximum": 100000000,
                "example": 10000
              },
              "key": {
                "type": "string",
                "description": "Chave Pix.",
                "maxLength": 160
              },
              "keyType": {
                "type": "string",
                "description": "Dica de tipo; o formato da chave é validado.",
                "enum": [
                  "CPF",
                  "CNPJ",
                  "EMAIL",
                  "PHONE",
                  "RANDOM",
                  "cpf",
                  "cnpj",
                  "email",
                  "phone",
                  "random"
                ]
              },
              "name": {
                "type": "string",
                "description": "Nome opcional do favorecido.",
                "maxLength": 80
              },
              "document": {
                "type": "string",
                "description": "CPF/CNPJ opcional do favorecido.",
                "maxLength": 20
              }
            },
            "required": [
              "type",
              "cents",
              "key"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "pixqr"
              },
              "cents": {
                "type": "integer",
                "description": "Inteiro em centavos de BRL. 10000 = R$ 100,00.",
                "minimum": 1,
                "maximum": 100000000,
                "example": 10000
              },
              "code": {
                "type": "string",
                "description": "Pix copia e cola completo.",
                "minLength": 20,
                "maxLength": 2000
              },
              "name": {
                "type": "string",
                "description": "Nome opcional.",
                "maxLength": 80
              }
            },
            "required": [
              "type",
              "cents",
              "code"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "boleto"
              },
              "cents": {
                "type": "integer",
                "description": "Inteiro em centavos de BRL. 10000 = R$ 100,00.",
                "minimum": 1,
                "maximum": 100000000,
                "example": 10000
              },
              "code": {
                "type": "string",
                "description": "Linha digitável de boleto.",
                "minLength": 40,
                "maxLength": 80
              },
              "quoteId": {
                "type": "string",
                "description": "Identificador opaco ULID de 26 caracteres.",
                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
              },
              "name": {
                "type": "string",
                "description": "Beneficiário; opcional, consultado no provedor.",
                "maxLength": 80
              }
            },
            "required": [
              "type",
              "cents",
              "code"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "card"
              },
              "name": {
                "type": "string",
                "description": "Apelido do cartão.",
                "minLength": 1,
                "maxLength": 60
              },
              "color": {
                "type": "string",
                "description": "Cor do cartão.",
                "enum": [
                  "green",
                  "black",
                  "lilac"
                ],
                "default": "green"
              },
              "holderName": {
                "type": "string",
                "description": "Nome e sobrenome impressos.",
                "minLength": 3,
                "maxLength": 60
              },
              "initialLoadCents": {
                "type": "integer",
                "description": "Recarga inicial opcional em centavos.",
                "minimum": 500,
                "maximum": 5000000
              }
            },
            "required": [
              "type",
              "name",
              "holderName"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "topup"
              },
              "cents": {
                "type": "integer",
                "description": "Inteiro em centavos de BRL. 10000 = R$ 100,00.",
                "minimum": 1,
                "maximum": 100000000,
                "example": 10000
              },
              "cardId": {
                "type": "string",
                "description": "Identificador opaco ULID de 26 caracteres.",
                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
              }
            },
            "required": [
              "type",
              "cents",
              "cardId"
            ],
            "additionalProperties": false
          }
        ],
        "discriminator": {
          "propertyName": "type"
        }
      },
      "CreateOperation": {
        "type": "object",
        "properties": {
          "operation": {
            "$ref": "#/components/schemas/PaymentInput"
          },
          "max_debit_micros": {
            "type": "string",
            "description": "Teto total de débito, incluindo tarifas. Obtenha debit_micros em /quotes. Se excedido, a transação inteira é revertida.",
            "pattern": "^[1-9]\\d{0,12}$"
          },
          "reference": {
            "type": "string",
            "description": "Referência de seu sistema, pesquisável. Não é chave de idempotência.",
            "minLength": 1,
            "maxLength": 128
          },
          "callback_url": {
            "type": "string",
            "description": "Opcional. URL HTTPS pública, porta 443. Usa o callback_secret da chave que criou a operação. Independente dos webhooks cadastrados.",
            "format": "uri",
            "maxLength": 2048
          },
          "metadata": {
            "type": "object",
            "maxProperties": 20,
            "additionalProperties": {
              "type": "string",
              "maxLength": 256
            },
            "default": {}
          }
        },
        "required": [
          "operation",
          "max_debit_micros"
        ],
        "additionalProperties": false
      },
      "Operation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identificador opaco ULID de 26 caracteres.",
            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
            "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
          },
          "type": {
            "type": "string",
            "description": "",
            "enum": [
              "pix",
              "pixqr",
              "boleto",
              "card",
              "topup"
            ]
          },
          "status": {
            "type": "string",
            "description": "processing: aguarde; review: conciliação, não refaça; completed: concluída; failed: confira as devoluções em transactions. Uma emissão com recarga pode concluir parcialmente.",
            "enum": [
              "processing",
              "review",
              "completed",
              "failed"
            ]
          },
          "reference": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "card_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "Identificador opaco ULID de 26 caracteres.",
                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "description": "Data e hora UTC, ISO 8601.",
            "format": "date-time"
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Transaction"
            }
          },
          "debited_micros": {
            "type": "string",
            "description": "Inteiro decimal em micros de USDT. 1000000 = 1 USDT. Use BigInt ou Decimal.",
            "pattern": "^\\d+$",
            "example": "20000000"
          }
        },
        "required": [
          "id",
          "type",
          "status",
          "reference",
          "metadata",
          "card_id",
          "created_at",
          "transactions",
          "debited_micros"
        ],
        "additionalProperties": false
      },
      "Transaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "ID público do lançamento (CH-...)."
          },
          "kind": {
            "type": "string",
            "description": ""
          },
          "title": {
            "type": "string",
            "description": ""
          },
          "subtitle": {
            "type": "string",
            "description": ""
          },
          "cents": {
            "type": "integer",
            "description": "Valor em BRL, negativo para saída, inclui tarifa."
          },
          "time": {
            "type": "string",
            "description": "Data e hora UTC, ISO 8601.",
            "format": "date-time"
          },
          "detail": {
            "type": "string",
            "description": ""
          },
          "fee": {
            "type": "integer",
            "description": "Tarifa em centavos."
          },
          "status": {
            "type": "string",
            "description": "",
            "enum": [
              "PENDING",
              "COMPLETE",
              "FAILED",
              "REVIEW"
            ]
          },
          "cardId": {
            "anyOf": [
              {
                "type": "string",
                "description": "Identificador opaco ULID de 26 caracteres.",
                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
              },
              {
                "type": "null"
              }
            ]
          },
          "cardAmountCents": {
            "anyOf": [
              {
                "type": "integer",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "usdtBrl": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "walletDeltaMicros": {
            "type": "integer",
            "description": "Variação assinada do saldo em micros."
          },
          "failureReason": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "refund": {
            "anyOf": [
              {
                "type": "string",
                "description": "ID público do lançamento de devolução."
              },
              {
                "type": "null"
              }
            ]
          },
          "refundedMicros": {
            "anyOf": [
              {
                "type": "integer",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "refundedAt": {
            "anyOf": [
              {
                "type": "string",
                "description": "Data e hora UTC, ISO 8601.",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "deposit": {
            "type": "null"
          },
          "end_to_end_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "Identificador Pix E2E. Presente nas operações."
              },
              {
                "type": "null"
              }
            ]
          },
          "settled_at": {
            "anyOf": [
              {
                "type": "string",
                "description": "Data e hora UTC, ISO 8601.",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "cursor_id": {
            "type": "string",
            "description": "Identificador opaco ULID de 26 caracteres.",
            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
            "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
          }
        },
        "required": [
          "id",
          "kind",
          "cents",
          "status",
          "time",
          "walletDeltaMicros"
        ],
        "additionalProperties": false
      },
      "Quote": {
        "type": "object",
        "properties": {
          "amount_cents": {
            "type": "integer",
            "description": ""
          },
          "fee_cents": {
            "type": "integer",
            "description": ""
          },
          "total_cents": {
            "type": "integer",
            "description": ""
          },
          "debit_micros": {
            "type": "string",
            "description": "Inteiro decimal em micros de USDT. 1000000 = 1 USDT. Use BigInt ou Decimal.",
            "pattern": "^\\d+$",
            "example": "20000000"
          },
          "usdt_brl": {
            "type": "string",
            "description": ""
          },
          "quoted_at": {
            "type": "string",
            "description": "Data e hora UTC, ISO 8601.",
            "format": "date-time"
          },
          "indicative": {
            "const": true
          }
        },
        "required": [
          "amount_cents",
          "fee_cents",
          "total_cents",
          "debit_micros",
          "usdt_brl",
          "quoted_at",
          "indicative"
        ],
        "additionalProperties": false
      },
      "BoletoQuote": {
        "type": "object",
        "properties": {
          "quoteId": {
            "type": "string",
            "description": "Identificador opaco ULID de 26 caracteres.",
            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
            "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
          },
          "type": {
            "type": "string",
            "description": "",
            "enum": [
              "boleto",
              "tributo"
            ]
          },
          "barcode": {
            "type": "string",
            "description": ""
          },
          "digitableLine": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "beneficiary": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "beneficiaryDocument": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "bank": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "dueDate": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "paymentLimitDate": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "onDemand": {
            "type": "boolean"
          },
          "amounts": {
            "type": "object",
            "properties": {
              "original": {
                "type": "number"
              },
              "discount": {
                "type": "number"
              },
              "interest": {
                "type": "number"
              },
              "fine": {
                "type": "number"
              },
              "rebate": {
                "type": "number"
              },
              "final": {
                "type": "number"
              }
            },
            "required": [
              "original",
              "discount",
              "interest",
              "fine",
              "rebate",
              "final"
            ],
            "additionalProperties": false
          },
          "cents": {
            "type": "integer",
            "description": "Inteiro em centavos de BRL. 10000 = R$ 100,00.",
            "minimum": 1,
            "maximum": 100000000,
            "example": 10000
          },
          "payable": {
            "type": "boolean"
          },
          "paymentWindow": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "open": {
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "string",
                    "description": ""
                  }
                },
                "required": [
                  "open"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "expiresAt": {
            "type": "string",
            "description": "Data e hora UTC, ISO 8601.",
            "format": "date-time"
          }
        },
        "required": [
          "quoteId",
          "type",
          "barcode",
          "digitableLine",
          "beneficiary",
          "beneficiaryDocument",
          "bank",
          "dueDate",
          "paymentLimitDate",
          "onDemand",
          "amounts",
          "cents",
          "payable",
          "paymentWindow",
          "expiresAt"
        ],
        "additionalProperties": false
      },
      "Balance": {
        "type": "object",
        "properties": {
          "asset": {
            "const": "USDT"
          },
          "available_micros": {
            "type": "string",
            "description": "Inteiro decimal em micros de USDT. 1000000 = 1 USDT. Use BigInt ou Decimal.",
            "pattern": "^\\d+$",
            "example": "20000000"
          },
          "decimals": {
            "const": 6
          },
          "updated_at": {
            "type": "string",
            "description": "Data e hora UTC, ISO 8601.",
            "format": "date-time"
          }
        },
        "required": [
          "asset",
          "available_micros",
          "decimals",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "WebhookInput": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "HTTPS público, porta 443, sem credenciais ou fragmento.",
            "format": "uri",
            "maxLength": 2048
          },
          "description": {
            "type": "string",
            "description": "",
            "maxLength": 160,
            "default": ""
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "operation.created",
                "operation.updated",
                "deposit.updated",
                "webhook.test"
              ]
            },
            "minItems": 1,
            "maxItems": 4
          },
          "enabled": {
            "type": "boolean",
            "default": true
          }
        },
        "required": [
          "url",
          "events"
        ],
        "additionalProperties": false
      },
      "Webhook": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identificador opaco ULID de 26 caracteres.",
            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
            "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
          },
          "url": {
            "type": "string",
            "description": "",
            "format": "uri"
          },
          "description": {
            "type": "string",
            "description": ""
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "",
              "enum": [
                "operation.created",
                "operation.updated",
                "deposit.updated",
                "webhook.test"
              ]
            }
          },
          "enabled": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "description": "Data e hora UTC, ISO 8601.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "description": "Data e hora UTC, ISO 8601.",
            "format": "date-time"
          },
          "secret": {
            "type": "string",
            "description": "Somente na criação. Guarde para verificar X-CriptoCore-Signature."
          }
        },
        "required": [
          "id",
          "url",
          "description",
          "events",
          "enabled",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "Event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identificador opaco ULID de 26 caracteres.",
            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
            "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
          },
          "type": {
            "type": "string",
            "description": "",
            "enum": [
              "operation.created",
              "operation.updated",
              "deposit.updated",
              "webhook.test"
            ]
          },
          "api_version": {
            "const": "2.0"
          },
          "created_at": {
            "type": "string",
            "description": "Data e hora UTC, ISO 8601.",
            "format": "date-time"
          },
          "data": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Operation"
              },
              {
                "$ref": "#/components/schemas/Deposit"
              },
              {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "description": ""
                  },
                  "webhook_id": {
                    "type": "string",
                    "description": "Identificador opaco ULID de 26 caracteres.",
                    "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                    "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
                  }
                },
                "required": [
                  "message",
                  "webhook_id"
                ],
                "additionalProperties": false
              }
            ]
          },
          "sequence": {
            "type": "string",
            "description": "Apenas na consulta /events. Cursor incremental por conta.",
            "pattern": "^\\d+$"
          }
        },
        "required": [
          "id",
          "type",
          "api_version",
          "created_at",
          "data"
        ],
        "additionalProperties": false
      },
      "Delivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identificador opaco ULID de 26 caracteres.",
            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
            "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
          },
          "event_id": {
            "type": "string",
            "description": "Identificador opaco ULID de 26 caracteres.",
            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
            "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
          },
          "webhook_id": {
            "anyOf": [
              {
                "type": "string",
                "description": "Identificador opaco ULID de 26 caracteres.",
                "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
                "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "description": "",
            "enum": [
              "webhook",
              "callback"
            ]
          },
          "status": {
            "type": "string",
            "description": "",
            "enum": [
              "pending",
              "retry",
              "delivered",
              "failed",
              "canceled"
            ]
          },
          "attempts": {
            "type": "integer",
            "description": ""
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "type": "string",
                "description": "Data e hora UTC, ISO 8601.",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_http_status": {
            "anyOf": [
              {
                "type": "integer",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "last_error": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "delivered_at": {
            "anyOf": [
              {
                "type": "string",
                "description": "Data e hora UTC, ISO 8601.",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "description": "Data e hora UTC, ISO 8601.",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "event_id",
          "webhook_id",
          "type",
          "status",
          "attempts",
          "next_attempt_at",
          "last_http_status",
          "last_error",
          "delivered_at",
          "created_at"
        ],
        "additionalProperties": false
      },
      "Asset": {
        "type": "object",
        "properties": {
          "asset": {
            "type": "string",
            "description": ""
          },
          "network": {
            "type": "string",
            "description": "Identificador exato aceito em /deposit-addresses."
          },
          "network_name": {
            "type": "string",
            "description": ""
          },
          "decimals": {
            "type": "integer",
            "description": ""
          },
          "deposit_enabled": {
            "type": "boolean"
          },
          "withdrawal_enabled": {
            "const": false
          },
          "minimum_units": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmations": {
            "anyOf": [
              {
                "type": "integer",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_percent": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_fixed_micros": {
            "anyOf": [
              {
                "type": "string",
                "description": "Inteiro decimal em micros de USDT. 1000000 = 1 USDT. Use BigInt ou Decimal.",
                "pattern": "^\\d+$",
                "example": "20000000"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "asset",
          "network",
          "network_name",
          "decimals",
          "deposit_enabled",
          "withdrawal_enabled",
          "minimum_units",
          "confirmations",
          "fee_percent",
          "fee_fixed_micros"
        ],
        "additionalProperties": false
      },
      "DepositAddress": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identificador opaco ULID de 26 caracteres.",
            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
            "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
          },
          "asset": {
            "type": "string",
            "description": ""
          },
          "network": {
            "type": "string",
            "description": ""
          },
          "address": {
            "type": "string",
            "description": ""
          },
          "memo": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "memo_required": {
            "type": "boolean"
          },
          "quote": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "rate": {
                    "type": "string",
                    "description": ""
                  },
                  "usdtBrl": {
                    "type": "string",
                    "description": ""
                  },
                  "source": {
                    "type": "string",
                    "description": ""
                  },
                  "quotedAt": {
                    "type": "string",
                    "description": "Data e hora UTC, ISO 8601.",
                    "format": "date-time"
                  }
                },
                "required": [
                  "rate",
                  "usdtBrl",
                  "source",
                  "quotedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "asset",
          "network",
          "address",
          "memo",
          "memo_required",
          "quote"
        ],
        "additionalProperties": false
      },
      "Deposit": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identificador opaco ULID de 26 caracteres.",
            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
            "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
          },
          "asset": {
            "type": "string",
            "description": ""
          },
          "network": {
            "type": "string",
            "description": ""
          },
          "networkLabel": {
            "type": "string",
            "description": ""
          },
          "amount": {
            "type": "string",
            "description": "Quantidade decimal do ativo; nunca converter para float."
          },
          "status": {
            "type": "string",
            "description": "CREDITED é o estado de crédito em saldo. HELD/REJECTED requerem análise; não significam saque ou devolução.",
            "enum": [
              "DETECTED",
              "CONFIRMING",
              "CONFIRMED",
              "SECURING",
              "SECURED",
              "CREDITED",
              "BELOW_MINIMUM",
              "PAIR_DISABLED",
              "HELD",
              "REJECTED"
            ]
          },
          "txHash": {
            "type": "string",
            "description": ""
          },
          "depositAddress": {
            "type": "string",
            "description": ""
          },
          "memo": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmations": {
            "type": "integer",
            "description": ""
          },
          "requiredConfirmations": {
            "type": "integer",
            "description": ""
          },
          "remainingConfirmations": {
            "type": "integer",
            "description": ""
          },
          "creditedMicros": {
            "anyOf": [
              {
                "type": "integer",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "grossMicros": {
            "anyOf": [
              {
                "type": "integer",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "feeMicros": {
            "anyOf": [
              {
                "type": "integer",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "holdReason": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "delayed": {
            "type": "boolean"
          },
          "rate": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "description": "Data e hora UTC, ISO 8601.",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "description": "Data e hora UTC, ISO 8601.",
            "format": "date-time"
          },
          "creditedAt": {
            "anyOf": [
              {
                "type": "string",
                "description": "Data e hora UTC, ISO 8601.",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "transactionId": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "explorer": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "initialQuote": {},
          "rateSource": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "usdtBrl": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "creditedCents": {
            "anyOf": [
              {
                "type": "integer",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "amountBasis": {
            "type": "string",
            "description": ""
          },
          "fromAddress": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "contract": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "blockNumber": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmationPhase": {
            "type": "string",
            "description": ""
          },
          "verifiedAt": {
            "anyOf": [
              {
                "type": "string",
                "description": "Data e hora UTC, ISO 8601.",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "sweptAt": {
            "anyOf": [
              {
                "type": "string",
                "description": "Data e hora UTC, ISO 8601.",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "securedAt": {
            "anyOf": [
              {
                "type": "string",
                "description": "Data e hora UTC, ISO 8601.",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "asset",
          "network",
          "networkLabel",
          "amount",
          "status",
          "txHash",
          "depositAddress",
          "memo",
          "confirmations",
          "requiredConfirmations",
          "remainingConfirmations",
          "creditedMicros",
          "grossMicros",
          "feeMicros",
          "holdReason",
          "delayed",
          "rate",
          "createdAt",
          "updatedAt",
          "creditedAt",
          "transactionId",
          "explorer",
          "initialQuote",
          "rateSource",
          "usdtBrl",
          "creditedCents",
          "amountBasis",
          "fromAddress",
          "contract",
          "blockNumber",
          "confirmationPhase",
          "verifiedAt",
          "sweptAt",
          "securedAt"
        ],
        "additionalProperties": false
      },
      "Card": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identificador opaco ULID de 26 caracteres.",
            "pattern": "^[0-9A-HJKMNP-TV-Z]{26}$",
            "example": "01K79A6VJW6QRK8GH2Y3FNSD5P"
          },
          "name": {
            "type": "string",
            "description": ""
          },
          "last4": {
            "type": "string",
            "description": ""
          },
          "balance": {
            "type": "integer",
            "description": "Saldo em centavos."
          },
          "frozen": {
            "type": "boolean"
          },
          "color": {
            "type": "string",
            "description": ""
          },
          "status": {
            "type": "string",
            "description": ""
          },
          "real": {
            "type": "boolean"
          },
          "pending": {
            "type": "integer",
            "description": ""
          },
          "holderName": {
            "anyOf": [
              {
                "type": "string",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "syncedAt": {
            "anyOf": [
              {
                "type": "string",
                "description": "Data e hora UTC, ISO 8601.",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "last4",
          "balance",
          "frozen",
          "color",
          "status",
          "real",
          "pending",
          "holderName",
          "syncedAt"
        ],
        "additionalProperties": false
      },
      "FeeTerms": {
        "type": "object",
        "properties": {
          "ratePpm": {
            "type": "integer",
            "description": "Percentual em partes por milhão. 30000 = 3%."
          },
          "fixed": {
            "type": "integer",
            "description": "Tarifa fixa em centavos."
          },
          "min": {
            "anyOf": [
              {
                "type": "integer",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "max": {
            "anyOf": [
              {
                "type": "integer",
                "description": ""
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "string",
            "description": ""
          }
        },
        "required": [
          "ratePpm",
          "fixed",
          "min",
          "max",
          "source"
        ],
        "additionalProperties": false
      }
    }
  }
}
