Webhooks

Listar Eventos

GET/v1/users/webhooks/events
Base URL Produção:https://api.validapay.com.br
Base URL Sandbox:https://sandbox.validapay.com.br

Autenticação

bearerAuthorizationstring · header · obrigatório

Envie no header:

Authorization: Bearer {{token}}

Retorna a lista de todos os eventos disponíveis para receber notificações, como pagamento aprovado, assinatura cancelada, entre outros.

Histórico de disparos

const url = 'https://sandbox.validapay.com.br/v1/users/webhooks/events?limit=50&nextPageToken=&type=';

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
{
  "items": [
    {
      "eventId": "evt_xxx",
      "webhookId": "wh_xxx",
      "type": "payment.success",
      "status": "success",
      "attempt": 1,
      "responseStatusCode": 200,
      "createdAt": "2024-01-15T10:30:00Z"
    }
  ],
  "count": 10,
  "total": 100,
  "hasMore": true,
  "nextPageToken": "eyJ..."
}