Webhooks

Cinderpay sends a webhook whenever something happens to a payment after your request has returned. Most integrations need three events to stay in sync, and the rest can be ignored until you have a reason to care about them.

Verify every delivery

Each delivery carries a signature header computed over the timestamp and the raw request body. Compute the same value with your endpoint secret and compare the two in constant time before you parse the JSON, because a parsed and re-serialised body will not match.

Reject deliveries whose timestamp is more than five minutes old. Set tolerance_seconds if your clock drifts.

Respond quickly

Return a 2xx status within ten seconds and do the real work on a queue. A delivery that times out is retried with increasing delays for three days, and your endpoint is disabled after that.