Webhooks
Event types
Statuses in events are the public, masked vocabulary — the same eight values the API and the ekash apps use. ekash's internal pipeline has far more states than that, and they are deliberately not exposed: an internal transition that does not change the public status emits no event at all, so you never receive a notification that nothing changed.
Payment events#
| Event | When |
|---|---|
payment.created | A payment row now exists, however it was created (API, app, batch upload, an incoming credit). |
payment.approved | A prepared payment was approved and is on its way. Sent alongside the new status event. |
payment.ready_to_process | A single payment was created and is waiting for approval. Sent right after payment.created — unless the same request already approved it (a key with auto-approve), in which case payment.approved follows instead. Rows of an uploaded batch do not send it: they wait for the batch to be submitted. |
payment.processing | Handed to the provider; the money is moving. |
payment.sent | Sent to the recipient. |
payment.received | The recipient's side confirmed receipt. |
payment.unclaimed | Sent, but the recipient has not claimed it yet. |
payment.on_hold | Held; it needs attention before it can continue. |
payment.canceled | Rejected before dispatch, or canceled afterwards. |
payment.refunded | Refunded, and the wallet has been credited back. |
payment.validated | A send-by-email recipient was verified and the payment can be submitted. |
payment.validation_failed | That verification failed or could not be completed. data.validation.message says which, in the same words the apps show. |
payment.approved accompanies the status event when a payment moves out of ready_to_process into processing or sent — that transition is the approval. A rejection moves it to canceled and reports only payment.canceled.
Batch events#
| Event | When |
|---|---|
batch.validated | Every row in an uploaded batch has finished recipient validation (validation.complete is now true). This is the signal to stop polling GET /v1/batches/{id}. |
batch.submitted | The batch passed validation and was submitted. |
batch.approved | The batch was approved and is being dispatched. |
batch.rejected | The batch was rejected; every row is canceled. |
Batch events carry the whole batch (PublicBatch, rows included). Each row's own status changes also arrive as ordinary payment.* events.
A 409 price_changed answer (see Approve in the README) approves nothing, so it raises no batch.approved and no payment.* event. When a key that auto-approves gets it from POST /v1/batches/{id}/submit, the batch was submitted: batch.submitted is published, batch.approved follows only once you confirm the new prices with approve?confirm_price_change=true&expected_debits=....
ping#
Sent only by POST /v1/webhooks/{id}/test, and only to that endpoint, whatever it is subscribed to. Use it to prove your URL is reachable and your verification works before you rely on it.
GET /v1/webhooks/event-types returns this list at runtime.