Event Webhooks
Low-code automation: your system POSTs an event → Paygham fills a template → WhatsApp is sent to the customer.
- In the admin, open Event Webhooks and create a webhook (Pro plan).
- Copy the webhook URL and secret.
- Map the customer phone and write a message template.
- Activate, then POST events from your app.
Example request
POST https://api.payghams.com/incoming-webhooks/YOUR_WEBHOOK_ID
Content-Type: application/json
Authorization: Bearer YOUR_SECRET
Idempotency-Key: invoice-42
{
"event_id": "invoice-42",
"customer": { "name": "Amina", "phone": "+12025550123" },
"invoice": { "number": "INV-42", "amount": 123.4 }
}Template
Hello {{customer_name}}, your invoice {{invoice_number}} for {{amount}} is ready.accepted: truemeans stored — check Recent events for delivery status.- Use a new
Idempotency-Keyfor each unique event. - Pro includes Webhook registration (outgoing) and Event Webhooks (incoming → WhatsApp).