Criar endpoint de webhook
POST
/api/v1/webhooksCria um novo endpoint para receber eventos via webhook.
Escopo necessário: write:webhooks
Body
urlstringobrigatórioURL HTTPS para receber os webhooks
eventsstring[]obrigatórioLista de eventos para inscrever
Exemplo
Requisição
curl -X POST https://app.paysclub.com/api/v1/webhooks \
-H "Authorization: Bearer pk_live_sua_chave" \
-H "Content-Type: application/json" \
-d '{
"url": "https://meusite.com/webhook",
"events": ["order.paid", "access.granted"]
}'201 Created
{
"data": {
"id": "...",
"url": "https://meusite.com/webhook",
"events": ["order.paid", "access.granted"],
"is_active": true,
"created_at": "2026-03-15T10:30:00Z"
},
"secret": "a3f8c2d1e9b4f7a2..."
}O
secret é retornado apenas na criação. Use-o para verificar a assinatura dos webhooks recebidos.