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.

This endpoint initiates a payment directly from your interface. You provide the customer’s phone number and, depending on the validation mode of the operator, either the OTP or an empty field. LigdiCash returns a token to store and triggers the validation process on the operator’s side.
POST https://app.ligdicash.com/pay/v01/straight/checkout-invoice/create
The LigdiCash Wallet uses distinct endpoints (/pay/v02/debitotp and /pay/v02/debitwallet/withotp). See the LigdiCash Wallet page for its specific integration.

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.
Content-Type
string
required
Must be application/json.

Body

commande
object
required
Root object of the request.

Request examples

The examples below show two cases depending on the validation mode. Only the otp field changes.
curl -X POST https://app.ligdicash.com/pay/v01/straight/checkout-invoice/create \
  -H "Apikey: {API_KEY}" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "commande": {
      "invoice": {
        "items": [],
        "total_amount": 5000,
        "devise": "XOF",
        "description": "Pro Subscription — January 2025",
        "customer": "22670000000",
        "customer_firstname": "Amadou",
        "customer_lastname": "Diallo",
        "customer_email": "amadou@example.com",
        "external_id": "",
        "otp": "123456"
      },
      "store": {
        "name": "MyApp",
        "website_url": "https://myapp.com"
      },
      "actions": {
        "cancel_url": "",
        "return_url": "",
        "callback_url": "https://myapp.com/api/callback/ligdicash"
      },
      "custom_data": {
        "transaction_id": "ORD-2025-00042"
      }
    }
  }'

Response

response_code
string
"00" if the transaction was created successfully, "01" on error.
token
string
Identifier of the transaction on the LigdiCash side. Store it in your database immediately — required to call the confirm endpoint and re-verify the status.
response_text
string
On success: "Votre requête est en cours de traitement". On failure: the error sub-code in the form Echec (CodeXX).
wiki
string
URL to the documentation of error codes for this endpoint. Consult when response_code is "01".

Response example

{
  "response_code": "00",
  "token": "eyJ0eXAiOiJKV1Qi...",
  "response_text": "Votre requête est en cours de traitement",
  "wiki": "https://client.ligdicash.com/wiki/createInvoice"
}
Store the token returned at creation. This is the one you will use to call confirm and check the final status — never rely on the token in the callback payload.