We have revamped our Android SDK to make it easy for our merchants to integrate and customize their payment flows. Our Android SDK supports Android SDK version 19 and above and provides two types of checkout flows -
- Web Checkout - Web checkout flow is the standard payment flow for collecting payments using the Cashfree payment gateway's Android SDK. In this flow, SDK provides a webview based checkout implementation to facilitate a quick integration with our payment gateway. Your customers can fill in the necessary details in the web page and complete the payment. This mode also handles all the business logic and UI components to make the payment smooth and easy to use.
- UPI Intent Checkout - UPI Intent flow is for merchants who wants to quickly provide UPI Intent functionality using Cashfree's mobile SDK. In this flow, SDK provides a pre-built native Android screen to facilitate a quick integration with our payment gateway. Your customers will see a list of UPI apps installed in their phone which they can select to initiate payment.
We hope you have already created an account with Cashfree Payments and have the API keys ready to start the integration. If not, click here to know how to create an account.
The integration can be completed in a few steps and should not take more than 30 minutes.
- Getting the SDK
- Create an order with Cashfree from backend (Step 2 in the image below)
- Initiate payment (Step 3 in the image below)
- Verify payment (Steps 4 & 5 in the image below) - This is a mandatory step so please don't skip this
When a customer places an order on merchant app, merchant needs to create order in Cashfree's system. In response of that request Cashfree will return
payment_session_id to you. It contains all the order details and has to be sent to the SDK while initiating the payment. Then checkout page is loaded and customer chooses the payment method he wants to pay by and enters his details (like UPI ID/card number etc.) Cashfree uses these details to process the payment and notifies the mobile SDK that payment has ended. Merchant verifies the payment and order status from Cashfree's backend and the same is shown to the customer on his app.
You can use our sample Android app project mentioned below as a reference for this SDK integration.
You can also refer to the Change Logs of the sdk here
Access to sandbox is provided for everyone and you can use the following endpoint - https://sandbox.cashfree.com/pg
You can try out the APIs for Steps 3 and 4 by using any of the following methods
You can ask questions, and participate in discussions about our Payment Gateway in the Cashfree Discord channel.
Updated 6 days ago