Skip to main content
Your callback URL is a public POST route. Anyone who knows this URL can send a forged payload — with a status: "completed" and an amount of their choosing. If you process this payload without verification, you will fulfill an order or trigger a payout based on a payment that never happened. The golden rule: never act on the received payload. Always re-verify.

The re-verification pattern

1

At creation — store the token

When creating a transaction (payin or payout), store the token returned by the API in your database, linked to your transaction_id.
2

On receiving the callback — extract the identifier

Receive the callback. Extract your transaction_id from the custom_data array by filtering on keyof_customdata.
3

Look up the stored token

Search your database for the token associated with this transaction_id. If no record matches, ignore the callback — it is likely fraudulent.
4

Call the confirm endpoint with the stored token

Call the LigdiCash verification endpoint with the token you stored — not the one in the callback (which is always empty for payins).
5

Act on the result of confirm, not on the payload

Use only the status returned by confirm to decide on your action.

What not to do