Cobranças

Baixar Boleto

GET/v1/charges/:chargeId/boleto.pdf
Base URL Produção:https://api.validapay.com.br
Base URL Sandbox:https://sandbox.validapay.com.br

Autenticação

noauthnoauthstring · header · obrigatório

Nenhuma autenticação via header — credenciais enviadas no body da requisição.

Path Parameters

NameTypeRequiredDescription
chargeIdstringRequiredChargeid

Retorna o arquivo PDF do boleto para enviar ou exibir ao cliente.

PDF do boleto (público)

Retorna PDF em base64 com Content-Type: application/pdf.

const url = 'https://sandbox.validapay.com.br/v1/charges/:chargeId/boleto.pdf?download=';

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

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

Response Examples

400400
{
  "code": "CHARGE_NOT_BOLETO"
}
404404
{
  "code": "BOLETO_PDF_NOT_AVAILABLE"
}