Integrate Google Pay for in-app payments
Stay organized with collections
Save and categorize content based on your preferences.
outlined_flag
Follow the Android guide and prepend gpay:// to the URI to generate the iOS intent for Google Pay integration.
The URI structure for iOS and Android intents is almost identical, with the iOS version requiring gpay:// at the beginning.
After completing a payment, iOS users need to manually switch back to the merchant app, which is a current limitation of the collect/intent flows.
Refer to the NPCI UPI Linking Specification for detailed information about request and response argument specifications.
Follow the Android guide
for generating the URI for iOS intent and integrating Google Pay with
your app.
Important: The URI for iOS intent is similar to that of Android intent.
The only difference is that you need to add gpay:// at the beginning of the
URI. This should launch Google Pay on iOS.
For more information regarding the
request and response argument specifications, see NPCI UPI Linking Specification .
Note: Currently, iOS does not support switching back to the merchant app post
payment. The user needs to manually toggle back to the merchant app once the
payment is completed. This is in line with the current status quo on
collect/intent flows.
Example iOS intent URI
gpay://upi/pay?pa=merchant%40pspbank&pn=MyNameHere&tr=15330175804633937&tn=Test%20deposit%2015330175804633937%20DH0490&am=5000&cu=INR&mc=621
Parameters
Description
pa
your-merchant-vpa@xxx
pn
your-merchant-name
mc
your-merchant-code
tr
your-transaction-ref-id
tn
your-transaction-note
am
your-order-amount
cu
INR
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-16 UTC.
[null,null,["Last updated 2024-10-16 UTC."],[],["To integrate Google Pay in an iOS app, generate a URI similar to Android's, but prepend it with `gpay://`. This URI structure launches Google Pay. The URI contains parameters like `pa` (merchant VPA), `pn` (merchant name), `mc` (merchant code), `tr` (transaction ID), `tn` (transaction note), `am` (amount), and `cu` (currency). iOS currently requires users to manually return to the merchant app after payment completion. Refer to the Android guide and NPCI UPI Linking Specification for additional details.\n"]]