Every LigdiCash API response contains three fields that let you interpret the result of a call: response_code, response_text, and wiki. They are present on every endpoint.
response_code
The response_code field indicates whether the request was accepted or rejected by LigdiCash.
| Value | Meaning |
|---|
00 | Valid request — the transaction is initiated |
01 | Rejected request — invalid payload or authentication error |
response_code: "00" does not mean the payment succeeded. It only means your payload was correct and the transaction was properly initiated. The actual outcome of the payment — success or failure — is communicated later via the callback or the confirm endpoint.
response_text
The value of response_text depends on both the result and the endpoint called.
On success (response_code: "00"), the content varies by transaction type:
| Flow | Content of response_text |
|---|
| Hosted payin | The URL of the LigdiCash payment page — this is the link you must open for the customer |
| Direct payin | A text message indicating that the transaction is being processed |
On failure (response_code: "01"), it takes the form Echec (CodeXX) where XX is a sub-code specific to the endpoint — for example Echec (Code00) for an authentication failure.
On failure, response_text is a technical code (Echec (CodeXX)). Prefer to consult the wiki field to get a readable description and display a message suited to your user.
The wiki field
The wiki field present in every response contains a URL to the documentation of the sub-codes for the endpoint called. Always consult this URL when response_code is 01 to know the exact cause of the failure.
The returned page displays a structured list of possible sub-codes and their description, in PHP var_dump format:
Each entry of subcodes corresponds to a possible value of response_text and its meaning in English.
Example response
Recommended pattern
Related pages