Cobranças
Buscar Cobrança
GET
/v1/charges/:chargeIdBase URL Produção:
https://api.validapay.com.brBase URL Sandbox:
https://sandbox.validapay.com.brAutenticação
bearerAuthorizationstring · header · obrigatório
Envie no header:
Authorization: Bearer {{token}}Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| chargeId | string | Required | Chargeid |
Retorna o status atualizado e todos os detalhes de uma cobrança, incluindo se já foi paga.
Consultar cobrança
const url = 'https://sandbox.validapay.com.br/v1/charges/:chargeId';
const options = {
method: 'GET',
headers: {
'Authorization': 'Bearer {{token}}'
},
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Response Examples
200200
{
"chargeId": "cha_xxx",
"status": "PAID",
"amount": 100.0,
"currency": "BRL",
"paymentType": "PIX",
"provider": "MAL",
"accountNumber": "123456",
"customerName": "João da Silva",
"email": "joao@email.com",
"taxId": "123.456.789-01",
"description": null,
"emvQrCode": null,
"paidAt": "2024-01-15T10:35:00Z",
"endToEndId": "E00000000...",
"createdAt": "2024-01-15T10:30:00Z",
"feeInfo": {
"grossAmount": 100.0,
"netAmount": 99.01,
"fees": {
"pix": 0.99
}
},
"splits": null,
"customer": {
"customerId": "cus_xxx",
"name": "João da Silva"
},
"subscription": null,
"coupon": null
}404404
{
"code": "CHARGE_NOT_FOUND"
}