Webhook-Ereignisse

Vollständige Liste verfügbarer Ereignisse und ihrer Payloads.

Verfügbare Ereignisse

Ereignis Beschreibung
booking.created Neue Buchung erstellt
booking.updated Buchung geändert
booking.cancelled Buchung storniert
booking.completed Buchung abgeschlossen (Service durchgeführt)
booking.no_show Kunde ist nicht erschienen
payment.completed Zahlung abgeschlossen
payment.failed Zahlung fehlgeschlagen
payment.refunded Zahlung erstattet
customer.created Neuer Kunde registriert
customer.updated Kunde aktualisiert
order.created Neue Bestellung erstellt
order.shipped Bestellung versandt
order.delivered Bestellung geliefert

booking.created

Wird ausgelöst, wenn eine neue Buchung erstellt wird.

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 Clásico",
                    "precio": 25.00,
                    "duracion_minutos": 30
                }
            ],
            "profesional": {
                "id": 5,
                "nombre": "Carlos García"
            },
            "cliente": {
                "id": 456,
                "nombre": "Juan Pérez",
                "email": "juan@email.com",
                "telefono": "+34612345678"
            },
            "total": 25.00,
            "estado": "confirmada",
            "notas": "Primera visita",
            "created_at": "2024-01-20T10:30:00Z"
        }
    }
}

booking.updated

Wird ausgelöst, wenn eine Buchung geändert wird (Datum, Uhrzeit, Fachmann usw.).

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"
            // ... vollständige Buchungsdaten
        },
        "changes": {
            "fecha": {
                "old": "2024-01-25",
                "new": "2024-01-26"
            },
            "hora_inicio": {
                "old": "10:30",
                "new": "11:00"
            }
        }
    }
}

booking.cancelled

Wird ausgelöst, wenn eine Buchung storniert wird.

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"
            // ... vollständige Daten
        },
        "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

Wird ausgelöst, wenn der Service durchgeführt wurde und die Buchung als abgeschlossen markiert wird.

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"
            // ... vollständige Daten
        },
        "points_earned": 25
    }
}

booking.no_show

Wird ausgelöst, wenn der Kunde nicht zum Termin erscheint.

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

Wird ausgelöst, wenn eine Zahlung erfolgreich abgeschlossen wird.

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 Pérez",
            "email": "juan@email.com"
        }
    }
}

payment.failed

Wird ausgelöst, wenn ein Zahlungsversuch fehlschlägt.

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

Wird ausgelöst, wenn eine Rückerstattung erfolgt.

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": "Cancelación por cliente",
            "stripe_refund_id": "re_abc123"
        },
        "original_payment": {
            "id": 789,
            "amount": 25.00
        },
        "booking": {
            "id": 12345
        }
    }
}

customer.created

Wird ausgelöst, wenn sich ein neuer Kunde registriert.

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

customer.updated

Wird ausgelöst, wenn ein Kunde sein Profil aktualisiert.

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

order.created

Wird ausgelöst, wenn eine neue Produktbestellung erstellt wird.

JSON Payload
{
    "id": "evt_ord123",
    "type": "order.created",
    "created": "2024-01-20T14:30:00Z",
    "tenant_id": "uuid-tenant",
    "data": {
        "order": {
            "id": 789,
            "numero": "PED-2024-0789",
            "cliente": {
                "id": 456,
                "nombre": "Juan Pérez",
                "email": "juan@email.com"
            },
            "items": [
                {
                    "producto_id": 12,
                    "nombre": "Shampoo Profesional",
                    "cantidad": 2,
                    "precio_unitario": 15.00,
                    "subtotal": 30.00
                }
            ],
            "subtotal": 30.00,
            "envio": 5.00,
            "total": 35.00,
            "estado": "pending",
            "created_at": "2024-01-20T14:30:00Z"
        }
    }
}

order.shipped

Wird ausgelöst, wenn eine Bestellung versandt wird.

JSON Payload
{
    "id": "evt_ord456",
    "type": "order.shipped",
    "created": "2024-01-21T10:00:00Z",
    "tenant_id": "uuid-tenant",
    "data": {
        "order": {
            "id": 789,
            "numero": "PED-2024-0789",
            "estado": "shipped",
            "tracking_number": "1Z999AA10123456784",
            "tracking_url": "https://tracking.example.com/1Z999AA10123456784",
            "shipped_at": "2024-01-21T10:00:00Z"
        }
    }
}

order.delivered

Wird ausgelöst, wenn eine Bestellung geliefert wird.

JSON Payload
{
    "id": "evt_ord789",
    "type": "order.delivered",
    "created": "2024-01-23T16:45:00Z",
    "tenant_id": "uuid-tenant",
    "data": {
        "order": {
            "id": 789,
            "numero": "PED-2024-0789",
            "estado": "delivered",
            "delivered_at": "2024-01-23T16:45:00Z"
        }
    }
}