Icone PayDocsWebhooks
How Icone Pay notifies your server when payments complete.
Receiving Events
When a payment's status changes, we POST a JSON event to your route's webhook URL. Each request is HMAC signed (see Verifying Webhooks) and retried with backoff if your endpoint is unavailable (see Delivery and Retries).
Event Payload
Every event carries both the presentment and the charged amounts, plus the COD split where relevant, so you can reconcile precisely.
| Field | Type | Description |
|---|---|---|
| amount / currency | number / string | What you priced (presentment). |
| paymentAmount / paymentCurrency | number / string | What the customer was charged. |
| exchangeRate | number | Presentment → payment rate used (1 when no conversion). |
| codAmount / prepaidAmount | number | Pay-on-delivery split; 0 for fully-online orders. |
Event Types
| event | When |
|---|---|
payment.success | Payment completed (or COD collected). |
payment.failed | Payment failed, expired, or COD cancelled. |
order.cod_placed | A pay-on-delivery order was placed, awaiting collection. |
Responding
Return any 2xx status to acknowledge an event. A non-2xx response (or a timeout) is treated as a failed delivery and the event is retried. Make your handler idempotent — use orderId to ignore duplicates.