Webhooks

Testar Webhook

POST/v1/users/webhooks/test
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}}

Envia um aviso de teste para o endereço configurado, permitindo validar se as notificações estão chegando corretamente.

Testar webhook (payload fake)

Obrigatório webhookId ou url.

CampoObrig.TipoDescrição
webhookId✅*stringID do webhook registrado
url✅*stringURL alternativa
entitystringTipo de evento para gerar payload

Body

application/json

Content-Type:application/json
{
  "webhookId": "wh_xxx",
  "entity": "payment.success"
}

Schema

FieldTypeRequiredDescription
webhookId
string-
-
entity
string-
-

Headers

NameTypeValueRequired
Content-Type-application/jsonOptional
const url = 'https://sandbox.validapay.com.br/v1/users/webhooks/test';

const options = {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer {{token}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
  "webhookId": "wh_xxx",
  "entity": "payment.success"
})
};

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

Response Examples

200200
{
  "success": true,
  "url": "https://meusite.com/webhook",
  "event": "payment.success",
  "payload": {},
  "response": {
    "statusCode": 200
  }
}
400400
{
  "success": false,
  "error": "Connection refused"
}