Skip to main content
The confirm endpoint lets you verify the status of an invoice from the token obtained at creation. Call it from your backend — after the redirect to return_url, or from your callback handler before fulfilling the order.

Headers

string
required
The API key of your LigdiCash project.
string
required
Your API TOKEN prefixed with Bearer . Example: Bearer eyJ0eXAiOiJKV1Qi...
string
required
Must be application/json.

Parameters

string
required
The token returned by the create endpoint when the invoice was created.
The token received in the callback payload is different from the creation token. Both let you call confirm, but only the creation token lets you reconcile with your merchant-side order.

Request example

Response fields

string
"00" if the API call succeeded, "01" on a technical error. This field indicates the success of the confirm request, not the payment outcome — use status for that.
string
Payment status. See the table below.
string
May be empty in the confirm response.
string
Complementary message or error sub-code in the form Echec (CodeXX). Consult wiki for the description. Empty if no error.
string
Free-form description of the transaction. Can be empty.
string
Numeric identifier of the operator used for the payment. Example: "14" for Moov CI. Empty if the status is pending.
string
Operator name. Example: "MOOV CI". Empty if the status is pending.
string | null
Phone number of the payer in the format 226XXXXXXXXX. May be null if the payment is still pending.
integer
Transaction amount in XOF.
integer
Same as montant. Both fields are always present and hold the same value.
string
Date and time of the transaction in the format YYYY-MM-DD HH:MM:SS+TZ. Example: "2026-04-15 11:19:28+00".
string
Concatenation of valueof_customdata values whose key (keyof_customdata) contains "id", separated by ;. Matches the value of your transaction_id if you follow the recommended pattern.
string
Operator reference. Can be empty.
string
Unique request identifier on the LigdiCash side. Useful for support.
array
Your metadata as sent at creation, enriched by LigdiCash (which adds entries like logfile). Each entry contains:
object
Customer information entered during payment.
string
URL to the documentation of error codes for this endpoint. Consult when response_code is "01".

status values

Response example

Reading custom_data in the response

custom_data returns an array of your metadata enriched by LigdiCash (which adds entries like logfile). To retrieve your transaction_id:
JavaScript
See Parsing custom_data for the full processing, including cases where custom_data is an empty array or an empty string.

When to call confirm

1. After the redirect to return_url From your frontend, trigger a call to your backend, which calls confirm with the stored token. Never call confirm directly from the browser — your API keys would be exposed. 2. In your callback handler Before fulfilling an order following a callback, always re-verify the status with confirm. A forged payload could be sent by anyone who knows your endpoint URL.

Polling pattern

If the callback is unavailable or slow to arrive, poll confirm at regular intervals:
JavaScript
Polling is a safety net, not the primary strategy. Always prefer the callback. See Polling vs callback for trade-offs.