Callback

A callback, also called a webhook or server notification, is a message a payment provider sends to the merchant’s server to report a payment’s status as it changes. Callbacks arrive quickly but can repeat, arrive out of order or never arrive. They are one of three sources in three-way reconciliation, next to the log and the statement.

How it works

A callback is pushed by the provider to an address the merchant registered. The merchant updates the payment from it. Several callbacks may describe one payment. Illustrative, synthetic example:

10:02:11  Provider S  PAY-3D5E  status: pending
10:02:40  Provider S  PAY-3D5E  status: approved
10:02:41  Provider S  PAY-3D5E  status: approved     (repeat)
10:05:03  Provider S  PAY-3D5E  status: declined     (late correction)

Which status is final depends on order, timestamps and the provider’s rules.

Why it matters

Callbacks drive what the merchant credits to a player, so a wrong or missing callback becomes a wrong balance. Repeats are common. On one anonymised merchant day, 401,255 repeated observations of the same facts were folded so that nothing was counted twice. Only 66 of 96 providers sent callbacks at all. Others reported only through status responses or statements.

How to spot it

  • Count callbacks per payment and look for more than one final status.
  • Store every callback, not only the last one applied.
  • Use an idempotency key so a repeat is not applied twice.
  • Compare the last callback with the statement line for the same payment.

Related terms

Duplicate notification · Idempotency key · Canonical status · Reversed outcome · Payment chaos

Try it on one day of your data

One day of your data, reconciled, and the report stays with you whether or not you continue.

Updated