Android (Google Pay)
Configure your app and Google Pay for Android.
1. Expo plugin
In app.json (or app.config.js), enable Google Pay:
{
"expo": {
"plugins": [
["@gmisoftware/react-native-pay", { "enableGooglePay": true }]
]
}
}
Use the same plugin with merchantIdentifier if you also support iOS.
2. Google Cloud / Google Pay API
- In Google Cloud Console, open your project.
- Enable the Google Pay API for the project.
For production you will also need to register your app and comply with Google’s requirements (screenshots, business info, etc.).
3. Gateway configuration (in app code)
Google Pay needs a Google Pay merchant ID for production, plus your payment gateway details (Stripe, Braintree, etc.) and gateway merchant ID. Configure them in usePaymentCheckout (or in your PaymentRequest):
usePaymentCheckout({
currencyCode: 'USD',
countryCode: 'US',
googlePayMerchantId: 'your_google_pay_merchant_id',
googlePayEnvironment: 'TEST', // or 'PRODUCTION'
googlePayGateway: 'stripe', // or braintree, square, adyen, etc.
googlePayGatewayMerchantId: 'your_stripe_merchant_id',
})
Supported gateways include: stripe, braintree, square, adyen, authorizenet, checkoutltd. See Google Pay Gateway Tokens for the full list and exact identifiers.
4. Prebuild and run
npx expo prebuild --clean
npx expo run:android
Testing
- Use a real device or an emulator with Google Play Services.
- Add a test card in Google Pay.
- For testing without a live gateway, use
googlePayEnvironment: 'TEST'and a test merchant ID if your gateway provides one.
Troubleshooting
- Button not showing: Ensure
enableGooglePay: trueis set, prebuild was run, and Google Play Services is available. - Google Pay unavailable: Add a card in Google Pay on the device; for testing use
googlePayEnvironment: 'TEST'and correct gateway config. - See Troubleshooting for more.
If you are integrating with Przelewy24, see Przelewy24 for an end-to-end app + backend flow.