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 creates a new payment invoice and returns a link to the LigdiCash payment page. It is the first step of the hosted payin flow.
POST https://app.ligdicash.com/pay/v01/redirect/checkout-invoice/create

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 example

curl -X POST https://app.ligdicash.com/pay/v01/redirect/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": [
          {
            "name": "Pro Subscription",
            "description": "Premium access for 1 month",
            "quantity": 1,
            "unit_price": 5000,
            "total_price": 5000
          }
        ],
        "total_amount": 5000,
        "devise": "XOF",
        "description": "Pro Subscription — January 2025",
        "customer": "",
        "customer_firstname": "Amadou",
        "customer_lastname": "Diallo",
        "customer_email": "amadou@example.com",
        "external_id": "",
        "otp": ""
      },
      "store": {
        "name": "MyApp",
        "website_url": "https://myapp.com"
      },
      "actions": {
        "cancel_url": "https://myapp.com/payment/cancel",
        "return_url": "https://myapp.com/payment/success",
        "callback_url": "https://myapp.com/api/callback/ligdicash"
      },
      "custom_data": {
        "transaction_id": "ORD-2025-00042"
      }
    }
  }'

Response

response_code
string
"00" if the invoice was created successfully, "01" on error.
token
string
Identifier of the transaction on the LigdiCash side. To be stored in your database — required to call confirm.
response_text
string
On success: the URL of the payment page to open for the customer. On failure: the error sub-code in the form Echec (CodeXX).
wiki
string
URL to the documentation of error codes for this endpoint. To consult when response_code is "01".

Response example

{
  "response_code": "00",
  "token": "eyJ0eXAiOiJKV1Qi...",
  "response_text": "https://app.ligdicash.com/pay/invoice/eyJ0eXAiOiJKV1Qi...",
  "wiki": "https://client.ligdicash.com/wiki/createInvoice"
}