Dashboard

Eventos de Webhook

Lista completa de eventos disponibles y sus payloads.

Eventos disponibles

Evento Descripcion
booking.created Nueva reserva creada
booking.updated Reserva modificada
booking.cancelled Reserva cancelada
booking.completed Reserva completada (servicio realizado)
booking.no_show Cliente no se presento
payment.completed Pago completado
payment.failed Pago fallido
payment.refunded Pago reembolsado
customer.created Nuevo cliente registrado
customer.updated Cliente actualizado

booking.created

Se dispara cuando se crea una nueva reserva.

JSON Payload
{
    "id": "evt_abc123",
    "type": "booking.created",
    "created": "2024-01-20T10:30:00Z",
    "tenant_id": "uuid-tenant",
    "data": {
        "booking": {
            "id": 12345,
            "codigo": "ABC123XY",
            "fecha": "2024-01-25",
            "hora_inicio": "10:30",
            "hora_fin": "11:00",
            "servicios": [
                {
                    "id": 15,
                    "nombre": "Corte Clasico",
                    "precio": 25.00,
                    "duracion_minutos": 30
                }
            ],
            "profesional": {
                "id": 5,
                "nombre": "Carlos Garcia"
            },
            "cliente": {
                "id": 456,
                "nombre": "Juan Perez",
                "email": "juan@email.com",
                "telefono": "+34612345678"
            },
            "total": 25.00,
            "estado": "confirmada",
            "notas": "Primera visita",
            "created_at": "2024-01-20T10:30:00Z"
        }
    }
}

booking.updated

Se dispara cuando se modifica una reserva (cambio de fecha, hora, profesional, etc).

JSON Payload
{
    "id": "evt_def456",
    "type": "booking.updated",
    "created": "2024-01-20T11:00:00Z",
    "tenant_id": "uuid-tenant",
    "data": {
        "booking": {
            "id": 12345,
            "codigo": "ABC123XY",
            "fecha": "2024-01-26",
            "hora_inicio": "11:00",
            "hora_fin": "11:30",
            // ... datos completos de la reserva
        },
        "changes": {
            "fecha": {
                "old": "2024-01-25",
                "new": "2024-01-26"
            },
            "hora_inicio": {
                "old": "10:30",
                "new": "11:00"
            }
        }
    }
}

booking.cancelled

Se dispara cuando una reserva es cancelada.

JSON Payload
{
    "id": "evt_ghi789",
    "type": "booking.cancelled",
    "created": "2024-01-20T12:00:00Z",
    "tenant_id": "uuid-tenant",
    "data": {
        "booking": {
            "id": 12345,
            "codigo": "ABC123XY",
            "estado": "cancelada"
            // ... datos completos
        },
        "cancellation": {
            "cancelled_by": "cliente",
            "reason": "Cambio de planes",
            "cancelled_at": "2024-01-20T12:00:00Z"
        },
        "refund": {
            "applicable": true,
            "amount": 25.00,
            "status": "pending"
        }
    }
}

booking.completed

Se dispara cuando el servicio ha sido realizado y la reserva se marca como completada.

JSON Payload
{
    "id": "evt_jkl012",
    "type": "booking.completed",
    "created": "2024-01-25T11:05:00Z",
    "tenant_id": "uuid-tenant",
    "data": {
        "booking": {
            "id": 12345,
            "estado": "completada",
            "completed_at": "2024-01-25T11:05:00Z"
            // ... datos completos
        },
        "points_earned": 25
    }
}

booking.no_show

Se dispara cuando el cliente no se presenta a la cita.

JSON Payload
{
    "id": "evt_mno345",
    "type": "booking.no_show",
    "created": "2024-01-25T11:30:00Z",
    "tenant_id": "uuid-tenant",
    "data": {
        "booking": {
            "id": 12345,
            "estado": "no_show",
            "marked_at": "2024-01-25T11:30:00Z"
        }
    }
}

payment.completed

Se dispara cuando un pago se completa exitosamente.

JSON Payload
{
    "id": "evt_pqr678",
    "type": "payment.completed",
    "created": "2024-01-20T10:35:00Z",
    "tenant_id": "uuid-tenant",
    "data": {
        "payment": {
            "id": 789,
            "amount": 25.00,
            "currency": "EUR",
            "method": "card",
            "stripe_payment_intent_id": "pi_abc123",
            "status": "succeeded"
        },
        "booking": {
            "id": 12345,
            "codigo": "ABC123XY"
        },
        "cliente": {
            "id": 456,
            "nombre": "Juan Perez",
            "email": "juan@email.com"
        }
    }
}

payment.failed

Se dispara cuando un intento de pago falla.

JSON Payload
{
    "id": "evt_stu901",
    "type": "payment.failed",
    "created": "2024-01-20T10:35:00Z",
    "tenant_id": "uuid-tenant",
    "data": {
        "payment": {
            "id": 790,
            "amount": 25.00,
            "currency": "EUR",
            "status": "failed",
            "error_code": "card_declined",
            "error_message": "Tu tarjeta fue rechazada"
        },
        "booking": {
            "id": 12346
        }
    }
}

payment.refunded

Se dispara cuando se realiza un reembolso.

JSON Payload
{
    "id": "evt_vwx234",
    "type": "payment.refunded",
    "created": "2024-01-21T09:00:00Z",
    "tenant_id": "uuid-tenant",
    "data": {
        "refund": {
            "id": 100,
            "amount": 25.00,
            "currency": "EUR",
            "reason": "Cancelacion por cliente",
            "stripe_refund_id": "re_abc123"
        },
        "original_payment": {
            "id": 789,
            "amount": 25.00
        },
        "booking": {
            "id": 12345
        }
    }
}

customer.created

Se dispara cuando un nuevo cliente se registra.

JSON Payload
{
    "id": "evt_yza567",
    "type": "customer.created",
    "created": "2024-01-20T10:25:00Z",
    "tenant_id": "uuid-tenant",
    "data": {
        "customer": {
            "id": 456,
            "nombre": "Juan Perez",
            "email": "juan@email.com",
            "telefono": "+34612345678",
            "source": "widget",
            "created_at": "2024-01-20T10:25:00Z"
        }
    }
}

customer.updated

Se dispara cuando un cliente actualiza su perfil.

JSON Payload
{
    "id": "evt_bcd890",
    "type": "customer.updated",
    "created": "2024-01-22T15:00:00Z",
    "tenant_id": "uuid-tenant",
    "data": {
        "customer": {
            "id": 456,
            "nombre": "Juan Perez Garcia",
            "email": "juan@email.com",
            "telefono": "+34612345678"
        },
        "changes": {
            "nombre": {
                "old": "Juan Perez",
                "new": "Juan Perez Garcia"
            }
        }
    }
}