Estructura del payload del webhook
JSON completo enviado en los webhooks de ggCheckout
Payload enviado a tu endpoint:
ggCheckout envía un POST con Content-Type: application/json a tu URL configurada. Si configuraste un Secret, se incluyen automáticamente los headers Authorization: Bearer <secret> y x-secret: <secret>.
{
"event": "pix.paid",
"createdAt": "2024-01-15T10:30:00Z",
"customer": {
"name": "Joao Silva",
"email": "joao@email.com",
"document": "12345678901",
"phone": "5511999999999",
"ip": "177.45.23.100"
},
"payment": {
"id": "29cce702-5e7e-40da-93b0-aaa19acab32e",
"method": "pix.paid",
"paymentMethod": "pix",
"gateway": "pagouai",
"status": "paid",
"amount": 97.00,
"pixCode": "00020126580014BR.GOV.BCB.PIX..."
},
"product": {
"id": "YbfsgK1Fgm0LzUsFglrn",
"type": "main",
"title": "Meu Produto Digital"
},
"products": [
{
"id": "YbfsgK1Fgm0LzUsFglrn",
"type": "main",
"title": "Meu Produto Digital"
},
{
"id": "bump_abc123",
"type": "orderbump",
"title": "E-book Bonus",
"price": 2700
}
],
"webhook": {
"id": "webhook_xyz789",
"businessId": "woYVFMp2mOOJnU0Mrbn8AlhhpmD2",
"events": ["pix.paid", "pix.generated"]
},
"utm_source": "facebook",
"utm_medium": "cpc",
"utm_campaign": "minha-campanha",
"utm_content": null,
"utm_term": null,
"customerIp": "177.45.23.100"
}Eventos disponibles:
pix.paid
PIX confirmado
pix.generated
PIX generado, esperando pago
pix.expired
PIX expirado sin pago
pix.failed
PIX fallido
pix.refunded
PIX reembolsado
card.paid
Tarjeta aprobada
card.generated
Tarjeta en procesamiento
card.expired
Tarjeta expirada sin confirmación
card.failed
Tarjeta rechazada
card.refunded
Tarjeta reembolsada
card.pending
Tarjeta pendiente de análisis
Campos importantes:
payment.status
Valores posibles: paid, pending, failed, refunded, charged_back
product.type
Valores posibles: main, orderbump, upsell, downsell
payment.pixCode
Código PIX copia y pega. Disponible solo en eventos PIX.
utm_*
Parámetros UTM del enlace. null si el cliente no vino de un enlace rastreado.
Reintentos
Si tu endpoint devuelve un error (status >= 400 o timeout), el webhook se reintentará automáticamente hasta 3 veces.