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
The API key of your LigdiCash project.
Your API TOKEN prefixed with Bearer . Example: Bearer eyJ0eXAiOiJKV1Qi...
Must be application/json.
Must be application/json.
Body
Root object of the request.
Invoice details.
List of items. Can be empty ([]) — in that case, only total_amount is taken into account.
Line total (unit_price × quantity) in XOF.
Total amount in XOF (integer, no decimals). If items is empty, this field alone defines the amount to collect.
Order description, displayed on the payment page.
Must always be empty (""). If a number is provided, LigdiCash filters the page to only show matching operators.
Alternative merchant identifier. Leave empty ("") if not used. Equivalent of transaction_id in custom_data.
Always empty ("") for hosted payin.
Information about your store.
Name of your store or application, displayed on the payment page.
Return and notification URLs.
URL where LigdiCash redirects the customer if they cancel the payment.
URL where LigdiCash redirects the customer after a successful payment.
URL of your backend endpoint for status notifications. Must be publicly accessible.
Free-form object for your metadata. LigdiCash returns it to you in the callback. Use it to pass your transaction_id.
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
"00" if the invoice was created successfully, "01" on error.
Identifier of the transaction on the LigdiCash side. To be stored in your database — required to call confirm.
On success: the URL of the payment page to open for the customer. On failure: the error sub-code in the form Echec (CodeXX).
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"
}
Related pages