Skip to main content

Installation

Don't have an Google Pay subscription? Try it free now.

Follow these steps to install Google Pay into your app.

Google Pay plugin is only available for projects running Capacitor 3 or later.

npm install @ionic-enterprise/google-paynpx cap sync

Add the following line to your native Android project to enable the Google Wallet API.

// Android - AndroidManifest.xml<meta-data  android:name="com.google.android.gms.wallet.api.enabled"  android:value="true" />

Getting Started#

Integrating with your application only requires three basic API calls. First, initialize the Google Pay client using initGooglePayClient. Second, check if the user is running a device capable of using Google Pay in the current context by calling the canMakePayments method, then make the payment request using makePaymentRequest.

await GooglePay.initGooglePayClient();await GooglePay.canMakePayments({});await GooglePay.makePaymentRequest({});