Skip to main content
This guide shows how to integrate LigdiCash in a mobile application. It covers the recommended architecture, opening the payment page in a WebView, detecting the user’s return, and confirming the payment on your backend. Prerequisites: you have a backend exposing a payment initiation route and a status route. Never call the LigdiCash API directly from a mobile app. See Recommended architecture.

Mobile architecture

Never open the LigdiCash URL in the system browser. That exits the app and makes it impossible to detect the return cleanly. Use a native WebView or, as an acceptable fallback, SFSafariViewController / Chrome Custom Tabs with a deep link.

React Native

Installation

Payment WebView component

React Native

Using it in a payment screen

React Native

Flutter

Dependency

pubspec.yaml

Payment WebView widget

Flutter

Full payment screen

Flutter

Handling the “pending” state

When the callback hasn’t arrived yet by the time the user returns to the app, the transaction is pending. Two approaches:
Show a “Verification in progress” screen and ask your backend every 3 seconds for 30 seconds maximum.
Flutter — polling

Things to watch for

Detecting return_url or cancel_url in the WebView is a UI signal, not proof of payment. Always confirm the status through your backend before showing a confirmation to the user.
On iOS, WKWebView (used by react-native-webview and webview_flutter) blocks requests to HTTP URLs when App Transport Security is on. Use HTTPS URLs for your return_url and cancel_url.
Pass the transaction_id in the query parameters of return_url and cancel_url (?txn=txn_abc123) to extract it easily from the WebView without storing it in global state.