curl -X POST 'https://api.goatpay.com.br/v1/webhooks/create' \
-H 'X-API-Key: gp_live_SUA_CHAVE' \
-H 'Content-Type: application/json' \
-d '{ "url": "https://api.suaempresa.com/webhooks/goatpay", "description": "ERP produção", "events": ["payment.paid", "transfer.completed"] }'
{
"success": true,
"message": "Webhook criado com sucesso",
"data": {
"item": {
"id": "clx_webhook",
"url": "https://api.suaempresa.com/webhooks/goatpay",
"description": "ERP produção",
"events": ["payment.paid", "transfer.completed"],
"status": "ACTIVE",
"createdAt": "2026-07-01T12:00:00.000Z"
},
"secret": "whsec_..."
},
"requestId": "req_abc"
}
Endpoints
Cadastrar webhook
Cadastra URL de eventos vinculada à API key.
POST
/
webhooks
/
create
curl -X POST 'https://api.goatpay.com.br/v1/webhooks/create' \
-H 'X-API-Key: gp_live_SUA_CHAVE' \
-H 'Content-Type: application/json' \
-d '{ "url": "https://api.suaempresa.com/webhooks/goatpay", "description": "ERP produção", "events": ["payment.paid", "transfer.completed"] }'
{
"success": true,
"message": "Webhook criado com sucesso",
"data": {
"item": {
"id": "clx_webhook",
"url": "https://api.suaempresa.com/webhooks/goatpay",
"description": "ERP produção",
"events": ["payment.paid", "transfer.completed"],
"status": "ACTIVE",
"createdAt": "2026-07-01T12:00:00.000Z"
},
"secret": "whsec_..."
},
"requestId": "req_abc"
}
curl -X POST 'https://api.goatpay.com.br/v1/webhooks/create' \
-H 'X-API-Key: gp_live_SUA_CHAVE' \
-H 'Content-Type: application/json' \
-d '{ "url": "https://api.suaempresa.com/webhooks/goatpay", "description": "ERP produção", "events": ["payment.paid", "transfer.completed"] }'
{
"success": true,
"message": "Webhook criado com sucesso",
"data": {
"item": {
"id": "clx_webhook",
"url": "https://api.suaempresa.com/webhooks/goatpay",
"description": "ERP produção",
"events": ["payment.paid", "transfer.completed"],
"status": "ACTIVE",
"createdAt": "2026-07-01T12:00:00.000Z"
},
"secret": "whsec_..."
},
"requestId": "req_abc"
}
Corpo da requisição
string
required
URL HTTPS pública.
string
required
Nome do endpoint.
array
required
Lista de eventos. Veja o guia Webhooks.
A resposta inclui secret whsec_… exibido uma única vez.
Authorizations
Chave gp_live_... criada em Integrações → Chaves de API no dashboard.
Body
application/json
HTTPS obrigatório.
Maximum string length:
120Required array length:
1 - 80 elementsAvailable options:
payment.created, payment.paid, payment_link.paid, payment.failed, payment.refunded, refund.requested, refund.completed, refund.failed, payment.pix.expired, transfer.created, transfer.completed, transfer.failed, transfer.internal.completed, transfer.internal.received, med.created, med.updated, med.evidence_sent, invoice.created, invoice.processing, invoice.issued, invoice.failed, invoice.cancelled, oauth.authorization.granted, oauth.authorization.denied, oauth.authorization.revoked, oauth.application.created, oauth.application.updated, oauth.application.deleted, oauth.client.created, oauth.client.secret_regenerated, oauth.client.redirect_uris_updated, webhook.test 
