Skip to main content
POST
/
pay
/
v01
/
redirect
/
checkout-invoice
/
create
Create a hosted payin invoice
curl --request POST \
  --url https://app.ligdicash.com/pay/v01/redirect/checkout-invoice/create \
  --header 'Accept: <accept>' \
  --header 'Apikey: <apikey>' \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "commande": {
    "invoice": {
      "items": [
        {
          "name": "<string>",
          "description": "<string>",
          "quantity": 123,
          "unit_price": 123,
          "total_price": 123
        }
      ],
      "total_amount": 123,
      "devise": "<string>",
      "description": "<string>",
      "customer": "<string>",
      "customer_firstname": "<string>",
      "customer_lastname": "<string>",
      "customer_email": "<string>",
      "external_id": "<string>",
      "otp": "<string>"
    },
    "store": {
      "name": "<string>",
      "website_url": "<string>"
    },
    "actions": {
      "cancel_url": "<string>",
      "return_url": "<string>",
      "callback_url": "<string>"
    },
    "custom_data": {}
  }
}
'
{
  "response_code": "<string>",
  "token": "<string>",
  "response_text": "<string>",
  "wiki": "<string>"
}

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.

Headers

Apikey
string
required
API key of the LigdiCash project.
Authorization
string
required
Bearer {API_TOKEN}
Accept
string
required
application/json
Content-Type
string
required
application/json

Body

commande
object
required

Response

response_code
string
"00" = success, "01" = error.
token
string
Transaction token. Store it immediately — required to call confirm.
response_text
string
Success: URL of the payment page to open for the customer. Failure: sub-code Echec (CodeXX).
wiki
string
URL to the sub-codes documentation for this endpoint.
{
  "response_code": "00",
  "token": "eyJ0eXAiOiJKV1Qi...",
  "response_text": "https://app.ligdicash.com/pay/invoice/eyJ0eXAiOiJKV1Qi...",
  "wiki": "https://client.ligdicash.com/wiki/createInvoice"
}

Error codes

Wiki: https://client.ligdicash.com/wiki/createInvoice — see Sub-codes per endpoint. Create an invoice — full examples and pitfalls to avoid.