Webhooks
A webhook is a POST request Senfenico sends to your server when an operation’s status changes, for example when a payment succeeds, a transfer fails or a settlement is paid out. It is the reliable way to learn that a pay_offline payment was confirmed on the customer’s phone, or that a charge succeeded even though the customer closed the payment page before the redirect. In that last case only charge.success is sent, not checkout.success (see Confirm the payment server-side).
Set up a webhook URL
Section titled “Set up a webhook URL”- In the dashboard, open Developer › Webhooks, then click Add an endpoint.
- Enter your webhook URL and pick a single event (for example
charge.success). Create one entry per event you want; the same URL can be reused. - Test-mode and live-mode subscriptions are separate. Switch modes in the dashboard to configure each one. Today,
checkout.*andsettlement.*events are an exception and are sent to all your matching subscriptions, in test and live mode alike. So always checklive_modeindatabefore acting (see Event list). - Copy the key shown under Signing secret on the same page. You need it to verify signatures.
URL requirements
Section titled “URL requirements”The URL must be public, using https:// (recommended) or http://. Private or local addresses, such as localhost, 10.x or 192.168.x, are rejected. To test locally, expose your server through a tunnel such as ngrok or Cloudflare Tunnel.
Redirects are not followed: a 301 or 302 response counts as a failure. Register the final URL, watching the trailing / and the switch from http to https.
Your server must respond with a 2xx status (200, 201 or 204, for example) within 5 seconds. Any other code, or no response, triggers a retry.
Event format
Section titled “Event format”Every request carries signature headers and a two-field JSON body:
POST /webhooks/senfenico HTTP/1.1Content-Type: application/jsonX-Senfenico-Timestamp: 1795675230X-Senfenico-Signature: v1=b9e53a21…3ad817X-Senfenico-Delivery: 6f1c2d4e-8a9b-4c0d-9e1f-2a3b4c5d6e7fX-Webhook-Hash: 3f0c9a…e71b
{"event": "charge.success", "data": "{\"reference\": \"CH261126-101512-ORANGE_BF-7c41e9a0b2\", \"status\": \"success\", …}"}What each header is for is explained in Verify webhook signatures.
Once decoded, data describes the object. Example for a charge:
{ "reference": "CH261126-101512-ORANGE_BF-7c41e9a0b2", "ext_id": "98b96ea4-210d-4ea0-9b03-8d7fd96e4064", "status": "success", "amount": 1000, "amount_refunded": 0, "fees": "2.990", "currency": "XOF", "payment_method": "mobile_money", "provider": "orange_bf", "phone": "76000000", "live_mode": false, "transaction_date": "2026-11-26T10:14:31Z", "created_at": "2026-11-26T10:14:31Z", "updated_at": "2026-11-26T10:15:02Z"}Use reference (or your own ext_id) to find the matching order.
Event list
Section titled “Event list”An event name is always <object>.<new status>.
| Object | Events | When |
|---|---|---|
| Charge | charge.success, charge.failed, charge.pending, charge.send_otp, charge.pay_offline, charge.canceled |
A direct charge changes status |
| Checkout | checkout.success, checkout.failed, checkout.pending |
A checkout changes status |
| Transfer | transfer.success, transfer.failed, transfer.pending |
A transfer changes status |
| Refund | refund.success, refund.failed, refund.pending |
A refund changes status |
| Settlement | settlement.processing, settlement.in_transit, settlement.success, settlement.cancelled |
A settlement changes status |
| Top-up | topup.success, topup.failed, topup.pending |
A balance top-up changes status |
Most integrations only need charge.success, checkout.success, charge.failed and transfer.success / transfer.failed.
Retries
Section titled “Retries”If your server doesn’t return 2xx (error, timeout, redirect), Senfenico resends the event, up to 10 attempts in total over about an hour.
| Attempt | Delay after the previous one |
|---|---|
| 1 | immediate |
| 2 | 10 seconds |
| 3 | 1 minute |
| 4 | 5 minutes |
| 5 to 10 | 10 minutes |
Every attempt for the same event carries the same X-Senfenico-Delivery. After the tenth, the event is not resent automatically.
Each webhook’s detail page in the dashboard shows the attempts and your server’s responses. Only charge notifications can be resent manually, from Payments › Resend callback.
More than an hour of downtime on your side means missed events. Don’t rely on webhooks alone: add a reconciliation job that checks the API (for example GET /v1/payment/charges/{reference}/) for orders still pending.
Responding to a webhook
Section titled “Responding to a webhook”After you verify the signature, return 200 right away and process the event in a background job, so you stay under 5 seconds. Also return 200 for an event you don’t recognize, since new events may be added.