> ## Documentation Index
> Fetch the complete documentation index at: https://developers.ligdicash.com/llms.txt
> Use this file to discover all available pages before exploring further.

# The callback (webhook) — Introduction

> LigdiCash sends a POST to your callback URL for every payment event. The core mechanism for the reliability of your integration.

The callback is an HTTP notification that LigdiCash sends to your server when a transaction's status changes — payment completed, payment failed, payout finalized. It is the primary mechanism for knowing the outcome of a transaction in real time, without polling the API in a loop.

## How it works

You provide a `callback_url` in every transaction creation request. When LigdiCash has a result, it sends a POST to that URL with the details of the transaction.

## The two requests sent

<Warning>
  LigdiCash sends **two POST requests** for each event: one in `application/x-www-form-urlencoded` and one in `application/json`. Both contain the same information. Your server will therefore receive two calls per event — plan for a deduplication strategy.
</Warning>

## What the callback does not guarantee

* **The received payload must never be considered as the source of truth.** Anyone who knows your callback URL can send a forged payload. Always re-verify through the `confirm` endpoint with the token stored at creation before taking action.

## In this section

<CardGroup cols={2}>
  <Card title="Configuration" icon="gear" href="/en/payment-api/callback/configuration">
    Define a reliable, publicly accessible callback URL.
  </Card>

  <Card title="Payin payload" icon="arrow-down-to-line" href="/en/payment-api/callback/payin-payload">
    Full anatomy of the payload received on an inbound payment.
  </Card>

  <Card title="Payout payload" icon="arrow-up-from-line" href="/en/payment-api/callback/payout-payload">
    Differences in the payload for a payout.
  </Card>

  <Card title="Security" icon="shield-check" href="/en/payment-api/callback/security">
    The re-verification pattern before any processing.
  </Card>

  <Card title="Parse custom_data" icon="code" href="/en/payment-api/callback/parse-custom-data">
    Extract your transaction\_id depending on the flow.
  </Card>

  <Card title="Idempotency" icon="arrows-rotate" href="/en/payment-api/callback/idempotency">
    Deduplicate the two requests received per event.
  </Card>

  <Card title="Framework examples" icon="laptop-code" href="/en/payment-api/callback/framework-examples">
    Full implementations in PHP, Laravel, Node.js, Python.
  </Card>
</CardGroup>
