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.

Direct payin lets you embed the payment form directly inside your application. Your customer never leaves your interface: they enter their phone number, validate the payment following their operator’s instructions, and the transaction is confirmed by callback. You have full control over the user experience. This method requires more integration work than hosted payin: the validation mode varies by operator, and your UX must adapt to each one.

How it works

The general flow has four steps, with step 3 varying depending on the validation mode of the chosen operator.
1

Collect the customer's phone number

Your interface collects the customer’s mobile money number, in the format without + or spaces (22670XXXXXXX). Depending on the operator, you decide which validation mode to apply.
2

Initiate the transaction

You call POST /pay/v01/straight/checkout-invoice/create (or the dedicated endpoints for the LigdiCash Wallet) with the customer’s number and, depending on the mode, either the OTP already collected or an empty otp field.
3

Customer validation

The customer validates the payment based on their operator: by responding to a USSD push, dialing a USSD code, or sharing an OTP received by SMS. In the SMS OTP case only, you resubmit a second request with the code.
4

Confirmation

LigdiCash sends a callback to your callback_url. You re-verify the status via the confirm endpoint with the token stored at creation, before fulfilling the order.

Validation modes

The behavior of step 3 depends on the operator. Four modes exist:
ModeTriggerSummary
USSD OTPBefore submissionThe customer dials a USSD code → generates an OTP → you submit with that OTP
USSD PushAfter submissionThe operator sends a USSD push → the customer validates with their PIN
Guided USSDAfter submissionThe operator sends an SMS with a USSD code → the customer dials the USSD
SMS OTPAfter submissionThe operator sends an OTP by SMS → the customer shares the code → you resubmit

Validation modes — full guide

Understand the modes and adapt your UX to each operator

Important constraints

The external_id field must always be empty ("") in every direct payin request.
The token returned at creation is different from the token present in the callback payload. Always store the creation token on the merchant side and use it to call confirm — never rely on the callback token alone.

In this section

Validation modes

USSD OTP, USSD Push, Guided USSD, SMS OTP — understand and adapt the UX

Create a transaction

Parameters, full payload, and response of the create endpoint

Verify the status

Call the confirm endpoint with the creation token

Supported operators

A dedicated page per operator with identifiers, mode, and examples