Skip to main content
This guide walks you through the full flow of a hosted payin: you create an invoice, redirect your customer to the LigdiCash payment page, receive the callback, and verify the status with the confirm endpoint.

Prerequisites

  • Your Apikey and API_TOKEN available in your LigdiCash dashboard
  • A callback_url publicly reachable from the internet (not localhost)
To expose a local server during development, you can use a tool like ngrok.

Step 1 — Create the transaction

Call the create endpoint, passing your transaction_id in custom_data. Store the returned token — you will need it in step 4.
On success, the response includes the payment page URL in response_text:

Step 2 — Redirect the customer

The payment URL is in response_text. Open it in the same tab or a new tab — never in an iframe.
Node.js
Iframes are blocked by LigdiCash. The payment link must open in the same tab, a new tab, a popup, or a native WebView on mobile.
Once the payment is completed or cancelled, LigdiCash redirects the customer to your return_url or cancel_url.

Step 3 — Receive the callback

LigdiCash sends a POST request to your callback_url when the transaction status changes.
Node.js (Express)
By convention, respond 200 to LigdiCash to acknowledge receipt of the callback.

Step 4 — Verify with confirm

Never trust the callback payload alone. Call confirm with the token stored at creation to validate the status.

What’s next?

Your first payment works. To go further:

Direct payin

Initiate the payment directly from your interface, without leaving your app.

Secure the callback

The complete pattern for re-verification and deduplication.

Payout

Send transfers to your customers or partners.

All operators

Orange Money, Moov, MTN, Wave, and more.