After the invoice is created, theDocumentation Index
Fetch the complete documentation index at: https://developers.ligdicash.com/llms.txt
Use this file to discover all available pages before exploring further.
response_text field of the response contains the URL of the LigdiCash payment page. This is the URL you must open so the customer can choose their operator and complete the payment. The opening mode depends on your context: web application, native mobile, or hybrid.
Iframes are blocked
This block is enforced server-side through theX-Frame-Options and Content-Security-Policy headers. It is not a bug — it is a deliberate security measure against clickjacking.
The 4 opening modes
| Mode | Recommended context | Implementation |
|---|---|---|
| Same tab | Web — linear flow with no state to keep | window.location.href = url |
| New tab | Web — user keeps the current page open | window.open(url, '_blank') |
| Popup | Web — modal UX, automatic return to the page | Anti-blocker pattern (see below) |
| Native WebView | iOS / Android — native mobile application | Detect return URLs to close |
Popup pattern (web)
Triggering awindow.open() after a network request is systematically blocked by modern browsers: it is not considered a direct user action.
The two-step solution:
- Open
about:blanksynchronously on click, before anyawait - Navigate to the payment URL after receiving the API response
JavaScript
WebView pattern (native mobile)
On iOS and Android, open the payment URL in a native WebView rather than in the system browser. This lets you detect the end of the flow and close the WebView automatically. Principle: intercept every navigation in the WebView and compare the URL with yourreturn_url and cancel_url.
For a complete implementation including React Native and Flutter, see Mobile integration.
Detecting the user’s return
When LigdiCash redirects the customer to yourreturn_url or cancel_url, it indicates that the payment flow on the LigdiCash side is finished. This is not proof of a successful payment.
Recommended behavior on receiving return_url:
- Display an intermediate screen “Verifying payment…”
- Call your backend, which calls
confirmwith the token stored at creation - Display the final result (success / failure / pending)
Related pages
- Create an invoice — getting the payment URL
- Verify the status — confirm the payment after redirect
- Common pitfalls — iframe, empty customer, and other frequent errors
- Mobile integration — React Native, Flutter, iOS, Android
