Skip to main content

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 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.
GET https://app.ligdicash.com/pay/v01/redirect/checkout-invoice/confirm

Headers

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

Parameters

token
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

curl -X GET "https://app.ligdicash.com/pay/v01/redirect/checkout-invoice/confirm?token={TOKEN}" \
  -H "Apikey: {API_KEY}" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -H "Accept: application/json"

Response fields

response_code
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.
status
string
Payment status. See the table below.
token
string
May be empty in the confirm response.
response_text
string
Complementary message or error sub-code in the form Echec (CodeXX). Consult wiki for the description. Empty if no error.
description
string
Free-form description of the transaction. Can be empty.
operator_id
string
Numeric identifier of the operator used for the payment. Example: "14" for Moov CI. Empty if the status is pending.
operator_name
string
Operator name. Example: "MOOV CI". Empty if the status is pending.
customer
string | null
Phone number of the payer in the format 226XXXXXXXXX. May be null if the payment is still pending.
montant
integer
Transaction amount in XOF.
amount
integer
Same as montant. Both fields are always present and hold the same value.
date
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".
external_id
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.
oreference
string
Operator reference. Can be empty.
request_id
string
Unique request identifier on the LigdiCash side. Useful for support.
custom_data
array
Your metadata as sent at creation, enriched by LigdiCash (which adds entries like logfile). Each entry contains:
customer_details
object
Customer information entered during payment.
wiki
string
URL to the documentation of error codes for this endpoint. Consult when response_code is "01".

status values

statusMeaningRecommended action
completedPayment confirmedFulfill the order
pendingAwaiting operator confirmationWait, recheck, or wait for the callback
notcompletedPayment did not go through (cancelled or failed)Offer to retry

Response example

{
  "response_code": "00",
  "token": "",
  "response_text": "",
  "description": "",
  "custom_data": [
    {
      "keyof_customdata": "transaction_id",
      "valueof_customdata": "BPBF-1776251968907",
      "datecreation_customdata": "2026-04-15 11:19:28.977757"
    },
    {
      "keyof_customdata": "logfile",
      "valueof_customdata": "2026041511192869df7440ed917",
      "datecreation_customdata": "2026-04-15 11:19:28.977757"
    }
  ],
  "status": "completed",
  "operator_id": "14",
  "operator_name": "MOOV CI",
  "customer": "2250171584035",
  "wiki": "https://client.ligdicash.com/wiki/confirmInvoice",
  "montant": 100,
  "amount": 100,
  "date": "2026-04-15 11:19:28+00",
  "external_id": "BPBF-1776251968907",
  "oreference": "",
  "customer_details": {
    "firstname": "ClémenceIlaria",
    "lastname": "Ouedraogo",
    "email": "clemenceilaria369@gmail.com",
    "phone": "2250171584035",
    "details": ""
  },
  "request_id": "P2771491712026"
}

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
const entry = data.custom_data.find(
  (item) => item.keyof_customdata === "transaction_id"
);
const transactionId = entry?.valueof_customdata;
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
async function waitForConfirmation(token, { interval = 4000, maxAttempts = 10 } = {}) {
  for (let i = 0; i < maxAttempts; i++) {
    const data = await callConfirm(token);

    if (data.status === "completed") return { success: true, data };
    if (data.status === "notcompleted") return { success: false, data };

    await new Promise((r) => setTimeout(r, interval));
  }
  return { success: false, reason: "timeout" };
}
Polling is a safety net, not the primary strategy. Always prefer the callback. See Polling vs callback for trade-offs.