Ana içeriğe atla

Webhooks — Olay Bildirimleri

Real-time olay almak için HTTPS endpoint kaydet.

İleri· 7 dk okuma· Son güncelleme: 2026-05-05· 31 kullanıcı faydalı buldu
Webhook = Glanevo'da bir olay olduğunda sizin adresinize gönderilen bildirim. **Kayıt.** Ayarlar → Geliştiriciler → Webhooks → + Yeni: - URL (HTTPS zorunlu) - Olay tipleri (çoklu seç) - Secret (signature doğrulama için) **Olay tipleri.** - `appointment.created`, `appointment.updated`, `appointment.cancelled`, `appointment.no_show` - `customer.created`, `customer.updated` - `payment.succeeded`, `payment.failed`, `payment.refunded` - `invoice.created`, `invoice.paid` - `staff.created` **Payload örneği (`appointment.created`):** ```json { "id": "evt_01HX...", "type": "appointment.created", "createdAt": "2026-05-21T10:30:00Z", "data": { "appointment": { "id": "apt_01HY...", "customerId": "cus_...", "serviceId": "svc_...", "startAt": "2026-05-22T14:00:00Z", "endAt": "2026-05-22T15:30:00Z", "price": 450 } } } ``` **Signature doğrula.** Her isteğin `X-Glanevo-Signature` header'ı HMAC-SHA256 ile imzalı. ```js const crypto = require('crypto'); const expected = crypto .createHmac('sha256', WEBHOOK_SECRET) .update(rawBody) .digest('hex'); if (req.headers['x-glanevo-signature'] !== expected) { return res.status(401).end(); } ``` **Retry.** 2xx döndürmezsen 5 kez exponential backoff (2 dk, 5 dk, 20 dk, 1 saat, 6 saat). 📊 Webhook geçmişi: Ayarlar → Geliştiriciler → Logs.

Bu makale faydalı oldu mu?