{"openapi":"3.1.0","info":{"title":"Wolf Sandbox API","version":"1.0.0","summary":"Pagamentos simulados (Pix e cartões de teste), pedidos, Payment Links e webhooks.","description":"API pública do **Wolf Sandbox** (Production Simulation Edition). O único provedor é o simulador: nenhuma cobrança é real, os QR Codes Pix são sintéticos e cartões de teste escolhem o cenário (não existe campo de número de cartão).\n\n- **Autenticação:** `Authorization: Bearer sk_test_...` (API key) ou o token de sessão do app do seller, conforme cada operação.\n- **Valores:** `amount_minor` é uma string com o inteiro em centavos (`\"9900\"` = R$ 99,00); nunca ponto flutuante.\n- **Idempotência:** operações marcadas exigem `Idempotency-Key` (8 a 255 caracteres).\n- **Erros:** envelope `{\"error\": {\"code\", \"message\", \"request_id\"}}`; `code` é estável.\n- **Rate limit:** `429 RATE_LIMITED` com `Retry-After`.\n- **Servidores:** o `/openapi.json` de cada ambiente informa o próprio `servers`.","x-wolf-edition":"production-simulation"},"servers":[{"url":"https://api.wolfpayteste.online","description":"Wolf Sandbox (production)"}],"tags":[{"name":"PaymentIntents","description":"Crie, confirme e acompanhe pagamentos Pix simulado e cartão de teste."},{"name":"Refunds","description":"Reembolsos totais ou parciais de pagamentos capturados."},{"name":"Simulator","description":"Ferramentas que só existem na edição de simulação: simular o pagamento de um Pix e forçar a reconciliação."},{"name":"Orders","description":"Pedidos de uma oferta e seus pagamentos."},{"name":"Products","description":"Catálogo: produtos."},{"name":"Offers","description":"Catálogo: ofertas (preço de um produto)."},{"name":"Checkout Sessions","description":"Sessões de checkout hospedado criadas pelo seller."},{"name":"Payment Links","description":"Links de pagamento persistentes de uma oferta."},{"name":"Public Checkout","description":"Rotas públicas usadas pelo checkout hospedado (sem API key): ler a sessão, registrar os dados do comprador (etapa 1), pagar, simular o Pix e abrir um Payment Link."},{"name":"Webhooks","description":"Endpoints de webhook, entregas, teste, replay e rotação do segredo."},{"name":"API Keys","description":"API keys do seller (só por sessão humana do app do seller)."},{"name":"Organizations","description":"Organizações do usuário autenticado (sessão do app do seller)."},{"name":"Reports","description":"Painel, finanças e checkouts abandonados do seller."},{"name":"Payouts, Settlements & Disputes","description":"Leitura de repasses, liquidações e disputas **sintéticos**."},{"name":"Conversion Events","description":"Eventos de conversão enviados pelo **servidor** da Wolf para Meta (Conversions API), Google Analytics 4 (Measurement Protocol) e TikTok (Events API): conexões, seleção por produto e log de entregas. Nenhum script roda no checkout."},{"name":"Payout Destinations","description":"Destinos **sintéticos** do saque do seller (Carteira > Bancos): bancos de uma lista fechada e as chaves Pix de cada banco, só como máscara. **Nenhum dado bancário real**: guardamos só o código do banco, o tipo da conta e os 4 últimos dígitos; da chave Pix, só o tipo e uma máscara gerada pela API a partir de uma dica curta (nunca a chave completa, agência, conta completa, CPF/CNPJ ou titular). Nenhum dinheiro sai para um banco de verdade."},{"name":"Account Security","description":"Segurança da conta do seller: verificação em duas etapas, sessões por dispositivo e ações sensíveis. Nunca expõe IP, localização, User-Agent bruto, token nem id de fator."},{"name":"Seller Identity","description":"Identidade cadastral do seller (CPF/CNPJ) e verificação manual de documentos pela equipe Wolf. Os dados sensíveis são enviados uma vez e nunca devolvidos: só máscara e estado."}],"paths":{"/v1/account/security":{"get":{"operationId":"getAccountSecurity","tags":["Account Security"],"summary":"Consultar a segurança da conta","description":"Se o usuário tem verificação em duas etapas (TOTP) verificada e o nível da sessão atual. Só pela sessão humana do app do seller (API key → `403`); o usuário e a sessão vêm do JWT verificado, nunca do corpo. Sessão encerrada → `401`. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`SELLER_ACCOUNT_SECURITY_ENABLED`).","security":[{"sellerSession":[]}],"responses":{"200":{"description":"Estado de segurança.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSecurity"},"example":{"two_factor_enabled":true,"verified_factor_count":1,"session_aal":"aal2"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE"]}},"/v1/account/security/mfa-events":{"post":{"operationId":"recordAccountMfaEvent","tags":["Account Security"],"summary":"Auditar uma mudança de 2FA","description":"O app liga ou remove um fator TOTP direto no provedor e depois informa aqui. A API confere o estado real (`enrolled` exige mais fatores verificados do que o último evento registrado; `removed`, menos, com um TOTP recente no JWT) e então audita. Evento que não confere, ou repetido sem mudança → `409 SESSION_STATE_MISMATCH`, sem nova linha. A auditoria não é atômica com a mudança no provedor: é evidência, e a decisão de acesso sempre lê o estado real. Só pela sessão humana do app do seller (API key → `403`); o usuário e a sessão vêm do JWT verificado, nunca do corpo. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`SELLER_ACCOUNT_SECURITY_ENABLED`).","security":[{"sellerSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountMfaEventRequest"},"example":{"event":"enrolled"}}}},"responses":{"200":{"description":"Evento auditado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountMfaEventResult"},"example":{"event":"enrolled","verified_factor_count":1}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`, `STEP_UP_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `SESSION_STATE_MISMATCH`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","SESSION_STATE_MISMATCH","STEP_UP_REQUIRED","VALIDATION_FAILED"]}},"/v1/account/sessions":{"get":{"operationId":"listAccountSessions","tags":["Account Security"],"summary":"Listar as sessões ativas","description":"Sessões vivas do próprio usuário (até 50), a atual marcada, com o dispositivo registrado (classe, sistema e navegador), criação e última atividade. Só pela sessão humana do app do seller (API key → `403`); o usuário e a sessão vêm do JWT verificado, nunca do corpo. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`SELLER_ACCOUNT_SECURITY_ENABLED`).","security":[{"sellerSession":[]}],"responses":{"200":{"description":"Sessões.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountSessionList"},"example":{"data":[{"id":"3f1d2c4b-5a69-4788-9a0b-1c2d3e4f5a6b","current":true,"device":{"class":"desktop","os":"macos","browser":"chrome"},"created_at":"2026-11-11T12:00:00.000Z","last_active_at":"2026-11-11T14:32:00.000Z"},{"id":"8a7b6c5d-4e3f-4a1b-8c9d-0e1f2a3b4c5d","current":false,"device":null,"created_at":"2026-11-01T09:00:00.000Z","last_active_at":"2026-11-10T18:10:00.000Z"}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE"]}},"/v1/account/sessions/current":{"put":{"operationId":"registerCurrentSessionDevice","tags":["Account Security"],"summary":"Registrar o dispositivo da sessão atual","description":"Grava o dispositivo da sessão do JWT; o primeiro valor vale e nunca é sobrescrito, então repetir é inofensivo (`204`). Sessão encerrada → `401`. Só pela sessão humana do app do seller (API key → `403`); o usuário e a sessão vêm do JWT verificado, nunca do corpo. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`SELLER_ACCOUNT_SECURITY_ENABLED`).","security":[{"sellerSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterSessionDeviceRequest"},"example":{"device":{"class":"desktop","os":"macos","browser":"chrome"}}}}},"responses":{"204":{"description":"Dispositivo registrado (ou já registrado).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","VALIDATION_FAILED"]}},"/v1/account/sessions/revoke-others":{"post":{"operationId":"confirmOtherSessionsRevoked","tags":["Account Security"],"summary":"Confirmar o encerramento das outras sessões","description":"O app encerra as outras sessões no provedor (`signOut({scope:'others'})`) e chama esta rota, que **audita** só depois de conferir que não restam outras sessões vivas (senão `409 SESSION_STATE_MISMATCH`). Exige reautenticação recente: com 2FA ativo, só o TOTP serve (a senha não); sem 2FA, senha ou TOTP (`403 STEP_UP_REQUIRED`). Idempotente por prova de reautenticação. Só pela sessão humana do app do seller (API key → `403`); o usuário e a sessão vêm do JWT verificado, nunca do corpo. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`SELLER_ACCOUNT_SECURITY_ENABLED`).","security":[{"sellerSession":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"200":{"description":"Não restam outras sessões.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokeOtherSessionsResult"},"example":{"remaining_other_sessions":0}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`, `STEP_UP_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `SESSION_STATE_MISMATCH`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","SESSION_STATE_MISMATCH","STEP_UP_REQUIRED","VALIDATION_FAILED"]}},"/v1/api-keys":{"get":{"operationId":"listApiKeys","tags":["API Keys"],"summary":"Listar API keys","description":"Chave vencida aparece com `status: \"expired\"`.","security":[{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"API keys (sem segredo).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiCredential"}}},"required":["data"]},"example":{"data":[{"id":"key_0a1b2c3d4e5f60718293a4b5c6d7e8f9","name":"Integração da loja","key_prefix":"sk_test_a1B2c3D4e5F6","scopes":["payments:read","payments:write","refunds:write"],"status":"active","expires_at":"2027-11-06T00:00:00.000Z","last_used_at":null,"created_at":"2026-11-06T12:00:00.000Z","revoked_at":null}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["api-keys:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED"]},"post":{"operationId":"createApiKey","tags":["API Keys"],"summary":"Criar API key","description":"Nesta edição só emite `sk_test_`. `expires_at` é opcional (instante ISO-8601 com offset, no futuro e em até 365 dias). O `secret` é exibido uma única vez. Com `SELLER_ACCOUNT_SECURITY_ENABLED` ligada (SPEC-0052) a sessão humana precisa de reautenticação recente: com 2FA ativo só o TOTP serve (a senha não), sem 2FA senha ou TOTP; senão `403 STEP_UP_REQUIRED`. Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`.","security":[{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiCredentialRequest"},"example":{"name":"Integração da loja","scopes":["payments:read","payments:write","refunds:write"],"expires_at":"2027-11-06T00:00:00Z"}}}},"responses":{"201":{"description":"API key criada (ou replay sem o segredo).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CreatedApiCredential"},{"$ref":"#/components/schemas/ReplayedApiCredential"}]},"example":{"credential":{"id":"key_0a1b2c3d4e5f60718293a4b5c6d7e8f9","name":"Integração da loja","key_prefix":"sk_test_a1B2c3D4e5F6","scopes":["payments:read","payments:write","refunds:write"],"status":"active","expires_at":"2027-11-06T00:00:00.000Z","last_used_at":null,"created_at":"2026-11-06T12:00:00.000Z","revoked_at":null},"secret":"sk_test_EXEMPLO_segredo_exibido_uma_unica_vez"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`, `STEP_UP_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["api-keys:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","RATE_LIMITED","SERVICE_UNAVAILABLE","STEP_UP_REQUIRED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/api-keys/{id}/revoke":{"post":{"operationId":"revokeApiKey","tags":["API Keys"],"summary":"Revogar API key","security":[{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da API key (`key_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"API key revogada.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCredential"},"example":{"id":"key_0a1b2c3d4e5f60718293a4b5c6d7e8f9","name":"Integração da loja","key_prefix":"sk_test_a1B2c3D4e5F6","scopes":["payments:read","payments:write","refunds:write"],"status":"revoked","expires_at":"2027-11-06T00:00:00.000Z","last_used_at":null,"created_at":"2026-11-06T12:00:00.000Z","revoked_at":"2026-11-06T12:10:00.000Z"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["api-keys:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/checkout-sessions":{"post":{"operationId":"createCheckoutSession","tags":["Checkout Sessions"],"summary":"Criar sessão de checkout","description":"Cria uma sessão de checkout hospedado de uma oferta `active` (`ttl_minutes` de 5 a 1440, padrão 30). O `client_secret` é exibido só na primeira resposta; um replay devolve a sessão com `secret_already_revealed: true`. Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionRequest"},"example":{"offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","ttl_minutes":30}}}},"responses":{"201":{"description":"Sessão criada (ou replay sem o segredo).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CreatedCheckoutSession"},{"$ref":"#/components/schemas/ReplayedCheckoutSession"}]},"example":{"id":"cs_2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","amount_minor":"9900","currency":"BRL","status":"open","payment_intent_id":null,"expires_at":"2026-11-06T12:30:00.000Z","client_secret":"csec_EXEMPLO_segredo_de_uso_unico_da_sessao"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/console/preferences/dashboard":{"get":{"operationId":"getDashboardPreference","tags":["Organizations"],"summary":"Consultar o layout da Visão geral","description":"Ordem e visibilidade dos blocos da Visão geral do usuário autenticado **nesta organização**, guardadas pelo servidor. `value: null` até o usuário salvar um layout (o app usa o padrão). É só apresentação: nunca muda o que o papel pode ler. Só pela sessão do app (API keys recebem `403`).","security":[{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Layout salvo (ou `null`).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardPreference"},"example":{"scope":"dashboard","value":{"version":1,"widgets":[{"id":"kpis","visible":true},{"id":"since_yesterday","visible":true},{"id":"revenue","visible":true},{"id":"balance","visible":true},{"id":"cumulative_revenue","visible":true},{"id":"waterfall","visible":true},{"id":"rhythm","visible":false},{"id":"recent_sales","visible":true},{"id":"methods","visible":true},{"id":"pix","visible":true},{"id":"rates","visible":true}]},"updated_at":"2026-11-06T12:00:00.000Z"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED"]},"put":{"operationId":"putDashboardPreference","tags":["Organizations"],"summary":"Salvar o layout da Visão geral","description":"Substitui o layout inteiro do usuário nesta organização (a última gravação vale; repetir o mesmo corpo é inofensivo, então não exige `Idempotency-Key`). `widgets` na ordem da tela, com no máximo 32 itens e ids únicos no formato `[a-z][a-z0-9_]*`; o servidor valida o formato, e o app ignora ids que não conhece. Só pela sessão do app (API keys recebem `403`).","security":[{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDashboardPreferenceRequest"},"example":{"value":{"version":1,"widgets":[{"id":"kpis","visible":true},{"id":"since_yesterday","visible":true},{"id":"revenue","visible":true},{"id":"balance","visible":true},{"id":"cumulative_revenue","visible":true},{"id":"waterfall","visible":true},{"id":"rhythm","visible":false},{"id":"recent_sales","visible":true},{"id":"methods","visible":true},{"id":"pix","visible":true},{"id":"rates","visible":true}]}}}}},"responses":{"200":{"description":"Layout salvo.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardPreference"},"example":{"scope":"dashboard","value":{"version":1,"widgets":[{"id":"kpis","visible":true},{"id":"since_yesterday","visible":true},{"id":"revenue","visible":true},{"id":"balance","visible":true},{"id":"cumulative_revenue","visible":true},{"id":"waterfall","visible":true},{"id":"rhythm","visible":false},{"id":"recent_sales","visible":true},{"id":"methods","visible":true},{"id":"pix","visible":true},{"id":"rates","visible":true}]},"updated_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/console/preferences/notifications":{"get":{"operationId":"getNotificationPreferences","tags":["Organizations"],"summary":"Consultar as preferências de notificação","description":"Quais avisos chegam ao usuário autenticado **nesta organização**, por evento e por canal (`app`: sino e toast; `email`), e se o silêncio noturno (23h às 7h no fuso da organização) está ligado. `value: null` até o usuário salvar (valem os padrões do catálogo: `app` ligado em tudo, `email` desligado, exceto nos avisos críticos). Chaves que esta versão não oferece não voltam. É só apresentação: nunca muda o que o papel pode ler. Só pela sessão do app (API keys recebem `403`). Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`NOTIFICATION_PREFERENCES_ENABLED`).","security":[{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Preferências salvas (ou `null`).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreference"},"example":{"scope":"notifications","value":{"version":1,"quiet_hours_enabled":true,"events":{"pix_issued":{"app":false,"email":false},"payment_approved":{"app":true,"email":true},"payout_failed":{"app":true,"email":true}}},"updated_at":"2026-11-06T12:00:00.000Z"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]},"put":{"operationId":"putNotificationPreferences","tags":["Organizations"],"summary":"Salvar as preferências de notificação","description":"Substitui as preferências inteiras do usuário nesta organização (a última gravação vale; repetir o mesmo corpo é inofensivo, então não exige `Idempotency-Key`). `events` aceita só chaves do catálogo disponíveis (`payment_approved`, `payment_declined`, `pix_issued`, `refund_completed`, `payout_requested`, `payout_paid`, `payout_failed`), cada uma com exatamente `app` e `email`; o aviso crítico `payout_failed` não pode ficar com `app` desligado enquanto não houver canal de e-mail (nem com os dois desligados depois). Chave desconhecida, mais de 32 chaves, mais de 4 KiB ou campos como `user_id`, `organization_id` e `seller_id` respondem `400`. Para restaurar o padrão, grave `{\"version\":1,\"quiet_hours_enabled\":false,\"events\":{}}`. Só pela sessão do app (API keys recebem `403`). Responde `404` enquanto o ambiente não tem a funcionalidade ligada.","security":[{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNotificationPreferencesRequest"},"example":{"value":{"version":1,"quiet_hours_enabled":true,"events":{"pix_issued":{"app":false,"email":false},"payment_approved":{"app":true,"email":true},"payout_failed":{"app":true,"email":true}}}}}}},"responses":{"200":{"description":"Preferências salvas.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreference"},"example":{"scope":"notifications","value":{"version":1,"quiet_hours_enabled":true,"events":{"pix_issued":{"app":false,"email":false},"payment_approved":{"app":true,"email":true},"payout_failed":{"app":true,"email":true}}},"updated_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/conversions/connections":{"get":{"operationId":"listConversionConnections","tags":["Conversion Events"],"summary":"Listar conexões de eventos de conversão","description":"Conexões da organização com Meta, GA4 e TikTok, sem as apagadas e sem o segredo. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`CONVERSION_EVENTS_ENABLED`).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Conexões.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionConnectionList"},"example":{"data":[{"id":"cvc_6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e","platform":"meta","name":"Meta · Pixel principal","account_id":"123456789012345","secret_last4":"a1B2","test_event_code":null,"debug_mode":false,"status":"active","created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z"}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["webhooks:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]},"post":{"operationId":"createConversionConnection","tags":["Conversion Events"],"summary":"Criar conexão de eventos de conversão","description":"Só pela sessão humana do app (API key → `403`). O segredo é cifrado na hora e nunca volta (só `secret_last4`). Uma conexão viva por plataforma e conta (`409 CONVERSION_CONNECTION_EXISTS`). Sem código de teste, as vendas simuladas viram conversões **reais** na conta de anúncios. Com `SELLER_ACCOUNT_SECURITY_ENABLED` ligada (SPEC-0052) exige reautenticação recente: com 2FA ativo só o TOTP serve (a senha não), sem 2FA senha ou TOTP; senão `403 STEP_UP_REQUIRED`. Repetir com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`CONVERSION_EVENTS_ENABLED`).","security":[{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConversionConnectionRequest"},"example":{"platform":"meta","account_id":"123456789012345","secret":"EAAB_exemplo_nao_use_0000","name":"Meta · Pixel principal","test_event_code":"TEST12345"}}}},"responses":{"201":{"description":"Conexão criada.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionConnection"},"example":{"id":"cvc_6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e","platform":"meta","name":"Meta · Pixel principal","account_id":"123456789012345","secret_last4":"a1B2","test_event_code":null,"debug_mode":false,"status":"active","created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`, `STEP_UP_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `CONVERSION_CONNECTION_EXISTS`, `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["webhooks:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","CONVERSION_CONNECTION_EXISTS","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","STEP_UP_REQUIRED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/conversions/connections/{id}":{"patch":{"operationId":"updateConversionConnection","tags":["Conversion Events"],"summary":"Atualizar conexão de eventos de conversão","description":"Só pela sessão humana do app. Ativar/desativar, renomear, trocar o segredo e o código de teste (Meta/TikTok) ou o modo de depuração (GA4). Campo da plataforma errada → `400`. Com `SELLER_ACCOUNT_SECURITY_ENABLED` ligada (SPEC-0052) exige reautenticação recente: com 2FA ativo só o TOTP serve (a senha não), sem 2FA senha ou TOTP; senão `403 STEP_UP_REQUIRED`. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`CONVERSION_EVENTS_ENABLED`).","security":[{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da conexão (`cvc_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConversionConnectionRequest"},"example":{"status":"disabled"}}}},"responses":{"200":{"description":"Conexão.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionConnection"},"example":{"id":"cvc_6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e","platform":"meta","name":"Meta · Pixel principal","account_id":"123456789012345","secret_last4":"a1B2","test_event_code":null,"debug_mode":false,"status":"disabled","created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`, `STEP_UP_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["webhooks:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","STEP_UP_REQUIRED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]},"delete":{"operationId":"deleteConversionConnection","tags":["Conversion Events"],"summary":"Apagar conexão de eventos de conversão","description":"Só pela sessão humana do app. Apaga o segredo e tira a conexão dos produtos; o log de entregas fica. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`CONVERSION_EVENTS_ENABLED`).","security":[{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da conexão (`cvc_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Conexão apagada.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]},"example":{"id":"cvc_6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e","deleted":true}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["webhooks:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/conversions/connections/{id}/test":{"post":{"operationId":"testConversionConnection","tags":["Conversion Events"],"summary":"Testar conexão de eventos de conversão","description":"Só pela sessão humana do app. Enfileira um evento de teste (com o código de teste, se houver); a Wolf o envia em cerca de um minuto e o resultado aparece no log. Conexão desativada → `409 CONVERSION_CONNECTION_DISABLED`. Repetir com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`CONVERSION_EVENTS_ENABLED`).","security":[{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da conexão (`cvc_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false},"example":{}}}},"responses":{"202":{"description":"Entrega de teste criada.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionDelivery"},"example":{"id":"cvd_8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a","connection_id":"cvc_6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e","platform":"meta","event":"test","platform_event_name":"WolfPaymentTest","event_id":"test_8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a","event_time":"2026-11-06T12:00:00.000Z","checkout_session_id":null,"order_id":null,"uses_test_code":false,"status":"pending","attempts":0,"next_attempt_at":"2026-11-06T12:00:00.000Z","last_response_status":null,"last_error":null,"latency_ms":null,"delivered_at":null,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `CONVERSION_CONNECTION_DISABLED`, `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["webhooks:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","CONVERSION_CONNECTION_DISABLED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/conversions/deliveries":{"get":{"operationId":"listConversionDeliveries","tags":["Conversion Events"],"summary":"Listar entregas de eventos de conversão","description":"Entregas mais recentes primeiro (até 100), opcionalmente de uma conexão. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`CONVERSION_EVENTS_ENABLED`).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"connection_id","in":"query","required":false,"schema":{"type":"string","pattern":"^cvc_[0-9a-f]{32}$"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Entregas.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionDeliveryList"},"example":{"data":[{"id":"cvd_8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a","connection_id":"cvc_6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e","platform":"meta","event":"purchase","platform_event_name":"Purchase","event_id":"ord_0f1e2d3c4b5a69788796a5b4c3d2e1f0","event_time":"2026-11-06T12:00:00.000Z","checkout_session_id":"cs_2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f","order_id":"ord_0f1e2d3c4b5a69788796a5b4c3d2e1f0","uses_test_code":false,"status":"succeeded","attempts":1,"next_attempt_at":null,"last_response_status":200,"last_error":null,"latency_ms":184,"delivered_at":"2026-11-06T12:00:41.000Z","created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:41.000Z"}]}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["webhooks:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/dashboard":{"get":{"operationId":"getDashboard","tags":["Reports"],"summary":"Painel","description":"Com `period` (`today`, `7d` ou `30d`; `currency` opcional, padrão BRL): visão geral do período no fuso da organização — \"hoje\" começa à meia-noite local — com KPIs contra o período anterior equivalente, série, métodos, Pix emitido × pago, saldos, waterfall e ritmo do dia. Com `period=custom`, `from` e `to` (datas locais `AAAA-MM-DD` no fuso da organização, as duas inclusive): a mesma leitura de um intervalo escolhido — de 1 a 92 dias, sem datas futuras e com `from` ≤ `to`. O período anterior equivalente é o mesmo número de dias imediatamente antes de `from`; a série é por hora quando o intervalo é de um único dia e por dia nos demais; o ritmo do dia só se aplica a um único dia. A resposta traz `period: \"custom\"` e `range` com as datas locais. `from` e `to` só valem com `period=custom`, e `custom` exige os dois. Formatos anteriores, mantidos por uma release: sem parâmetros, resumo de todos os pagamentos; com `from`, `to` (datas UTC `AAAA-MM-DD`) e `currency` — os três juntos, sem `period` — resumo do período. Qualquer outra mistura → `400 VALIDATION_FAILED`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"currency","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}},{"name":"period","in":"query","required":false,"schema":{"type":"string","enum":["today","7d","30d","custom"]}},{"name":"origin","in":"query","required":false,"schema":{"type":"string","enum":["front","upsell","downsell"]}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Resumo.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DashboardPeriod"},{"$ref":"#/components/schemas/Dashboard"},{"$ref":"#/components/schemas/SellerDashboard"}]},"example":{"period":"today","currency":"BRL","timezone":"America/Sao_Paulo","from":"2026-11-06T03:00:00.000Z","to":"2026-11-06T15:00:00.000Z","previous_from":"2026-11-05T03:00:00.000Z","previous_to":"2026-11-05T15:00:00.000Z","generated_at":"2026-11-06T15:00:00.120Z","range":{"from":"2026-11-06","to":"2026-11-06","days":1},"kpis":{"gross":{"value":"29700","previous":"19800","delta":"9900"},"paid":{"value":3,"previous":2,"delta":1},"pix_conversion":{"value":6667,"previous":5000,"delta":1667,"numerator":2,"denominator":3,"previous_numerator":1,"previous_denominator":2},"card_approval":{"value":5000,"previous":10000,"delta":-5000,"numerator":1,"denominator":2,"previous_numerator":1,"previous_denominator":1}},"series":{"granularity":"hour","buckets":[{"start":"2026-11-06T12:00:00.000Z","label":"2026-11-06T09:00","gross_minor":"19800","pix_minor":"19800","card_minor":"0","paid_count":2},{"start":"2026-11-06T13:00:00.000Z","label":"2026-11-06T10:00","gross_minor":"9900","pix_minor":"0","card_minor":"9900","paid_count":1}]},"methods":[{"method":"pix","paid_count":2,"gross_minor":"19800"},{"method":"card","paid_count":1,"gross_minor":"9900"}],"pix":{"emitted_count":3,"paid_count":2,"pending_count":1,"expired_count":0,"emitted_minor":"29700","paid_minor":"19800"},"balances":{"available_minor":"9404","pending_minor":"29700","reserved_minor":"0","dispute_hold_minor":"0","payout_pending_minor":"0","paid_out_minor":"150000"},"waterfall":{"gross_minor":"29700","refunds_minor":"4900","disputes_minor":"0","fees_minor":"0","net_minor":"24800","fees_settled_payments":0,"succeeded_payments":3},"rhythm":{"status":"insufficient_history","date":"2026-11-06","current_hour":12,"reason":"history_shorter_than_4_weeks"},"recent_sales":[{"payment_intent_id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","order_id":"ord_0f1e2d3c4b5a69788796a5b4c3d2e1f0","amount_minor":"9900","currency":"BRL","status":"succeeded","display_status":"paid","payment_method":"card","created_at":"2026-11-06T12:00:00.000Z"}],"day_over_day":{"from":"2026-11-06T03:00:00.000Z","to":"2026-11-06T15:00:00.000Z","previous_from":"2026-11-05T03:00:00.000Z","previous_to":"2026-11-05T15:00:00.000Z","gross":{"value":"29700","previous":"19800","delta":"9900"},"paid":{"value":3,"previous":2,"delta":1},"pix_conversion":{"value":6667,"previous":5000,"delta":1667,"numerator":2,"denominator":3,"previous_numerator":1,"previous_denominator":2},"card_approval":{"value":5000,"previous":10000,"delta":-5000,"numerator":1,"denominator":2,"previous_numerator":1,"previous_denominator":1},"refunds":{"value":"4900","previous":"0","delta":"4900"}}}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["reports:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/disputes":{"get":{"operationId":"listDisputes","tags":["Payouts, Settlements & Disputes"],"summary":"Listar disputas sintéticas","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Disputas.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Dispute"}}},"required":["data"]},"example":{"data":[{"id":"dsp_9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b","payment_intent_id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","charge_id":"chg_8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d","amount_minor":"9900","currency":"BRL","status":"created","reason_code":"product_not_received","provider_id":"simulator","external_id":"sim_dsp_0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f","provider_status":"needs_response","synthetic_obligation":true,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z","resolved_at":null}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["payments:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED"]}},"/v1/disputes/{id}":{"get":{"operationId":"getDispute","tags":["Payouts, Settlements & Disputes"],"summary":"Consultar disputa sintética","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da disputa (`dsp_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Disputa.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dispute"},"example":{"id":"dsp_9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b","payment_intent_id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","charge_id":"chg_8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d","amount_minor":"9900","currency":"BRL","status":"created","reason_code":"product_not_received","provider_id":"simulator","external_id":"sim_dsp_0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f","provider_status":"needs_response","synthetic_obligation":true,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z","resolved_at":null}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["payments:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/finance":{"get":{"operationId":"getFinance","tags":["Reports"],"summary":"Saldos e journals","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Saldos e journals recentes.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceSnapshot"},"example":{"balances":[{"code":"seller_available","currency":"BRL","balance_minor":"9504"}],"journals":[{"id":"jrn_1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f","source_type":"payment_intent","source_id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","operation_key":"capture:pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","currency":"BRL","debit_minor":"9900","credit_minor":"9900","created_at":"2026-11-06T12:00:05.000Z"}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["finance:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED"]}},"/v1/finance/fees":{"get":{"operationId":"getFinanceFees","tags":["Reports"],"summary":"Taxas vigentes","description":"Política de taxas vigente do seller em pontos-base (100 = 1 %): a do seller, se existir, senão a da plataforma; `overrides` lista as políticas por produto ou oferta. Com `offer_id=off_...` (opcional, SPEC-0055) a resposta traz também `effective`: a política que se aplicaria a um pagamento **dessa oferta**, escolhida pela mesma precedência do resolvedor de pagamentos (oferta, produto, seller, plataforma; empate pela versão maior), ou `null` se nenhuma se aplica. É a base do \"Você recebe\" do preço (uma previsão, nunca valor liquidado). Oferta de outro seller → `404`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"offer_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^off_[A-Za-z0-9]+$"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Taxas.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceFees"},"example":{"default":{"scope":"global","scope_id":null,"provider_id":"simulator","fee_basis_points":499,"reserve_basis_points":0,"max_installments":12,"version":"1"},"overrides":[]}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["finance:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/finance/forecast":{"get":{"operationId":"getFinanceForecast","tags":["Reports"],"summary":"Previsão de liberações","description":"Liberações previstas do saldo a liberar (liquidação sintética, nenhum dinheiro real). Cada pagamento aprovado tem o prazo congelado na aprovação, em dias corridos no fuso da organização (Pix D+1 e cartão de teste D+30, ou o prazo da conta definido pela Wolf), e fica disponível às 00:00 locais do dia do prazo. Com a liquidação automática ligada, `data` traz o valor líquido (depois da taxa e da reserva) por dia e método, uma liberação já vencida aparece com a data de hoje, `held` soma os pagamentos retidos (disputa aberta, reembolso em andamento, revisão) e `reason` é `null`. Com ela desligada, `data` vem vazio com `reason: \"no_canonical_settlement_schedule\"`. `terms` lista os prazos vigentes para novos pagamentos e `pending_minor` o saldo a liberar.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"currency","in":"query","required":false,"schema":{"default":"BRL","type":"string","pattern":"^[A-Z]{3}$"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Previsão.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceForecast"},"example":{"currency":"BRL","pending_minor":"29700","reason":null,"data":[{"date":"2026-09-29","amount_minor":"9406","gross_minor":"9900","fee_minor":"494","reserve_minor":"0","payments":1,"methods":[{"payment_method_type":"pix","amount_minor":"9406","gross_minor":"9900","payments":1}]},{"date":"2026-10-28","amount_minor":"18812","gross_minor":"19800","fee_minor":"988","reserve_minor":"0","payments":2,"methods":[{"payment_method_type":"card","amount_minor":"18812","gross_minor":"19800","payments":2}]}],"terms":[{"payment_method_type":"pix","days":1,"source":"platform_default"},{"payment_method_type":"card","days":30,"source":"platform_default"}],"held":{"gross_minor":"0","payments":0,"reasons":[]}}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["finance:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/finance/payouts":{"get":{"operationId":"listFinancePayouts","tags":["Payouts, Settlements & Disputes"],"summary":"Histórico de saques","description":"Saques sintéticos do seller, do mais recente ao mais antigo, com a origem (`seller`: pedido pelo app; `admin`: criado pela operação da Wolf) e o estado (`created` = em processamento, `paid`, `failed`).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Saques.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinancePayoutList"},"example":{"data":[{"id":"pyo_2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e","amount_minor":"123456","currency":"BRL","status":"paid","origin":"seller","destination_ref":"sim_seller_default","synthetic_obligation":true,"created_at":"2026-11-06T12:00:00.000Z","resolved_at":"2026-11-06T12:00:05.000Z"}]}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["finance:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/finance/statement":{"get":{"operationId":"getFinanceStatement","tags":["Reports"],"summary":"Extrato do saldo disponível","description":"Lançamentos da conta de saldo disponível do seller, do mais recente ao mais antigo, com `balance_after_minor` (saldo logo após cada lançamento). Paginado por `cursor`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"currency","in":"query","required":false,"schema":{"default":"BRL","type":"string","pattern":"^[A-Z]{3}$"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":2048,"pattern":"^s1_[0-9a-f]+$"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Extrato.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinanceStatement"},"example":{"currency":"BRL","account":"seller_available","balance_minor":"9404","data":[{"id":"pst_4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a","journal_id":"jrn_1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f","source_type":"settlement","source_id":"stl_6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b","payment_intent_id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","amount_minor":"9404","balance_after_minor":"9404","created_at":"2026-11-06T12:00:05.000Z"}],"next_cursor":null}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["finance:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/identity/kyc/documents":{"post":{"operationId":"uploadKycDocument","tags":["Seller Identity"],"summary":"Enviar um documento","description":"Corpo binário (não é JSON), uma imagem por requisição. O tipo é decidido pelo **conteúdo**: só PNG, JPEG ou WebP completos, sem animação nem bytes sobrando, até 5 MiB, de 400 a 4096 px por lado; o nome do arquivo e o `Content-Type` declarados são ignorados. O arquivo é cifrado com uma chave própria antes de ir ao armazenamento privado e **nunca** é devolvido. `kind` e `id_type` (`rg`/`cnh`, só nos documentos de identidade) vêm de listas fechadas; `company_contract` aceita até 5 páginas. Recusa → `400 KYC_UPLOAD_REJECTED`. Só pela sessão humana do app do seller (API key → `403`); o seller vem da sessão, nunca do corpo. Só o papel `OWNER` grava; `OWNER` e `ADMIN` leem; os demais papéis não veem nem o CPF mascarado. Conta `suspended` ou `closed`: só leitura (`403 FORBIDDEN`). Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`SELLER_IDENTITY_PROFILE_ENABLED`; envio e revisão de documentos também pedem `KYC_DOCUMENTS_ENABLED`) e `503 SERVICE_UNAVAILABLE` quando ela está ligada mas faltam a chave, o pepper ou o armazenamento privado.","security":[{"sellerSession":[]}],"parameters":[{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["id_front","id_back","cnpj_card","company_contract","rep_id_front","rep_id_back"]}},{"name":"id_type","in":"query","required":false,"schema":{"type":"string","enum":["rg","cnh"]}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"description":"Bytes da imagem (PNG, JPEG ou WebP; até 5 MiB; de 400 a 4096 px por lado; sem animação). A API confere o conteúdo e guarda o tipo detectado, não o declarado.","content":{"image/png":{"schema":{"type":"string","contentMediaType":"image/png"}},"image/jpeg":{"schema":{"type":"string","contentMediaType":"image/jpeg"}},"image/webp":{"schema":{"type":"string","contentMediaType":"image/webp"}}}},"responses":{"201":{"description":"Documento guardado (cifrado).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KycDocumentUploaded"},"example":{"document_id":"kdoc_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","status":"uploaded"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `KYC_UPLOAD_REJECTED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `IDENTITY_LOCKED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","IDENTITY_LOCKED","INTERNAL_ERROR","KYC_UPLOAD_REJECTED","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","VALIDATION_FAILED"]}},"/v1/identity/kyc/documents/{documentId}":{"delete":{"operationId":"deleteKycDocument","tags":["Seller Identity"],"summary":"Remover um documento enviado","description":"Só enquanto o dossiê está em rascunho ou aguardando correção e só de documento que não foi aceito. O conteúdo é destruído. Só pela sessão humana do app do seller (API key → `403`); o seller vem da sessão, nunca do corpo. Só o papel `OWNER` grava; `OWNER` e `ADMIN` leem; os demais papéis não veem nem o CPF mascarado. Conta `suspended` ou `closed`: só leitura (`403 FORBIDDEN`). Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`SELLER_IDENTITY_PROFILE_ENABLED`; envio e revisão de documentos também pedem `KYC_DOCUMENTS_ENABLED`) e `503 SERVICE_UNAVAILABLE` quando ela está ligada mas faltam a chave, o pepper ou o armazenamento privado.","security":[{"sellerSession":[]}],"parameters":[{"name":"documentId","in":"path","required":true,"description":"Id do documento (`kdoc_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Documento removido.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KycDocumentRemoved"},"example":{"document_id":"kdoc_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","removed":true}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `IDENTITY_LOCKED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","IDENTITY_LOCKED","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","VALIDATION_FAILED"]}},"/v1/identity/kyc/submit":{"post":{"operationId":"submitKyc","tags":["Seller Identity"],"summary":"Enviar o dossiê para revisão","description":"Confere que o perfil e o conjunto esperado de documentos do tipo (PF: frente e verso do documento; PJ: cartão CNPJ, contrato social e o documento do representante) estão completos, trava os campos de identidade e coloca o dossiê em análise. Incompleto → `409 KYC_INCOMPLETE`. Verificação cadastral **informativa** do ambiente de simulação: o selo diz \"Conta verificada (simulação)\" e não afirma cumprimento de obrigação regulatória. Só pela sessão humana do app do seller (API key → `403`); o seller vem da sessão, nunca do corpo. Só o papel `OWNER` grava; `OWNER` e `ADMIN` leem; os demais papéis não veem nem o CPF mascarado. Conta `suspended` ou `closed`: só leitura (`403 FORBIDDEN`). Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`SELLER_IDENTITY_PROFILE_ENABLED`; envio e revisão de documentos também pedem `KYC_DOCUMENTS_ENABLED`) e `503 SERVICE_UNAVAILABLE` quando ela está ligada mas faltam a chave, o pepper ou o armazenamento privado.","security":[{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Dossiê enviado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KycSubmissionResult"},"example":{"status":"submitted","verification_status":"pending"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `INVALID_STATE_TRANSITION`, `KYC_INCOMPLETE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","INVALID_STATE_TRANSITION","KYC_INCOMPLETE","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","VALIDATION_FAILED"]}},"/v1/identity/kyc/withdraw":{"post":{"operationId":"withdrawKyc","tags":["Seller Identity"],"summary":"Retirar o dossiê não decidido","description":"Retira o dossiê enviado e ainda não decidido. Os documentos seguem a retenção (expurgo em prazo curto). Só pela sessão humana do app do seller (API key → `403`); o seller vem da sessão, nunca do corpo. Só o papel `OWNER` grava; `OWNER` e `ADMIN` leem; os demais papéis não veem nem o CPF mascarado. Conta `suspended` ou `closed`: só leitura (`403 FORBIDDEN`). Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`SELLER_IDENTITY_PROFILE_ENABLED`; envio e revisão de documentos também pedem `KYC_DOCUMENTS_ENABLED`) e `503 SERVICE_UNAVAILABLE` quando ela está ligada mas faltam a chave, o pepper ou o armazenamento privado.","security":[{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Dossiê retirado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KycSubmissionResult"},"example":{"status":"withdrawn","verification_status":"unverified"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `INVALID_STATE_TRANSITION`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","INVALID_STATE_TRANSITION","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","VALIDATION_FAILED"]}},"/v1/identity/profile":{"get":{"operationId":"getSellerIdentity","tags":["Seller Identity"],"summary":"Consultar a identidade e a verificação","description":"Perfil mascarado, estado de verificação (\"Conta verificada\" só quando `verified`), dossiê atual e documentos vigentes. Só pela sessão humana do app do seller (API key → `403`); o seller vem da sessão, nunca do corpo. Só o papel `OWNER` grava; `OWNER` e `ADMIN` leem; os demais papéis não veem nem o CPF mascarado. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`SELLER_IDENTITY_PROFILE_ENABLED`; envio e revisão de documentos também pedem `KYC_DOCUMENTS_ENABLED`) e `503 SERVICE_UNAVAILABLE` quando ela está ligada mas faltam a chave, o pepper ou o armazenamento privado.","security":[{"sellerSession":[]}],"responses":{"200":{"description":"Estado de identidade.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerIdentity"},"example":{"documents_enabled":true,"seller_since":"2026-10-01T10:00:00.000Z","profile":{"person_type":"PF","document_type":"cpf","document_masked":"•••.•••.•••-56","holder_name":"Ana Exemplo Souza","birth_date_provided":true,"representative":null,"locked":false,"updated_at":"2026-11-12T12:00:00.000Z"},"verification":{"status":"pending","verified_at":null},"submission":{"status":"submitted","submitted_at":"2026-11-12T12:00:00.000Z","decided_at":null,"reason_code":null,"expected_documents":["id_front","id_back"]},"documents":[{"id":"kdoc_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","kind":"id_front","id_type":"rg","status":"in_review","reason_code":null,"size_bytes":183204,"uploaded_at":"2026-11-12T12:00:00.000Z"}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE"]},"put":{"operationId":"saveSellerIdentityProfile","tags":["Seller Identity"],"summary":"Gravar o perfil de identidade","description":"Grava (substituindo) os campos editáveis antes do envio do dossiê. Depois do `submit` os campos ficam travados: `409 IDENTITY_LOCKED`. Documento inválido → `400 IDENTITY_INVALID_DOCUMENT`; já em uso por outro seller → `409 IDENTITY_DUPLICATE` (genérico, sem revelar de quem). Só pela sessão humana do app do seller (API key → `403`); o seller vem da sessão, nunca do corpo. Só o papel `OWNER` grava; `OWNER` e `ADMIN` leem; os demais papéis não veem nem o CPF mascarado. Conta `suspended` ou `closed`: só leitura (`403 FORBIDDEN`). Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`SELLER_IDENTITY_PROFILE_ENABLED`; envio e revisão de documentos também pedem `KYC_DOCUMENTS_ENABLED`) e `503 SERVICE_UNAVAILABLE` quando ela está ligada mas faltam a chave, o pepper ou o armazenamento privado.","security":[{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveIdentityProfileRequest"},"example":{"person_type":"PF","document":"529.982.247-25","holder_name":"Ana Exemplo Souza","birth_date":"1990-04-21"}}}},"responses":{"200":{"description":"Perfil gravado (mascarado, sem nomes).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedIdentityProfile"},"example":{"person_type":"PF","document_type":"cpf","document_masked":"•••.•••.•••-56","birth_date_provided":true,"locked":false,"updated_at":"2026-11-12T12:00:00.000Z"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `IDENTITY_INVALID_DOCUMENT`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `IDENTITY_DUPLICATE`, `IDENTITY_LOCKED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","IDENTITY_DUPLICATE","IDENTITY_INVALID_DOCUMENT","IDENTITY_LOCKED","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","VALIDATION_FAILED"]}},"/v1/me/organizations":{"get":{"operationId":"listMyOrganizations","tags":["Organizations"],"summary":"Listar minhas organizações","description":"Organizações do usuário da sessão. Com mais de uma, envie `wolf-organization-id` nas demais rotas.","security":[{"sellerSession":[]}],"responses":{"200":{"description":"Organizações.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}}},"required":["data"]},"example":{"data":[{"id":"org_6a5b4c3d2e1f00918273645546372819","seller_id":"sel_8f7e6d5c4b3a29180716253443526170","legal_name":"Estúdio Exemplo Ltda","display_name":"Estúdio Exemplo","status":"active","role":"OWNER","capabilities":["payments:read","payments:write","refunds:write","offers:read","offers:write","organization:close","organization:settings"],"timezone":"America/Sao_Paulo"}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","INTERNAL_ERROR","RATE_LIMITED"]}},"/v1/notifications":{"get":{"operationId":"listNotifications","tags":["Reports"],"summary":"Notificações ao vivo","description":"Eventos recentes da conta para os avisos ao vivo do app: Pix emitido, pagamento aprovado ou recusado, reembolso e saque (saques só para papéis com `finance:read`). Sem `since`: os mais recentes das últimas 24 h; com `since` (o `next_cursor` anterior): os eventos depois dele, em ordem. Pensado para polling a cada 15 s. **Nunca** traz nome, e-mail ou documento do comprador: só valor, método e uma referência curta. Com as preferências de notificação ligadas no ambiente (`NOTIFICATION_PREFERENCES_ENABLED`), a sessão do app recebe só os avisos que o próprio usuário deixou ligados no canal `app` (o filtro vem **depois** da paginação: o cursor avança pela página lida, então uma página pode vir menor ou vazia). Com `include_state=1` (enviado só pelo app que lê os campos novos), a resposta ganha, de forma aditiva, `quiet_now` e `critical` por item; sem ele, e para API keys, a resposta é exatamente a de sempre.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"since","in":"query","required":false,"schema":{"type":"string","maxLength":512,"pattern":"^n1_[0-9a-f]+$"}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}},{"name":"include_state","in":"query","required":false,"schema":{"type":"string","const":"1"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Notificações (com `include_state=1`: também `quiet_now` e `critical`).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotificationPage"},{"$ref":"#/components/schemas/NotificationPageWithState"}]},"example":{"data":[{"id":"evt_7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f","kind":"pix_issued","occurred_at":"2026-11-06T12:00:00.000000Z","amount_minor":"6873","currency":"BRL","resource_id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","reference":"1B2C3D4E","payment_method":"pix","payout_origin":null},{"id":"evt_8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a","kind":"payment_approved","occurred_at":"2026-11-06T12:01:30.000000Z","amount_minor":"6873","currency":"BRL","resource_id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","reference":"1B2C3D4E","payment_method":"pix","payout_origin":null}],"next_cursor":"n1_5b22323032362d31312d30365431323a30313a33302e3030303030305a222c226576745f3864396530663161326233633464356536663761386239633064316532663361225d","has_more":false}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["payments:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/offers":{"get":{"operationId":"listOffers","tags":["Offers"],"summary":"Listar ofertas","description":"Sem parâmetros de consulta a resposta é a lista completa legada (`{data}`); com qualquer parâmetro ela é paginada por cursor (`{data, next_cursor}`). Parâmetro desconhecido → `400 VALIDATION_FAILED`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","active","archived"]}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":2048,"pattern":"^c1_[0-9a-f]+$"}},{"name":"product_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^prd_[A-Za-z0-9]+$"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Ofertas.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OfferPage"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Offer"}}},"required":["data"]}]},"example":{"data":[{"id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","name":"Oferta de lançamento","amount_minor":"9900","currency":"BRL","status":"active","created_at":"2026-11-06T12:00:00.000Z","accepted_methods":["pix","card"]}],"next_cursor":null}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]},"post":{"operationId":"createOffer","tags":["Offers"],"summary":"Criar oferta","description":"Cria uma oferta em `draft` para um produto do seller, com `name` (sem ele: \"Oferta R$ 99,00\") e `accepted_methods` (sem ele: Pix e cartão de teste), e na mesma transação o link de pagamento permanente dela (`payment_link`), que abre checkout assim que oferta e produto estiverem ativos. Com os Payment Links desligados no ambiente (kill switch `PAYMENT_LINKS_ENABLED`) a oferta nasce sem link (`payment_link: null`). Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOfferRequest"},"example":{"product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","name":"Oferta de lançamento","amount_minor":"9900","currency":"BRL"}}}},"responses":{"201":{"description":"Oferta criada (com o link permanente).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"product_id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"name":{"type":"string"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["draft","active","archived"]},"created_at":{"type":"string"},"accepted_methods":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["pix","card"]}},"price_version":{"type":"integer","minimum":1,"maximum":9007199254740991},"payment_link":{"anyOf":[{"$ref":"#/components/schemas/PaymentLink"},{"type":"null"}]}},"required":["id","product_id","name","amount_minor","currency","status","created_at","accepted_methods","price_version","payment_link"]},"example":{"id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","name":"Oferta de lançamento","amount_minor":"9900","currency":"BRL","status":"draft","created_at":"2026-11-06T12:00:00.000Z","accepted_methods":["pix","card"],"payment_link":{"id":"plk_9f8e7d6c5b4a39281706f5e4d3c2b1a0","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","status":"active","session_count":0,"completed_session_count":0,"last_session_at":null,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z"}}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read","offers:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/offers/{id}":{"get":{"operationId":"getOffer","tags":["Offers"],"summary":"Consultar oferta","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da oferta (`off_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Oferta.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Offer"},"example":{"id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","name":"Oferta de lançamento","amount_minor":"9900","currency":"BRL","status":"active","created_at":"2026-11-06T12:00:00.000Z","accepted_methods":["pix","card"]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]},"patch":{"operationId":"updateOffer","tags":["Offers"],"summary":"Renomear a oferta, mudar os métodos aceitos ou o preço","description":"`name` renomeia a oferta (2 a 80 caracteres). `accepted_methods` define os métodos que o checkout da oferta oferece: `pix`, `card` (cartão de teste) ou ambos (padrão). O checkout mostra só esses métodos e pagar com outro → `409 PAYMENT_METHOD_NOT_ACCEPTED`. Ao menos um dos campos. Repetir os valores atuais não muda nada; toda mudança é auditada (`offer.renamed`, `offer.accepted_methods_changed`, `offer.price_changed`).\n\n**Preço (SPEC-0055).** `amount_minor` (string de inteiro positivo, unidades menores, até 19 dígitos; a moeda nunca muda) exige `expected_price_version`: a `price_version` que quem edita viu (concorrência otimista). `reason` (opcional, uma linha de texto puro, até 200 caracteres) fica no histórico. O preço, a versão (`price_version + 1`), a linha do histórico e a auditoria são gravados na mesma transação; se o nome ainda é o nome padrão do preço antigo (`Oferta R$ 97,00`) ele passa a ser o do novo, e um nome escolhido pelo seller nunca muda sozinho. Preço igual ao atual é uma repetição segura: `200` sem versão nova. Versão desatualizada → `409 OFFER_PRICE_VERSION_CONFLICT` com `error.details` (`current_price_version`, `current_amount_minor`, `currency`). Variação de **50% ou mais**, para cima ou para baixo, exige `confirm_large_change: true`, senão `409 OFFER_PRICE_CHANGE_NOT_CONFIRMED` e nada muda. Oferta `archived` → `409 INVALID_STATE_TRANSITION`. Editar o preço exige o escopo `offers:write` e o recurso ligado no ambiente (`OFFER_PRICE_EDIT_ENABLED`); desligado, mudar o preço responde `404 RESOURCE_NOT_FOUND` e o `PATCH` sem preço segue igual. Tem limite de taxa próprio (`offer_price_edit`). O novo preço vale para as próximas sessões e leituras; pedidos, itens, PaymentIntents e liquidações já criados **não mudam**, e quem está com o checkout aberto confirma o novo valor antes de pagar. A resposta traz `price_version` e `previous_amount_minor` (o preço da versão anterior, `null` na versão 1).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da oferta (`off_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOfferRequest"},"example":{"amount_minor":"12700","expected_price_version":1,"reason":"Reajuste de outubro"}}}},"responses":{"200":{"description":"Oferta atualizada.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"product_id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"name":{"type":"string"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["draft","active","archived"]},"created_at":{"type":"string"},"accepted_methods":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["pix","card"]}},"price_version":{"type":"integer","minimum":1,"maximum":9007199254740991},"previous_amount_minor":{"anyOf":[{"type":"string","pattern":"^[1-9][0-9]*$"},{"type":"null"}]}},"required":["id","product_id","name","amount_minor","currency","status","created_at","accepted_methods","price_version","previous_amount_minor"]},"example":{"id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","name":"Oferta de lançamento","amount_minor":"12700","currency":"BRL","status":"active","created_at":"2026-11-06T12:00:00.000Z","accepted_methods":["pix","card"],"price_version":2,"previous_amount_minor":"9700"}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `INVALID_STATE_TRANSITION`, `OFFER_PRICE_CHANGE_NOT_CONFIRMED`, `OFFER_PRICE_VERSION_CONFLICT`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read","offers:write"],"x-wolf-rate-limits":["api_authenticated","offer_price_edit"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","INVALID_STATE_TRANSITION","OFFER_PRICE_CHANGE_NOT_CONFIRMED","OFFER_PRICE_VERSION_CONFLICT","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/offers/{id}/bumps":{"get":{"operationId":"listOfferBumps","tags":["Offers"],"summary":"Listar order bumps da oferta","description":"Order bumps da oferta principal, na ordem de `position`, com o preço atual da oferta de cada bump.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da oferta principal (`off_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Order bumps.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferBumpList"},"example":{"data":[{"id":"ob_7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","bump_offer_id":"off_5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d","headline":"Adicionar à compra: Guia bônus","description":"Checklist em PDF com 40 poses para ensaios.","position":0,"status":"active","bump_offer":{"product_id":"prd_3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f","amount_minor":"2700","currency":"BRL","status":"active"},"image_id":null,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z"}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]},"post":{"operationId":"createOfferBump","tags":["Offers"],"summary":"Criar order bump","description":"Oferece outra oferta do seller (`bump_offer_id`) como adicional no checkout desta oferta. Regras: mesma moeda; um bump `active` (padrão) exige a oferta do bump `active`; no máximo 3 bumps ativos por oferta e sem bump dentro de bump (`409 INVALID_STATE_TRANSITION`); a mesma oferta não entra duas vezes como bump (`400`). Auditado (`offer_bump.created`). Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da oferta principal (`off_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOfferBumpRequest"},"example":{"bump_offer_id":"off_5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d","headline":"Adicionar à compra: Guia bônus","description":"Checklist em PDF com 40 poses para ensaios.","position":0}}}},"responses":{"201":{"description":"Order bump criado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferBump"},"example":{"id":"ob_7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","bump_offer_id":"off_5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d","headline":"Adicionar à compra: Guia bônus","description":"Checklist em PDF com 40 poses para ensaios.","position":0,"status":"active","bump_offer":{"product_id":"prd_3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f","amount_minor":"2700","currency":"BRL","status":"active"},"image_id":null,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `INVALID_STATE_TRANSITION`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read","offers:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","INVALID_STATE_TRANSITION","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/offers/{id}/bumps/{bumpId}":{"patch":{"operationId":"updateOfferBump","tags":["Offers"],"summary":"Alterar order bump","description":"Muda `headline`, `description`, `position` e/ou `status` (`active` ↔ `inactive`; bumps nunca são apagados). Ativar respeita as mesmas regras da criação. Repetir os valores atuais não muda nada. Auditado (`offer_bump.updated`).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da oferta principal (`off_...`).","schema":{"type":"string","minLength":1}},{"name":"bumpId","in":"path","required":true,"description":"Id do order bump (`ob_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOfferBumpRequest"},"example":{"status":"inactive"}}}},"responses":{"200":{"description":"Order bump atualizado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferBump"},"example":{"id":"ob_7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","bump_offer_id":"off_5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d","headline":"Adicionar à compra: Guia bônus","description":"Checklist em PDF com 40 poses para ensaios.","position":0,"status":"inactive","bump_offer":{"product_id":"prd_3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f","amount_minor":"2700","currency":"BRL","status":"active"},"image_id":null,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `INVALID_STATE_TRANSITION`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read","offers:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","INVALID_STATE_TRANSITION","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/offers/{id}/bumps/{bumpId}/image":{"put":{"operationId":"setOfferBumpImage","tags":["Offers"],"summary":"Enviar a imagem do order bump","description":"Envie os bytes da imagem no corpo (não é JSON). A API confere o conteúdo (assinatura, estrutura e dimensões; o `Content-Type` declarado não é confiável), guarda a imagem com um nome aleatório (`img_...`) e a serve só por origens da Wolf. Uma imagem nova substitui a anterior, que é apagada. Imagem fora das regras → `400 IMAGE_NOT_ACCEPTED`; imagens indisponíveis no ambiente → `404 RESOURCE_NOT_FOUND`. Auditado.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da oferta principal (`off_...`).","schema":{"type":"string","minLength":1}},{"name":"bumpId","in":"path","required":true,"description":"Id do order bump (`ob_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"description":"Bytes da imagem (PNG, JPEG ou WebP; até 2 MiB; de 16 a 4096 px por lado; sem animação). A API confere o conteúdo e guarda o tipo detectado, não o declarado.","content":{"image/png":{"schema":{"type":"string","contentMediaType":"image/png"}},"image/jpeg":{"schema":{"type":"string","contentMediaType":"image/jpeg"}},"image/webp":{"schema":{"type":"string","contentMediaType":"image/webp"}}}},"responses":{"200":{"description":"Order bump com a imagem nova (`image_id`).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferBump"},"example":{"id":"ob_7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","bump_offer_id":"off_5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d","headline":"Adicionar à compra: Guia bônus","description":"Checklist em PDF com 40 poses para ensaios.","position":0,"status":"active","bump_offer":{"product_id":"prd_3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f","amount_minor":"2700","currency":"BRL","status":"active"},"image_id":"img_6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f","created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `IMAGE_NOT_ACCEPTED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read","offers:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IMAGE_NOT_ACCEPTED","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]},"delete":{"operationId":"deleteOfferBumpImage","tags":["Offers"],"summary":"Remover a imagem do order bump","description":"Remove a imagem do card do order bump. Auditado.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da oferta principal (`off_...`).","schema":{"type":"string","minLength":1}},{"name":"bumpId","in":"path","required":true,"description":"Id do order bump (`ob_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Order bump sem imagem.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferBump"},"example":{"id":"ob_7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","bump_offer_id":"off_5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d","headline":"Adicionar à compra: Guia bônus","description":"Checklist em PDF com 40 poses para ensaios.","position":0,"status":"active","bump_offer":{"product_id":"prd_3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f","amount_minor":"2700","currency":"BRL","status":"active"},"image_id":null,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read","offers:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/offers/{id}/price-history":{"get":{"operationId":"listOfferPriceHistory","tags":["Offers"],"summary":"Histórico de preço da oferta","description":"Cada mudança do preço da oferta, da mais recente para a mais antiga, paginada por `cursor` opaco (`next_cursor`): versão, preço anterior (`null` na versão 1, a criação) e novo, quem mudou (`actor_type`: `seller_user`, `api_credential` ou `system`, e um rótulo `actor_label`: o nome do usuário, o nome da chave de API ou \"Sistema\"; nunca e-mail nem id interno), a nota `reason` e o instante. Só do seu seller; oferta de outro seller → `404`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da oferta (`off_...`).","schema":{"type":"string","minLength":1}},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^ph1_[1-9][0-9]{0,8}$"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Histórico.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"price_version":{"type":"integer","minimum":1,"maximum":9007199254740991},"previous_amount_minor":{"anyOf":[{"type":"string","pattern":"^[1-9][0-9]*$"},{"type":"null"}]},"amount_minor":{"type":"string","pattern":"^[1-9][0-9]*$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"actor_type":{"type":"string","enum":["system","seller_user","api_credential"]},"actor_label":{"type":"string"},"reason":{"type":["string","null"]},"changed_at":{"type":"string"}},"required":["price_version","previous_amount_minor","amount_minor","currency","actor_type","actor_label","reason","changed_at"]}},"next_cursor":{"anyOf":[{"type":"string","pattern":"^ph1_[1-9][0-9]{0,8}$"},{"type":"null"}]}},"required":["data","next_cursor"]},"example":{"data":[{"price_version":2,"previous_amount_minor":"9700","amount_minor":"12700","currency":"BRL","actor_type":"seller_user","actor_label":"Maria","reason":"Reajuste de outubro","changed_at":"2026-11-12T12:00:00.000Z"},{"price_version":1,"previous_amount_minor":null,"amount_minor":"9700","currency":"BRL","actor_type":"system","actor_label":"Sistema","reason":null,"changed_at":"2026-11-01T12:00:00.000Z"}],"next_cursor":null}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/offers/{id}/price-impact":{"get":{"operationId":"getOfferPriceImpact","tags":["Offers"],"summary":"Impacto de um novo preço","description":"Somente leitura, sem efeito colateral: o que mudar o preço para `amount_minor` tocaria. `active_payment_links` (links ativos da oferta), `open_sessions_without_order` (sessões abertas e vigentes sem pedido, contadas até 99: `capped: true` é \"99+\"), `bump_of` e `upsell_of` (ofertas que usam esta como order bump ou como passo de upsell/downsell: até 20 com o nome, mais o `total`), `fee_override_scope` (`offer` ou `product` quando há política de taxa própria), `exceeds_payment_limit` (o preço proposto passa do limite por pagamento em vigor, que recusaria o pagamento; só o veredito, nunca o valor do limite; `null` sem limite para comparar) e `net_preview` (previsão do \"Você recebe\" por método aceito pela taxa efetiva; só com `finance:read`, senão `null`; sempre uma previsão, nunca valor liquidado). Só dados do seu seller; oferta de outro seller → `404`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da oferta (`off_...`).","schema":{"type":"string","minLength":1}},{"name":"amount_minor","in":"query","required":true,"schema":{"type":"string","maxLength":19,"pattern":"^[1-9][0-9]*$"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Impacto.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"offer_id":{"type":"string","maxLength":128,"pattern":"^off_[A-Za-z0-9]+$"},"current":{"type":"object","properties":{"amount_minor":{"type":"string","pattern":"^[1-9][0-9]*$"},"price_version":{"type":"integer","minimum":1,"maximum":9007199254740991},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount_minor","price_version","currency"]},"proposed_amount_minor":{"type":"string","maxLength":19,"pattern":"^[1-9][0-9]*$"},"active_payment_links":{"type":"integer","minimum":0,"maximum":9007199254740991},"open_sessions_without_order":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":99},"capped":{"type":"boolean"}},"required":["count","capped"]},"bump_of":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"items":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"offer_id":{"type":"string","maxLength":128,"pattern":"^off_[A-Za-z0-9]+$"},"name":{"type":"string"}},"required":["offer_id","name"]}}},"required":["total","items"]},"upsell_of":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"maximum":9007199254740991},"items":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"offer_id":{"type":"string","maxLength":128,"pattern":"^off_[A-Za-z0-9]+$"},"name":{"type":"string"}},"required":["offer_id","name"]}}},"required":["total","items"]},"fee_override_scope":{"anyOf":[{"type":"string","enum":["offer","product"]},{"type":"null"}]},"exceeds_payment_limit":{"type":["boolean","null"]},"net_preview":{"anyOf":[{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"by_method":{"type":"array","items":{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","pix"]},"fee_minor":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},{"type":"null"}]},"reserve_minor":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},{"type":"null"}]},"net_minor":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},{"type":"null"}]}},"required":["payment_method_type","fee_minor","reserve_minor","net_minor"]}}},"required":["currency","by_method"]},{"type":"null"}]}},"required":["offer_id","current","proposed_amount_minor","active_payment_links","open_sessions_without_order","bump_of","upsell_of","fee_override_scope","exceeds_payment_limit","net_preview"]},"example":{"offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","current":{"amount_minor":"9700","price_version":1,"currency":"BRL"},"proposed_amount_minor":"12700","active_payment_links":1,"open_sessions_without_order":{"count":2,"capped":false},"bump_of":{"total":1,"items":[{"offer_id":"off_EXEMPLO2","name":"Oferta R$ 197,00"}]},"upsell_of":{"total":0,"items":[]},"fee_override_scope":null,"exceeds_payment_limit":false,"net_preview":{"currency":"BRL","by_method":[{"payment_method_type":"pix","fee_minor":"633","reserve_minor":"0","net_minor":"12067"},{"payment_method_type":"card","fee_minor":"633","reserve_minor":"0","net_minor":"12067"}]}}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/offers/{id}/status":{"patch":{"operationId":"setOfferStatus","tags":["Offers"],"summary":"Mudar status da oferta","description":"Ativar uma oferta exige o produto `active` (`409 PRODUCT_NOT_ACTIVE`).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da oferta (`off_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogStatusRequest"},"example":{"status":"active"}}}},"responses":{"200":{"description":"Oferta atualizada.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Offer"},"example":{"id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","name":"Oferta de lançamento","amount_minor":"9900","currency":"BRL","status":"active","created_at":"2026-11-06T12:00:00.000Z","accepted_methods":["pix","card"]}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `INVALID_STATE_TRANSITION`, `PRODUCT_NOT_ACTIVE`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read","offers:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","INVALID_STATE_TRANSITION","PRODUCT_NOT_ACTIVE","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/offers/{id}/upsells":{"get":{"operationId":"listOfferUpsells","tags":["Offers"],"summary":"Listar os passos de upsell da oferta","description":"Passos do funil pós-compra da oferta, na ordem de `position`, com o alvo (nome, preço atual) e se ele ainda cumpre as regras (`eligible`, `ineligible_reason`).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da oferta do checkout (`off_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Passos.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferUpsellList"},"example":{"data":[{"id":"ups_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","step_offer_id":"off_5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d","kind":"upsell","position":1,"headline":"Oferta única: Guia bônus de poses","description":"Aproveite agora: o guia completo por um preço especial.","accepted_url":null,"declined_url":null,"status":"active","target":{"product_id":"prd_3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f","product_name":"Guia bônus de poses","amount_minor":"2700","currency":"BRL","status":"active"},"eligible":true,"ineligible_reason":null,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z"}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]},"post":{"operationId":"createOfferUpsell","tags":["Offers"],"summary":"Criar passo de upsell ou downsell","description":"Oferece outra oferta do seller (`step_offer_id`) depois do pagamento aprovado desta oferta, como um novo Pix. Regras (também impostas no banco): oferta-alvo ativa do mesmo seller, na mesma moeda, que aceita Pix, de produto ativo com entrega pronta, diferente desta oferta e sem repetir; no máximo 2 passos ativos; `downsell` só logo depois de um `upsell`. Qualquer regra de alvo violada → `409 UPSELL_NOT_AVAILABLE`; URL fora de CTV-008 (https público, sem credenciais) → `400 VALIDATION_FAILED`. As URLs `accepted_url` e `declined_url` são opcionais, aparecem ao comprador como botão e nunca recebem parâmetros. Auditado (`offer_upsell.created`).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da oferta do checkout (`off_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOfferUpsellRequest"},"example":{"step_offer_id":"off_5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d","kind":"upsell","headline":"Oferta única: Guia bônus de poses","description":"Aproveite agora: o guia completo por um preço especial.","position":1}}}},"responses":{"201":{"description":"Passo criado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferUpsell"},"example":{"id":"ups_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","step_offer_id":"off_5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d","kind":"upsell","position":1,"headline":"Oferta única: Guia bônus de poses","description":"Aproveite agora: o guia completo por um preço especial.","accepted_url":null,"declined_url":null,"status":"active","target":{"product_id":"prd_3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f","product_name":"Guia bônus de poses","amount_minor":"2700","currency":"BRL","status":"active"},"eligible":true,"ineligible_reason":null,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `TENANT_SELECTION_REQUIRED`, `UPSELL_NOT_AVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read","offers:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","UPSELL_NOT_AVAILABLE","VALIDATION_FAILED"]}},"/v1/offers/{id}/upsells/stats":{"get":{"operationId":"getOfferUpsellStats","tags":["Offers"],"summary":"Consultar o take dos passos de upsell","description":"Por passo: apresentadas, aceitas, recusadas, vencidas e pagas (pedidos filhos `paid`), e o `take_bps` (`floor(pagas × 10000 ÷ apresentadas)`, `null` sem apresentações). O período (`from`/`to`, `YYYY-MM-DD`, inclusivos) é no fuso da organização; sem ele, todo o histórico.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da oferta do checkout (`off_...`).","schema":{"type":"string","minLength":1}},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Contagens e take.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferUpsellStats"},"example":{"data":[{"step_id":"ups_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","kind":"upsell","presented":20,"accepted":6,"declined":10,"expired":4,"paid":5,"take_bps":2500}],"take_bps":2500}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/offers/{id}/upsells/{upsellId}":{"patch":{"operationId":"updateOfferUpsell","tags":["Offers"],"summary":"Alterar passo de upsell","description":"Muda `headline`, `description`, `accepted_url`, `declined_url` (`null` limpa), `position` e/ou `status` (`active` ↔ `inactive`; passos nunca são apagados). Ativar reavalia o alvo e o funil como na criação. Repetir os valores atuais não muda nada. Auditado (`offer_upsell.updated`, antes e depois).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da oferta do checkout (`off_...`).","schema":{"type":"string","minLength":1}},{"name":"upsellId","in":"path","required":true,"description":"Id do passo (`ups_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOfferUpsellRequest"},"example":{"status":"inactive"}}}},"responses":{"200":{"description":"Passo atualizado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferUpsell"},"example":{"id":"ups_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","step_offer_id":"off_5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d","kind":"upsell","position":1,"headline":"Oferta única: Guia bônus de poses","description":"Aproveite agora: o guia completo por um preço especial.","accepted_url":null,"declined_url":null,"status":"inactive","target":{"product_id":"prd_3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f","product_name":"Guia bônus de poses","amount_minor":"2700","currency":"BRL","status":"active"},"eligible":true,"ineligible_reason":null,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`, `UPSELL_NOT_AVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read","offers:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","UPSELL_NOT_AVAILABLE","VALIDATION_FAILED"]}},"/v1/orders":{"get":{"operationId":"listOrders","tags":["Orders"],"summary":"Listar pedidos","description":"Sem parâmetros de consulta a resposta é a lista completa legada (`{data}`); com qualquer parâmetro ela é paginada por cursor (`{data, next_cursor}`). Parâmetro desconhecido → `400 VALIDATION_FAILED`. A página traz produto, método, comprador mascarado (`a***@gmail.com`, `Ana S.`), `display_status` (vocabulário do painel) e `counts` por status de exibição para os mesmos filtros, sem o `status`. `q` busca por id do pedido/pagamento, e-mail completo do comprador ou parte do nome (3+ caracteres); `from`/`to` são datas locais (inclusivas) no fuso da organização; `status` usa o vocabulário de exibição e ainda aceita `pending_payment` (status canônico do pedido). Cada pedido traz `attribution` (origem da primeira abertura do checkout e `device`, a classe do aparelho do comprador em conjuntos fechados que podem crescer: trate um valor desconhecido como `unknown`); um `attribution` não nulo **não** significa que o link tinha UTM, pois um link sem parâmetros de campanha registra só o aparelho.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","enum":["pending","processing","paid","declined","refunded","partially_refunded","canceled","expired","disputed","chargeback","failed"]},{"type":"string","const":"pending_payment"}]}},{"name":"min_amount","in":"query","required":false,"schema":{"type":"string","pattern":"^[1-9][0-9]*$"}},{"name":"product_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^prd_[A-Za-z0-9]+$"}},{"name":"offer_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^off_[A-Za-z0-9]+$"}},{"name":"method","in":"query","required":false,"schema":{"type":"string","enum":["card","pix"]}},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":2048,"pattern":"^o1_[0-9a-f]+$"}},{"name":"utm_source","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":150}},{"name":"utm_campaign","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":150}},{"name":"origin","in":"query","required":false,"schema":{"type":"string","enum":["front","upsell","downsell"]}},{"name":"parent_order_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^ord_[A-Za-z0-9]+$"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Pedidos.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SellerOrderPage"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}},"required":["data"]}]},"example":{"data":[{"id":"ord_0f1e2d3c4b5a69788796a5b4c3d2e1f0","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","checkout_session_id":null,"amount_minor":"9900","currency":"BRL","status":"paid","paid_payment_intent_id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","paid_charge_id":"chg_8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d","created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:05.000Z","paid_at":"2026-11-06T12:00:05.000Z","canceled_at":null,"expired_at":null,"items":[{"id":"oi_1f2e3d4c5b6a79808f7e6d5c4b3a2918","kind":"main","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","offer_bump_id":null,"amount_minor":"9900","currency":"BRL","position":0,"product_name":"Curso de fotografia"}],"product_name":"Curso de fotografia","offer_name":"Oferta de lançamento","payment_intent_id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","payment_method":"pix","buyer":{"name":"Ana C.","email":"a***@example.com","phone":"+55 11 9****-4321"},"display_status":"paid","refunded_minor":"0","attribution":{"entry":"payment_link","captured_at":"2026-11-06T11:59:40.000Z","utm_source":"instagram","utm_medium":"stories","utm_campaign":"black-friday","utm_term":null,"utm_content":"video-1","src":null,"sck":null,"fbclid":"IwAR0exemplo","gclid":null,"ttclid":null,"device":{"class":"mobile","os":"android","browser":"chrome"}}}],"next_cursor":null,"counts":{"all":1,"pending":0,"processing":0,"paid":1,"declined":0,"refunded":0,"partially_refunded":0,"canceled":0,"expired":0,"disputed":0,"chargeback":0,"failed":0}}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["orders:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]},"post":{"operationId":"createOrder","tags":["Orders"],"summary":"Criar pedido","description":"Cria um pedido `pending_payment` de uma oferta `active`. `bump_ids` (opcional, até 3) acrescenta order bumps **ativos desta oferta**: o servidor valida e precifica cada um, e o `amount_minor` do pedido é a soma dos `items`. Bump de outra oferta, inativo, repetido ou desconhecido → `409 BUMP_NOT_AVAILABLE`, sem criar nada. Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve o mesmo resultado, sem nova cobrança; corpo diferente → `409 IDEMPOTENCY_CONFLICT`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderRequest"},"example":{"offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","bump_ids":["ob_7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a"]}}}},"responses":{"201":{"description":"Pedido criado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"},"example":{"id":"ord_0f1e2d3c4b5a69788796a5b4c3d2e1f0","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","checkout_session_id":null,"amount_minor":"12600","currency":"BRL","status":"pending_payment","paid_payment_intent_id":null,"paid_charge_id":null,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z","paid_at":null,"canceled_at":null,"expired_at":null,"items":[{"id":"oi_1f2e3d4c5b6a79808f7e6d5c4b3a2918","kind":"main","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","offer_bump_id":null,"amount_minor":"9900","currency":"BRL","position":0},{"id":"oi_2a3b4c5d6e7f8091a2b3c4d5e6f70819","kind":"bump","offer_id":"off_5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d","product_id":"prd_3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f","offer_bump_id":"ob_7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a","amount_minor":"2700","currency":"BRL","position":1}]}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `BUMP_NOT_AVAILABLE`, `IDEMPOTENCY_CONFLICT`, `INVALID_STATE_TRANSITION`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["orders:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","BUMP_NOT_AVAILABLE","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","INVALID_STATE_TRANSITION","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/orders/{id}":{"get":{"operationId":"getOrder","tags":["Orders"],"summary":"Consultar pedido","description":"O pedido com a visão da listagem e o comprador completo em `buyer_details` (lido do pagamento do pedido; o documento só como tipo e dois últimos dígitos), a origem da venda (`attribution`: UTMs, ids de clique e `src`/`sck`, mais `device`, a classe do aparelho do comprador em conjuntos fechados que podem crescer, então trate um valor desconhecido como `unknown`; um `attribution` não nulo **não** significa que o link tinha UTM, porque um link sem parâmetros registra só o aparelho e os campos de campanha vêm nulos) e a taxa e o líquido (`settlement`: da linha de liquidação depois da liquidação; antes, previsão pela política de taxa congelada no pagamento, marcada `forecast`).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do pedido (`ord_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Pedido.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerOrderDetail"},"example":{"id":"ord_0f1e2d3c4b5a69788796a5b4c3d2e1f0","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","checkout_session_id":null,"amount_minor":"9900","currency":"BRL","status":"paid","paid_payment_intent_id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","paid_charge_id":"chg_8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d","created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:05.000Z","paid_at":"2026-11-06T12:00:05.000Z","canceled_at":null,"expired_at":null,"items":[{"id":"oi_1f2e3d4c5b6a79808f7e6d5c4b3a2918","kind":"main","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","offer_bump_id":null,"amount_minor":"9900","currency":"BRL","position":0,"product_name":"Curso de fotografia"}],"product_name":"Curso de fotografia","offer_name":"Oferta de lançamento","payment_intent_id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","payment_method":"pix","buyer":{"name":"Ana C.","email":"a***@example.com","phone":"+55 11 9****-4321"},"display_status":"paid","refunded_minor":"0","attribution":{"entry":"payment_link","captured_at":"2026-11-06T11:59:40.000Z","utm_source":"instagram","utm_medium":"stories","utm_campaign":"black-friday","utm_term":null,"utm_content":"video-1","src":null,"sck":null,"fbclid":"IwAR0exemplo","gclid":null,"ttclid":null,"device":{"class":"mobile","os":"android","browser":"chrome"}},"buyer_details":{"name":"Ana Compradora","email":"ana@example.com","phone":"+5511987654321","document":{"type":"cpf","last2":"25"}},"settlement":{"status":"forecast","currency":"BRL","gross_minor":"9900","fee_minor":"494","reserve_minor":"0","net_minor":"9406","fee_basis_points":499,"reserve_basis_points":0,"release_on":"2026-11-07","settled_at":null,"origin":null,"hold_reason":null}}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["orders:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TENANT_SELECTION_REQUIRED"]}},"/v1/orders/{id}/cancel":{"post":{"operationId":"cancelOrder","tags":["Orders"],"summary":"Cancelar pedido","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do pedido (`ord_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Pedido cancelado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `INVALID_STATE_TRANSITION`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["orders:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","INVALID_STATE_TRANSITION","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/orders/{id}/conversions":{"get":{"operationId":"listOrderConversions","tags":["Orders"],"summary":"Eventos de conversão da venda","description":"Entregas de eventos de conversão desta venda: o Purchase do pedido e o InitiateCheckout e o Lead da sessão de checkout dele. Pedido de outro seller → `404`. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`CONVERSION_EVENTS_ENABLED`).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do pedido (`ord_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Entregas da venda.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionDeliveryList"},"example":{"data":[{"id":"cvd_8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a","connection_id":"cvc_6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e","platform":"meta","event":"purchase","platform_event_name":"Purchase","event_id":"ord_0f1e2d3c4b5a69788796a5b4c3d2e1f0","event_time":"2026-11-06T12:00:00.000Z","checkout_session_id":"cs_2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f","order_id":"ord_0f1e2d3c4b5a69788796a5b4c3d2e1f0","uses_test_code":false,"status":"succeeded","attempts":1,"next_attempt_at":null,"last_response_status":200,"last_error":null,"latency_ms":184,"delivered_at":"2026-11-06T12:00:41.000Z","created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:41.000Z"}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["orders:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/orders/{id}/expire":{"post":{"operationId":"expireOrder","tags":["Orders"],"summary":"Expirar pedido","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do pedido (`ord_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Pedido expirado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `INVALID_STATE_TRANSITION`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["orders:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","INVALID_STATE_TRANSITION","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/orders/{id}/messages":{"get":{"operationId":"listOrderMessages","tags":["Orders"],"summary":"Histórico de mensagens da venda","description":"Até 100 mensagens ao comprador desta venda, as mais recentes primeiro (tipo, canal, modo, estado, destinatário mascarado e instantes). Outro seller → `404`. A leitura funciona em qualquer modo. O ambiente decide o modo (`BUYER_MESSAGES_MODE`): `off` desliga os envios (`503 BUYER_MESSAGES_DISABLED`; o histórico continua legível) e `simulate` registra a mensagem sem enviar nada a ninguém — a linha mostra `mode: simulated` e o estado `simulated`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do pedido (`ord_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Mensagens.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuyerMessageList"},"example":{"data":[{"id":"msg_2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e","kind":"access_resend","channel":"email","mode":"simulated","status":"queued","recipient_masked":"a***@example.com","created_at":"2026-11-06T12:00:00.000Z","sent_at":null,"terminal_at":null,"error_code":null,"resend_of_id":"msg_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","attempt_no":null},{"id":"msg_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","kind":"order_confirmation","channel":"email","mode":"simulated","status":"simulated","recipient_masked":"a***@example.com","created_at":"2026-11-06T12:00:00.000Z","sent_at":null,"terminal_at":"2026-11-06T12:01:00.000Z","error_code":null,"resend_of_id":null,"attempt_no":null}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["orders:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]},"post":{"operationId":"createOrderMessage","tags":["Orders"],"summary":"Reenviar acesso, Pix ou link Pix ao comprador","description":"Reserva uma nova mensagem manual ao comprador da venda: `access_resend` (venda paga, sem reembolso total nem disputa perdida), `pix_resend` (Pix pendente e não expirado; o mesmo código, nunca regenerado) ou `pix_link` (venda não paga). Com `resend_of` o tipo vem da mensagem original (uma confirmação vira `access_resend`; um aviso de reembolso não é reenviado). O destinatário é o pagador da venda, **derivado no servidor** — o corpo nunca aceita endereço. Tetos aplicados no banco: 3 do mesmo tipo e 10 no total por pedido em 24 h, 60 s entre duas do mesmo tipo e 100 por seller por hora (`429 MESSAGE_RESEND_LIMIT_REACHED` com `Retry-After`). Auditado. Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`. O ambiente decide o modo (`BUYER_MESSAGES_MODE`): `off` desliga os envios (`503 BUYER_MESSAGES_DISABLED`; o histórico continua legível) e `simulate` registra a mensagem sem enviar nada a ninguém — a linha mostra `mode: simulated` e o estado `simulated`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do pedido (`ord_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderMessageRequest"},"example":{"resend_of":"msg_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d"}}}},"responses":{"202":{"description":"Mensagem reservada (na fila; o despacho a decide em até um minuto).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuyerMessage"},"example":{"id":"msg_2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e","kind":"access_resend","channel":"email","mode":"simulated","status":"queued","recipient_masked":"a***@example.com","created_at":"2026-11-06T12:00:00.000Z","sent_at":null,"terminal_at":null,"error_code":null,"resend_of_id":"msg_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","attempt_no":null}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `MESSAGE_NOT_ALLOWED_FOR_STATE`, `MESSAGE_RECIPIENT_SUPPRESSED`, `MESSAGE_RECIPIENT_UNAVAILABLE`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `MESSAGE_RESEND_LIMIT_REACHED`, `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `BUYER_MESSAGES_DISABLED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["orders:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","BUYER_MESSAGES_DISABLED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","MESSAGE_NOT_ALLOWED_FOR_STATE","MESSAGE_RECIPIENT_SUPPRESSED","MESSAGE_RECIPIENT_UNAVAILABLE","MESSAGE_RESEND_LIMIT_REACHED","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/orders/{id}/notifications":{"get":{"operationId":"listOrderNotifications","tags":["Orders"],"summary":"Notificações da venda","description":"Entregas de webhook dos eventos desta venda (o pedido, os pagamentos, reembolsos e disputas dele e a sessão de checkout), uma linha por evento e endpoint com a situação da última tentativa, o número de tentativas e o último status HTTP. Do evento mais recente ao mais antigo, no máximo 50 (`truncated`). Mostra só o host do endpoint. Pedido de outro seller → `404`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do pedido (`ord_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Notificações.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleNotificationList"},"example":{"order_id":"ord_0f1e2d3c4b5a69788796a5b4c3d2e1f0","truncated":false,"data":[{"event_id":"evt_4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a","event_type":"payment.succeeded","event_created_at":"2026-11-06T12:00:00.000Z","endpoint_id":"whe_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","endpoint_host":"hooks.example.com","status":"succeeded","attempts":1,"last_response_status":200,"latency_ms":184,"last_attempt_at":"2026-11-06T12:00:05.000Z"}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["orders:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/orders/{id}/payment-intents":{"post":{"operationId":"createOrderPaymentIntent","tags":["Orders"],"summary":"Criar PaymentIntent do pedido","description":"Cria um PaymentIntent com o valor e a moeda do pedido, ligado a ele (`order_id`). Um pedido tem no máximo um PaymentIntent vivo.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do pedido (`ord_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"201":{"description":"PaymentIntent criado para o pedido.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntent"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `INVALID_STATE_TRANSITION`, `PAYMENT_LIMIT_EXCEEDED`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["payments:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated","payment_intent_create"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","INVALID_STATE_TRANSITION","PAYMENT_LIMIT_EXCEEDED","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/orders/{id}/receipt":{"get":{"operationId":"getOrderReceipt","tags":["Orders"],"summary":"Comprovante da venda (simulado)","description":"Recibo canônico da venda em JSON: pedido, itens, valor, método, estado, datas, pagador (nome e o documento só como tipo + 2 últimos dígitos) e o total reembolsado. Sempre `simulated: true`, com o aviso de que **não é documento fiscal**. Sem `orders:read` não há comprovante; outro seller → `404`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do pedido (`ord_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Comprovante.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderReceipt"},"example":{"simulated":true,"notice":"Comprovante de uma venda SIMULADA do ambiente de testes da Wolf. Não é documento fiscal e não representa dinheiro de verdade.","generated_at":"2026-11-06T12:00:00.000Z","order":{"id":"ord_0f1e2d3c4b5a69788796a5b4c3d2e1f0","status":"paid","created_at":"2026-11-06T12:00:00.000Z","paid_at":"2026-11-06T12:00:00.000Z","product_name":"Curso de fotografia","amount_minor":"9900","currency":"BRL","payment_method":"pix","payment_intent_id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e"},"items":[{"kind":"main","product_name":"Curso de fotografia","amount_minor":"9900","currency":"BRL","position":1}],"payer":{"name":"Ana Compradora","document":{"type":"cpf","last2":"25"}},"refunded_minor":"0"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["orders:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TENANT_SELECTION_REQUIRED"]}},"/v1/organization/closure-request":{"get":{"operationId":"getOrganizationClosureRequest","tags":["Organizations"],"summary":"Consultar pedido de encerramento","description":"Pedido de encerramento da organização atual, ou `data: null` se não houver.","security":[{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Pedido atual (ou `null`).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"$ref":"#/components/schemas/OrganizationClosureRequest"},{"type":"null"}]}},"required":["data"]},"example":{"data":{"id":"ocr_2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a","organization_id":"org_6a5b4c3d2e1f00918273645546372819","reason":"Encerrando a operação de testes.","requested_at":"2026-11-06T12:00:00.000Z"}}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED"]},"post":{"operationId":"requestOrganizationClosure","tags":["Organizations"],"summary":"Pedir o encerramento da organização","description":"Só o OWNER, pela sessão do app. Registra o pedido para a operação da Wolf (nada é apagado; o ledger fica intacto). Repetir devolve o pedido existente com `200`. Com `SELLER_ACCOUNT_SECURITY_ENABLED` ligada (SPEC-0052) a sessão humana precisa de reautenticação recente: com 2FA ativo só o TOTP serve (a senha não), sem 2FA senha ou TOTP; senão `403 STEP_UP_REQUIRED`.","security":[{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationClosureRequest"},"example":{"reason":"Encerrando a operação de testes."}}}},"responses":{"200":{"description":"Já existia um pedido; ele é devolvido sem mudança.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationClosureRequest"},"example":{"id":"ocr_2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a","organization_id":"org_6a5b4c3d2e1f00918273645546372819","reason":"Encerrando a operação de testes.","requested_at":"2026-11-06T12:00:00.000Z"}}}},"201":{"description":"Pedido registrado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationClosureRequest"},"example":{"id":"ocr_2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a","organization_id":"org_6a5b4c3d2e1f00918273645546372819","reason":"Encerrando a operação de testes.","requested_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`, `STEP_UP_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","SERVICE_UNAVAILABLE","STEP_UP_REQUIRED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/organizations":{"post":{"operationId":"createOrganization","tags":["Organizations"],"summary":"Criar organização","description":"Cria a organização do usuário da sessão. `display_name` é o nome público do checkout (2 a 80 caracteres; padrão: `legal_name`). Na edição de simulação, com a aprovação automática ligada, a organização já nasce ativa.","security":[{"sellerSession":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationRequest"},"example":{"legal_name":"Estúdio Exemplo Ltda","display_name":"Estúdio Exemplo"}}}},"responses":{"201":{"description":"Organização criada.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"},"example":{"id":"org_6a5b4c3d2e1f00918273645546372819","seller_id":"sel_8f7e6d5c4b3a29180716253443526170","legal_name":"Estúdio Exemplo Ltda","display_name":"Estúdio Exemplo","status":"review","role":"OWNER","capabilities":["payments:read","payments:write","refunds:write","offers:read","offers:write","organization:close","organization:settings"],"timezone":"America/Sao_Paulo"}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","INTERNAL_ERROR","RATE_LIMITED","VALIDATION_FAILED"]}},"/v1/organizations/current":{"patch":{"operationId":"updateCurrentOrganization","tags":["Organizations"],"summary":"Atualizar a organização atual","description":"Muda o fuso da organização (`timezone`), usado por todos os períodos do painel (\"hoje\" começa à meia-noite local). Só OWNER ou ADMIN, pela sessão do app. Auditado como `organization.timezone_changed` quando o valor muda; repetir o mesmo valor não muda nada. Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`.","security":[{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCurrentOrganizationRequest"},"example":{"timezone":"America/Manaus"}}}},"responses":{"200":{"description":"Organização atualizada.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"},"example":{"id":"org_6a5b4c3d2e1f00918273645546372819","seller_id":"sel_8f7e6d5c4b3a29180716253443526170","legal_name":"Estúdio Exemplo Ltda","display_name":"Estúdio Exemplo","status":"active","role":"OWNER","capabilities":["payments:read","payments:write","refunds:write","offers:read","offers:write","organization:close","organization:settings"],"timezone":"America/Manaus"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/payment-intents":{"post":{"operationId":"createPaymentIntent","tags":["PaymentIntents"],"summary":"Criar PaymentIntent","description":"Cria um PaymentIntent em `requires_payment_method`. `payment_method_types` define os métodos aceitos (padrão `[\"card\"]`); `payer` é opcional aqui e obrigatório no checkout hospedado. `pix` em `payment_method_types` com o Pix desligado no ambiente (kill switch `PIX_SIMULATION_ENABLED`) → `409 PAYMENT_METHOD_UNAVAILABLE`. Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve o mesmo resultado, sem nova cobrança; corpo diferente → `409 IDEMPOTENCY_CONFLICT`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentIntentRequest"},"example":{"amount_minor":"9900","currency":"BRL","payment_method_types":["pix","card"],"payer":{"name":"Ana Compradora","email":"ana@example.com","phone":"(11) 98765-4321","document":{"type":"cpf","number":"529.982.247-25"}},"description":"Curso de fotografia","metadata":{"pedido_interno":"A-1001"}}}}},"responses":{"201":{"description":"PaymentIntent criado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntent"},"example":{"id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","order_id":null,"amount_minor":"9900","currency":"BRL","provider_id":"simulator","failure_code":null,"payment_method_types":["pix","card"],"description":"Curso de fotografia","metadata":{"pedido_interno":"A-1001"},"payer":{"name":"Ana Compradora","email":"ana@example.com","phone":"+5511987654321","document":{"type":"cpf","last2":"25"}},"cancellation_reason":null,"status":"requires_payment_method","latest_provider_attempt_id":null,"payment_method_type":null,"next_action":null,"expires_at":null}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `PAYMENT_LIMIT_EXCEEDED`, `PAYMENT_METHOD_UNAVAILABLE`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["payments:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated","payment_intent_create"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","PAYMENT_LIMIT_EXCEEDED","PAYMENT_METHOD_UNAVAILABLE","RATE_LIMITED","SERVICE_UNAVAILABLE","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/payment-intents/{id}":{"get":{"operationId":"getPaymentIntent","tags":["PaymentIntents"],"summary":"Consultar PaymentIntent","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do PaymentIntent (`pi_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"PaymentIntent.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntent"},"example":{"id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","order_id":null,"amount_minor":"9900","currency":"BRL","provider_id":"simulator","failure_code":null,"payment_method_types":["pix","card"],"description":"Curso de fotografia","metadata":{"pedido_interno":"A-1001"},"payer":{"name":"Ana Compradora","email":"ana@example.com","phone":"+5511987654321","document":{"type":"cpf","last2":"25"}},"cancellation_reason":null,"status":"succeeded","latest_provider_attempt_id":"pat_5d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a","payment_method_type":"pix","next_action":null,"expires_at":"2026-11-06T12:30:00.000Z"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["payments:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/payment-intents/{id}/activity":{"get":{"operationId":"getPaymentIntentActivity","tags":["PaymentIntents"],"summary":"Linha do tempo do PaymentIntent","description":"Tentativas no provedor simulado, reembolsos e disputas do PaymentIntent (listas limitadas; `truncated` indica corte).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do PaymentIntent (`pi_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Linha do tempo.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentActivity"},"example":{"payment_intent":{"id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","order_id":null,"amount_minor":"9900","currency":"BRL","provider_id":"simulator","failure_code":null,"payment_method_types":["pix","card"],"description":"Curso de fotografia","metadata":{"pedido_interno":"A-1001"},"payer":{"name":"Ana Compradora","email":"ana@example.com","phone":"+5511987654321","document":{"type":"cpf","last2":"25"}},"cancellation_reason":null,"status":"succeeded","latest_provider_attempt_id":"pat_5d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a","payment_method_type":"pix","next_action":null,"expires_at":"2026-11-06T12:30:00.000Z","created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:05.000Z"},"attempts":[{"id":"pat_5d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a","state":"succeeded","provider_id":"simulator","external_id":"sim_pix_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","canonical_error_code":null,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:05.000Z"}],"refunds":[{"id":"rfd_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","payment_intent_id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","charge_id":"chg_8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d","amount_minor":"4900","currency":"BRL","status":"succeeded","provider_id":"simulator","external_id":"sim_ref_4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c","failure_code":null,"created_at":"2026-11-06T12:00:05.000Z","updated_at":"2026-11-06T12:00:05.000Z"}],"disputes":[],"truncated":{"attempts":false,"refunds":false,"disputes":false}}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["payments:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/payment-intents/{id}/confirm":{"post":{"operationId":"confirmPaymentIntent","tags":["PaymentIntents"],"summary":"Confirmar PaymentIntent","description":"Confirma com `{\"type\":\"pix\"}` (responde `202` com `status: \"processing\"` e `next_action.pix_qr` sintético) ou com um cartão de teste (`{\"type\":\"card\",\"test_card\":\"approved\"}`). O método precisa estar em `payment_method_types`. Cartão `unavailable_then_*` gera estado desconhecido no provedor: a resposta é `202 processing` e a reconciliação resolve depois. Recusa → `402 PAYMENT_DECLINED`. Com o Pix desligado no ambiente (kill switch `PIX_SIMULATION_ENABLED`) → `409 PAYMENT_METHOD_UNAVAILABLE`; cartão de teste não é afetado.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do PaymentIntent (`pi_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmPaymentIntentRequest"},"example":{"payment_method":{"type":"pix"}}}}},"responses":{"200":{"description":"Pagamento concluído (cartão de teste aprovado).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntent"},"example":{"id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","order_id":null,"amount_minor":"9900","currency":"BRL","provider_id":"simulator","failure_code":null,"payment_method_types":["pix","card"],"description":"Curso de fotografia","metadata":{"pedido_interno":"A-1001"},"payer":{"name":"Ana Compradora","email":"ana@example.com","phone":"+5511987654321","document":{"type":"cpf","last2":"25"}},"cancellation_reason":null,"status":"succeeded","latest_provider_attempt_id":"pat_5d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a","payment_method_type":"card","next_action":null,"expires_at":null}}}},"202":{"description":"Pagamento em processamento: Pix aguardando pagamento (com `next_action`) ou cartão em reconciliação.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntent"},"example":{"id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","order_id":null,"amount_minor":"9900","currency":"BRL","provider_id":"simulator","failure_code":null,"payment_method_types":["pix","card"],"description":"Curso de fotografia","metadata":{"pedido_interno":"A-1001"},"payer":{"name":"Ana Compradora","email":"ana@example.com","phone":"+5511987654321","document":{"type":"cpf","last2":"25"}},"cancellation_reason":null,"status":"processing","latest_provider_attempt_id":"pat_5d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a","payment_method_type":"pix","next_action":{"type":"pix_qr","qr_code_payload":"00020101021226780014br.gov.bcb.pix0120SIMULADO-NAO-PAGAVEL0232SIMULADO - NENHUMA COBRANCA REAL520400005303986540599.005802BR5921WOLF SANDBOX SIMULADO6009SAO PAULO62290525SIMULADO3b9f0c2d1e4a5b6c76304726B","expires_at":"2026-11-06T12:30:00.000Z"},"expires_at":"2026-11-06T12:30:00.000Z"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Erro: `PAYMENT_DECLINED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `INVALID_STATE_TRANSITION`, `PAYMENT_LIMIT_EXCEEDED`, `PAYMENT_METHOD_UNAVAILABLE`, `PROVIDER_STATE_UNKNOWN`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["payments:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","INVALID_STATE_TRANSITION","PAYMENT_DECLINED","PAYMENT_LIMIT_EXCEEDED","PAYMENT_METHOD_UNAVAILABLE","PROVIDER_STATE_UNKNOWN","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/payment-intents/{id}/refunds":{"post":{"operationId":"createRefund","tags":["Refunds"],"summary":"Reembolsar PaymentIntent","description":"Cria um reembolso total ou parcial (`amount_minor`) de um PaymentIntent `succeeded`. A soma dos reembolsos nunca excede o capturado. `202` indica resultado desconhecido no provedor, resolvido por reconciliação. Pela sessão do app do seller exige reautenticação recente (até 10 minutos; senão `403 STEP_UP_REQUIRED`); API keys são autorizadas só pelo escopo `refunds:write`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do PaymentIntent (`pi_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRefundRequest"},"example":{"amount_minor":"4900"}}}},"responses":{"200":{"description":"Reembolso concluído.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"},"example":{"id":"rfd_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","payment_intent_id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","charge_id":"chg_8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d","amount_minor":"4900","currency":"BRL","status":"succeeded","provider_id":"simulator","external_id":"sim_ref_4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c","failure_code":null}}}},"202":{"description":"Reembolso com resultado desconhecido no provedor (em reconciliação).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`, `STEP_UP_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `INVALID_STATE_TRANSITION`, `REFUND_EXCEEDS_CAPTURED`, `REFUND_FAILED`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["payments:read","refunds:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","INVALID_STATE_TRANSITION","RATE_LIMITED","REFUND_EXCEEDS_CAPTURED","REFUND_FAILED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","STEP_UP_REQUIRED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/payment-links":{"get":{"operationId":"listPaymentLinks","tags":["Payment Links"],"summary":"Listar Payment Links","description":"Com os Payment Links desligados no ambiente (kill switch `PAYMENT_LINKS_ENABLED`) toda rota `/v1/payment-links*` responde `404 RESOURCE_NOT_FOUND`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"offer_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^off_[A-Za-z0-9]+$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["active","inactive"]}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Payment Links, mais recentes primeiro.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLinkList"},"example":{"data":[{"id":"plk_9f8e7d6c5b4a39281706f5e4d3c2b1a0","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","status":"active","session_count":12,"completed_session_count":7,"last_session_at":"2026-11-06T12:00:05.000Z","created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z"}]}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]},"post":{"operationId":"createPaymentLink","tags":["Payment Links"],"summary":"Criar Payment Link","description":"Cria um link `active` para uma oferta `draft` ou `active` do seller (oferta arquivada → `400`); o link só abre checkout enquanto a oferta estiver `active`. Toda oferta nova já nasce com o link permanente dela (`POST /v1/offers`); esta rota cria links adicionais. A URL pública é `https://checkout.<domínio>/l/{id}`. Com os Payment Links desligados no ambiente (kill switch `PAYMENT_LINKS_ENABLED`) → `404 RESOURCE_NOT_FOUND`. Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentLinkRequest"},"example":{"offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901"}}}},"responses":{"201":{"description":"Payment Link criado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"},"example":{"id":"plk_9f8e7d6c5b4a39281706f5e4d3c2b1a0","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","status":"active","session_count":0,"completed_session_count":0,"last_session_at":null,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read","offers:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/payment-links/{id}":{"get":{"operationId":"getPaymentLink","tags":["Payment Links"],"summary":"Consultar Payment Link","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do Payment Link (`plk_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Payment Link.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"},"example":{"id":"plk_9f8e7d6c5b4a39281706f5e4d3c2b1a0","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","status":"active","session_count":12,"completed_session_count":7,"last_session_at":"2026-11-06T12:00:05.000Z","created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/payment-links/{id}/status":{"patch":{"operationId":"setPaymentLinkStatus","tags":["Payment Links"],"summary":"Ativar ou desativar Payment Link","description":"Um link `inactive` não abre sessões. Repetir o estado atual não muda nada. Com os Payment Links desligados no ambiente (kill switch `PAYMENT_LINKS_ENABLED`) toda rota `/v1/payment-links*` responde `404 RESOURCE_NOT_FOUND`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do Payment Link (`plk_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLinkStatusRequest"},"example":{"status":"inactive"}}}},"responses":{"200":{"description":"Payment Link atualizado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentLink"},"example":{"id":"plk_9f8e7d6c5b4a39281706f5e4d3c2b1a0","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","status":"inactive","session_count":12,"completed_session_count":7,"last_session_at":"2026-11-06T12:00:05.000Z","created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["offers:read","offers:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/payout-destinations/banks":{"get":{"operationId":"listPayoutBanks","tags":["Payout Destinations"],"summary":"Listar bancos sintéticos do saque","description":"Os bancos ativos do seller com as chaves Pix ativas de cada um, mascarados. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`SELLER_PAYOUT_DESTINATIONS_ENABLED`, que também precisa de `SELLER_PAYOUTS_ENABLED`).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Bancos e chaves Pix sintéticos.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutBankList"},"example":{"data":[{"id":"sim_bnk_6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e","bank_code":"260","bank_name":"Nubank","account_type":"checking","account_last4":"3391","label":"Conta da empresa","display_label":"Nubank ····3391","is_default":true,"status":"active","synthetic":true,"created_at":"2026-11-13T12:00:00.000Z","pix_keys":[{"id":"sim_pix_8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a","bank_id":"sim_bnk_6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e","key_type":"email","mask":"j•••@•••.com","display_label":"Pix e-mail j•••@•••.com","is_default":false,"status":"active","synthetic":true,"created_at":"2026-11-13T12:00:00.000Z"}]}],"notice":"Simulação: nenhum dinheiro sai para um banco de verdade.","limits":{"banks_active_max":10,"pix_keys_per_bank_max":5}}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["finance:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]},"post":{"operationId":"createPayoutBank","tags":["Payout Destinations"],"summary":"Cadastrar banco sintético","description":"Cadastra um banco sintético. O primeiro destino ativo do seller vira o padrão do saque. Até 10 bancos ativos (e 30 no total, contando os arquivados): acima disso `409 PAYOUT_DESTINATION_LIMIT_REACHED`. Só pela sessão humana do app do seller, com papel que tenha `payouts:write` (OWNER ou ADMIN) e reautenticação recente (até 10 minutos; senão `403 STEP_UP_REQUIRED`), como o saque; API keys recebem `403`. Exige `Idempotency-Key`: repetir com a mesma chave e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`. Cada mudança grava uma entrada de auditoria `payout_destination.*`. **Simulação: nenhum dinheiro sai para um banco de verdade.** Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`SELLER_PAYOUT_DESTINATIONS_ENABLED`, que também precisa de `SELLER_PAYOUTS_ENABLED`).","security":[{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePayoutBankRequest"},"example":{"bank_code":"260","account_type":"checking","account_last4":"3391","label":"Conta da empresa"}}}},"responses":{"201":{"description":"Banco criado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutBank"},"example":{"id":"sim_bnk_6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e","bank_code":"260","bank_name":"Nubank","account_type":"checking","account_last4":"3391","label":"Conta da empresa","display_label":"Nubank ····3391","is_default":true,"status":"active","synthetic":true,"created_at":"2026-11-13T12:00:00.000Z","pix_keys":[]}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`, `STEP_UP_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `PAYOUT_DESTINATION_LIMIT_REACHED`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["finance:read"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","PAYOUT_DESTINATION_LIMIT_REACHED","RATE_LIMITED","RESOURCE_NOT_FOUND","STEP_UP_REQUIRED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/payout-destinations/banks/{id}/pix-keys":{"post":{"operationId":"createPayoutPixKey","tags":["Payout Destinations"],"summary":"Cadastrar chave Pix sintética de um banco","description":"Cadastra uma chave Pix sintética sob um banco ativo do seller: só o tipo e uma dica curta, de onde a API gera a máscara (a chave completa nunca é aceita nem guardada). Até 5 chaves ativas por banco. Banco de outro seller ou inexistente → `404`; banco arquivado → `409 PAYOUT_DESTINATION_UNAVAILABLE`. Só pela sessão humana do app do seller, com papel que tenha `payouts:write` (OWNER ou ADMIN) e reautenticação recente (até 10 minutos; senão `403 STEP_UP_REQUIRED`), como o saque; API keys recebem `403`. Exige `Idempotency-Key`: repetir com a mesma chave e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`. Cada mudança grava uma entrada de auditoria `payout_destination.*`. **Simulação: nenhum dinheiro sai para um banco de verdade.** Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`SELLER_PAYOUT_DESTINATIONS_ENABLED`, que também precisa de `SELLER_PAYOUTS_ENABLED`).","security":[{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do banco (`sim_bnk_...`) do seller da sessão.","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePayoutPixKeyRequest"},"example":{"key_type":"email","key_hint":"j@com"}}}},"responses":{"201":{"description":"Chave Pix criada.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutPixKey"},"example":{"id":"sim_pix_8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a","bank_id":"sim_bnk_6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e","key_type":"email","mask":"j•••@•••.com","display_label":"Pix e-mail j•••@•••.com","is_default":false,"status":"active","synthetic":true,"created_at":"2026-11-13T12:00:00.000Z"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`, `STEP_UP_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `PAYOUT_DESTINATION_LIMIT_REACHED`, `PAYOUT_DESTINATION_UNAVAILABLE`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["finance:read"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","PAYOUT_DESTINATION_LIMIT_REACHED","PAYOUT_DESTINATION_UNAVAILABLE","RATE_LIMITED","RESOURCE_NOT_FOUND","STEP_UP_REQUIRED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/payout-destinations/{id}/archive":{"post":{"operationId":"archivePayoutDestination","tags":["Payout Destinations"],"summary":"Arquivar banco ou chave Pix sintéticos","description":"Arquiva um banco (e as chaves Pix dele) ou uma chave Pix: nada é apagado e um arquivado não volta (cadastre de novo). Se era o padrão, o saque sem destino volta para a conta sintética padrão da plataforma. Os saques já feitos mantêm o destino e o rótulo. Arquivar de novo devolve o mesmo resultado. Só pela sessão humana do app do seller, com papel que tenha `payouts:write` (OWNER ou ADMIN) e reautenticação recente (até 10 minutos; senão `403 STEP_UP_REQUIRED`), como o saque; API keys recebem `403`. Exige `Idempotency-Key`: repetir com a mesma chave e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`. Cada mudança grava uma entrada de auditoria `payout_destination.*`. **Simulação: nenhum dinheiro sai para um banco de verdade.** Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`SELLER_PAYOUT_DESTINATIONS_ENABLED`, que também precisa de `SELLER_PAYOUTS_ENABLED`).","security":[{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do destino (`sim_bnk_...` de um banco ou `sim_pix_...` de uma chave Pix) do seller da sessão. Um destino de outro seller responde `404`, igual a um inexistente.","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutDestinationActionRequest"},"example":{}}}},"responses":{"200":{"description":"Destino arquivado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutDestinationAck"},"example":{"id":"sim_bnk_6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e","kind":"bank","status":"archived","is_default":false,"synthetic":true}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`, `STEP_UP_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["finance:read"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","STEP_UP_REQUIRED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/payout-destinations/{id}/default":{"post":{"operationId":"setPayoutDestinationDefault","tags":["Payout Destinations"],"summary":"Tornar um destino o padrão do saque","description":"Torna um banco ou uma chave Pix ativos o destino usado quando o saque não nomeia um (um padrão por seller; o anterior deixa de ser). Destino arquivado → `409 PAYOUT_DESTINATION_UNAVAILABLE`. Só pela sessão humana do app do seller, com papel que tenha `payouts:write` (OWNER ou ADMIN) e reautenticação recente (até 10 minutos; senão `403 STEP_UP_REQUIRED`), como o saque; API keys recebem `403`. Exige `Idempotency-Key`: repetir com a mesma chave e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`. Cada mudança grava uma entrada de auditoria `payout_destination.*`. **Simulação: nenhum dinheiro sai para um banco de verdade.** Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`SELLER_PAYOUT_DESTINATIONS_ENABLED`, que também precisa de `SELLER_PAYOUTS_ENABLED`).","security":[{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do destino (`sim_bnk_...` de um banco ou `sim_pix_...` de uma chave Pix) do seller da sessão. Um destino de outro seller responde `404`, igual a um inexistente.","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutDestinationActionRequest"},"example":{}}}},"responses":{"200":{"description":"Destino padrão definido.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutDestinationAck"},"example":{"id":"sim_bnk_6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e","kind":"bank","status":"active","is_default":true,"synthetic":true}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`, `STEP_UP_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `PAYOUT_DESTINATION_UNAVAILABLE`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["finance:read"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","PAYOUT_DESTINATION_UNAVAILABLE","RATE_LIMITED","RESOURCE_NOT_FOUND","STEP_UP_REQUIRED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/payouts":{"get":{"operationId":"listPayouts","tags":["Payouts, Settlements & Disputes"],"summary":"Listar repasses sintéticos","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Repasses.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Payout"}}},"required":["data"]},"example":{"data":[{"id":"pyo_2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e","amount_minor":"150000","currency":"BRL","status":"paid","origin":"admin","provider_id":"simulator","provider_request_key":"payout:pyo_2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e","external_id":"sim_pyo_1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a","destination_ref":"sim_conta_principal","provider_status":"paid","synthetic_obligation":true,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:05.000Z","resolved_at":"2026-11-06T12:00:05.000Z"}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["finance:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED"]},"post":{"operationId":"createSellerPayout","tags":["Payouts, Settlements & Disputes"],"summary":"Solicitar saque sintético","description":"Saque **sintético** do saldo disponível (nenhum dinheiro real se move). Só pela sessão humana do app do seller, com papel que tenha `payouts:write` (OWNER ou ADMIN) e reautenticação recente (até 10 minutos; senão `403 STEP_UP_REQUIRED`); API keys recebem `403` nesta versão. Valor em unidades menores: mínimo `1000` (R$ 10,00, senão `409 PAYOUT_BELOW_MINIMUM`) e no máximo o saldo disponível (`409 PAYOUT_AMOUNT_EXCEEDS_AVAILABLE`). Dois pedidos simultâneos com saldo para um só: só um é aceito. O saque nasce `created` (em processamento) e é resolvido de forma sintética em cerca de 2 minutos (`paid`), ou marcado como falha pela operação da Wolf. Só existe com a flag `SELLER_PAYOUTS_ENABLED` ligada no ambiente (senão `404`). **Destino (SPEC-0057)**: com `SELLER_PAYOUT_DESTINATIONS_ENABLED` ligada, `destination_id` (opcional) escolhe um banco ou chave Pix sintéticos do próprio seller (`sim_bnk_...` / `sim_pix_...`, ver `/v1/payout-destinations/banks`): de outro seller, inexistente ou fora do formato → `404`, arquivado → `409 PAYOUT_DESTINATION_UNAVAILABLE`; sem ele vale o destino padrão do seller e, sem padrão, `sim_seller_default`. Só o `destination_ref` do saque muda (e a resposta traz `destination_label`, ex.: `Nubank ····3391`); valor, saldo e ledger são os mesmos. Com a flag desligada, `destination_id` → `404`. Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve o mesmo resultado, sem nova cobrança; corpo diferente → `409 IDEMPOTENCY_CONFLICT`.","security":[{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSellerPayoutRequest"},"example":{"amount_minor":"123456","currency":"BRL","destination_id":"sim_bnk_6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e"}}}},"responses":{"200":{"description":"Replay da mesma `Idempotency-Key`: o mesmo saque, sem novo débito.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payout"},"example":{"id":"pyo_2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e","amount_minor":"123456","currency":"BRL","status":"created","origin":"seller","provider_id":"simulator","provider_request_key":"payout:pyo_2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e","external_id":null,"destination_ref":"sim_seller_default","provider_status":"created","synthetic_obligation":true,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z","resolved_at":null}}}},"201":{"description":"Saque criado (em processamento).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payout"},"example":{"id":"pyo_2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e","amount_minor":"123456","currency":"BRL","status":"created","origin":"seller","provider_id":"simulator","provider_request_key":"payout:pyo_2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e","external_id":null,"destination_ref":"sim_seller_default","provider_status":"created","synthetic_obligation":true,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:00.000Z","resolved_at":null}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`, `STEP_UP_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `PAYOUT_AMOUNT_EXCEEDS_AVAILABLE`, `PAYOUT_BELOW_MINIMUM`, `PAYOUT_DESTINATION_UNAVAILABLE`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["finance:read"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","PAYOUT_AMOUNT_EXCEEDS_AVAILABLE","PAYOUT_BELOW_MINIMUM","PAYOUT_DESTINATION_UNAVAILABLE","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","STEP_UP_REQUIRED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/payouts/{id}":{"get":{"operationId":"getPayout","tags":["Payouts, Settlements & Disputes"],"summary":"Consultar repasse sintético","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do repasse (`pyo_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Repasse.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payout"},"example":{"id":"pyo_2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e","amount_minor":"150000","currency":"BRL","status":"paid","origin":"admin","provider_id":"simulator","provider_request_key":"payout:pyo_2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e","external_id":"sim_pyo_1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a","destination_ref":"sim_conta_principal","provider_status":"paid","synthetic_obligation":true,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:05.000Z","resolved_at":"2026-11-06T12:00:05.000Z"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["finance:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/products":{"get":{"operationId":"listProducts","tags":["Products"],"summary":"Listar produtos","description":"Sem parâmetros de consulta a resposta é a lista completa legada (`{data}`); com qualquer parâmetro ela é paginada por cursor (`{data, next_cursor}`). Parâmetro desconhecido → `400 VALIDATION_FAILED`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","active","archived"]}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":2048,"pattern":"^c1_[0-9a-f]+$"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Produtos. A página traz também `offers_count`, `links_count` (links ativos), `bumps_count` e `revenue_30d_minor` (bruto em BRL dos últimos 30 dias locais).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SellerProductPage"},{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}},"required":["data"]}]},"example":{"data":[{"id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","name":"Curso de fotografia","status":"active","created_at":"2026-11-06T12:00:00.000Z","description":"Do básico à edição: 40 aulas gravadas e exercícios práticos.","category":"design_fotografia","sales_page_url":"https://example.com/curso-de-fotografia","guarantee_days":7,"support_name":"Equipe Estúdio Exemplo","support_email":"suporte@example.com","support_whatsapp":"+5511912345678","statement_descriptor":"EXEMPLO FOTO","thank_you_url":"https://example.com/obrigado","delivery_mode":"access_links","image_id":"img_6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f","offer_count":1,"active_offer_count":1,"offers_count":1,"links_count":1,"bumps_count":0,"revenue_30d_minor":"29700","deletable":false,"access_links_count":1}],"next_cursor":null}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["products:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]},"post":{"operationId":"createProduct","tags":["Products"],"summary":"Criar produto","description":"Cria um produto em `draft`. Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductRequest"},"example":{"name":"Curso de fotografia"}}}},"responses":{"201":{"description":"Produto criado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"},"example":{"id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","name":"Curso de fotografia","status":"draft","created_at":"2026-11-06T12:00:00.000Z","description":"Do básico à edição: 40 aulas gravadas e exercícios práticos.","category":"design_fotografia","sales_page_url":"https://example.com/curso-de-fotografia","guarantee_days":7,"support_name":"Equipe Estúdio Exemplo","support_email":"suporte@example.com","support_whatsapp":"+5511912345678","statement_descriptor":"EXEMPLO FOTO","thank_you_url":"https://example.com/obrigado","delivery_mode":"access_links","image_id":"img_6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["products:read","products:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/products/{id}":{"get":{"operationId":"getProduct","tags":["Products"],"summary":"Consultar produto","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do produto (`prd_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Produto.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"},"example":{"id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","name":"Curso de fotografia","status":"active","created_at":"2026-11-06T12:00:00.000Z","description":"Do básico à edição: 40 aulas gravadas e exercícios práticos.","category":"design_fotografia","sales_page_url":"https://example.com/curso-de-fotografia","guarantee_days":7,"support_name":"Equipe Estúdio Exemplo","support_email":"suporte@example.com","support_whatsapp":"+5511912345678","statement_descriptor":"EXEMPLO FOTO","thank_you_url":"https://example.com/obrigado","delivery_mode":"access_links","image_id":"img_6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["products:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]},"patch":{"operationId":"updateProduct","tags":["Products"],"summary":"Atualizar a ficha do produto","description":"Atualiza a ficha: `name` (2 a 160 caracteres), `description` (texto simples, até 2.000 caracteres, sem HTML), `category` (lista fechada), `sales_page_url` (https), `guarantee_days` (garantia do produtor, 0 a 30 dias; não é garantia de pagamento), `support_name`, `support_email`, `support_whatsapp` (E.164, ex.: `+5511912345678`) e `statement_descriptor` (até 13 letras, números ou espaços; guardado, sem efeito no simulador). Envie só os campos a mudar; `null` limpa o campo. O checkout hospedado mostra descrição, suporte e garantia do produtor. Toda mudança é auditada.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do produto (`prd_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductRequest"},"example":{"description":"Do básico à edição: 40 aulas gravadas e exercícios práticos.","category":"design_fotografia","guarantee_days":7,"support_email":"suporte@example.com","support_whatsapp":"+5511912345678","statement_descriptor":"EXEMPLO FOTO"}}}},"responses":{"200":{"description":"Produto com a ficha atualizada.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"},"example":{"id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","name":"Curso de fotografia","status":"active","created_at":"2026-11-06T12:00:00.000Z","description":"Do básico à edição: 40 aulas gravadas e exercícios práticos.","category":"design_fotografia","sales_page_url":"https://example.com/curso-de-fotografia","guarantee_days":7,"support_name":"Equipe Estúdio Exemplo","support_email":"suporte@example.com","support_whatsapp":"+5511912345678","statement_descriptor":"EXEMPLO FOTO","thank_you_url":"https://example.com/obrigado","delivery_mode":"access_links","image_id":"img_6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f"}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `PRODUCT_DELIVERY_REQUIRED`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["products:read","products:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","PRODUCT_DELIVERY_REQUIRED","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]},"delete":{"operationId":"deleteProduct","tags":["Products"],"summary":"Excluir produto","description":"Exclui de verdade só um produto em `draft` sem histórico: nenhum pedido, nenhum checkout aberto, nenhum link de pagamento que já abriu checkout, nenhum order bump (como oferta principal ou do bump) e nenhuma política de pagamento da Wolf. Junto saem as ofertas dele, os links de pagamento nunca usados, os links de acesso e a imagem. Nos outros casos → `409 PRODUCT_NOT_DELETABLE` (arquive o produto). Auditado (`product.deleted`); depois disso o produto responde `404`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do produto (`prd_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Produto excluído.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"]},"example":{"id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","deleted":true}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `PRODUCT_NOT_DELETABLE`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["products:read","products:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","PRODUCT_NOT_DELETABLE","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/products/{id}/access-links":{"get":{"operationId":"listProductAccessLinks","tags":["Products"],"summary":"Listar links de acesso","description":"Links de entrega do produto (no máximo 5), na ordem do recibo. O comprador só os vê no recibo depois do pagamento aprovado.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do produto (`prd_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Links de acesso.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductAccessLinkList"},"example":{"data":[{"id":"pal_4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d","product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","label":"Área de membros","url":"https://membros.example.com/curso-de-fotografia","host":"membros.example.com","position":0,"created_at":"2026-11-06T12:00:00.000Z"}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["products:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]},"post":{"operationId":"createProductAccessLink","tags":["Products"],"summary":"Adicionar link de acesso","description":"Adiciona um link https (rótulo de até 80 caracteres) ao fim da lista; no máximo 5 por produto (`409 PRODUCT_ACCESS_LINK_LIMIT_REACHED`). O link aparece no recibo do checkout só depois do pagamento aprovado, com o domínio visível e sem redirecionamento automático. Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do produto (`prd_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductAccessLinkRequest"},"example":{"label":"Área de membros","url":"https://membros.example.com/curso-de-fotografia"}}}},"responses":{"201":{"description":"Link criado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductAccessLink"},"example":{"id":"pal_4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d","product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","label":"Área de membros","url":"https://membros.example.com/curso-de-fotografia","host":"membros.example.com","position":0,"created_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `PRODUCT_ACCESS_LINK_LIMIT_REACHED`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["products:read","products:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","PRODUCT_ACCESS_LINK_LIMIT_REACHED","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/products/{id}/access-links/{linkId}":{"delete":{"operationId":"deleteProductAccessLink","tags":["Products"],"summary":"Remover link de acesso","description":"Remove o link da entrega (auditado); depois disso ele responde `404`. O último link de um produto ativo entregue por links de acesso não sai (`409 PRODUCT_DELIVERY_REQUIRED`): antes, marque `delivery_mode: \"seller_system\"` ou arquive o produto.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do produto (`prd_...`).","schema":{"type":"string","minLength":1}},{"name":"linkId","in":"path","required":true,"description":"Id do link de acesso (`pal_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Link removido.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductAccessLink"},"example":{"id":"pal_4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d","product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","label":"Área de membros","url":"https://membros.example.com/curso-de-fotografia","host":"membros.example.com","position":0,"created_at":"2026-11-06T12:00:00.000Z"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `PRODUCT_DELIVERY_REQUIRED`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["products:read","products:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","PRODUCT_DELIVERY_REQUIRED","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/products/{id}/conversion-connections":{"get":{"operationId":"getProductConversionConnections","tags":["Conversion Events"],"summary":"Conexões de eventos de conversão do produto","description":"As conexões da organização, marcadas as que disparam para o produto (padrão: nenhuma). Produto de outro seller → `404`. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`CONVERSION_EVENTS_ENABLED`).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do produto (`prd_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Seleção do produto.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductConversionConnections"},"example":{"product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","data":[{"connection_id":"cvc_6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e","platform":"meta","name":"Meta · Pixel principal","account_id":"123456789012345","status":"active","selected":true}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["products:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]},"put":{"operationId":"setProductConversionConnections","tags":["Conversion Events"],"summary":"Escolher as conexões do produto","description":"Substitui a seleção (até 10). Conexão desconhecida, de outro seller ou apagada → `404`. Repetir o mesmo corpo é inofensivo. Responde `404` enquanto o ambiente não tem a funcionalidade ligada (`CONVERSION_EVENTS_ENABLED`).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do produto (`prd_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductConversionConnectionsRequest"},"example":{"connection_ids":["cvc_6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e"]}}}},"responses":{"200":{"description":"Seleção do produto.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductConversionConnections"},"example":{"product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","data":[{"connection_id":"cvc_6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e","platform":"meta","name":"Meta · Pixel principal","account_id":"123456789012345","status":"active","selected":true}]}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["products:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/products/{id}/image":{"put":{"operationId":"setProductImage","tags":["Products"],"summary":"Enviar a imagem do produto","description":"Envie os bytes da imagem no corpo (não é JSON). A API confere o conteúdo (assinatura, estrutura e dimensões; o `Content-Type` declarado não é confiável), guarda a imagem com um nome aleatório (`img_...`) e a serve só por origens da Wolf. Uma imagem nova substitui a anterior, que é apagada. Imagem fora das regras → `400 IMAGE_NOT_ACCEPTED`; imagens indisponíveis no ambiente → `404 RESOURCE_NOT_FOUND`. Auditado.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do produto (`prd_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"description":"Bytes da imagem (PNG, JPEG ou WebP; até 2 MiB; de 16 a 4096 px por lado; sem animação). A API confere o conteúdo e guarda o tipo detectado, não o declarado.","content":{"image/png":{"schema":{"type":"string","contentMediaType":"image/png"}},"image/jpeg":{"schema":{"type":"string","contentMediaType":"image/jpeg"}},"image/webp":{"schema":{"type":"string","contentMediaType":"image/webp"}}}},"responses":{"200":{"description":"Produto com a imagem nova (`image_id`).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"},"example":{"id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","name":"Curso de fotografia","status":"active","created_at":"2026-11-06T12:00:00.000Z","description":"Do básico à edição: 40 aulas gravadas e exercícios práticos.","category":"design_fotografia","sales_page_url":"https://example.com/curso-de-fotografia","guarantee_days":7,"support_name":"Equipe Estúdio Exemplo","support_email":"suporte@example.com","support_whatsapp":"+5511912345678","statement_descriptor":"EXEMPLO FOTO","thank_you_url":"https://example.com/obrigado","delivery_mode":"access_links","image_id":"img_6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f"}}}},"400":{"description":"Erro: `IMAGE_NOT_ACCEPTED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["products:read","products:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IMAGE_NOT_ACCEPTED","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]},"delete":{"operationId":"deleteProductImage","tags":["Products"],"summary":"Remover a imagem do produto","description":"Remove a imagem (o checkout volta ao banner sem imagem). Auditado.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do produto (`prd_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Produto sem imagem.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"},"example":{"id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","name":"Curso de fotografia","status":"active","created_at":"2026-11-06T12:00:00.000Z","description":"Do básico à edição: 40 aulas gravadas e exercícios práticos.","category":"design_fotografia","sales_page_url":"https://example.com/curso-de-fotografia","guarantee_days":7,"support_name":"Equipe Estúdio Exemplo","support_email":"suporte@example.com","support_whatsapp":"+5511912345678","statement_descriptor":"EXEMPLO FOTO","thank_you_url":"https://example.com/obrigado","delivery_mode":"access_links","image_id":null}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["products:read","products:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/products/{id}/status":{"patch":{"operationId":"setProductStatus","tags":["Products"],"summary":"Mudar status do produto","description":"Ativar exige a entrega configurada: ao menos um link de acesso ou `delivery_mode: \"seller_system\"` (a entrega é feita pelo sistema do seller, por webhook); sem ela → `409 PRODUCT_DELIVERY_REQUIRED`. Arquivar e voltar a rascunho não têm essa exigência. Toda mudança é auditada (`product.status_changed`).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do produto (`prd_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogStatusRequest"},"example":{"status":"active"}}}},"responses":{"200":{"description":"Produto atualizado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"},"example":{"id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","name":"Curso de fotografia","status":"active","created_at":"2026-11-06T12:00:00.000Z","description":"Do básico à edição: 40 aulas gravadas e exercícios práticos.","category":"design_fotografia","sales_page_url":"https://example.com/curso-de-fotografia","guarantee_days":7,"support_name":"Equipe Estúdio Exemplo","support_email":"suporte@example.com","support_whatsapp":"+5511912345678","statement_descriptor":"EXEMPLO FOTO","thank_you_url":"https://example.com/obrigado","delivery_mode":"access_links","image_id":"img_6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f"}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `INVALID_STATE_TRANSITION`, `PRODUCT_DELIVERY_REQUIRED`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["products:read","products:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","INVALID_STATE_TRANSITION","PRODUCT_DELIVERY_REQUIRED","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/public/buyer-messages/opt-out/{token}":{"post":{"operationId":"optOutOfBuyerMessages","tags":["Public Checkout"],"summary":"Deixar de receber mensagens (opt-out do comprador)","description":"Chamado pelo **servidor** da página `/m/{token}` do checkout hospedado (botão \"Não quero mais receber\") e, no futuro, pelo clique único do cliente de e-mail (RFC 8058). O `token` é assinado (HMAC com expiração, sem dado pessoal) e vai no link de uma mensagem ao comprador. **Não há corpo.** O pedido é limitado por IP **antes** de qualquer consulta ao banco. Um token válido grava, uma única vez, a supressão `opt_out` do endereço **daquele** seller (o seller vem da mensagem guardada, nunca do pedido); um segundo clique não muda nada. A resposta é **a mesma** (`200`) para token válido, expirado, forjado, malformado ou de mensagem inexistente: a rota não é um oráculo (a defesa é a assinatura, não a uniformidade de tempo). Um ambiente sem chave utilizável de verificação (ausente, de algoritmo diferente de HMAC-SHA-256 ou sem o usage `verify`) é configuração, não token: responde `503` igual para qualquer token, nunca o `200`. A rota não é um oráculo e nunca revela seller, pedido, endereço nem a origem de uma supressão. O `GET /m/{token}` do checkout só mostra a página e **não grava nada** (um scanner de e-mail que apenas abre o link não descadastra ninguém).","security":[],"parameters":[{"name":"token","in":"path","required":true,"description":"Token assinado do link da mensagem (opaco, até 256 caracteres).","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Pedido recebido (idêntico em todos os casos).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuyerMessageOptOutReceived"},"example":{"status":"received"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["buyer_message_opt_out"],"x-wolf-error-codes":["INTERNAL_ERROR","RATE_LIMITED","SERVICE_UNAVAILABLE"]}},"/v1/public/catalog-images/{id}":{"get":{"operationId":"getCatalogImage","tags":["Public Checkout"],"summary":"Ler imagem de produto ou order bump","description":"Bytes de uma imagem que um produto ou order bump usa (nome aleatório `img_...`), com o tipo detectado no envio, `X-Content-Type-Options: nosniff` e cache imutável. Imagem que nenhum produto ou bump usa → `404`. O checkout hospedado e o app do seller a servem pela própria origem (`/img/{id}`), então a CSP deles não abre nenhuma origem nova.","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da imagem (`img_...`).","schema":{"type":"string","minLength":1}}],"responses":{"200":{"description":"Imagem.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"image/png":{"schema":{"type":"string","contentMediaType":"image/png"}},"image/jpeg":{"schema":{"type":"string","contentMediaType":"image/jpeg"}},"image/webp":{"schema":{"type":"string","contentMediaType":"image/webp"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-error-codes":["INTERNAL_ERROR","RESOURCE_NOT_FOUND"]}},"/v1/public/checkout-sessions/{id}":{"get":{"operationId":"getPublicCheckoutSession","tags":["Public Checkout"],"summary":"Ler sessão pública (polling)","description":"Visão do comprador: nome público do seller, produto e descrição, suporte e garantia do produtor (`guarantee_days`), métodos aceitos pela oferta, valor, estado da sessão e do pagamento atual. `access_links` (links de entrega com o domínio) vem preenchido só depois do pagamento aprovado; antes é `null`. `bumps` lista os order bumps ativos da oferta (vazio com `CHECKOUT_BUMPS_ENABLED` desligado) e, depois da primeira tentativa de pagamento, `order` traz o pedido com seus itens e `selected_bump_ids` a seleção fixada. Enquanto a sessão está aberta e ainda **não há pedido**, `amount_minor` é o preço **atual** da oferta (o seller pode editar o preço, SPEC-0055); só quando ele difere do preço da abertura da sessão, `price_changed` vem `true` e `opened_amount_minor` traz o preço da abertura (o checkout então pede ao comprador que confirme o novo valor). Os dois campos não existem quando o preço é o mesmo, nem depois que há pedido: com pedido, `amount_minor` é o valor congelado do pedido (um preço editado depois não o altera). Os `bumps` mostram sempre o preço atual da oferta de cada bump. A confirmação do comprador é sempre o `expected_amount_minor` do `pay`. Nunca o id do seller. Sessão vencida responde `200` com `status: \"expired\"`; segredo errado → `404`.","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da sessão (`cs_...`).","schema":{"type":"string","minLength":1}},{"name":"x-checkout-secret","in":"header","required":true,"description":"`client_secret` (`csec_...`) da sessão. O checkout hospedado o guarda em cookie httpOnly e o envia pelo servidor.","schema":{"type":"string","format":"starts_with","pattern":"^csec_.*"}}],"responses":{"200":{"description":"Sessão.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCheckoutSession"},"example":{"id":"cs_2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","amount_minor":"9900","currency":"BRL","status":"open","payment_intent_id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","expires_at":"2026-11-06T12:30:00.000Z","seller":{"display_name":"Estúdio Exemplo"},"product":{"name":"Curso de fotografia","description":"Do básico à edição: 40 aulas gravadas e exercícios práticos.","image_id":"img_6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f"},"support":{"name":"Equipe Estúdio Exemplo","email":"suporte@example.com","whatsapp":"+5511912345678"},"guarantee_days":7,"accepted_methods":["pix","card"],"access_links":null,"thank_you":null,"payment":{"id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","order_id":"ord_0f1e2d3c4b5a69788796a5b4c3d2e1f0","status":"processing","amount_minor":"12600","currency":"BRL","failure_code":null,"next_action":{"type":"pix_qr","qr_code_payload":"00020101021226780014br.gov.bcb.pix0120SIMULADO-NAO-PAGAVEL0232SIMULADO - NENHUMA COBRANCA REAL520400005303986540599.005802BR5921WOLF SANDBOX SIMULADO6009SAO PAULO62290525SIMULADO3b9f0c2d1e4a5b6c76304726B","expires_at":"2026-11-06T12:30:00.000Z"},"cancellation_reason":null},"bumps":[{"id":"ob_7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a","headline":"Adicionar à compra: Guia bônus","description":"Checklist em PDF com 40 poses para ensaios.","product_name":"Guia bônus de poses","amount_minor":"2700","currency":"BRL","image_id":null}],"order":{"id":"ord_0f1e2d3c4b5a69788796a5b4c3d2e1f0","amount_minor":"12600","currency":"BRL","items":[{"kind":"main","bump_id":null,"product_name":"Curso de fotografia","amount_minor":"9900","currency":"BRL"},{"kind":"bump","bump_id":"ob_7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a","product_name":"Guia bônus de poses","amount_minor":"2700","currency":"BRL"}]},"selected_bump_ids":["ob_7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a"]}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-error-codes":["INTERNAL_ERROR","RESOURCE_NOT_FOUND","VALIDATION_FAILED"]}},"/v1/public/checkout-sessions/{id}/attribution":{"post":{"operationId":"captureCheckoutAttribution","tags":["Public Checkout"],"summary":"Registrar a origem da sessão (UTMs)","description":"Chamado pelo **servidor** do checkout hospedado com os parâmetros de campanha da URL aberta pelo comprador (`/l/<link>?utm_source=…`, preservados pelo interstitial do Turnstile, ou `/<sessão>?…`) e/ou a classe do aparelho do comprador (`device`: celular/tablet/computador, família do sistema e do navegador, derivada do `User-Agent` pelo servidor do checkout; o `User-Agent` bruto nunca é enviado nem guardado). O primeiro registro de cada sessão vale; repetir não muda nada (`recorded: false`). Só uma sessão aberta aceita (concluída → `409 INVALID_STATE_TRANSITION`; expirada → `400`). Valor fora das regras → `400 VALIDATION_FAILED`. A resposta nunca devolve os valores, que não vão para logs, eventos nem webhooks. Limitado pelo escopo `checkout_pay` (sessão + IP); não exige o Turnstile, que continua na abertura do link e no pagamento.","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da sessão (`cs_...`).","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureCheckoutAttributionRequest"},"example":{"client_secret":"csec_exemplo_nao_use","entry":"payment_link","attribution":{"utm_source":"instagram","utm_medium":"stories","utm_campaign":"black-friday","fbclid":"IwAR0exemplo"},"device":{"class":"mobile","os":"ios","browser":"instagram"}}}}},"responses":{"200":{"description":"Origem registrada (ou já registrada).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapturedCheckoutAttribution"},"example":{"checkout_session_id":"cs_4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a","recorded":true}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `INVALID_STATE_TRANSITION`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["checkout_pay"],"x-wolf-error-codes":["INTERNAL_ERROR","INVALID_STATE_TRANSITION","RATE_LIMITED","RESOURCE_NOT_FOUND","VALIDATION_FAILED"]}},"/v1/public/checkout-sessions/{id}/lead":{"post":{"operationId":"captureCheckoutLead","tags":["Public Checkout"],"summary":"Registrar os dados do comprador (etapa 1)","description":"Chamado pelo **servidor** do checkout hospedado quando o comprador conclui a etapa 1 (dados), que mostra o aviso \"Usaremos seu e-mail e telefone para te ajudar a concluir a compra.\". Um registro por sessão: repetir atualiza os dados. Só uma sessão aberta aceita (concluída → `409 INVALID_STATE_TRANSITION`; expirada → `400`). O telefone é opcional e só do Brasil (DDD + número); é guardado em E.164. A resposta nunca devolve os dados. Limitado pelo escopo `checkout_pay` (sessão + IP); não exige o Turnstile, que continua no pagamento. Os dados valem para a recuperação da venda por 30 dias e depois são anonimizados; nunca vão para webhooks.","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da sessão (`cs_...`).","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CaptureCheckoutLeadRequest"},"example":{"client_secret":"csec_EXEMPLO_segredo_de_uso_unico_da_sessao","name":"Ana Compradora","email":"ana@example.com","phone":"(11) 98765-4321"}}}},"responses":{"200":{"description":"Dados registrados.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapturedCheckoutLead"},"example":{"checkout_session_id":"cs_2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f","captured":true}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `INVALID_STATE_TRANSITION`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["checkout_pay"],"x-wolf-error-codes":["INTERNAL_ERROR","INVALID_STATE_TRANSITION","RATE_LIMITED","RESOURCE_NOT_FOUND","VALIDATION_FAILED"]}},"/v1/public/checkout-sessions/{id}/pay":{"post":{"operationId":"payCheckoutSession","tags":["Public Checkout"],"summary":"Pagar sessão de checkout","description":"Cria o pedido da oferta (uma vez por sessão) e o PaymentIntent com o pagador e confirma com o método escolhido. Pix responde `202` com o QR sintético; cartão de teste aprovado responde `200`; recusa → `402`. A resposta é a visão do comprador (sem pagador nem ids do provedor). Método fora dos `accepted_methods` da oferta → `409 PAYMENT_METHOD_NOT_ACCEPTED`, antes de criar pedido ou pagamento. Com o Pix desligado no ambiente (kill switch `PIX_SIMULATION_ENABLED`) → `409 PAYMENT_METHOD_UNAVAILABLE`; cartão de teste não é afetado. `bump_ids` (opcional) são order bumps da sessão (`bumps` da leitura pública): o servidor valida e precifica, e o PaymentIntent tem o valor total do pedido. Bump inválido, inativo, repetido ou de outra oferta → `409 BUMP_NOT_AVAILABLE`, sem cobrança. A primeira tentativa fixa os itens do pedido: tentativas seguintes repetem a mesma seleção (`selected_bump_ids`); outra seleção → `409 IDEMPOTENCY_CONFLICT`, sem cobrança. `expected_amount_minor` (opcional, string de inteiro) é o **total que o comprador viu** (oferta + bumps escolhidos): nunca é o preço cobrado — o servidor calcula o total e só compara, dentro da transação que cria o pedido. Se o total atual for diferente → `409 OFFER_PRICE_CHANGED` (com `error.details.current_amount_minor` e `currency`), sem criar pedido nem PaymentIntent e sem cobrança; o checkout deve mostrar `details.current_amount_minor` como o valor a confirmar (pode ser o total congelado de um pedido já criado para a sessão, não o preço atual da oferta) e repetir o `pay` com ele em `expected_amount_minor`. Sem `expected_amount_minor`, o preço da linha principal do pedido precisa ser o mesmo da abertura da sessão, senão o mesmo `409`. Um pedido já criado para a sessão (repetição do `pay`) mantém o valor congelado.","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da sessão (`cs_...`).","schema":{"type":"string","minLength":1}},{"name":"wolf-turnstile-token","in":"header","required":false,"description":"Token do Cloudflare Turnstile (verificação humana) obtido pelo checkout hospedado. Obrigatório quando o ambiente tem o widget configurado; ausente ou inválido → `403 CAPTCHA_REQUIRED`. Cada token vale uma única vez, por até 300 s.","schema":{"type":"string","minLength":1,"maxLength":2048}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayCheckoutSessionRequest"},"example":{"client_secret":"csec_EXEMPLO_segredo_de_uso_unico_da_sessao","payer":{"name":"Ana Compradora","email":"ana@example.com","phone":"(11) 98765-4321","document":{"type":"cpf","number":"529.982.247-25"}},"payment_method":{"type":"pix"},"bump_ids":["ob_7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a"]}}}},"responses":{"200":{"description":"Pagamento concluído.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutPayment"},"example":{"id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","order_id":"ord_0f1e2d3c4b5a69788796a5b4c3d2e1f0","status":"succeeded","amount_minor":"9900","currency":"BRL","failure_code":null,"next_action":null,"cancellation_reason":null}}}},"202":{"description":"Pagamento em processamento (Pix aguardando ou cartão em reconciliação).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutPayment"},"example":{"id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","order_id":"ord_0f1e2d3c4b5a69788796a5b4c3d2e1f0","status":"processing","amount_minor":"9900","currency":"BRL","failure_code":null,"next_action":{"type":"pix_qr","qr_code_payload":"00020101021226780014br.gov.bcb.pix0120SIMULADO-NAO-PAGAVEL0232SIMULADO - NENHUMA COBRANCA REAL520400005303986540599.005802BR5921WOLF SANDBOX SIMULADO6009SAO PAULO62290525SIMULADO3b9f0c2d1e4a5b6c76304726B","expires_at":"2026-11-06T12:30:00.000Z"},"cancellation_reason":null}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Erro: `PAYMENT_DECLINED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `CAPTCHA_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `BUMP_NOT_AVAILABLE`, `IDEMPOTENCY_CONFLICT`, `INVALID_STATE_TRANSITION`, `OFFER_PRICE_CHANGED`, `PAYMENT_LIMIT_EXCEEDED`, `PAYMENT_METHOD_NOT_ACCEPTED`, `PAYMENT_METHOD_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-idempotency":"required","x-wolf-rate-limits":["checkout_pay"],"x-wolf-error-codes":["BUMP_NOT_AVAILABLE","CAPTCHA_REQUIRED","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","INVALID_STATE_TRANSITION","OFFER_PRICE_CHANGED","PAYMENT_DECLINED","PAYMENT_LIMIT_EXCEEDED","PAYMENT_METHOD_NOT_ACCEPTED","PAYMENT_METHOD_UNAVAILABLE","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","VALIDATION_FAILED"]}},"/v1/public/checkout-sessions/{id}/pix/simulate-payment":{"post":{"operationId":"simulateCheckoutPixPayment","tags":["Public Checkout"],"summary":"Simular pagamento do Pix da sessão","description":"Botão \"Simular pagamento\" do checkout: age só sobre o PaymentIntent da própria sessão. Repetir não faz nada. Só existe na edição de simulação. Com o Pix desligado no ambiente (kill switch `PIX_SIMULATION_ENABLED`) → `409 PAYMENT_METHOD_UNAVAILABLE`, antes da verificação do Turnstile.","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da sessão (`cs_...`).","schema":{"type":"string","minLength":1}},{"name":"wolf-turnstile-token","in":"header","required":false,"description":"Token do Cloudflare Turnstile (verificação humana) obtido pelo checkout hospedado. Obrigatório quando o ambiente tem o widget configurado; ausente ou inválido → `403 CAPTCHA_REQUIRED`. Cada token vale uma única vez, por até 300 s.","schema":{"type":"string","minLength":1,"maxLength":2048}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionSecretRequest"},"example":{"client_secret":"csec_EXEMPLO_segredo_de_uso_unico_da_sessao"}}}},"responses":{"200":{"description":"Pagamento após a simulação.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutPayment"},"example":{"id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","order_id":"ord_0f1e2d3c4b5a69788796a5b4c3d2e1f0","status":"succeeded","amount_minor":"9900","currency":"BRL","failure_code":null,"next_action":null,"cancellation_reason":null}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `CAPTCHA_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `INVALID_STATE_TRANSITION`, `PAYMENT_METHOD_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["checkout_pay"],"x-wolf-edition":"production-simulation","x-wolf-error-codes":["CAPTCHA_REQUIRED","INTERNAL_ERROR","INVALID_STATE_TRANSITION","PAYMENT_METHOD_UNAVAILABLE","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","VALIDATION_FAILED"]}},"/v1/public/checkout-sessions/{id}/reconcile":{"post":{"operationId":"reconcileCheckoutSession","tags":["Public Checkout"],"summary":"Reconciliar pagamento da sessão","description":"Consulta o provedor simulado pelo pagamento da sessão em estado desconhecido. Só existe na edição de simulação.","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da sessão (`cs_...`).","schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionSecretRequest"},"example":{"client_secret":"csec_EXEMPLO_segredo_de_uso_unico_da_sessao"}}}},"responses":{"200":{"description":"Resultado definitivo.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutPayment"}}}},"202":{"description":"Ainda sem resultado definitivo.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutPayment"}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Erro: `PAYMENT_DECLINED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["checkout_pay"],"x-wolf-edition":"production-simulation","x-wolf-error-codes":["INTERNAL_ERROR","PAYMENT_DECLINED","RATE_LIMITED","RESOURCE_NOT_FOUND","VALIDATION_FAILED"]}},"/v1/public/checkout-sessions/{id}/upsell/accept":{"post":{"operationId":"acceptCheckoutUpsell","tags":["Public Checkout"],"summary":"Aceitar o upsell (novo Pix)","description":"\"Sim, quero\": cria **uma** sessão filha, **um** pedido (`origin` upsell ou downsell, ligado ao pedido pago por `parent_order_id`) e **um** PaymentIntent Pix, reaproveitando o pagador só dentro do servidor de pagamentos. O preço cobrado é o que o comprador viu: com `expected_amount_minor` (o preço confirmado no card; o checkout hospedado passa a enviá-lo no PR 2), uma aba velha que confirmou outro valor é recusada; sem ele vale o último preço lido no recibo. Se a oferta-alvo mudou de preço, `409 OFFER_PRICE_CHANGED` (`error.details.current_amount_minor`) e nada é criado. Repetir (duplo clique, retry, duas abas) devolve a mesma sessão filha e o PaymentIntent atual; um Pix vencido ganha outro na mesma sessão filha, sem novo pedido. Pai não pago, reembolsado ou em disputa, janela vencida (15 min após a aprovação), passo que não é o atual ou alvo que deixou de cumprir as regras → `409 UPSELL_NOT_AVAILABLE`. O corpo leva só o segredo da sessão-pai (`client_secret`) e o `step_id` que o comprador viu: alvo, preço, moeda e pagador vêm sempre do servidor. Com `CHECKOUT_UPSELL_ENABLED` desligada responde `409 UPSELL_NOT_AVAILABLE`.","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da sessão-pai (`cs_...`).","schema":{"type":"string","minLength":1}},{"name":"wolf-turnstile-token","in":"header","required":false,"description":"Token do Cloudflare Turnstile (verificação humana) obtido pelo checkout hospedado. Obrigatório quando o ambiente tem o widget configurado; ausente ou inválido → `403 CAPTCHA_REQUIRED`. Cada token vale uma única vez, por até 300 s.","schema":{"type":"string","minLength":1,"maxLength":2048}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptUpsellRequest"},"example":{"client_secret":"csec_EXEMPLO_segredo_de_uso_unico_da_sessao","step_id":"ups_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","expected_amount_minor":"2700"}}}},"responses":{"201":{"description":"Sessão filha criada (ou a mesma, num replay) com o Pix do upsell.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptedUpsell"},"example":{"step_id":"ups_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","session":{"id":"cs_8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b","client_secret":"csec_EXEMPLO_segredo_da_sessao_filha","amount_minor":"2700","currency":"BRL","status":"open","expires_at":"2026-11-06T12:45:00.000Z"},"payment":{"id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","order_id":"ord_0f1e2d3c4b5a69788796a5b4c3d2e1f0","status":"processing","amount_minor":"2700","currency":"BRL","failure_code":null,"next_action":{"type":"pix_qr","qr_code_payload":"00020101021226780014br.gov.bcb.pix0120SIMULADO-NAO-PAGAVEL0232SIMULADO - NENHUMA COBRANCA REAL520400005303986540599.005802BR5921WOLF SANDBOX SIMULADO6009SAO PAULO62290525SIMULADO3b9f0c2d1e4a5b6c76304726B","expires_at":"2026-11-06T12:30:00.000Z"},"cancellation_reason":null}}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `CAPTCHA_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `OFFER_PRICE_CHANGED`, `PAYMENT_LIMIT_EXCEEDED`, `PAYMENT_METHOD_UNAVAILABLE`, `UPSELL_NOT_AVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-idempotency":"required","x-wolf-rate-limits":["checkout_pay"],"x-wolf-error-codes":["CAPTCHA_REQUIRED","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","OFFER_PRICE_CHANGED","PAYMENT_LIMIT_EXCEEDED","PAYMENT_METHOD_UNAVAILABLE","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","UPSELL_NOT_AVAILABLE","VALIDATION_FAILED"]}},"/v1/public/checkout-sessions/{id}/upsell/decline":{"post":{"operationId":"declineCheckoutUpsell","tags":["Public Checkout"],"summary":"Recusar o upsell","description":"\"Não, obrigado\": marca o passo como recusado (idempotente) e responde o próximo passo (um downsell, só depois de uma recusa) ou o destino: a URL de recusa do passo, senão a página de obrigado do produto, senão nada. O destino é só um botão \"Continuar para <domínio>\": nenhum redirecionamento acontece sozinho e nenhum parâmetro é anexado à URL. O corpo leva só o segredo da sessão-pai (`client_secret`) e o `step_id` que o comprador viu: alvo, preço, moeda e pagador vêm sempre do servidor. Com `CHECKOUT_UPSELL_ENABLED` desligada responde `409 UPSELL_NOT_AVAILABLE`.","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da sessão-pai (`cs_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsellStepRequest"},"example":{"client_secret":"csec_EXEMPLO_segredo_de_uso_unico_da_sessao","step_id":"ups_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d"}}}},"responses":{"200":{"description":"Recusado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeclinedUpsell"},"example":{"step_id":"ups_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","status":"declined","next":null,"destination":{"url":"https://example.com/obrigado","host":"example.com"}}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `UPSELL_NOT_AVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-idempotency":"required","x-wolf-rate-limits":["checkout_pay"],"x-wolf-error-codes":["IDEMPOTENCY_CONFLICT","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","UPSELL_NOT_AVAILABLE","VALIDATION_FAILED"]}},"/v1/public/payment-links/{id}/session":{"get":{"operationId":"openPaymentLinkSession","tags":["Public Checkout"],"summary":"Abrir sessão de um Payment Link","description":"Chamado pelo **servidor** do checkout hospedado: cria uma sessão para um link `active` de seller e oferta ativos e devolve o segredo de uso único da sessão. Link inexistente, inativo ou de seller/oferta inativos → `404` (sem dizer qual). Limitado por IP e verificado pelo Turnstile (quando o ambiente tem o widget) antes de qualquer consulta. Com os Payment Links desligados no ambiente (kill switch `PAYMENT_LINKS_ENABLED`) → `404`, antes de qualquer outra verificação.","security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do Payment Link (`plk_...`).","schema":{"type":"string","minLength":1}},{"name":"wolf-turnstile-token","in":"header","required":false,"description":"Token do Cloudflare Turnstile (verificação humana) obtido pelo checkout hospedado. Obrigatório quando o ambiente tem o widget configurado; ausente ou inválido → `403 CAPTCHA_REQUIRED`. Cada token vale uma única vez, por até 300 s.","schema":{"type":"string","minLength":1,"maxLength":2048}}],"responses":{"201":{"description":"Sessão aberta.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenedPaymentLinkSession"},"example":{"checkout_session_id":"cs_2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f","client_secret":"csec_EXEMPLO_segredo_de_uso_unico_da_sessao","expires_at":"2026-11-06T13:00:00.000Z"}}}},"403":{"description":"Erro: `CAPTCHA_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-rate-limits":["payment_link_open"],"x-wolf-error-codes":["CAPTCHA_REQUIRED","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE"]}},"/v1/refunds/{id}":{"get":{"operationId":"getRefund","tags":["Refunds"],"summary":"Consultar reembolso","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do reembolso (`rfd_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Reembolso.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"},"example":{"id":"rfd_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","payment_intent_id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","charge_id":"chg_8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d","amount_minor":"4900","currency":"BRL","status":"succeeded","provider_id":"simulator","external_id":"sim_ref_4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c","failure_code":null}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["payments:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/reports/abandoned-checkouts":{"get":{"operationId":"listAbandonedCheckouts","tags":["Reports"],"summary":"Checkouts abandonados","description":"Compradores que concluíram a etapa 1 do checkout e não pagaram: a sessão expirou ou passaram 30 minutos sem pagamento aprovado (um Pix emitido ou um cartão em processamento ainda não conta). Mais recentes primeiro, um por oferta e e-mail; some quando o mesmo e-mail compra a mesma oferta depois. `from`/`to` são dias no fuso da organização (`timezone`). Nome, e-mail e telefone vêm completos só para quem lê vendas (`orders:read`); para os demais, mascarados. Filtros opcionais: `reason` (`expired`/`inactive`), `stage` (`data`, `pix_expired`, `card_declined`, `payment_other`: onde o comprador parou), `status` (`open`, o padrão e o que a lista mostrava, ou `recovered`: o mesmo e-mail voltou e pagou a mesma oferta depois, com `recovered.order_id`) e `q` (3 a 80 caracteres; busca por produto, UTM e id do lead e, só para quem lê vendas, nome, e-mail e telefone: sem `orders:read` o contato não é pesquisado; o texto nunca é registrado). Sem os filtros novos nada muda. Os dados ficam 30 dias. Sem exportação.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"product_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^prd_[A-Za-z0-9]+$"}},{"name":"offer_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^off_[A-Za-z0-9]+$"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"reason","in":"query","required":false,"schema":{"type":"string","enum":["expired","inactive"]}},{"name":"stage","in":"query","required":false,"schema":{"type":"string","enum":["data","pix_expired","card_declined","payment_other"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","recovered"]}},{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":2048,"pattern":"^a1_[0-9a-f]+$"}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Página de checkouts abandonados.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AbandonedCheckoutPage"},"example":{"data":[{"id":"lead_5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e","checkout_session_id":"cs_2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","product_id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","product_name":"Curso de fotografia","amount_minor":"9900","currency":"BRL","customer":{"name":"Ana Compradora","email":"ana@example.com","phone":"+5511987654321","visibility":"full"},"captured_at":"2026-11-06T12:00:00.000Z","reason":"expired","stage":"pix_expired","recovered":null}],"next_cursor":null,"timezone":"America/Sao_Paulo"}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["reports:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","SERVICE_UNAVAILABLE","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/reports/abandoned-checkouts/summary":{"get":{"operationId":"getAbandonedCheckoutSummary","tags":["Reports"],"summary":"Resumo dos checkouts abandonados","description":"Totais do relatório de abandonos com o **mesmo predicado e a mesma deduplicação** da lista (`GET /v1/reports/abandoned-checkouts`): abandonados (`open`), recuperados (`recovered`: o mesmo e-mail voltou e pagou a mesma oferta depois), a taxa de recuperação em pontos-base, a soma por moeda e as facetas por etapa (`stage`) e por motivo (`reason`). Aceita os filtros da lista, sem `limit` nem `cursor`; cada faceta segue todos os filtros menos o seu e conta o conjunto do `status` pedido (padrão `open`). Sem nenhum dado do comprador. `complete: false` quando o período começa antes de 30 dias atrás (ou não tem início): os leads são anonimizados após 30 dias e saem dos totais. A busca `q` varre produto, UTM e id do lead e, só para quem tem `orders:read`, nome, e-mail e telefone; o texto nunca é registrado. Tempo máximo de 4 s (`503` com `Retry-After`).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"product_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^prd_[A-Za-z0-9]+$"}},{"name":"offer_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^off_[A-Za-z0-9]+$"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"reason","in":"query","required":false,"schema":{"type":"string","enum":["expired","inactive"]}},{"name":"stage","in":"query","required":false,"schema":{"type":"string","enum":["data","pix_expired","card_declined","payment_other"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","recovered"]}},{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":3,"maxLength":80}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Resumo.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AbandonedCheckoutSummary"},"example":{"timezone":"America/Sao_Paulo","generated_at":"2026-11-11T14:02:11.482Z","range":{"from":"2026-11-05","to":"2026-11-11"},"retention_days":30,"complete":true,"open":{"count":12},"recovered":{"count":5},"recovery_rate_bps":2941,"currencies":[{"currency":"BRL","open_amount_minor":"148200","recovered_abandoned_amount_minor":"62000","recovered_order_amount_minor":"70500"}],"facets":{"by_stage":{"data":4,"pix_expired":6,"card_declined":2,"payment_other":0},"by_reason":{"expired":9,"inactive":3}}}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["reports:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","SERVICE_UNAVAILABLE","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/reports/abandoned-checkouts/{leadId}/recovery-link":{"post":{"operationId":"createCheckoutRecoveryLink","tags":["Reports"],"summary":"Gerar link de recuperação","description":"Cria uma **nova** sessão de checkout para a oferta do abandono, válida por 24 horas, com o seu próprio `client_secret` (nunca o da sessão abandonada). A URL do comprador é `https://checkout.<domínio>/{id}?secret={client_secret}`, sem nenhum dado do comprador. Oferta inativa → `400`; comprador que já pagou → `409 INVALID_STATE_TRANSITION`. Auditado. Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`. Um replay devolve a sessão sem o segredo (`secret_already_revealed: true`).","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"leadId","in":"path","required":true,"description":"Id do checkout abandonado (`lead_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyRequest"},"example":{}}}},"responses":{"201":{"description":"Sessão de recuperação criada (ou replay sem o segredo).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CreatedCheckoutRecoveryLink"},{"$ref":"#/components/schemas/ReplayedCheckoutRecoveryLink"}]},"example":{"id":"cs_8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b","offer_id":"off_1b2c3d4e5f60718293a4b5c6d7e8f901","amount_minor":"9900","currency":"BRL","status":"open","payment_intent_id":null,"expires_at":"2026-11-07T12:00:00.000Z","client_secret":"csec_EXEMPLO_segredo_novo_de_uso_unico","lead_id":"lead_5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `INVALID_STATE_TRANSITION`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["orders:read","offers:read"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","INVALID_STATE_TRANSITION","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/reports/abandoned-checkouts/{leadId}/reminders":{"post":{"operationId":"createAbandonedCheckoutReminder","tags":["Reports"],"summary":"Registrar um lembrete de recuperação (\"n de 3\")","description":"Reserva a próxima tentativa de lembrete do lead sob o lock do lead (duas requisições simultâneas na terceira: uma ganha) e registra `handed_off` para o canal `whatsapp_handoff`: o console abre o `wa.me` com o telefone que o seller já vê, e a Wolf não sabe se ele enviou. No máximo 3 lembretes por lead somando todas as vias (`409 RECOVERY_REMINDER_LIMIT_REACHED`), com 1 hora entre eles (`429 MESSAGE_RESEND_LIMIT_REACHED`). Lead já convertido ou expurgado → `409 MESSAGE_NOT_ALLOWED_FOR_STATE`; sem telefone → `409 MESSAGE_RECIPIENT_UNAVAILABLE`. O canal `email` fica desligado até o texto jurídico (`409 MESSAGE_NOT_ALLOWED_FOR_STATE`). Auditado. Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`. O ambiente decide o modo (`BUYER_MESSAGES_MODE`): `off` desliga os envios (`503 BUYER_MESSAGES_DISABLED`; o histórico continua legível) e `simulate` registra a mensagem sem enviar nada a ninguém — a linha mostra `mode: simulated` e o estado `simulated`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"leadId","in":"path","required":true,"description":"Id do checkout abandonado (`lead_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAbandonedCheckoutReminderRequest"},"example":{"channel":"whatsapp_handoff"}}}},"responses":{"202":{"description":"Tentativa reservada e handoff registrado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AbandonedCheckoutReminderHandoff"},"example":{"message_id":"msg_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d","channel":"whatsapp_handoff","mode":"handoff","status":"handed_off","attempt_no":1,"max":3,"created_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `MESSAGE_NOT_ALLOWED_FOR_STATE`, `MESSAGE_RECIPIENT_UNAVAILABLE`, `RECOVERY_REMINDER_LIMIT_REACHED`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `MESSAGE_RESEND_LIMIT_REACHED`, `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `BUYER_MESSAGES_DISABLED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["orders:read","offers:read"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","BUYER_MESSAGES_DISABLED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","MESSAGE_NOT_ALLOWED_FOR_STATE","MESSAGE_RECIPIENT_UNAVAILABLE","MESSAGE_RESEND_LIMIT_REACHED","RATE_LIMITED","RECOVERY_REMINDER_LIMIT_REACHED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/reports/sales-breakdown":{"get":{"operationId":"getSalesBreakdown","tags":["Reports"],"summary":"Construtor de relatórios de vendas","description":"Agrega as vendas do seller por até 2 dimensões de um catálogo fechado (`product`, `day`, `method`, `utm_source`, `utm_medium`, `utm_campaign`) e 1 a 8 métricas (`sales_count`, `gross_minor`, `average_ticket_minor`, `refunds_minor`, `refund_rate_bps`, `disputes_minor`, `fees_minor`, `net_minor`). `from` e `to` são dias locais da organização (no máximo 92 dias, sem datas futuras). A base é a do painel: os pagamentos criados na janela, na moeda pedida; o bruto é a soma dos aprovados e fecha com o painel para as mesmas datas (`meta.basis: \"payment_created_at\"`: um período já encerrado pode mudar com um reembolso ou uma liquidação tardios; `meta.generated_at` diz quando foi calculado). Reembolsos, contestações e a taxa Wolf são os dos pagamentos da janela em qualquer data; a taxa só dos pagamentos já liquidados (`fees_complete`), e `net_minor` é `null` enquanto algum pagamento do grupo não foi liquidado. Com `product` (dimensão ou filtro) cada pagamento vira uma linha por item do pedido e reembolso, contestação e taxa são repartidos entre os itens pro rata do valor, em inteiros, pelo maior resto (`meta.allocation`); `sales_count` por produto conta os pagamentos que contêm o produto. Devolve no máximo `limit` grupos (até 200) mais `other`, que soma o restante; ticket e taxa de reembolso são recalculados das somas, nunca médias de médias. `fees_minor` e `net_minor` exigem também `finance:read` (`403` sem ele). Sem paginação por cursor: a consulta agrega e é limitada por `limit`. Vale uma consulta por vez, com tempo máximo de 4 s: acima disso `503 SERVICE_UNAVAILABLE` com `Retry-After`, nunca um resultado parcial. Dinheiro em unidades menores, como string. Nenhuma métrica de lucro, ROI, tráfego, afiliado ou estado existe.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"currency","in":"query","required":false,"schema":{"default":"BRL","type":"string","pattern":"^[A-Z]{3}$"}},{"name":"dimensions","in":"query","required":false,"schema":{"type":"string","maxLength":256}},{"name":"metrics","in":"query","required":true,"schema":{"type":"string","maxLength":256}},{"name":"product_id","in":"query","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^prd_[A-Za-z0-9]+$"}},{"name":"method","in":"query","required":false,"schema":{"type":"string","enum":["card","pix"]}},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["sales_count","gross_minor","average_ticket_minor","refunds_minor","refund_rate_bps","disputes_minor","fees_minor","net_minor","key"]}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":200}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Relatório agregado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SalesBreakdown"},"example":{"meta":{"timezone":"America/Sao_Paulo","currency":"BRL","range":{"from":"2026-11-01","to":"2026-11-10","days":10},"window":{"from":"2026-11-01T03:00:00.000Z","to":"2026-11-10T14:02:11.000Z"},"basis":"payment_created_at","allocation":"pro_rata_items","generated_at":"2026-11-11T14:02:11.482Z","edition":"production-simulation","dimensions":["product"],"metrics":["sales_count","gross_minor","net_minor"]},"rows":[{"keys":{"product":{"id":"prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e","name":"Curso de fotografia"}},"values":{"sales_count":12,"gross_minor":"148200","net_minor":null},"fees_complete":false}],"other":{"groups":37,"values":{"sales_count":40,"gross_minor":"91000","net_minor":null},"fees_complete":false},"totals":{"values":{"sales_count":52,"gross_minor":"239200","net_minor":null},"fees_complete":false},"groups_total":38,"truncated":true}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["reports:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","SERVICE_UNAVAILABLE","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/settlements":{"get":{"operationId":"listSettlements","tags":["Payouts, Settlements & Disputes"],"summary":"Listar liquidações sintéticas","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Lotes de liquidação.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SettlementBatch"}}},"required":["data"]},"example":{"data":[{"id":"stb_4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f","provider_id":"simulator","external_id":"sim_lote_2026_11_06","window_start":"2026-11-05T00:00:00.000Z","window_end":"2026-11-06T00:00:00.000Z","status":"completed","origin":"admin","synthetic_obligation":true,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:05.000Z","finalized_at":"2026-11-06T12:00:05.000Z","lines":[{"id":"stl_6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b","charge_id":"chg_8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d","amount_minor":"9900","fee_minor":"396","currency":"BRL","status":"available","available_minor":"9504","reserve_minor":"0","reconciliation_case_id":null}]}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["finance:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED"]}},"/v1/settlements/{id}":{"get":{"operationId":"getSettlement","tags":["Payouts, Settlements & Disputes"],"summary":"Consultar liquidação sintética","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do lote (`stb_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Lote de liquidação.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettlementBatch"},"example":{"id":"stb_4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f","provider_id":"simulator","external_id":"sim_lote_2026_11_06","window_start":"2026-11-05T00:00:00.000Z","window_end":"2026-11-06T00:00:00.000Z","status":"completed","origin":"admin","synthetic_obligation":true,"created_at":"2026-11-06T12:00:00.000Z","updated_at":"2026-11-06T12:00:05.000Z","finalized_at":"2026-11-06T12:00:05.000Z","lines":[{"id":"stl_6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b","charge_id":"chg_8a7b6c5d4e3f2a1b0c9d8e7f6a5b4c3d","amount_minor":"9900","fee_minor":"396","currency":"BRL","status":"available","available_minor":"9504","reserve_minor":"0","reconciliation_case_id":null}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["finance:read"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/simulator/payment-intents/{id}/pix/pay":{"post":{"operationId":"simulatePixPayment","tags":["Simulator"],"summary":"Simular o pagamento de um Pix","description":"Gera o evento de provedor `pix.paid` do PaymentIntent confirmado com Pix: o pagamento vira `succeeded` (Charge, ledger e webhooks `payment.*` na mesma transação). Repetir não faz nada. Só existe na edição de simulação. Com o Pix desligado no ambiente (kill switch `PIX_SIMULATION_ENABLED`) → `409 PAYMENT_METHOD_UNAVAILABLE`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do PaymentIntent (`pi_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"PaymentIntent após o pagamento simulado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntent"},"example":{"id":"pi_3b9f0c2d1e4a5b6c7d8e9f0a1b2c3d4e","order_id":null,"amount_minor":"9900","currency":"BRL","provider_id":"simulator","failure_code":null,"payment_method_types":["pix","card"],"description":"Curso de fotografia","metadata":{"pedido_interno":"A-1001"},"payer":{"name":"Ana Compradora","email":"ana@example.com","phone":"+5511987654321","document":{"type":"cpf","last2":"25"}},"cancellation_reason":null,"status":"succeeded","latest_provider_attempt_id":"pat_5d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a","payment_method_type":"pix","next_action":null,"expires_at":"2026-11-06T12:30:00.000Z"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `INVALID_STATE_TRANSITION`, `PAYMENT_METHOD_UNAVAILABLE`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["payments:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-edition":"production-simulation","x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","INVALID_STATE_TRANSITION","PAYMENT_METHOD_UNAVAILABLE","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/simulator/payment-intents/{id}/reconcile":{"post":{"operationId":"reconcilePaymentIntent","tags":["Simulator"],"summary":"Reconciliar PaymentIntent agora","description":"Consulta o provedor simulado pela tentativa em estado desconhecido e aplica o resultado, sem esperar o ciclo automático de reconciliação.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do PaymentIntent (`pi_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Resultado definitivo aplicado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntent"}}}},"202":{"description":"O provedor ainda não tem resultado definitivo.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentIntent"}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Erro: `PAYMENT_DECLINED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["payments:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-edition":"production-simulation","x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","PAYMENT_DECLINED","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/simulator/refunds/{id}/reconcile":{"post":{"operationId":"reconcileRefund","tags":["Simulator"],"summary":"Reconciliar reembolso agora","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do reembolso (`rfd_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Resultado definitivo aplicado.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}}},"202":{"description":"O provedor ainda não tem resultado definitivo.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `REFUND_FAILED`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["payments:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-edition":"production-simulation","x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","REFUND_FAILED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/webhooks/deliveries":{"get":{"operationId":"listWebhookDeliveries","tags":["Webhooks"],"summary":"Listar entregas recentes","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Entregas, mais recentes primeiro.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}},"required":["data"]},"example":{"data":[{"id":"whd_5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c","endpoint_id":"whe_3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a","event_id":"evt_7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e","event_type":"webhook.test","attempt":1,"status":"pending","response_status":null,"latency_ms":null,"created_at":"2026-11-06T12:00:00.000Z"}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["webhooks:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED"]}},"/v1/webhooks/deliveries/{id}/replay":{"post":{"operationId":"replayWebhookDelivery","tags":["Webhooks"],"summary":"Reenviar entrega (replay)","description":"Nova tentativa do mesmo evento (mesmo `event_id`, `attempt` maior) para o mesmo endpoint. Endpoint desativado → `409 WEBHOOK_ENDPOINT_DISABLED`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id da entrega de origem (`whd_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyRequest"},"example":{}}}},"responses":{"202":{"description":"Nova entrega criada.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"},"example":{"id":"whd_5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c","endpoint_id":"whe_3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a","event_id":"evt_7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e","event_type":"payment.paid","attempt":2,"status":"pending","response_status":null,"latency_ms":null,"created_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `TENANT_SELECTION_REQUIRED`, `WEBHOOK_ENDPOINT_DISABLED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["webhooks:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED","WEBHOOK_ENDPOINT_DISABLED"]}},"/v1/webhooks/endpoints":{"get":{"operationId":"listWebhookEndpoints","tags":["Webhooks"],"summary":"Listar endpoints","description":"Lista os endpoints do seller, sem os excluídos.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Endpoints.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"required":["data"]},"example":{"data":[{"id":"whe_3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a","url":"https://example.com/wolf/webhooks","enabled":true,"status":"active","disabled_reason":null,"consecutive_failures":0,"selected_events":["payment.paid","payment.canceled"],"product_ids":[],"payment_methods":[],"delivery_mode":"live","secret_rotated_at":null,"deleted_at":null,"created_at":"2026-11-06T12:00:00.000Z"}]}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["webhooks:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","RATE_LIMITED","TENANT_SELECTION_REQUIRED"]},"post":{"operationId":"createWebhookEndpoint","tags":["Webhooks"],"summary":"Criar endpoint","description":"Cadastra uma URL HTTPS. `live` (padrão recomendado) exige sessão humana do seller e devolve o `signing_secret` uma única vez; em produção `simulated` é recusado (`400`). URLs da própria Wolf e destinos privados são recusados. Com `SELLER_ACCOUNT_SECURITY_ENABLED` ligada (SPEC-0052) a sessão humana precisa de reautenticação recente: com 2FA ativo só o TOTP serve (a senha não), sem 2FA senha ou TOTP; senão `403 STEP_UP_REQUIRED`. (Só a criação `live` exige; `simulated` não.) Repetir a requisição com a mesma `Idempotency-Key` e o mesmo corpo devolve a mesma resposta com `idempotent-replayed: true`; corpo diferente → `409 IDEMPOTENCY_CONFLICT`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpointRequest"},"example":{"url":"https://example.com/wolf/webhooks","selected_events":["payment.paid","payment.canceled"],"delivery_mode":"live"}}}},"responses":{"201":{"description":"Endpoint criado (`live` com o segredo, replay sem ele, ou `simulated`).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/CreatedLiveWebhookEndpoint"},{"$ref":"#/components/schemas/ReplayedLiveWebhookEndpoint"}]},{"$ref":"#/components/schemas/WebhookEndpoint"}]},"example":{"id":"whe_3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a","url":"https://example.com/wolf/webhooks","enabled":true,"status":"active","disabled_reason":null,"consecutive_failures":0,"selected_events":["payment.paid","payment.canceled"],"product_ids":[],"payment_methods":[],"delivery_mode":"live","secret_rotated_at":null,"deleted_at":null,"created_at":"2026-11-06T12:00:00.000Z","signing_secret":"whsec_live_EXEMPLO_nao_use_em_producao"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`, `STEP_UP_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["webhooks:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","RATE_LIMITED","SERVICE_UNAVAILABLE","STEP_UP_REQUIRED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/webhooks/endpoints/{id}":{"patch":{"operationId":"updateWebhookEndpoint","tags":["Webhooks"],"summary":"Atualizar endpoint (status e filtros)","description":"`status`: `disabled` grava `disabled_reason: \"manual\"`; `active` limpa o motivo e zera `consecutive_failures`. `product_ids` (produtos da própria conta) e `payment_methods` (`card`, `pix`) substituem os filtros de entrega; lista vazia = todos. A entrega respeita os três filtros (eventos, produtos e métodos). Eventos de uma venda (`payment.*`, `refund.*`, `dispute.*`, `order.*`, `checkout.session.*`) só passam por um filtro não vazio quando o produto ou o método é conhecido e está na lista; eventos da conta (`payout.*`, `settlement.*`, …) ignoram os filtros de produto e método. Informe ao menos um campo; repetir os valores atuais não muda nada. Com `SELLER_ACCOUNT_SECURITY_ENABLED` ligada (SPEC-0052) a sessão humana precisa de reautenticação recente: com 2FA ativo só o TOTP serve (a senha não), sem 2FA senha ou TOTP; senão `403 STEP_UP_REQUIRED`. (Só reativar, `status: \"active\"`, exige; desativar e os filtros não.)","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do endpoint (`whe_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookEndpointRequest"},"example":{"product_ids":["prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e"],"payment_methods":["pix"]}}}},"responses":{"200":{"description":"Endpoint.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"},"example":{"id":"whe_3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a","url":"https://example.com/wolf/webhooks","enabled":true,"status":"active","disabled_reason":null,"consecutive_failures":0,"selected_events":["payment.paid","payment.canceled"],"product_ids":["prd_7e6d5c4b3a2918f7e6d5c4b3a2918f7e"],"payment_methods":["pix"],"delivery_mode":"live","secret_rotated_at":null,"deleted_at":null,"created_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`, `STEP_UP_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `INVALID_STATE_TRANSITION`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["webhooks:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","INVALID_STATE_TRANSITION","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","STEP_UP_REQUIRED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]},"delete":{"operationId":"deleteWebhookEndpoint","tags":["Webhooks"],"summary":"Excluir endpoint","description":"Exclusão lógica e terminal: o endpoint some da listagem e responde `404` depois.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do endpoint (`whe_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Endpoint excluído.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"},"example":{"id":"whe_3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a","url":"https://example.com/wolf/webhooks","enabled":false,"status":"deleted","disabled_reason":null,"consecutive_failures":0,"selected_events":["payment.paid","payment.canceled"],"product_ids":[],"payment_methods":[],"delivery_mode":"live","secret_rotated_at":null,"deleted_at":"2026-11-06T12:10:00.000Z","created_at":"2026-11-06T12:00:00.000Z"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `INVALID_STATE_TRANSITION`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["webhooks:write"],"x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","INTERNAL_ERROR","INVALID_STATE_TRANSITION","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED"]}},"/v1/webhooks/endpoints/{id}/rotate-secret":{"post":{"operationId":"rotateWebhookEndpointSecret","tags":["Webhooks"],"summary":"Rotacionar signing secret","description":"Só endpoint `live` e só sessão humana do seller (API key → `403`). O segredo novo vale na hora e é exibido uma única vez; um replay devolve `secret_already_revealed: true`. Com `SELLER_ACCOUNT_SECURITY_ENABLED` ligada (SPEC-0052) a sessão humana precisa de reautenticação recente: com 2FA ativo só o TOTP serve (a senha não), sem 2FA senha ou TOTP; senão `403 STEP_UP_REQUIRED`.","security":[{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do endpoint (`whe_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyRequest"},"example":{}}}},"responses":{"200":{"description":"Endpoint com o novo segredo (ou replay sem ele).","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RotatedWebhookEndpointSecret"},{"$ref":"#/components/schemas/ReplayedRotatedWebhookEndpointSecret"}]},"example":{"id":"whe_3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a","url":"https://example.com/wolf/webhooks","enabled":true,"status":"active","disabled_reason":null,"consecutive_failures":0,"selected_events":["payment.paid","payment.canceled"],"product_ids":[],"payment_methods":[],"delivery_mode":"live","secret_rotated_at":"2026-11-06T12:05:00.000Z","deleted_at":null,"created_at":"2026-11-06T12:00:00.000Z","signing_secret":"whsec_live_EXEMPLO_novo_segredo"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`, `STEP_UP_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `INVALID_STATE_TRANSITION`, `TENANT_SELECTION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Erro: `SERVICE_UNAVAILABLE`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["webhooks:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","INVALID_STATE_TRANSITION","RATE_LIMITED","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","STEP_UP_REQUIRED","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED"]}},"/v1/webhooks/endpoints/{id}/test":{"post":{"operationId":"testWebhookEndpoint","tags":["Webhooks"],"summary":"Enviar evento de teste","description":"Enfileira um evento `webhook.test` (uma tentativa, assinada como os eventos de domínio). Endpoint desativado → `409 WEBHOOK_ENDPOINT_DISABLED`.","security":[{"apiKey":[]},{"sellerSession":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"Id do endpoint (`whe_...`).","schema":{"type":"string","minLength":1}},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyRequest"},"example":{}}}},"responses":{"202":{"description":"Entrega de teste criada.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"idempotent-replayed":{"$ref":"#/components/headers/IdempotentReplayed"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"},"example":{"id":"whd_5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c","endpoint_id":"whe_3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a","event_id":"evt_7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e","event_type":"webhook.test","attempt":1,"status":"pending","response_status":null,"latency_ms":null,"created_at":"2026-11-06T12:00:00.000Z"}}}},"400":{"description":"Erro: `IDEMPOTENCY_KEY_REQUIRED`, `VALIDATION_FAILED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Erro: `AUTHENTICATION_REQUIRED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Erro: `FORBIDDEN`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Erro: `RESOURCE_NOT_FOUND`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Erro: `IDEMPOTENCY_CONFLICT`, `IDEMPOTENCY_IN_PROGRESS`, `TENANT_SELECTION_REQUIRED`, `WEBHOOK_ENDPOINT_DISABLED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Erro: `RATE_LIMITED`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"retry-after":{"$ref":"#/components/headers/RetryAfter"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Erro: `INTERNAL_ERROR`.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-wolf-scopes":["webhooks:write"],"x-wolf-idempotency":"required","x-wolf-rate-limits":["api_authenticated"],"x-wolf-error-codes":["AUTHENTICATION_REQUIRED","FORBIDDEN","IDEMPOTENCY_CONFLICT","IDEMPOTENCY_IN_PROGRESS","IDEMPOTENCY_KEY_REQUIRED","INTERNAL_ERROR","RATE_LIMITED","RESOURCE_NOT_FOUND","TENANT_SELECTION_REQUIRED","VALIDATION_FAILED","WEBHOOK_ENDPOINT_DISABLED"]}}},"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["code","message","request_id"]}},"required":["error"]},"PaymentNextAction":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"pix_qr"},"qr_code_payload":{"type":"string","minLength":1},"expires_at":{"type":"string"}},"required":["type","qr_code_payload","expires_at"]}]},"PayerView":{"type":"object","properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"document":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["cpf","cnpj"]},"last2":{"type":"string","pattern":"^[0-9]{2}$"}},"required":["type","last2"]},{"type":"null"}]}},"required":["name","email","phone","document"]},"PaymentIntent":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^pi_.*"},"order_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^ord_.*"},{"type":"null"}]},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["requires_payment_method","requires_action","processing","succeeded","failed","canceled"]},"provider_id":{"type":"string"},"latest_provider_attempt_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^pat_.*"},{"type":"null"}]},"failure_code":{"type":["string","null"]},"payment_method_types":{"minItems":1,"type":"array","items":{"type":"string","enum":["card","pix"]}},"payment_method_type":{"anyOf":[{"type":"string","enum":["card","pix"]},{"type":"null"}]},"description":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"payer":{"anyOf":[{"$ref":"#/components/schemas/PayerView"},{"type":"null"}]},"next_action":{"anyOf":[{"$ref":"#/components/schemas/PaymentNextAction"},{"type":"null"}]},"expires_at":{"type":["string","null"]},"cancellation_reason":{"anyOf":[{"type":"string","enum":["expired"]},{"type":"null"}]}},"required":["id","order_id","amount_minor","currency","status","provider_id","latest_provider_attempt_id","failure_code","payment_method_types","payment_method_type","description","metadata","payer","next_action","expires_at","cancellation_reason"]},"PaymentActivity":{"type":"object","properties":{"payment_intent":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^pi_.*"},"order_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^ord_.*"},{"type":"null"}]},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["requires_payment_method","requires_action","processing","succeeded","failed","canceled"]},"provider_id":{"type":"string"},"latest_provider_attempt_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^pat_.*"},{"type":"null"}]},"failure_code":{"type":["string","null"]},"payment_method_types":{"minItems":1,"type":"array","items":{"type":"string","enum":["card","pix"]}},"payment_method_type":{"anyOf":[{"type":"string","enum":["card","pix"]},{"type":"null"}]},"description":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"payer":{"anyOf":[{"$ref":"#/components/schemas/PayerView"},{"type":"null"}]},"next_action":{"anyOf":[{"$ref":"#/components/schemas/PaymentNextAction"},{"type":"null"}]},"expires_at":{"type":["string","null"]},"cancellation_reason":{"anyOf":[{"type":"string","enum":["expired"]},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","order_id","amount_minor","currency","status","provider_id","latest_provider_attempt_id","failure_code","payment_method_types","payment_method_type","description","metadata","payer","next_action","expires_at","cancellation_reason","created_at","updated_at"]},"attempts":{"maxItems":25,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^pat_.*"},"state":{"type":"string","enum":["created","submitted","succeeded","failed","unknown","reconciled_succeeded","reconciled_failed"]},"provider_id":{"type":"string"},"external_id":{"type":["string","null"]},"canonical_error_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","state","provider_id","external_id","canonical_error_code","created_at","updated_at"]}},"refunds":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^rfd_.*"},"payment_intent_id":{"type":"string","format":"starts_with","pattern":"^pi_.*"},"charge_id":{"type":"string","format":"starts_with","pattern":"^chg_.*"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["created","processing","succeeded","failed","unknown"]},"provider_id":{"type":"string"},"external_id":{"type":["string","null"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","payment_intent_id","charge_id","amount_minor","currency","status","provider_id","external_id","failure_code","created_at","updated_at"]}},"disputes":{"maxItems":50,"type":"array","items":{"$ref":"#/components/schemas/Dispute"}},"truncated":{"type":"object","properties":{"attempts":{"type":"boolean"},"refunds":{"type":"boolean"},"disputes":{"type":"boolean"}},"required":["attempts","refunds","disputes"]}},"required":["payment_intent","attempts","refunds","disputes","truncated"]},"Refund":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^rfd_.*"},"payment_intent_id":{"type":"string","format":"starts_with","pattern":"^pi_.*"},"charge_id":{"type":"string","format":"starts_with","pattern":"^chg_.*"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["created","processing","succeeded","failed","unknown"]},"provider_id":{"type":"string"},"external_id":{"type":["string","null"]},"failure_code":{"type":["string","null"]}},"required":["id","payment_intent_id","charge_id","amount_minor","currency","status","provider_id","external_id","failure_code"]},"Dispute":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^dsp_.*"},"payment_intent_id":{"type":"string","format":"starts_with","pattern":"^pi_.*"},"charge_id":{"type":"string","format":"starts_with","pattern":"^chg_.*"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["created","won","lost"]},"reason_code":{"type":"string","enum":["fraudulent","product_not_received","not_as_described","duplicate","other"]},"provider_id":{"type":"string"},"external_id":{"type":"string"},"provider_status":{"type":"string"},"synthetic_obligation":{"type":"boolean","const":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"resolved_at":{"type":["string","null"]}},"required":["id","payment_intent_id","charge_id","amount_minor","currency","status","reason_code","provider_id","external_id","provider_status","synthetic_obligation","created_at","updated_at","resolved_at"]},"Payout":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^pyo_.*"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["created","paid","failed"]},"origin":{"type":"string","enum":["admin","seller"]},"provider_id":{"type":"string"},"provider_request_key":{"type":"string"},"external_id":{"type":["string","null"]},"destination_ref":{"type":"string","pattern":"^sim_[A-Za-z0-9_-]{3,120}$"},"destination_label":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"provider_status":{"type":["string","null"]},"synthetic_obligation":{"type":"boolean","const":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"resolved_at":{"type":["string","null"]}},"required":["id","amount_minor","currency","status","origin","provider_id","provider_request_key","external_id","destination_ref","provider_status","synthetic_obligation","created_at","updated_at","resolved_at"]},"FinancePayout":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^pyo_.*"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["created","paid","failed"]},"origin":{"type":"string","enum":["admin","seller"]},"destination_ref":{"type":"string","pattern":"^sim_[A-Za-z0-9_-]{3,120}$"},"destination_label":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"synthetic_obligation":{"type":"boolean","const":true},"created_at":{"type":"string"},"resolved_at":{"type":["string","null"]}},"required":["id","amount_minor","currency","status","origin","destination_ref","synthetic_obligation","created_at","resolved_at"]},"FinancePayoutList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FinancePayout"}}},"required":["data"]},"Notification":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"kind":{"type":"string","enum":["pix_issued","payment_approved","payment_declined","refund_completed","payout_requested","payout_paid","payout_failed"]},"occurred_at":{"type":"string"},"amount_minor":{"type":"string","pattern":"^[0-9]+$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"resource_id":{"type":"string","minLength":1,"maxLength":128},"reference":{"type":"string","pattern":"^[A-Z0-9]{1,8}$"},"payment_method":{"anyOf":[{"type":"string","enum":["card","pix"]},{"type":"null"}]},"payout_origin":{"anyOf":[{"type":"string","enum":["admin","seller"]},{"type":"null"}]}},"required":["id","kind","occurred_at","amount_minor","currency","resource_id","reference","payment_method","payout_origin"]},"NotificationPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}},"next_cursor":{"type":"string","maxLength":512,"pattern":"^n1_[0-9a-f]+$"},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]},"NotificationWithState":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"kind":{"type":"string","enum":["pix_issued","payment_approved","payment_declined","refund_completed","payout_requested","payout_paid","payout_failed"]},"occurred_at":{"type":"string"},"amount_minor":{"type":"string","pattern":"^[0-9]+$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"resource_id":{"type":"string","minLength":1,"maxLength":128},"reference":{"type":"string","pattern":"^[A-Z0-9]{1,8}$"},"payment_method":{"anyOf":[{"type":"string","enum":["card","pix"]},{"type":"null"}]},"payout_origin":{"anyOf":[{"type":"string","enum":["admin","seller"]},{"type":"null"}]},"critical":{"type":"boolean"}},"required":["id","kind","occurred_at","amount_minor","currency","resource_id","reference","payment_method","payout_origin","critical"]},"NotificationPageWithState":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NotificationWithState"}},"next_cursor":{"type":"string","maxLength":512,"pattern":"^n1_[0-9a-f]+$"},"has_more":{"type":"boolean"},"quiet_now":{"type":"boolean"}},"required":["data","next_cursor","has_more","quiet_now"]},"NotificationPreferences":{"type":"object","properties":{"version":{"type":"number","const":1},"quiet_hours_enabled":{"type":"boolean"},"events":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z0-9_]{1,32}$"},"additionalProperties":{"type":"object","properties":{"email":{"type":"boolean"},"app":{"type":"boolean"}},"required":["email","app"]}}},"required":["version","quiet_hours_enabled","events"]},"NotificationPreference":{"type":"object","properties":{"scope":{"type":"string","const":"notifications"},"value":{"anyOf":[{"$ref":"#/components/schemas/NotificationPreferences"},{"type":"null"}]},"updated_at":{"type":["string","null"]}},"required":["scope","value","updated_at"]},"DashboardLayout":{"type":"object","properties":{"version":{"type":"number","const":1},"widgets":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"visible":{"type":"boolean"}},"required":["id","visible"]}}},"required":["version","widgets"]},"DashboardPreference":{"type":"object","properties":{"scope":{"type":"string","enum":["dashboard"]},"value":{"anyOf":[{"$ref":"#/components/schemas/DashboardLayout"},{"type":"null"}]},"updated_at":{"type":["string","null"]}},"required":["scope","value","updated_at"]},"SettlementBatch":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^stb_.*"},"provider_id":{"type":"string"},"external_id":{"type":"string"},"window_start":{"type":"string"},"window_end":{"type":"string"},"status":{"type":"string","enum":["created","processing","completed","requires_review"]},"origin":{"type":"string","enum":["admin","auto"]},"synthetic_obligation":{"type":"boolean","const":true},"created_at":{"type":"string"},"updated_at":{"type":"string"},"finalized_at":{"type":["string","null"]},"lines":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^stl_.*"},"charge_id":{"type":"string","format":"starts_with","pattern":"^chg_.*"},"amount_minor":{"type":"string"},"fee_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["pending","available","mismatch"]},"available_minor":{"type":["string","null"]},"reserve_minor":{"type":["string","null"]},"reconciliation_case_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^rcc_.*"},{"type":"null"}]}},"required":["id","charge_id","amount_minor","fee_minor","currency","status","available_minor","reserve_minor","reconciliation_case_id"]}}},"required":["id","provider_id","external_id","window_start","window_end","status","origin","synthetic_obligation","created_at","updated_at","finalized_at","lines"]},"Order":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^ord_.*"},"offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"product_id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"checkout_session_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^cs_.*"},{"type":"null"}]},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["pending_payment","paid","canceled","expired"]},"paid_payment_intent_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^pi_.*"},{"type":"null"}]},"paid_charge_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^chg_.*"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"paid_at":{"type":["string","null"]},"canceled_at":{"type":["string","null"]},"expired_at":{"type":["string","null"]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^oi_.*"},"kind":{"type":"string","enum":["main","bump"]},"offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"product_id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"offer_bump_id":{"anyOf":[{"type":"string","pattern":"^ob_[A-Za-z0-9]{1,64}$"},{"type":"null"}]},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"position":{"type":"integer","minimum":0,"maximum":3}},"required":["id","kind","offer_id","product_id","offer_bump_id","amount_minor","currency","position"]}},"origin":{"type":"string","enum":["front","upsell","downsell"]},"parent_order_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^ord_.*"},{"type":"null"}]}},"required":["id","offer_id","product_id","checkout_session_id","amount_minor","currency","status","paid_payment_intent_id","paid_charge_id","created_at","updated_at","paid_at","canceled_at","expired_at","items","origin","parent_order_id"]},"OrderPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"next_cursor":{"anyOf":[{"type":"string","maxLength":2048,"pattern":"^o1_[0-9a-f]+$"},{"type":"null"}]}},"required":["data","next_cursor"]},"Product":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","active","archived"]},"created_at":{"type":"string"},"description":{"type":["string","null"]},"category":{"anyOf":[{"type":"string","enum":["negocios_empreendedorismo","marketing_vendas","financas_investimentos","saude_bem_estar","desenvolvimento_pessoal","educacao_concursos","idiomas","tecnologia_programacao","design_fotografia","culinaria_gastronomia","outros"]},{"type":"null"}]},"sales_page_url":{"type":["string","null"]},"guarantee_days":{"type":"integer","minimum":0,"maximum":30},"support_name":{"type":["string","null"]},"support_email":{"type":["string","null"]},"support_whatsapp":{"type":["string","null"]},"statement_descriptor":{"type":["string","null"]},"thank_you_url":{"type":["string","null"]},"delivery_mode":{"type":"string","enum":["access_links","seller_system"]},"image_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^img_.*"},{"type":"null"}]}},"required":["id","name","status","created_at","description","category","sales_page_url","guarantee_days","support_name","support_email","support_whatsapp","statement_descriptor","thank_you_url","delivery_mode","image_id"]},"ProductAccessLink":{"type":"object","properties":{"id":{"type":"string","pattern":"^pal_[A-Za-z0-9]{1,64}$"},"product_id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"label":{"type":"string"},"url":{"type":"string"},"host":{"type":"string"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"created_at":{"type":"string"}},"required":["id","product_id","label","url","host","position","created_at"]},"ProductAccessLinkList":{"type":"object","properties":{"data":{"maxItems":5,"type":"array","items":{"$ref":"#/components/schemas/ProductAccessLink"}}},"required":["data"]},"ProductListItem":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","active","archived"]},"created_at":{"type":"string"},"description":{"type":["string","null"]},"category":{"anyOf":[{"type":"string","enum":["negocios_empreendedorismo","marketing_vendas","financas_investimentos","saude_bem_estar","desenvolvimento_pessoal","educacao_concursos","idiomas","tecnologia_programacao","design_fotografia","culinaria_gastronomia","outros"]},{"type":"null"}]},"sales_page_url":{"type":["string","null"]},"guarantee_days":{"type":"integer","minimum":0,"maximum":30},"support_name":{"type":["string","null"]},"support_email":{"type":["string","null"]},"support_whatsapp":{"type":["string","null"]},"statement_descriptor":{"type":["string","null"]},"thank_you_url":{"type":["string","null"]},"delivery_mode":{"type":"string","enum":["access_links","seller_system"]},"image_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^img_.*"},{"type":"null"}]},"offer_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"active_offer_count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","name","status","created_at","description","category","sales_page_url","guarantee_days","support_name","support_email","support_whatsapp","statement_descriptor","thank_you_url","delivery_mode","image_id","offer_count","active_offer_count"]},"ProductPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductListItem"}},"next_cursor":{"anyOf":[{"type":"string","maxLength":2048,"pattern":"^c1_[0-9a-f]+$"},{"type":"null"}]}},"required":["data","next_cursor"]},"Offer":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"product_id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"name":{"type":"string"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["draft","active","archived"]},"created_at":{"type":"string"},"accepted_methods":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["pix","card"]}},"price_version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["id","product_id","name","amount_minor","currency","status","created_at","accepted_methods","price_version"]},"OfferPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Offer"}},"next_cursor":{"anyOf":[{"type":"string","maxLength":2048,"pattern":"^c1_[0-9a-f]+$"},{"type":"null"}]}},"required":["data","next_cursor"]},"OfferBump":{"type":"object","properties":{"id":{"type":"string","pattern":"^ob_[A-Za-z0-9]{1,64}$"},"offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"bump_offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"headline":{"type":"string"},"description":{"type":"string"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["active","inactive"]},"bump_offer":{"type":"object","properties":{"product_id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["draft","active","archived"]}},"required":["product_id","amount_minor","currency","status"]},"image_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^img_.*"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","offer_id","bump_offer_id","headline","description","position","status","bump_offer","image_id","created_at","updated_at"]},"OfferBumpList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OfferBump"}}},"required":["data"]},"CheckoutSession":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^cs_.*"},"offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["open","completed","expired"]},"payment_intent_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^pi_.*"},{"type":"null"}]},"expires_at":{"type":"string"}},"required":["id","offer_id","amount_minor","currency","status","payment_intent_id","expires_at"]},"CreatedCheckoutSession":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^cs_.*"},"offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["open","completed","expired"]},"payment_intent_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^pi_.*"},{"type":"null"}]},"expires_at":{"type":"string"},"client_secret":{"type":"string","format":"starts_with","pattern":"^csec_.*"}},"required":["id","offer_id","amount_minor","currency","status","payment_intent_id","expires_at","client_secret"]},"ReplayedCheckoutSession":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^cs_.*"},"offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["open","completed","expired"]},"payment_intent_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^pi_.*"},{"type":"null"}]},"expires_at":{"type":"string"},"secret_already_revealed":{"type":"boolean","const":true}},"required":["id","offer_id","amount_minor","currency","status","payment_intent_id","expires_at","secret_already_revealed"]},"CheckoutPayment":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^pi_.*"},"order_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^ord_.*"},{"type":"null"}]},"status":{"type":"string","enum":["requires_payment_method","requires_action","processing","succeeded","failed","canceled"]},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"failure_code":{"type":["string","null"]},"next_action":{"anyOf":[{"$ref":"#/components/schemas/PaymentNextAction"},{"type":"null"}]},"cancellation_reason":{"anyOf":[{"type":"string","enum":["expired"]},{"type":"null"}]}},"required":["id","order_id","status","amount_minor","currency","failure_code","next_action","cancellation_reason"]},"CapturedCheckoutLead":{"type":"object","properties":{"checkout_session_id":{"type":"string","format":"starts_with","pattern":"^cs_.*"},"captured":{"type":"boolean","const":true}},"required":["checkout_session_id","captured"]},"PublicCheckoutSession":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^cs_.*"},"offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["open","completed","expired"]},"payment_intent_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^pi_.*"},{"type":"null"}]},"expires_at":{"type":"string"},"seller":{"type":"object","properties":{"display_name":{"type":"string","minLength":1}},"required":["display_name"]},"product":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":["string","null"]},"image_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^img_.*"},{"type":"null"}]}},"required":["name","description","image_id"]},"support":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"]},"whatsapp":{"type":["string","null"]}},"required":["name","email","whatsapp"]},{"type":"null"}]},"guarantee_days":{"type":"integer","minimum":0,"maximum":30},"accepted_methods":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["pix","card"]}},"access_links":{"anyOf":[{"maxItems":5,"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"url":{"type":"string"},"host":{"type":"string"}},"required":["label","url","host"]}},{"type":"null"}]},"thank_you":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"host":{"type":"string"}},"required":["url","host"]},{"type":"null"}]},"payment":{"anyOf":[{"$ref":"#/components/schemas/CheckoutPayment"},{"type":"null"}]},"bumps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^ob_[A-Za-z0-9]{1,64}$"},"headline":{"type":"string"},"description":{"type":"string"},"product_name":{"type":"string"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"image_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^img_.*"},{"type":"null"}]}},"required":["id","headline","description","product_name","amount_minor","currency","image_id"]}},"order":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^ord_.*"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"items":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["main","bump"]},"bump_id":{"anyOf":[{"type":"string","pattern":"^ob_[A-Za-z0-9]{1,64}$"},{"type":"null"}]},"product_name":{"type":"string"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["kind","bump_id","product_name","amount_minor","currency"]}}},"required":["id","amount_minor","currency","items"]},{"type":"null"}]},"selected_bump_ids":{"type":"array","items":{"type":"string","pattern":"^ob_[A-Za-z0-9]{1,64}$"}},"upsell":{"anyOf":[{"$ref":"#/components/schemas/PublicUpsellOffer"},{"type":"null"}]},"price_changed":{"type":"boolean"},"opened_amount_minor":{"type":"string","maxLength":19,"pattern":"^[1-9][0-9]*$"}},"required":["id","offer_id","amount_minor","currency","status","payment_intent_id","expires_at","seller","product","support","guarantee_days","accepted_methods","access_links","thank_you","payment","bumps","order","selected_bump_ids","upsell"]},"PaymentLink":{"type":"object","properties":{"id":{"type":"string","pattern":"^plk_[A-Za-z0-9]{1,64}$"},"offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"status":{"type":"string","enum":["active","inactive"]},"session_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"completed_session_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"last_session_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","offer_id","status","session_count","completed_session_count","last_session_at","created_at","updated_at"]},"PaymentLinkList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PaymentLink"}}},"required":["data"]},"OpenedPaymentLinkSession":{"type":"object","properties":{"checkout_session_id":{"type":"string","format":"starts_with","pattern":"^cs_.*"},"client_secret":{"type":"string","format":"starts_with","pattern":"^csec_.*"},"expires_at":{"type":"string"}},"required":["checkout_session_id","client_secret","expires_at"]},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^whe_.*"},"url":{"type":"string","format":"uri"},"enabled":{"type":"boolean"},"status":{"type":"string","enum":["active","disabled","deleted"]},"disabled_reason":{"anyOf":[{"type":"string","enum":["manual","consecutive_failures"]},{"type":"null"}]},"consecutive_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"selected_events":{"type":"array","items":{"type":"string"}},"product_ids":{"type":"array","items":{"type":"string","format":"starts_with","pattern":"^prd_.*"}},"payment_methods":{"type":"array","items":{"type":"string","enum":["card","pix"]}},"delivery_mode":{"type":"string","enum":["simulated","live"]},"secret_rotated_at":{"type":["string","null"]},"deleted_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","url","enabled","status","disabled_reason","consecutive_failures","selected_events","product_ids","payment_methods","delivery_mode","secret_rotated_at","deleted_at","created_at"]},"CreatedLiveWebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^whe_.*"},"url":{"type":"string","format":"uri"},"enabled":{"type":"boolean"},"status":{"type":"string","enum":["active","disabled","deleted"]},"disabled_reason":{"anyOf":[{"type":"string","enum":["manual","consecutive_failures"]},{"type":"null"}]},"consecutive_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"selected_events":{"type":"array","items":{"type":"string"}},"product_ids":{"type":"array","items":{"type":"string","format":"starts_with","pattern":"^prd_.*"}},"payment_methods":{"type":"array","items":{"type":"string","enum":["card","pix"]}},"delivery_mode":{"type":"string","enum":["simulated","live"]},"secret_rotated_at":{"type":["string","null"]},"deleted_at":{"type":["string","null"]},"created_at":{"type":"string"},"signing_secret":{"type":"string","pattern":"^whsec_live_[A-Za-z0-9_-]+$"}},"required":["id","url","enabled","status","disabled_reason","consecutive_failures","selected_events","product_ids","payment_methods","delivery_mode","secret_rotated_at","deleted_at","created_at","signing_secret"]},"ReplayedLiveWebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^whe_.*"},"url":{"type":"string","format":"uri"},"enabled":{"type":"boolean"},"status":{"type":"string","enum":["active","disabled","deleted"]},"disabled_reason":{"anyOf":[{"type":"string","enum":["manual","consecutive_failures"]},{"type":"null"}]},"consecutive_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"selected_events":{"type":"array","items":{"type":"string"}},"product_ids":{"type":"array","items":{"type":"string","format":"starts_with","pattern":"^prd_.*"}},"payment_methods":{"type":"array","items":{"type":"string","enum":["card","pix"]}},"delivery_mode":{"type":"string","const":"live"},"secret_rotated_at":{"type":["string","null"]},"deleted_at":{"type":["string","null"]},"created_at":{"type":"string"},"secret_already_revealed":{"type":"boolean","const":true}},"required":["id","url","enabled","status","disabled_reason","consecutive_failures","selected_events","product_ids","payment_methods","delivery_mode","secret_rotated_at","deleted_at","created_at","secret_already_revealed"]},"RotatedWebhookEndpointSecret":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^whe_.*"},"url":{"type":"string","format":"uri"},"enabled":{"type":"boolean"},"status":{"type":"string","enum":["active","disabled","deleted"]},"disabled_reason":{"anyOf":[{"type":"string","enum":["manual","consecutive_failures"]},{"type":"null"}]},"consecutive_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"selected_events":{"type":"array","items":{"type":"string"}},"product_ids":{"type":"array","items":{"type":"string","format":"starts_with","pattern":"^prd_.*"}},"payment_methods":{"type":"array","items":{"type":"string","enum":["card","pix"]}},"delivery_mode":{"type":"string","const":"live"},"secret_rotated_at":{"type":["string","null"]},"deleted_at":{"type":["string","null"]},"created_at":{"type":"string"},"signing_secret":{"type":"string","pattern":"^whsec_live_[A-Za-z0-9_-]+$"}},"required":["id","url","enabled","status","disabled_reason","consecutive_failures","selected_events","product_ids","payment_methods","delivery_mode","secret_rotated_at","deleted_at","created_at","signing_secret"]},"ReplayedRotatedWebhookEndpointSecret":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^whe_.*"},"url":{"type":"string","format":"uri"},"enabled":{"type":"boolean"},"status":{"type":"string","enum":["active","disabled","deleted"]},"disabled_reason":{"anyOf":[{"type":"string","enum":["manual","consecutive_failures"]},{"type":"null"}]},"consecutive_failures":{"type":"integer","minimum":0,"maximum":9007199254740991},"selected_events":{"type":"array","items":{"type":"string"}},"product_ids":{"type":"array","items":{"type":"string","format":"starts_with","pattern":"^prd_.*"}},"payment_methods":{"type":"array","items":{"type":"string","enum":["card","pix"]}},"delivery_mode":{"type":"string","const":"live"},"secret_rotated_at":{"type":["string","null"]},"deleted_at":{"type":["string","null"]},"created_at":{"type":"string"},"secret_already_revealed":{"type":"boolean","const":true}},"required":["id","url","enabled","status","disabled_reason","consecutive_failures","selected_events","product_ids","payment_methods","delivery_mode","secret_rotated_at","deleted_at","created_at","secret_already_revealed"]},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^whd_.*"},"endpoint_id":{"type":"string","format":"starts_with","pattern":"^whe_.*"},"event_id":{"type":"string","format":"starts_with","pattern":"^evt_.*"},"event_type":{"type":"string"},"attempt":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"status":{"type":"string","enum":["pending","delivering","succeeded","failed","dead_letter"]},"response_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"latency_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","endpoint_id","event_id","event_type","attempt","status","response_status","latency_ms","created_at"]},"ApiCredential":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^key_.*"},"name":{"type":"string"},"key_prefix":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["payments:read","payments:write","refunds:write","products:read","products:write","offers:read","offers:write","orders:read","orders:write","reports:read","finance:read","webhooks:write","api-keys:write","checkout.exports:create","checkout.exports:read"]}},"status":{"type":"string","enum":["active","revoked","expired"]},"expires_at":{"type":["string","null"]},"last_used_at":{"type":["string","null"]},"created_at":{"type":"string"},"revoked_at":{"type":["string","null"]}},"required":["id","name","key_prefix","scopes","status","expires_at","last_used_at","created_at","revoked_at"]},"CreatedApiCredential":{"type":"object","properties":{"credential":{"$ref":"#/components/schemas/ApiCredential"},"secret":{"type":"string","pattern":"^sk_(test|live)_[A-Za-z0-9_-]+$"}},"required":["credential","secret"]},"ReplayedApiCredential":{"type":"object","properties":{"credential":{"$ref":"#/components/schemas/ApiCredential"},"secret_already_revealed":{"type":"boolean","const":true}},"required":["credential","secret_already_revealed"]},"Organization":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^org_.*"},"seller_id":{"type":"string","format":"starts_with","pattern":"^sel_.*"},"legal_name":{"type":"string"},"display_name":{"type":"string"},"status":{"type":"string"},"role":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string"}},"timezone":{"type":"string","enum":["America/Sao_Paulo","America/Araguaina","America/Bahia","America/Belem","America/Boa_Vista","America/Campo_Grande","America/Cuiaba","America/Eirunepe","America/Fortaleza","America/Maceio","America/Manaus","America/Noronha","America/Porto_Velho","America/Recife","America/Rio_Branco","America/Santarem","UTC"]}},"required":["id","seller_id","legal_name","display_name","status","role","capabilities","timezone"]},"OrganizationClosureRequest":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^ocr_.*"},"organization_id":{"type":"string","format":"starts_with","pattern":"^org_.*"},"reason":{"type":["string","null"]},"requested_at":{"type":"string"}},"required":["id","organization_id","reason","requested_at"]},"Dashboard":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"total_payments":{"type":"integer","minimum":0,"maximum":9007199254740991},"succeeded_payments":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed_payments":{"type":"integer","minimum":0,"maximum":9007199254740991},"processing_payments":{"type":"integer","minimum":0,"maximum":9007199254740991},"gross_volume_minor":{"type":"string"},"recent_payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"created_at":{"type":"string"}},"required":["id","status","amount_minor","currency","created_at"]}}},"required":["currency","total_payments","succeeded_payments","failed_payments","processing_payments","gross_volume_minor","recent_payments"]},"DashboardPeriod":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"timezone":{"type":"string","const":"UTC"},"generated_at":{"type":"string"},"initiated_payments":{"type":"integer","minimum":0,"maximum":9007199254740991},"succeeded_payments":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed_payments":{"type":"integer","minimum":0,"maximum":9007199254740991},"processing_payments":{"type":"integer","minimum":0,"maximum":9007199254740991},"canceled_payments":{"type":"integer","minimum":0,"maximum":9007199254740991},"gross_volume_minor":{"type":"string","pattern":"^[0-9]+$"},"succeeded_refunds":{"type":"integer","minimum":0,"maximum":9007199254740991},"refunded_volume_minor":{"type":"string","pattern":"^[0-9]+$"},"recent_payments":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^pi_.*"},"status":{"type":"string","enum":["requires_payment_method","requires_action","processing","succeeded","failed","canceled"]},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"created_at":{"type":"string"}},"required":["id","status","amount_minor","currency","created_at"]}}},"required":["currency","from","to","timezone","generated_at","initiated_payments","succeeded_payments","failed_payments","processing_payments","canceled_payments","gross_volume_minor","succeeded_refunds","refunded_volume_minor","recent_payments"]},"AbandonedCheckout":{"type":"object","properties":{"id":{"type":"string","pattern":"^lead_[A-Za-z0-9]{1,64}$"},"checkout_session_id":{"type":"string","format":"starts_with","pattern":"^cs_.*"},"offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"product_id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"product_name":{"type":"string"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"customer":{"type":"object","properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"visibility":{"type":"string","enum":["full","masked"]}},"required":["name","email","phone","visibility"]},"captured_at":{"type":"string"},"reason":{"type":"string","enum":["expired","inactive"]},"attribution":{"anyOf":[{"$ref":"#/components/schemas/SaleAttribution"},{"type":"null"}]},"stage":{"type":"string","enum":["data","pix_expired","card_declined","payment_other"]},"recovered":{"anyOf":[{"type":"object","properties":{"order_id":{"type":"string","format":"starts_with","pattern":"^ord_.*"},"at":{"type":"string"}},"required":["order_id","at"]},{"type":"null"}]},"reminders":{"$ref":"#/components/schemas/AbandonedCheckoutReminders"}},"required":["id","checkout_session_id","offer_id","product_id","product_name","amount_minor","currency","customer","captured_at","reason","attribution"]},"AbandonedCheckoutPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AbandonedCheckout"}},"next_cursor":{"anyOf":[{"type":"string","maxLength":2048,"pattern":"^a1_[0-9a-f]+$"},{"type":"null"}]},"timezone":{"type":"string"}},"required":["data","next_cursor","timezone"]},"CreatedCheckoutRecoveryLink":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^cs_.*"},"offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["open","completed","expired"]},"payment_intent_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^pi_.*"},{"type":"null"}]},"expires_at":{"type":"string"},"client_secret":{"type":"string","format":"starts_with","pattern":"^csec_.*"},"lead_id":{"type":"string","pattern":"^lead_[A-Za-z0-9]{1,64}$"}},"required":["id","offer_id","amount_minor","currency","status","payment_intent_id","expires_at","client_secret","lead_id"]},"ReplayedCheckoutRecoveryLink":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^cs_.*"},"offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["open","completed","expired"]},"payment_intent_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^pi_.*"},{"type":"null"}]},"expires_at":{"type":"string"},"secret_already_revealed":{"type":"boolean","const":true},"lead_id":{"type":"string","pattern":"^lead_[A-Za-z0-9]{1,64}$"}},"required":["id","offer_id","amount_minor","currency","status","payment_intent_id","expires_at","secret_already_revealed","lead_id"]},"FinanceSnapshot":{"type":"object","properties":{"balances":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"balance_minor":{"type":"string"}},"required":["code","currency","balance_minor"]}},"journals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^jrn_.*"},"source_type":{"type":"string"},"source_id":{"type":"string"},"operation_key":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"debit_minor":{"type":"string"},"credit_minor":{"type":"string"},"created_at":{"type":"string"}},"required":["id","source_type","source_id","operation_key","currency","debit_minor","credit_minor","created_at"]}}},"required":["balances","journals"]},"SellerDashboard":{"type":"object","properties":{"period":{"type":"string","enum":["today","7d","30d","custom"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"timezone":{"type":"string","enum":["America/Sao_Paulo","America/Araguaina","America/Bahia","America/Belem","America/Boa_Vista","America/Campo_Grande","America/Cuiaba","America/Eirunepe","America/Fortaleza","America/Maceio","America/Manaus","America/Noronha","America/Porto_Velho","America/Recife","America/Rio_Branco","America/Santarem","UTC"]},"origin":{"anyOf":[{"type":"string","enum":["front","upsell","downsell"]},{"type":"null"}]},"by_origin":{"anyOf":[{"type":"object","properties":{"items":{"minItems":3,"maxItems":3,"type":"array","items":{"type":"object","properties":{"paid_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"gross_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"average_ticket_minor":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},{"type":"null"}]},"origin":{"type":"string","enum":["front","upsell","downsell"]}},"required":["paid_count","gross_minor","average_ticket_minor","origin"]}},"total":{"type":"object","properties":{"paid_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"gross_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"average_ticket_minor":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},{"type":"null"}]}},"required":["paid_count","gross_minor","average_ticket_minor"]}},"required":["items","total"]},{"type":"null"}]},"from":{"type":"string"},"to":{"type":"string"},"previous_from":{"type":"string"},"previous_to":{"type":"string"},"generated_at":{"type":"string"},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"days":{"type":"integer","minimum":1,"maximum":92}},"required":["from","to","days"]},{"type":"null"}]},"kpis":{"type":"object","properties":{"gross":{"type":"object","properties":{"value":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"previous":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"delta":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$"}},"required":["value","previous","delta"]},"paid":{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"previous":{"type":"integer","minimum":0,"maximum":9007199254740991},"delta":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["value","previous","delta"]},"pix_conversion":{"type":"object","properties":{"value":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"previous":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"delta":{"anyOf":[{"type":"integer","minimum":-10000,"maximum":10000},{"type":"null"}]},"numerator":{"type":"integer","minimum":0,"maximum":9007199254740991},"denominator":{"type":"integer","minimum":0,"maximum":9007199254740991},"previous_numerator":{"type":"integer","minimum":0,"maximum":9007199254740991},"previous_denominator":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["value","previous","delta","numerator","denominator","previous_numerator","previous_denominator"]},"card_approval":{"type":"object","properties":{"value":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"previous":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"delta":{"anyOf":[{"type":"integer","minimum":-10000,"maximum":10000},{"type":"null"}]},"numerator":{"type":"integer","minimum":0,"maximum":9007199254740991},"denominator":{"type":"integer","minimum":0,"maximum":9007199254740991},"previous_numerator":{"type":"integer","minimum":0,"maximum":9007199254740991},"previous_denominator":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["value","previous","delta","numerator","denominator","previous_numerator","previous_denominator"]}},"required":["gross","paid","pix_conversion","card_approval"]},"series":{"type":"object","properties":{"granularity":{"type":"string","enum":["hour","day"]},"buckets":{"maxItems":92,"type":"array","items":{"type":"object","properties":{"start":{"type":"string"},"label":{"type":"string"},"gross_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"pix_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"card_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"paid_count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["start","label","gross_minor","pix_minor","card_minor","paid_count"]}}},"required":["granularity","buckets"]},"methods":{"minItems":2,"maxItems":2,"type":"array","items":{"type":"object","properties":{"method":{"type":"string","enum":["card","pix"]},"paid_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"gross_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"required":["method","paid_count","gross_minor"]}},"pix":{"type":"object","properties":{"emitted_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"paid_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"pending_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"expired_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"emitted_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"paid_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"required":["emitted_count","paid_count","pending_count","expired_count","emitted_minor","paid_minor"]},"balances":{"type":"object","properties":{"available_minor":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$"},"pending_minor":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$"},"reserved_minor":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$"},"dispute_hold_minor":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$"},"payout_pending_minor":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$"},"paid_out_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"required":["available_minor","pending_minor","reserved_minor","dispute_hold_minor","payout_pending_minor","paid_out_minor"]},"waterfall":{"type":"object","properties":{"gross_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"refunds_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"disputes_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"fees_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"net_minor":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$"},"fees_settled_payments":{"type":"integer","minimum":0,"maximum":9007199254740991},"succeeded_payments":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["gross_minor","refunds_minor","disputes_minor","fees_minor","net_minor","fees_settled_payments","succeeded_payments"]},"rhythm":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"ok"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"current_hour":{"type":"integer","minimum":0,"maximum":23},"today":{"minItems":24,"maxItems":24,"type":"array","items":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},{"type":"null"}]}},"baseline":{"minItems":24,"maxItems":24,"type":"array","items":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"today_so_far_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"baseline_so_far_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"baseline_day_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"projection_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"required":["status","date","current_hour","today","baseline","today_so_far_minor","baseline_so_far_minor","baseline_day_minor","projection_minor"]},{"type":"object","properties":{"status":{"type":"string","const":"insufficient_history"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"current_hour":{"type":"integer","minimum":0,"maximum":23},"reason":{"type":"string","enum":["history_shorter_than_4_weeks","no_baseline_so_far"]}},"required":["status","date","current_hour","reason"]},{"type":"object","properties":{"status":{"type":"string","const":"closed_day"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"day":{"minItems":24,"maxItems":24,"type":"array","items":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"baseline":{"minItems":24,"maxItems":24,"type":"array","items":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"day_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"baseline_day_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"required":["status","date","day","baseline","day_minor","baseline_day_minor"]},{"type":"object","properties":{"status":{"type":"string","const":"not_applicable"},"reason":{"type":"string","const":"range_longer_than_one_day"}},"required":["status","reason"]}]},"recent_sales":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"payment_intent_id":{"type":"string","format":"starts_with","pattern":"^pi_.*"},"order_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^ord_.*"},{"type":"null"}]},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["requires_payment_method","requires_action","processing","succeeded","failed","canceled"]},"display_status":{"type":"string","enum":["pending","processing","paid","declined","refunded","partially_refunded","canceled","expired","disputed","chargeback","failed"]},"payment_method":{"anyOf":[{"type":"string","enum":["card","pix"]},{"type":"null"}]},"created_at":{"type":"string"}},"required":["payment_intent_id","order_id","amount_minor","currency","status","display_status","payment_method","created_at"]}},"day_over_day":{"anyOf":[{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"previous_from":{"type":"string"},"previous_to":{"type":"string"},"gross":{"type":"object","properties":{"value":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"previous":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"delta":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$"}},"required":["value","previous","delta"]},"paid":{"type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":9007199254740991},"previous":{"type":"integer","minimum":0,"maximum":9007199254740991},"delta":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["value","previous","delta"]},"pix_conversion":{"type":"object","properties":{"value":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"previous":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"delta":{"anyOf":[{"type":"integer","minimum":-10000,"maximum":10000},{"type":"null"}]},"numerator":{"type":"integer","minimum":0,"maximum":9007199254740991},"denominator":{"type":"integer","minimum":0,"maximum":9007199254740991},"previous_numerator":{"type":"integer","minimum":0,"maximum":9007199254740991},"previous_denominator":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["value","previous","delta","numerator","denominator","previous_numerator","previous_denominator"]},"card_approval":{"type":"object","properties":{"value":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"previous":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"delta":{"anyOf":[{"type":"integer","minimum":-10000,"maximum":10000},{"type":"null"}]},"numerator":{"type":"integer","minimum":0,"maximum":9007199254740991},"denominator":{"type":"integer","minimum":0,"maximum":9007199254740991},"previous_numerator":{"type":"integer","minimum":0,"maximum":9007199254740991},"previous_denominator":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["value","previous","delta","numerator","denominator","previous_numerator","previous_denominator"]},"refunds":{"type":"object","properties":{"value":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"previous":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"delta":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$"}},"required":["value","previous","delta"]}},"required":["from","to","previous_from","previous_to","gross","paid","pix_conversion","card_approval","refunds"]},{"type":"null"}]}},"required":["period","currency","timezone","origin","by_origin","from","to","previous_from","previous_to","generated_at","range","kpis","series","methods","pix","balances","waterfall","rhythm","recent_sales","day_over_day"]},"SellerOrderItem":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^oi_.*"},"kind":{"type":"string","enum":["main","bump"]},"offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"product_id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"offer_bump_id":{"anyOf":[{"type":"string","pattern":"^ob_[A-Za-z0-9]{1,64}$"},{"type":"null"}]},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"position":{"type":"integer","minimum":0,"maximum":3},"product_name":{"type":["string","null"]}},"required":["id","kind","offer_id","product_id","offer_bump_id","amount_minor","currency","position","product_name"]},"SaleAttribution":{"type":"object","properties":{"entry":{"type":"string","enum":["payment_link","checkout_link"]},"captured_at":{"type":"string"},"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"src":{"type":["string","null"]},"sck":{"type":["string","null"]},"fbclid":{"type":["string","null"]},"gclid":{"type":["string","null"]},"ttclid":{"type":["string","null"]},"device":{"anyOf":[{"type":"object","properties":{"class":{"type":"string","enum":["mobile","tablet","desktop","bot","unknown"]},"os":{"type":"string","enum":["android","ios","windows","macos","linux","chromeos","unknown"]},"browser":{"type":"string","enum":["chrome","safari","firefox","edge","samsung_internet","opera","instagram","facebook","messenger","tiktok","kwai","snapchat","pinterest","linkedin","webview","unknown"]}},"required":["class","os","browser"]},{"type":"null"}]}},"required":["entry","captured_at","utm_source","utm_medium","utm_campaign","utm_term","utm_content","src","sck","fbclid","gclid","ttclid","device"]},"SaleSettlement":{"type":"object","properties":{"status":{"type":"string","enum":["settled","forecast"]},"currency":{"type":"string"},"gross_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"fee_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"reserve_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"net_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"fee_basis_points":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"reserve_basis_points":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"release_on":{"type":["string","null"]},"settled_at":{"type":["string","null"]},"origin":{"anyOf":[{"type":"string","enum":["auto","admin"]},{"type":"null"}]},"hold_reason":{"anyOf":[{"type":"string","enum":["dispute_open","refund_in_progress","settlement_in_progress","settlement_mismatch","seller_under_review","seller_suspended"]},{"type":"null"}]}},"required":["status","currency","gross_minor","fee_minor","reserve_minor","net_minor","fee_basis_points","reserve_basis_points","release_on","settled_at","origin","hold_reason"]},"SaleNotification":{"type":"object","properties":{"event_id":{"type":"string"},"event_type":{"type":"string"},"event_created_at":{"type":"string"},"endpoint_id":{"type":"string"},"endpoint_host":{"type":["string","null"]},"status":{"type":"string","enum":["pending","delivering","succeeded","failed","dead_letter"]},"attempts":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"last_response_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"latency_ms":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"last_attempt_at":{"type":"string"}},"required":["event_id","event_type","event_created_at","endpoint_id","endpoint_host","status","attempts","last_response_status","latency_ms","last_attempt_at"]},"SaleNotificationList":{"type":"object","properties":{"order_id":{"type":"string","format":"starts_with","pattern":"^ord_.*"},"data":{"type":"array","items":{"$ref":"#/components/schemas/SaleNotification"}},"truncated":{"type":"boolean"}},"required":["order_id","data","truncated"]},"CapturedCheckoutAttribution":{"type":"object","properties":{"checkout_session_id":{"type":"string","format":"starts_with","pattern":"^cs_.*"},"recorded":{"type":"boolean"}},"required":["checkout_session_id","recorded"]},"SellerOrder":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^ord_.*"},"offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"product_id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"checkout_session_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^cs_.*"},{"type":"null"}]},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["pending_payment","paid","canceled","expired"]},"paid_payment_intent_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^pi_.*"},{"type":"null"}]},"paid_charge_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^chg_.*"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"paid_at":{"type":["string","null"]},"canceled_at":{"type":["string","null"]},"expired_at":{"type":["string","null"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/SellerOrderItem"}},"origin":{"type":"string","enum":["front","upsell","downsell"]},"parent_order_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^ord_.*"},{"type":"null"}]},"product_name":{"type":"string"},"offer_name":{"type":["string","null"]},"payment_intent_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^pi_.*"},{"type":"null"}]},"payment_method":{"anyOf":[{"type":"string","enum":["card","pix"]},{"type":"null"}]},"buyer":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["name","email","phone"]},{"type":"null"}]},"display_status":{"type":"string","enum":["pending","processing","paid","declined","refunded","partially_refunded","canceled","expired","disputed","chargeback","failed"]},"refunded_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"attribution":{"anyOf":[{"$ref":"#/components/schemas/SaleAttribution"},{"type":"null"}]}},"required":["id","offer_id","product_id","checkout_session_id","amount_minor","currency","status","paid_payment_intent_id","paid_charge_id","created_at","updated_at","paid_at","canceled_at","expired_at","items","origin","parent_order_id","product_name","offer_name","payment_intent_id","payment_method","buyer","display_status","refunded_minor","attribution"]},"SellerOrderPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SellerOrder"}},"next_cursor":{"anyOf":[{"type":"string","maxLength":2048,"pattern":"^o1_[0-9a-f]+$"},{"type":"null"}]},"counts":{"type":"object","properties":{"all":{"type":"integer","minimum":0,"maximum":9007199254740991},"pending":{"type":"integer","minimum":0,"maximum":9007199254740991},"processing":{"type":"integer","minimum":0,"maximum":9007199254740991},"paid":{"type":"integer","minimum":0,"maximum":9007199254740991},"declined":{"type":"integer","minimum":0,"maximum":9007199254740991},"refunded":{"type":"integer","minimum":0,"maximum":9007199254740991},"partially_refunded":{"type":"integer","minimum":0,"maximum":9007199254740991},"canceled":{"type":"integer","minimum":0,"maximum":9007199254740991},"expired":{"type":"integer","minimum":0,"maximum":9007199254740991},"disputed":{"type":"integer","minimum":0,"maximum":9007199254740991},"chargeback":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["all","pending","processing","paid","declined","refunded","partially_refunded","canceled","expired","disputed","chargeback","failed"]}},"required":["data","next_cursor","counts"]},"SellerOrderDetail":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^ord_.*"},"offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"product_id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"checkout_session_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^cs_.*"},{"type":"null"}]},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["pending_payment","paid","canceled","expired"]},"paid_payment_intent_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^pi_.*"},{"type":"null"}]},"paid_charge_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^chg_.*"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"paid_at":{"type":["string","null"]},"canceled_at":{"type":["string","null"]},"expired_at":{"type":["string","null"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/SellerOrderItem"}},"origin":{"type":"string","enum":["front","upsell","downsell"]},"parent_order_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^ord_.*"},{"type":"null"}]},"product_name":{"type":"string"},"offer_name":{"type":["string","null"]},"payment_intent_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^pi_.*"},{"type":"null"}]},"payment_method":{"anyOf":[{"type":"string","enum":["card","pix"]},{"type":"null"}]},"buyer":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}},"required":["name","email","phone"]},{"type":"null"}]},"display_status":{"type":"string","enum":["pending","processing","paid","declined","refunded","partially_refunded","canceled","expired","disputed","chargeback","failed"]},"refunded_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"attribution":{"anyOf":[{"$ref":"#/components/schemas/SaleAttribution"},{"type":"null"}]},"buyer_details":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"document":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["cpf","cnpj"]},"last2":{"type":"string","pattern":"^[0-9]{2}$"}},"required":["type","last2"]},{"type":"null"}]}},"required":["name","email","phone","document"]},{"type":"null"}]},"settlement":{"anyOf":[{"$ref":"#/components/schemas/SaleSettlement"},{"type":"null"}]}},"required":["id","offer_id","product_id","checkout_session_id","amount_minor","currency","status","paid_payment_intent_id","paid_charge_id","created_at","updated_at","paid_at","canceled_at","expired_at","items","origin","parent_order_id","product_name","offer_name","payment_intent_id","payment_method","buyer","display_status","refunded_minor","attribution","buyer_details","settlement"]},"SellerProductListItem":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"name":{"type":"string"},"status":{"type":"string","enum":["draft","active","archived"]},"created_at":{"type":"string"},"description":{"type":["string","null"]},"category":{"anyOf":[{"type":"string","enum":["negocios_empreendedorismo","marketing_vendas","financas_investimentos","saude_bem_estar","desenvolvimento_pessoal","educacao_concursos","idiomas","tecnologia_programacao","design_fotografia","culinaria_gastronomia","outros"]},{"type":"null"}]},"sales_page_url":{"type":["string","null"]},"guarantee_days":{"type":"integer","minimum":0,"maximum":30},"support_name":{"type":["string","null"]},"support_email":{"type":["string","null"]},"support_whatsapp":{"type":["string","null"]},"statement_descriptor":{"type":["string","null"]},"thank_you_url":{"type":["string","null"]},"delivery_mode":{"type":"string","enum":["access_links","seller_system"]},"image_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^img_.*"},{"type":"null"}]},"offer_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"active_offer_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"offers_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"links_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"bumps_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"revenue_30d_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"deletable":{"type":"boolean"},"access_links_count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","name","status","created_at","description","category","sales_page_url","guarantee_days","support_name","support_email","support_whatsapp","statement_descriptor","thank_you_url","delivery_mode","image_id","offer_count","active_offer_count","offers_count","links_count","bumps_count","revenue_30d_minor","deletable","access_links_count"]},"SellerProductPage":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SellerProductListItem"}},"next_cursor":{"anyOf":[{"type":"string","maxLength":2048,"pattern":"^c1_[0-9a-f]+$"},{"type":"null"}]}},"required":["data","next_cursor"]},"SalesBreakdown":{"type":"object","properties":{"meta":{"type":"object","properties":{"timezone":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"range":{"type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"days":{"type":"integer","minimum":1,"maximum":92}},"required":["from","to","days"]},"window":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"]},"basis":{"type":"string","const":"payment_created_at"},"allocation":{"anyOf":[{"type":"string","const":"pro_rata_items"},{"type":"null"}]},"generated_at":{"type":"string"},"edition":{"type":"string"},"dimensions":{"type":"array","items":{"type":"string","enum":["product","day","method","utm_source","utm_medium","utm_campaign"]}},"metrics":{"type":"array","items":{"type":"string","enum":["sales_count","gross_minor","average_ticket_minor","refunds_minor","refund_rate_bps","disputes_minor","fees_minor","net_minor"]}}},"required":["timezone","currency","range","window","basis","allocation","generated_at","edition","dimensions","metrics"]},"rows":{"type":"array","items":{"type":"object","properties":{"keys":{"type":"object","properties":{"product":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"name":{"type":["string","null"]}},"required":["id","name"]},{"type":"null"}]},"day":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"method":{"anyOf":[{"type":"string","enum":["card","pix"]},{"type":"null"}]},"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]}}},"values":{"type":"object","properties":{"sales_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"gross_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"average_ticket_minor":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},{"type":"null"}]},"refunds_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"refund_rate_bps":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"disputes_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"fees_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"net_minor":{"anyOf":[{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$"},{"type":"null"}]}}},"fees_complete":{"type":"boolean"}},"required":["keys","values","fees_complete"]}},"other":{"anyOf":[{"type":"object","properties":{"groups":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"values":{"type":"object","properties":{"sales_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"gross_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"average_ticket_minor":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},{"type":"null"}]},"refunds_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"refund_rate_bps":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"disputes_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"fees_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"net_minor":{"anyOf":[{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$"},{"type":"null"}]}}},"fees_complete":{"type":"boolean"}},"required":["groups","values","fees_complete"]},{"type":"null"}]},"totals":{"type":"object","properties":{"values":{"type":"object","properties":{"sales_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"gross_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"average_ticket_minor":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},{"type":"null"}]},"refunds_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"refund_rate_bps":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"disputes_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"fees_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"net_minor":{"anyOf":[{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$"},{"type":"null"}]}}},"fees_complete":{"type":"boolean"}},"required":["values","fees_complete"]},"groups_total":{"type":"integer","minimum":0,"maximum":9007199254740991},"truncated":{"type":"boolean"}},"required":["meta","rows","other","totals","groups_total","truncated"]},"AbandonedCheckoutSummary":{"type":"object","properties":{"timezone":{"type":"string"},"generated_at":{"type":"string"},"range":{"type":"object","properties":{"from":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"to":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]}},"required":["from","to"]},"retention_days":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"complete":{"type":"boolean"},"open":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["count"]},"recovered":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["count"]},"recovery_rate_bps":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]},"currencies":{"type":"array","items":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"open_amount_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"recovered_abandoned_amount_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"recovered_order_amount_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}},"required":["currency","open_amount_minor","recovered_abandoned_amount_minor","recovered_order_amount_minor"]}},"facets":{"type":"object","properties":{"by_stage":{"type":"object","properties":{"data":{"type":"integer","minimum":0,"maximum":9007199254740991},"pix_expired":{"type":"integer","minimum":0,"maximum":9007199254740991},"card_declined":{"type":"integer","minimum":0,"maximum":9007199254740991},"payment_other":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["data","pix_expired","card_declined","payment_other"]},"by_reason":{"type":"object","properties":{"expired":{"type":"integer","minimum":0,"maximum":9007199254740991},"inactive":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["expired","inactive"]}},"required":["by_stage","by_reason"]}},"required":["timezone","generated_at","range","retention_days","complete","open","recovered","recovery_rate_bps","currencies","facets"]},"FinanceStatement":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"account":{"type":"string","const":"seller_available"},"balance_minor":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^pst_.*"},"journal_id":{"type":"string","format":"starts_with","pattern":"^jrn_.*"},"source_type":{"type":"string"},"source_id":{"type":"string"},"payment_intent_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^pi_.*"},{"type":"null"}]},"amount_minor":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$"},"balance_after_minor":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$"},"created_at":{"type":"string"}},"required":["id","journal_id","source_type","source_id","payment_intent_id","amount_minor","balance_after_minor","created_at"]}},"next_cursor":{"anyOf":[{"type":"string","maxLength":2048,"pattern":"^s1_[0-9a-f]+$"},{"type":"null"}]}},"required":["currency","account","balance_minor","data","next_cursor"]},"FinanceFees":{"type":"object","properties":{"overrides":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"string","enum":["global","seller","product","offer"]},"scope_id":{"type":["string","null"]},"provider_id":{"type":"string"},"fee_basis_points":{"type":"integer","minimum":0,"maximum":10000},"reserve_basis_points":{"type":"integer","minimum":0,"maximum":10000},"max_installments":{"type":"integer","minimum":1,"maximum":24},"version":{"type":"string"}},"required":["scope","scope_id","provider_id","fee_basis_points","reserve_basis_points","max_installments","version"]}},"effective":{"anyOf":[{"type":"object","properties":{"scope":{"type":"string","enum":["global","seller","product","offer"]},"scope_id":{"type":["string","null"]},"provider_id":{"type":"string"},"fee_basis_points":{"type":"integer","minimum":0,"maximum":10000},"reserve_basis_points":{"type":"integer","minimum":0,"maximum":10000},"max_installments":{"type":"integer","minimum":1,"maximum":24},"version":{"type":"string"}},"required":["scope","scope_id","provider_id","fee_basis_points","reserve_basis_points","max_installments","version"]},{"type":"null"}]}},"required":["default","overrides"]},"FinanceForecast":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"pending_minor":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$"},"data":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"amount_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"gross_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"fee_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"reserve_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"payments":{"type":"integer","minimum":0,"maximum":9007199254740991},"methods":{"type":"array","items":{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","pix"]},"amount_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"gross_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"payments":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["payment_method_type","amount_minor","gross_minor","payments"]}}},"required":["date","amount_minor","methods"]}},"reason":{"anyOf":[{"type":"string","enum":["no_canonical_settlement_schedule"]},{"type":"null"}]},"terms":{"type":"array","items":{"type":"object","properties":{"payment_method_type":{"type":"string","enum":["card","pix"]},"days":{"type":"integer","minimum":0,"maximum":60},"source":{"type":"string","enum":["platform_default","seller_override"]}},"required":["payment_method_type","days","source"]}},"held":{"type":"object","properties":{"gross_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"payments":{"type":"integer","minimum":0,"maximum":9007199254740991},"reasons":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string","enum":["dispute_open","refund_in_progress","settlement_in_progress","settlement_mismatch","seller_under_review","seller_suspended"]},"gross_minor":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"payments":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reason","gross_minor","payments"]}}},"required":["gross_minor","payments","reasons"]}},"required":["currency","pending_minor","data","reason","terms","held"]},"ConversionConnection":{"type":"object","properties":{"id":{"type":"string","pattern":"^cvc_[0-9a-f]{32}$"},"platform":{"type":"string","enum":["meta","google_analytics","tiktok"]},"name":{"type":"string"},"account_id":{"type":"string"},"secret_last4":{"type":"string"},"test_event_code":{"type":["string","null"]},"debug_mode":{"type":"boolean"},"status":{"type":"string","enum":["active","disabled"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","platform","name","account_id","secret_last4","test_event_code","debug_mode","status","created_at","updated_at"]},"ConversionConnectionList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConversionConnection"}}},"required":["data"]},"ConversionDelivery":{"type":"object","properties":{"id":{"type":"string","pattern":"^cvd_[0-9a-f]{32}$"},"connection_id":{"type":"string"},"platform":{"type":"string","enum":["meta","google_analytics","tiktok"]},"event":{"type":"string","enum":["initiate_checkout","lead","purchase","test"]},"platform_event_name":{"type":"string"},"event_id":{"type":"string"},"event_time":{"type":"string"},"checkout_session_id":{"type":["string","null"]},"order_id":{"type":["string","null"]},"uses_test_code":{"type":"boolean"},"status":{"type":"string","enum":["pending","delivering","succeeded","failed","dead_letter"]},"attempts":{"type":"integer","minimum":0,"maximum":9007199254740991},"next_attempt_at":{"type":["string","null"]},"last_response_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"last_error":{"type":["string","null"]},"latency_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"delivered_at":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","connection_id","platform","event","platform_event_name","event_id","event_time","checkout_session_id","order_id","uses_test_code","status","attempts","next_attempt_at","last_response_status","last_error","latency_ms","delivered_at","created_at","updated_at"]},"ConversionDeliveryList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConversionDelivery"}}},"required":["data"]},"ProductConversionConnections":{"type":"object","properties":{"product_id":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"connection_id":{"type":"string"},"platform":{"type":"string","enum":["meta","google_analytics","tiktok"]},"name":{"type":"string"},"account_id":{"type":"string"},"status":{"type":"string","enum":["active","disabled"]},"selected":{"type":"boolean"}},"required":["connection_id","platform","name","account_id","status","selected"]}}},"required":["product_id","data"]},"PayoutBank":{"type":"object","properties":{"id":{"type":"string","pattern":"^sim_bnk_[A-Za-z0-9]{1,64}$"},"bank_code":{"type":"string","enum":["104","208","237","260","336","341","001","033","077"]},"bank_name":{"type":"string"},"account_type":{"type":"string","enum":["checking","savings"]},"account_last4":{"type":"string","pattern":"^[0-9]{4}$"},"label":{"type":["string","null"]},"display_label":{"type":"string"},"is_default":{"type":"boolean"},"status":{"type":"string","enum":["active","archived"]},"synthetic":{"type":"boolean","const":true},"created_at":{"type":"string"},"pix_keys":{"type":"array","items":{"$ref":"#/components/schemas/PayoutPixKey"}}},"required":["id","bank_code","bank_name","account_type","account_last4","label","display_label","is_default","status","synthetic","created_at","pix_keys"]},"PayoutPixKey":{"type":"object","properties":{"id":{"type":"string","pattern":"^sim_pix_[A-Za-z0-9]{1,64}$"},"bank_id":{"type":"string","pattern":"^sim_bnk_[A-Za-z0-9]{1,64}$"},"key_type":{"type":"string","enum":["cpf","cnpj","email","phone","random"]},"mask":{"type":"string"},"display_label":{"type":"string"},"is_default":{"type":"boolean"},"status":{"type":"string","enum":["active","archived"]},"synthetic":{"type":"boolean","const":true},"created_at":{"type":"string"}},"required":["id","bank_id","key_type","mask","display_label","is_default","status","synthetic","created_at"]},"PayoutBankList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PayoutBank"}},"notice":{"type":"string","const":"Simulação: nenhum dinheiro sai para um banco de verdade."},"limits":{"type":"object","properties":{"banks_active_max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pix_keys_per_bank_max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["banks_active_max","pix_keys_per_bank_max"]}},"required":["data","notice","limits"]},"PayoutDestinationAck":{"type":"object","properties":{"id":{"type":"string","pattern":"^sim_(bnk|pix)_[A-Za-z0-9]{1,64}$"},"kind":{"type":"string","enum":["bank","pix_key"]},"status":{"type":"string","enum":["active","archived"]},"is_default":{"type":"boolean"},"synthetic":{"type":"boolean","const":true}},"required":["id","kind","status","is_default","synthetic"]},"AccountSecurity":{"type":"object","properties":{"two_factor_enabled":{"type":"boolean"},"verified_factor_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"session_aal":{"type":"string","enum":["aal1","aal2"]}},"required":["two_factor_enabled","verified_factor_count","session_aal"]},"AccountSession":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"current":{"type":"boolean"},"device":{"anyOf":[{"type":"object","properties":{"class":{"type":"string","enum":["mobile","tablet","desktop","bot","unknown"]},"os":{"type":"string","enum":["android","ios","windows","macos","linux","chromeos","unknown"]},"browser":{"type":"string","enum":["chrome","safari","firefox","edge","samsung_internet","opera","instagram","facebook","messenger","tiktok","kwai","snapchat","pinterest","linkedin","webview","unknown"]}},"required":["class","os","browser"]},{"type":"null"}]},"created_at":{"type":"string"},"last_active_at":{"type":"string"}},"required":["id","current","device","created_at","last_active_at"]},"AccountSessionList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountSession"}}},"required":["data"]},"RevokeOtherSessionsResult":{"type":"object","properties":{"remaining_other_sessions":{"type":"number","const":0}},"required":["remaining_other_sessions"]},"AccountMfaEventResult":{"type":"object","properties":{"event":{"type":"string","enum":["enrolled","removed"]},"verified_factor_count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["event","verified_factor_count"]},"OfferUpsell":{"type":"object","properties":{"id":{"type":"string","pattern":"^ups_[A-Za-z0-9]{1,64}$"},"offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"step_offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"kind":{"type":"string","enum":["upsell","downsell"]},"position":{"type":"integer","minimum":1,"maximum":3},"headline":{"type":"string"},"description":{"type":"string"},"accepted_url":{"type":["string","null"]},"declined_url":{"type":["string","null"]},"status":{"type":"string","enum":["active","inactive"]},"target":{"type":"object","properties":{"product_id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"product_name":{"type":"string"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["draft","active","archived"]}},"required":["product_id","product_name","amount_minor","currency","status"]},"eligible":{"type":"boolean"},"ineligible_reason":{"anyOf":[{"type":"string","enum":["target_archived","target_no_pix","target_no_delivery","target_currency"]},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","offer_id","step_offer_id","kind","position","headline","description","accepted_url","declined_url","status","target","eligible","ineligible_reason","created_at","updated_at"]},"OfferUpsellList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OfferUpsell"}}},"required":["data"]},"OfferUpsellStats":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"step_id":{"type":"string","pattern":"^ups_[A-Za-z0-9]{1,64}$"},"kind":{"type":"string","enum":["upsell","downsell"]},"presented":{"type":"integer","minimum":0,"maximum":9007199254740991},"accepted":{"type":"integer","minimum":0,"maximum":9007199254740991},"declined":{"type":"integer","minimum":0,"maximum":9007199254740991},"expired":{"type":"integer","minimum":0,"maximum":9007199254740991},"paid":{"type":"integer","minimum":0,"maximum":9007199254740991},"take_bps":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]}},"required":["step_id","kind","presented","accepted","declined","expired","paid","take_bps"]}},"take_bps":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000},{"type":"null"}]}},"required":["data","take_bps"]},"PublicUpsellOffer":{"type":"object","properties":{"step_id":{"type":"string","pattern":"^ups_[A-Za-z0-9]{1,64}$"},"kind":{"type":"string","enum":["upsell","downsell"]},"headline":{"type":"string"},"description":{"type":"string"},"product_name":{"type":"string"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"image_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^img_.*"},{"type":"null"}]}},"required":["step_id","kind","headline","description","product_name","amount_minor","currency","image_id"]},"AcceptedUpsell":{"type":"object","properties":{"step_id":{"type":"string","pattern":"^ups_[A-Za-z0-9]{1,64}$"},"session":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^cs_.*"},"client_secret":{"type":"string","format":"starts_with","pattern":"^csec_.*"},"amount_minor":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"status":{"type":"string","enum":["open","completed","expired"]},"expires_at":{"type":"string"}},"required":["id","client_secret","amount_minor","currency","status","expires_at"]},"payment":{"$ref":"#/components/schemas/CheckoutPayment"}},"required":["step_id","session","payment"]},"DeclinedUpsell":{"type":"object","properties":{"step_id":{"type":"string","pattern":"^ups_[A-Za-z0-9]{1,64}$"},"status":{"type":"string","const":"declined"},"next":{"anyOf":[{"$ref":"#/components/schemas/PublicUpsellOffer"},{"type":"null"}]},"destination":{"anyOf":[{"type":"object","properties":{"url":{"type":"string"},"host":{"type":"string"}},"required":["url","host"]},{"type":"null"}]}},"required":["step_id","status","next","destination"]},"BuyerMessage":{"type":"object","properties":{"id":{"type":"string","pattern":"^msg_[0-9a-f]{32}$"},"kind":{"type":"string","enum":["order_confirmation","access_resend","pix_ready","pix_resend","pix_link","payment_failed","refund_processed","recovery_reminder"]},"channel":{"type":"string","enum":["email","whatsapp"]},"mode":{"type":"string","enum":["live","simulated","handoff"]},"status":{"type":"string","enum":["queued","sending","sent","delivered","bounced","complained","failed","unknown","unknown_expired","simulated","suppressed","cancelled","handed_off"]},"recipient_masked":{"type":["string","null"]},"created_at":{"type":"string"},"sent_at":{"type":["string","null"]},"terminal_at":{"type":["string","null"]},"error_code":{"anyOf":[{"type":"string","pattern":"^[A-Z0-9_]{1,64}$"},{"type":"null"}]},"resend_of_id":{"anyOf":[{"type":"string","pattern":"^msg_[0-9a-f]{32}$"},{"type":"null"}]},"attempt_no":{"anyOf":[{"type":"integer","minimum":1,"maximum":3},{"type":"null"}]}},"required":["id","kind","channel","mode","status","recipient_masked","created_at","sent_at","terminal_at","error_code","resend_of_id","attempt_no"]},"BuyerMessageList":{"type":"object","properties":{"data":{"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/BuyerMessage"}}},"required":["data"]},"OrderReceipt":{"type":"object","properties":{"simulated":{"type":"boolean","const":true},"notice":{"type":"string"},"generated_at":{"type":"string"},"order":{"type":"object","properties":{"id":{"type":"string","format":"starts_with","pattern":"^ord_.*"},"status":{"type":"string"},"created_at":{"type":"string"},"paid_at":{"type":["string","null"]},"product_name":{"type":"string"},"amount_minor":{"type":"string"},"currency":{"type":"string"},"payment_method":{"type":["string","null"]},"payment_intent_id":{"type":["string","null"]}},"required":["id","status","created_at","paid_at","product_name","amount_minor","currency","payment_method","payment_intent_id"]},"items":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"product_name":{"type":"string"},"amount_minor":{"type":"string"},"currency":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["kind","product_name","amount_minor","currency","position"]}},"payer":{"anyOf":[{"type":"object","properties":{"name":{"type":["string","null"]},"document":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["cpf","cnpj"]},"last2":{"type":"string"}},"required":["type","last2"]},{"type":"null"}]}},"required":["name","document"]},{"type":"null"}]},"refunded_minor":{"type":"string"}},"required":["simulated","notice","generated_at","order","items","payer","refunded_minor"]},"AbandonedCheckoutReminderHandoff":{"type":"object","properties":{"message_id":{"type":"string","pattern":"^msg_[0-9a-f]{32}$"},"channel":{"type":"string","const":"whatsapp_handoff"},"mode":{"type":"string","const":"handoff"},"status":{"type":"string","const":"handed_off"},"attempt_no":{"type":"integer","minimum":1,"maximum":3},"max":{"type":"number","const":3},"created_at":{"type":"string"}},"required":["message_id","channel","mode","status","attempt_no","max","created_at"]},"BuyerMessageOptOutReceived":{"type":"object","properties":{"status":{"type":"string","const":"received"}},"required":["status"]},"AbandonedCheckoutReminders":{"type":"object","properties":{"used":{"type":"integer","minimum":0,"maximum":3},"max":{"type":"number","const":3},"last_at":{"type":["string","null"]},"next_allowed_at":{"type":["string","null"]}},"required":["used","max","last_at","next_allowed_at"]},"IdentityProfile":{"type":"object","properties":{"person_type":{"type":"string","enum":["PF","PJ"]},"document_type":{"type":"string","enum":["cpf","cnpj"]},"document_masked":{"type":"string"},"holder_name":{"type":"string"},"birth_date_provided":{"type":"boolean"},"representative":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"document_masked":{"type":"string"}},"required":["name","document_masked"]},{"type":"null"}]},"locked":{"type":"boolean"},"updated_at":{"type":"string"}},"required":["person_type","document_type","document_masked","holder_name","birth_date_provided","representative","locked","updated_at"]},"SavedIdentityProfile":{"type":"object","properties":{"person_type":{"type":"string","enum":["PF","PJ"]},"document_type":{"type":"string","enum":["cpf","cnpj"]},"document_masked":{"type":"string"},"birth_date_provided":{"type":"boolean"},"locked":{"type":"boolean"},"updated_at":{"type":"string"}},"required":["person_type","document_type","document_masked","birth_date_provided","locked","updated_at"]},"KycDocument":{"type":"object","properties":{"id":{"type":"string","pattern":"^kdoc_[0-9a-f]{32}$"},"kind":{"type":"string","enum":["id_front","id_back","cnpj_card","company_contract","rep_id_front","rep_id_back"]},"id_type":{"anyOf":[{"type":"string","enum":["rg","cnh"]},{"type":"null"}]},"status":{"type":"string","enum":["pending_upload","uploaded","in_review","accepted","rejected","superseded","integrity_failed","purged"]},"reason_code":{"anyOf":[{"type":"string","enum":["illegible_image","expired_document","data_mismatch","incomplete_documents","other"]},{"type":"null"}]},"size_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"uploaded_at":{"type":"string"}},"required":["id","kind","id_type","status","reason_code","size_bytes","uploaded_at"]},"SellerIdentity":{"type":"object","properties":{"documents_enabled":{"type":"boolean"},"seller_since":{"type":"string"},"profile":{"anyOf":[{"$ref":"#/components/schemas/IdentityProfile"},{"type":"null"}]},"identity_erased":{"type":"boolean"},"verification":{"type":"object","properties":{"status":{"type":"string","enum":["unverified","pending","needs_changes","verified","rejected"]},"verified_at":{"type":["string","null"]}},"required":["status","verified_at"]},"submission":{"anyOf":[{"type":"object","properties":{"status":{"type":"string","enum":["draft","submitted","in_review","approved","rejected","needs_changes","withdrawn","superseded"]},"submitted_at":{"type":["string","null"]},"decided_at":{"type":["string","null"]},"reason_code":{"anyOf":[{"type":"string","enum":["illegible_image","expired_document","data_mismatch","incomplete_documents","other"]},{"type":"null"}]},"expected_documents":{"type":"array","items":{"type":"string","enum":["id_front","id_back","cnpj_card","company_contract","rep_id_front","rep_id_back"]}}},"required":["status","submitted_at","decided_at","reason_code","expected_documents"]},{"type":"null"}]},"documents":{"maxItems":32,"type":"array","items":{"$ref":"#/components/schemas/KycDocument"}}},"required":["documents_enabled","seller_since","profile","verification","submission","documents"]},"KycDocumentUploaded":{"type":"object","properties":{"document_id":{"type":"string","pattern":"^kdoc_[0-9a-f]{32}$"},"status":{"type":"string","const":"uploaded"}},"required":["document_id","status"]},"KycSubmissionResult":{"type":"object","properties":{"status":{"type":"string","enum":["draft","submitted","in_review","approved","rejected","needs_changes","withdrawn","superseded"]},"verification_status":{"type":"string","enum":["unverified","pending","needs_changes","verified","rejected"]}},"required":["status","verification_status"]},"KycDocumentRemoved":{"type":"object","properties":{"document_id":{"type":"string","pattern":"^kdoc_[0-9a-f]{32}$"},"removed":{"type":"boolean","const":true}},"required":["document_id","removed"]},"PayerInput":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":160},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":8,"maxLength":32,"pattern":"^[0-9()+\\-.\\s]+$"},"document":{"type":"object","properties":{"type":{"type":"string","enum":["cpf","cnpj"]},"number":{"type":"string","minLength":11,"maxLength":18,"pattern":"^[0-9A-Za-z./ -]+$"}},"required":["type","number"],"additionalProperties":false}},"required":["name","email"],"additionalProperties":false},"PaymentMethod":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"card"},"test_card":{"type":"string","enum":["approved","declined_insufficient_funds","declined_generic","unavailable_then_approved","unavailable_then_declined"]}},"required":["type","test_card"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"pix"}},"required":["type"],"additionalProperties":false}]},"CreatePaymentIntentRequest":{"type":"object","properties":{"amount_minor":{"type":"string","pattern":"^[1-9][0-9]*$"},"currency":{"default":"BRL","type":"string","pattern":"^[A-Z]{3}$"},"payment_method_types":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["card","pix"]}},"payer":{"$ref":"#/components/schemas/PayerInput"},"description":{"type":"string","minLength":1,"maxLength":500},"metadata":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,40}$"},"additionalProperties":{"type":"string","maxLength":500}}},"required":["amount_minor"]},"ConfirmPaymentIntentRequest":{"type":"object","properties":{"payment_method":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["payment_method"],"additionalProperties":false},"CreateRefundRequest":{"type":"object","properties":{"amount_minor":{"type":"string","pattern":"^[1-9][0-9]*$"}},"required":["amount_minor"]},"UpdateNotificationPreferencesRequest":{"type":"object","properties":{"value":{"type":"object","properties":{"version":{"type":"number","const":1},"quiet_hours_enabled":{"type":"boolean"},"events":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z0-9_]{1,32}$"},"additionalProperties":{"type":"object","properties":{"email":{"type":"boolean"},"app":{"type":"boolean"}},"required":["email","app"],"additionalProperties":false}}},"required":["version","quiet_hours_enabled","events"],"additionalProperties":false}},"required":["value"],"additionalProperties":false},"UpdateDashboardPreferenceRequest":{"type":"object","properties":{"value":{"type":"object","properties":{"version":{"type":"number","const":1},"widgets":{"maxItems":32,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"visible":{"type":"boolean"}},"required":["id","visible"],"additionalProperties":false}}},"required":["version","widgets"],"additionalProperties":false}},"required":["value"],"additionalProperties":false},"CreateSellerPayoutRequest":{"type":"object","properties":{"amount_minor":{"type":"string","pattern":"^[1-9][0-9]*$"},"currency":{"default":"BRL","type":"string","pattern":"^[A-Z]{3}$"},"destination_id":{"type":"string","maxLength":128}},"required":["amount_minor"],"additionalProperties":false},"CreateOrderRequest":{"type":"object","properties":{"offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"checkout_session_id":{"anyOf":[{"type":"string","format":"starts_with","pattern":"^cs_.*"},{"type":"null"}]},"bump_ids":{"maxItems":3,"type":"array","items":{"type":"string","pattern":"^ob_[A-Za-z0-9]{1,64}$"}}},"required":["offer_id"]},"CreateProductRequest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":160}},"required":["name"]},"UpdateProductRequest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":160},"description":{"anyOf":[{"type":"string","minLength":1,"maxLength":2000},{"type":"null"}]},"category":{"anyOf":[{"type":"string","enum":["negocios_empreendedorismo","marketing_vendas","financas_investimentos","saude_bem_estar","desenvolvimento_pessoal","educacao_concursos","idiomas","tecnologia_programacao","design_fotografia","culinaria_gastronomia","outros"]},{"type":"null"}]},"sales_page_url":{"anyOf":[{"type":"string","minLength":9,"maxLength":2048},{"type":"null"}]},"guarantee_days":{"type":"integer","minimum":0,"maximum":30},"support_name":{"anyOf":[{"type":"string","minLength":2,"maxLength":80},{"type":"null"}]},"support_email":{"anyOf":[{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"support_whatsapp":{"anyOf":[{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"},{"type":"null"}]},"statement_descriptor":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9]([A-Za-z0-9 ]{0,11}[A-Za-z0-9])?$"},{"type":"null"}]},"thank_you_url":{"anyOf":[{"type":"string","minLength":9,"maxLength":2048},{"type":"null"}]},"delivery_mode":{"type":"string","enum":["access_links","seller_system"]}},"additionalProperties":false},"CreateProductAccessLinkRequest":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"url":{"type":"string","minLength":9,"maxLength":2048}},"required":["label","url"],"additionalProperties":false},"CreateOfferRequest":{"type":"object","properties":{"product_id":{"type":"string","format":"starts_with","pattern":"^prd_.*"},"amount_minor":{"type":"string","pattern":"^[1-9][0-9]*$"},"currency":{"default":"BRL","type":"string","pattern":"^[A-Z]{3}$"},"name":{"type":"string","minLength":2,"maxLength":80},"accepted_methods":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["pix","card"]}}},"required":["product_id","amount_minor"]},"UpdateOfferRequest":{"type":"object","properties":{"accepted_methods":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["pix","card"]}},"name":{"type":"string","minLength":2,"maxLength":80},"amount_minor":{"type":"string","maxLength":19,"pattern":"^[1-9][0-9]*$"},"expected_price_version":{"type":"integer","minimum":1,"maximum":2147483647},"reason":{"type":"string","minLength":1,"maxLength":200},"confirm_large_change":{"type":"boolean"}},"additionalProperties":false},"CreateOfferBumpRequest":{"type":"object","properties":{"bump_offer_id":{"type":"string","maxLength":128,"pattern":"^off_[A-Za-z0-9]+$"},"headline":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":280},"position":{"type":"integer","minimum":0,"maximum":99},"status":{"type":"string","enum":["active","inactive"]}},"required":["bump_offer_id","headline"],"additionalProperties":false},"UpdateOfferBumpRequest":{"type":"object","properties":{"headline":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":280},"position":{"type":"integer","minimum":0,"maximum":99},"status":{"type":"string","enum":["active","inactive"]}},"additionalProperties":false},"CatalogStatusRequest":{"type":"object","properties":{"status":{"type":"string","enum":["draft","active","archived"]}},"required":["status"]},"CreateCheckoutSessionRequest":{"type":"object","properties":{"offer_id":{"type":"string","format":"starts_with","pattern":"^off_.*"},"ttl_minutes":{"type":"integer","minimum":5,"maximum":1440}},"required":["offer_id"]},"PayCheckoutSessionRequest":{"type":"object","properties":{"client_secret":{"type":"string","format":"starts_with","pattern":"^csec_.*"},"payer":{"$ref":"#/components/schemas/PayerInput"},"payment_method":{"$ref":"#/components/schemas/PaymentMethod"},"bump_ids":{"maxItems":3,"type":"array","items":{"type":"string","pattern":"^ob_[A-Za-z0-9]{1,64}$"}},"expected_amount_minor":{"type":"string","maxLength":19,"pattern":"^[1-9][0-9]*$"}},"required":["client_secret","payer","payment_method"],"additionalProperties":false},"CheckoutSessionSecretRequest":{"type":"object","properties":{"client_secret":{"type":"string","format":"starts_with","pattern":"^csec_.*"}},"required":["client_secret"]},"CaptureCheckoutLeadRequest":{"type":"object","properties":{"client_secret":{"type":"string","format":"starts_with","pattern":"^csec_.*"},"name":{"type":"string","minLength":2,"maxLength":160},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":8,"maxLength":32,"pattern":"^[0-9()+\\-.\\s]+$"}},"required":["client_secret","name","email"],"additionalProperties":false},"CreatePaymentLinkRequest":{"type":"object","properties":{"offer_id":{"type":"string","maxLength":128,"pattern":"^off_[A-Za-z0-9]+$"}},"required":["offer_id"],"additionalProperties":false},"PaymentLinkStatusRequest":{"type":"object","properties":{"status":{"type":"string","enum":["active","inactive"]}},"required":["status"],"additionalProperties":false},"CreateWebhookEndpointRequest":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"selected_events":{"default":[],"maxItems":100,"type":"array","items":{"type":"string"}},"delivery_mode":{"default":"simulated","type":"string","enum":["simulated","live"]}},"required":["url"],"additionalProperties":false},"UpdateWebhookEndpointRequest":{"type":"object","properties":{"status":{"type":"string","enum":["active","disabled"]},"product_ids":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^prd_[A-Za-z0-9]{1,64}$"}},"payment_methods":{"maxItems":2,"type":"array","items":{"type":"string","enum":["card","pix"]}}},"additionalProperties":false},"EmptyRequest":{"type":"object","properties":{},"additionalProperties":false},"CreateApiCredentialRequest":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["payments:read","payments:write","refunds:write","products:read","products:write","offers:read","offers:write","orders:read","orders:write","reports:read","finance:read","webhooks:write","api-keys:write","checkout.exports:create","checkout.exports:read"]}},"expires_at":{"anyOf":[{"type":"string","pattern":"(?:^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$)|(?:^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$)","format":"date-time"},{"type":"null"}]}},"required":["name","scopes"]},"CreateOrganizationRequest":{"type":"object","properties":{"legal_name":{"type":"string","minLength":2,"maxLength":160},"display_name":{"type":"string","minLength":2,"maxLength":80}},"required":["legal_name"]},"CreateOrganizationClosureRequest":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"additionalProperties":false},"CaptureCheckoutAttributionRequest":{"type":"object","properties":{"client_secret":{"type":"string","format":"starts_with","pattern":"^csec_.*"},"entry":{"type":"string","enum":["payment_link","checkout_link"]},"attribution":{"type":"object","properties":{"utm_source":{"type":"string"},"utm_medium":{"type":"string"},"utm_campaign":{"type":"string"},"utm_term":{"type":"string"},"utm_content":{"type":"string"},"src":{"type":"string"},"sck":{"type":"string"},"fbclid":{"type":"string"},"gclid":{"type":"string"},"ttclid":{"type":"string"}},"additionalProperties":false},"device":{"type":"object","properties":{"class":{"type":"string","enum":["mobile","tablet","desktop","bot","unknown"]},"os":{"type":"string","enum":["android","ios","windows","macos","linux","chromeos","unknown"]},"browser":{"type":"string","enum":["chrome","safari","firefox","edge","samsung_internet","opera","instagram","facebook","messenger","tiktok","kwai","snapchat","pinterest","linkedin","webview","unknown"]}},"required":["class","os","browser"],"additionalProperties":false}},"required":["client_secret","entry"],"additionalProperties":false},"UpdateCurrentOrganizationRequest":{"type":"object","properties":{"timezone":{"type":"string","enum":["America/Sao_Paulo","America/Araguaina","America/Bahia","America/Belem","America/Boa_Vista","America/Campo_Grande","America/Cuiaba","America/Eirunepe","America/Fortaleza","America/Maceio","America/Manaus","America/Noronha","America/Porto_Velho","America/Recife","America/Rio_Branco","America/Santarem","UTC"]}},"required":["timezone"],"additionalProperties":false},"CreateConversionConnectionRequest":{"oneOf":[{"type":"object","properties":{"platform":{"type":"string","const":"meta"},"account_id":{"type":"string","pattern":"^[0-9]{6,20}$"},"test_event_code":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"secret":{"type":"string","pattern":"^[A-Za-z0-9._~|-]{8,1024}$"}},"required":["platform","account_id","secret"],"additionalProperties":false},{"type":"object","properties":{"platform":{"type":"string","const":"google_analytics"},"account_id":{"type":"string","pattern":"^G-[A-Z0-9]{4,16}$"},"debug_mode":{"type":"boolean"},"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"secret":{"type":"string","pattern":"^[A-Za-z0-9._~|-]{8,1024}$"}},"required":["platform","account_id","secret"],"additionalProperties":false},{"type":"object","properties":{"platform":{"type":"string","const":"tiktok"},"account_id":{"type":"string","pattern":"^[A-Z0-9]{8,40}$"},"test_event_code":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"secret":{"type":"string","pattern":"^[A-Za-z0-9._~|-]{8,1024}$"}},"required":["platform","account_id","secret"],"additionalProperties":false}]},"UpdateConversionConnectionRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\u0000-\\u001f\\u007f]+$"},"status":{"type":"string","enum":["active","disabled"]},"secret":{"type":"string","pattern":"^[A-Za-z0-9._~|-]{8,1024}$"},"test_event_code":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},{"type":"null"}]},"debug_mode":{"type":"boolean"}},"additionalProperties":false},"UpdateProductConversionConnectionsRequest":{"type":"object","properties":{"connection_ids":{"maxItems":10,"type":"array","items":{"type":"string","pattern":"^cvc_[0-9a-f]{32}$"}}},"required":["connection_ids"],"additionalProperties":false},"CreatePayoutBankRequest":{"type":"object","properties":{"bank_code":{"type":"string","enum":["104","208","237","260","336","341","001","033","077"]},"account_type":{"type":"string","enum":["checking","savings"]},"account_last4":{"type":"string","pattern":"^[0-9]{4}$"},"label":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[\\p{L}\\p{N} .,'’_&()-]+$"}},"required":["bank_code","account_type","account_last4"],"additionalProperties":false},"CreatePayoutPixKeyRequest":{"type":"object","properties":{"key_type":{"type":"string","enum":["cpf","cnpj","email","phone","random"]},"key_hint":{"type":"string","minLength":1,"maxLength":30}},"required":["key_type","key_hint"],"additionalProperties":false},"PayoutDestinationActionRequest":{"type":"object","properties":{},"additionalProperties":false},"RegisterSessionDeviceRequest":{"type":"object","properties":{"device":{"type":"object","properties":{"class":{"type":"string","enum":["mobile","tablet","desktop","bot","unknown"]},"os":{"type":"string","enum":["android","ios","windows","macos","linux","chromeos","unknown"]},"browser":{"type":"string","enum":["chrome","safari","firefox","edge","samsung_internet","opera","instagram","facebook","messenger","tiktok","kwai","snapchat","pinterest","linkedin","webview","unknown"]}},"required":["class","os","browser"],"additionalProperties":false}},"required":["device"],"additionalProperties":false},"AccountMfaEventRequest":{"type":"object","properties":{"event":{"type":"string","enum":["enrolled","removed"]}},"required":["event"],"additionalProperties":false},"CreateOfferUpsellRequest":{"type":"object","properties":{"step_offer_id":{"type":"string","maxLength":128,"pattern":"^off_[A-Za-z0-9]+$"},"kind":{"type":"string","enum":["upsell","downsell"]},"position":{"type":"integer","minimum":1,"maximum":3},"headline":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":280},"accepted_url":{"anyOf":[{"type":"string","minLength":1,"maxLength":2048},{"type":"null"}]},"declined_url":{"anyOf":[{"type":"string","minLength":1,"maxLength":2048},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive"]}},"required":["step_offer_id","kind","headline"],"additionalProperties":false},"UpdateOfferUpsellRequest":{"type":"object","properties":{"headline":{"type":"string","minLength":1,"maxLength":80},"description":{"type":"string","maxLength":280},"accepted_url":{"anyOf":[{"type":"string","minLength":1,"maxLength":2048},{"type":"null"}]},"declined_url":{"anyOf":[{"type":"string","minLength":1,"maxLength":2048},{"type":"null"}]},"position":{"type":"integer","minimum":1,"maximum":3},"status":{"type":"string","enum":["active","inactive"]}},"additionalProperties":false},"UpsellStepRequest":{"type":"object","properties":{"client_secret":{"type":"string","format":"starts_with","pattern":"^csec_.*"},"step_id":{"type":"string","pattern":"^ups_[A-Za-z0-9]{1,64}$"}},"required":["client_secret","step_id"],"additionalProperties":false},"AcceptUpsellRequest":{"type":"object","properties":{"client_secret":{"type":"string","format":"starts_with","pattern":"^csec_.*"},"step_id":{"type":"string","pattern":"^ups_[A-Za-z0-9]{1,64}$"},"expected_amount_minor":{"type":"string","maxLength":19,"pattern":"^[1-9][0-9]*$"}},"required":["client_secret","step_id"],"additionalProperties":false},"CreateOrderMessageRequest":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["access_resend","pix_resend","pix_link"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"resend_of":{"type":"string","pattern":"^msg_[0-9a-f]{32}$"}},"required":["resend_of"],"additionalProperties":false}]},"CreateAbandonedCheckoutReminderRequest":{"type":"object","properties":{"channel":{"type":"string","enum":["email","whatsapp_handoff"]}},"required":["channel"],"additionalProperties":false},"SaveIdentityProfileRequest":{"oneOf":[{"type":"object","properties":{"person_type":{"type":"string","const":"PF"},"document":{"type":"string","minLength":11,"maxLength":18,"pattern":"^[0-9A-Za-z.\\-/\\s]+$"},"holder_name":{"type":"string","minLength":2,"maxLength":120},"birth_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["person_type","document","holder_name","birth_date"],"additionalProperties":false},{"type":"object","properties":{"person_type":{"type":"string","const":"PJ"},"document":{"type":"string","minLength":11,"maxLength":18,"pattern":"^[0-9A-Za-z.\\-/\\s]+$"},"holder_name":{"type":"string","minLength":2,"maxLength":120},"representative":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"document":{"type":"string","minLength":11,"maxLength":18,"pattern":"^[0-9A-Za-z.\\-/\\s]+$"}},"required":["name","document"],"additionalProperties":false}},"required":["person_type","document","holder_name","representative"],"additionalProperties":false}]}},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"sk_test_...","description":"API key secreta do seller (`sk_test_...`), criada no app do seller. Nesta edição só existem chaves de teste."},"sellerSession":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Token de sessão do app do seller (Supabase Auth). Rotas de API keys, rotação de segredo de webhook e organizações exigem sessão humana."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"description":"Chave escolhida pelo cliente (8 a 255 caracteres). Mesma chave + mesmo corpo = mesma resposta; corpo diferente = `409 IDEMPOTENCY_CONFLICT`. Guardada por 24 h.","schema":{"type":"string","minLength":8,"maxLength":255}},"OrganizationId":{"name":"wolf-organization-id","in":"header","required":false,"description":"Só para sessão do app do seller com mais de uma organização (senão `409 TENANT_SELECTION_REQUIRED`). Ignorado para API keys.","schema":{"type":"string","pattern":"^org_"}}},"headers":{"RequestId":{"description":"Identificador da requisição (informe ao suporte).","schema":{"type":"string"}},"IdempotentReplayed":{"description":"`true` quando a resposta é a reprodução de uma requisição anterior com a mesma `Idempotency-Key`.","schema":{"type":"string","enum":["true"]}},"RetryAfter":{"description":"Segundos até a janela do rate limit reabrir.","schema":{"type":"integer","minimum":1}}}}}