After you have successfully created a Remote Payment using the API and received aDocumentation Index
Fetch the complete documentation index at: https://docs.cashii.app/llms.txt
Use this file to discover all available pages before exploring further.
paymentId back, the next step is to guide the user to complete the payment.
Redirecting Users to the Payment Page
Your application (typically the frontend) needs to redirect the user’s browser to the Cashii payment page. Construct the URL as follows:code(Required): The 16-digitpaymentIdyou received when creating the Remote Payment.redirect(Required): The URL within your application where Cashii should redirect the user after they attempt the payment (whether successful or not). This URL must be URL-encoded.
User Experience on the Payment Page
- A web-based payment page is displayed.
- It shows a QR code that can be scanned by the Cashii app.
- It allows payment via bank cards integrated with the Cashii network.
- Users can manually enter the 16-digit payment code if needed.
- On some devices (like certain Samsung models using the default browser), universal links might not work reliably. In such cases, the user might see tabs and need to manually tap the “Cashii App” tab to trigger the app launch.
Handling the Redirect Back to Your App
Once the user completes (or cancels) the payment attempt on the Cashii page/app, Cashii will redirect their browser back to theredirectUrl you provided.
Cashii appends query parameters to this URL to inform your application about the outcome:
Example Redirect Back:
transaction_id: The unique identifier for the transaction record within Cashii (distinct from the initialpaymentId).status: The resulting status of the payment attempt (e.g.,paid,rejected,canceled). See Core Concepts for possible values.signature: A security signature hash (details forthcoming - used to verify the redirect came from Cashii).
status parameter in the redirect URL provides immediate feedback to the user, do not rely solely on this client-side information to confirm the payment for fulfilling orders or providing services.
Always verify the final payment status server-side.
Verifying Payment Status (Server-Side)
YourredirectUrl should point to a page or endpoint in your application that triggers a server-side verification process:
- Your frontend receives the redirect with
transaction_id,status, andsignature. - Your frontend informs your backend, passing along the original
paymentId(which you should associate with the user’s session or the order). - Your backend uses the
paymentIdto call the Retrieve Remote Payment Information endpoint (API Reference or see Quickstart). - The API response contains the definitive, trusted
statusof the payment. - Your backend updates your order status in your database based on the verified API response.
- Your backend informs the frontend, which then displays the appropriate confirmation or error message to the user.