- Merchant needs to have a working VPA and UPI credentials from a bank or payment gateway partner enabled at Juspay
- Merchant needs to get on-boarded on GooglePay as a merchant, Refer support link for the sign up process:
GooglePay UPI intent - in app payments flow
GooglePay SDK flow
User Experience
- When a user taps the Google Pay payment option on merchant checkout page, they’ll see a payment sheet that displays the payment methods saved to their Google Account.
- Users can then quickly select the bank account for paying and proceed to pay.
- The user will be redirected to GooglePay ScreenLock and then asked to enter his UPI PIN for final authentication.
- Once GooglePay gives a successful callback, merchant will do a Status Check with Juspay on redirection and confirm the status to user.
GooglePay flow can be integrated using Juspay's ExpressCheckout SDK in a two step integration. Refer SDK integration link.
Marking down the required sections for integrating GooglePay via Express Checkout Headless SDK
- Check Device specific App/SDK: Check GooglePay availability for the current device and show GooglePay on UI only if it is present/ready.
- Initiate transaction: Use walletTxn operation to initiate GooglePay.
JSONObject juspayPayload = new JSONObject();
juspayPayload.put("opName","walletTxn");
juspayPayload.put("paymentMethod","walletObject.walletName");
juspayPayload.put("directWalletToken","walletObject.walletToken");
juspayPayload.put("sdkPresent",""walletObject.walletSdkName"");
juspayPayload.put("mobileNumber","walletObject.mobileNumber");
The user will receive a push not requested for amount under the merchant name on his User Device. Once authentication is completed, the response will be posted to user device as well merchant server.
Omnichannel API
Merchants can use the Omnichannel API to request and accept payments from customers through Google Pay by requesting a single identifier (like a phone number) in their purchase flow. This API provides a server-side interface for merchants to initiate a payment call to Google and complete the
transaction.
Merchants can pre-populate the user's phone numbers (or ask for input) on their app or website.
Once the user confirms the populated information, the merchant makes a server call to request payment
The Google Pay app directs the user to complete the payment.
The merchant verifies the payment status with their PSP before proceeding to confirm the purchase.
The User Experience is handled by the merchant when using mobile number based push payments on GooglePay. Please refer to GooglePay brand guidelines before implementing.
Step 1: User selects GooglePay as the preferred Payment Option
Step 2: User is asked to enter the Mobile Number linked to GooglePay in the payment page. Merchants can choose to autofill this field.
Step 3: User clicks on “PAY”. The /txns API is called on click. This triggers a request to the GooglePay account linked to the mobile Number passed.
Step 4a: The response contains the field “url”. The URL needs to be loaded on a browser. The URL checks Juspay order status. As soon as the user confirms the payment on GooglePay, the browser will redirect to the merchant redirection page.
Step 4b: Instead of loading the URL passed in the response, merchants can handle UI natively and check Juspay order status API for the order confirmation. Once the user pays on GooglePay, the status API will return “CHARGED”. Until then, the status will be “PENDING_VBV”.
curl -X POST https://api.juspay.in/txns \
-d “merchant_id"="merchantxyz"
-d "order_id"="googlepayprodtest27"
-d "payment_method_type"="WALLET"
-d "format"="json"
-d "payment_method"="GOOGLEPAY"
-d "mobile_number"="+919815393322"
-d "txn_type"="PUSH_PAY"
-d "payment_channel"="ANDROID_APP"
{
"txn_uuid": "eulnMssWup5CRWwKyPg",
"txn_id": "googlepayprodtest27",
"status": "PENDING",
"payment": {
"authentication": {
"url": "https://api.juspay.in/v2/pay/start/merchantxyz/eulnMssWup5CRWwKyPg",
"method": "GET"
}
},
"order_id": "googlepayprodtest27"
}