Chargebacks

Baixar arquivo da defesa

Devolve o binário do anexo com o Content-Type original e o nome em Content-Disposition. Sem download, o arquivo é exibido no navegador.

GET/v1/disputes/:caseId/evidence/files/:fileId
Base URL Produção:https://api.validapay.com.br
Base URL Sandbox:https://sandbox.validapay.com.br

Escopos requeridos

charges/read

Path Parameters

caseIdstringobrigatório
Identificador do chargeback (`caseId`), devolvido na listagem
fileIdstringobrigatório
Identificador do arquivo, devolvido no envio do anexo

Query Parameters

typeobrigatório
sempre CHARGEBACK nesta seção
CHARGEBACK
downloadopcional
1 ou true força o download em vez de exibir no navegador
1
const url = 'https://sandbox.validapay.com.br/v1/disputes/:caseId/evidence/files/:fileId?type=CHARGEBACK&download=1';

const options = {
  method: 'GET',
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));

Response Examples

404Arquivo não encontrado▾
JSON
{
    "error": {
        "message": "Anexo não encontrado",
        "code": "EVIDENCE_FILE_NOT_FOUND",
        "details": null,
        "timestamp": "2026-10-28T14:20:00.000Z"
    }
}
404Chargeback não encontrado▾
JSON
{
    "error": {
        "message": "Caso de chargeback não encontrado",
        "code": "CHARGEBACK_CASE_NOT_FOUND",
        "details": null,
        "timestamp": "2026-10-28T14:20:00.000Z"
    }
}