Skip to main content

Expo Config Plugin

The @gmisoftware/react-native-pay Expo config plugin configures native projects so Apple Pay and Google Pay work without manual edits.

Usage

Add the plugin to app.json or app.config.js:

{
"expo": {
"plugins": [
[
"@gmisoftware/react-native-pay",
{
"merchantIdentifier": "merchant.com.yourcompany.app",
"enableGooglePay": true
}
]
]
}
}

Options

OptionTypeDescription
merchantIdentifierstring or string[]Apple Pay Merchant ID(s). If omitted, Apple Pay entitlements are not added.
enableGooglePaybooleanIf true, adds the Google Pay metadata to the Android manifest. Default: false.

Examples

iOS only (Apple Pay):

["@gmisoftware/react-native-pay", { "merchantIdentifier": "merchant.com.example.app" }]

Android only (Google Pay):

["@gmisoftware/react-native-pay", { "enableGooglePay": true }]

Both platforms:

["@gmisoftware/react-native-pay", {
"merchantIdentifier": "merchant.com.example.app",
"enableGooglePay": true
}]

Multiple Merchant IDs (iOS):

["@gmisoftware/react-native-pay", {
"merchantIdentifier": ["merchant.com.example.app", "merchant.com.example.other"],
"enableGooglePay": true
}]

After changing the plugin

Run:

npx expo prebuild --clean

Then rebuild and run the app.

Next