Android Native SDK is a powerful SDK designed to facilitate the seamless integration of payment instruments saved on users’ PhonePe app. With Android Native SDK, businesses can effortlessly access and utilise payment methods such as UPI, UPI lite, Wallet and more through their own checkout, making the checkout process smooth and convenient for users. This will help in enhancing overall user experience also will help in improving SR.
Sequence Diagram
Copied !
Summary
Copied !
- User lands on the checkout page on the merchant app.
- Merchant app will call the merchant backend to get the `savedInstrumentsToken`.
- Merchant backend will call PhonePe’s Fetch Auth Token API (Authorization) to get an auth token.
- Merchant backend will call PhonePe’s Init API (Saved Instruments Token API) to get the `savedInstrumentsToken`.
- Merchant backend will return this response to the merchant app.
- Merchant app will pass this token to the PhonePe SDK and get the payment options or consent intent to render on the checkout screen. Based on response from the SDK.
- Merchant app will render a “Link” button in case of fresh user OR
- Merchant app will render list of saved instruments
- Once the user selects a payment option and clicks ‘Pay’, the merchant app will call the merchant backend to create an order.
- Merchant backend will call PhonePe’s Create Order API to create an order and get an order token.
- Merchant backend will return this response to the merchant app.
- Merchant app will trigger the SDK to perform the final payment (details below) – if the user selected a saved instrument, merchant app must pass this information to the SDK.
- Merchant backend can check for webhook response and/or use PhonePe’s Check Status API (integration details below) to inform the transaction status to the user on the merchant app.