Stay organized with collections Save and categorize content based on your preferences.
Some businesses require the ability to embed their web checkout process in their mobile applications by using a WebView. This guide walks you through the steps needed to support Google Pay in your WebView after you completed the Google Pay Web integration.
The Payment Request API is used to launch the Google Pay sheet when the web checkout process is embedded in an Android WebView. By default the Payment Request API will be disabled for WebView. The following changes to your app code are required:
Enable the Payment Request API for the WebView you use in your App.
Make sure to use the correct import statement for the code you are using.
Kotlin
importandroid.webkit.WebSettings;importandroid.webkit.WebView;importandroidx.webkit.WebSettingsCompat;importandroidx.webkit.WebViewFeature;AndroidView(factory={// Update WebView settings to allow JavaScript and payment requestsettings.javaScriptEnabled=trueWebView(it).apply{if(WebViewFeature.isFeatureSupported(WebViewFeature.PAYMENT_REQUEST)){WebSettingsCompat.setPaymentRequestEnabled(settings,true);}}},update={it.loadUrl(url)})
Java
importandroid.webkit.WebSettings;importandroid.webkit.WebView;importandroidx.webkit.WebSettingsCompat;importandroidx.webkit.WebViewFeature;WebViewwebView=findViewById(R.id.webview);WebSettingswebSettings=webView.getSettings();// Update WebView settings to allow JavaScript and payment requestwebSettings.setJavaScriptEnabled(true);if(WebViewFeature.isFeatureSupported(WebViewFeature.PAYMENT_REQUEST)){WebSettingsCompat.setPaymentRequestEnabled(webSettings,true);}
Publish your integration
In order for your app to be allowed to use Google Pay within Android WebView, you must complete the publish your integration guide.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[],[],null,["# Using Android WebView\n\nSome businesses require the ability to embed their web checkout process in their mobile\napplications by using a WebView. This guide walks you through the steps needed to support Google Pay in your WebView\nafter you completed the [Google Pay Web integration](/pay/api/web/guides/tutorial).\n| **Important:** In order for your app to be allowed to use Google Pay within Android WebView you need to [publish your App integration](/pay/api/android/guides/test-and-deploy/publish-your-integration).\n\nUser device requirements\n------------------------\n\n- Google Play services version 25.18.30 or higher\n- [Android Webview for Chrome](https://play.google.com/store/apps/details?id=com.google.android.webview) version 137 or higher\n| **Note** : If the user device requirements are not met, the `IS_READY_TO_PAY` API will return `false`.\n\nRequired App changes\n--------------------\n\nThe Payment Request API is used to launch the Google Pay sheet when the web checkout process is embedded in an Android WebView.\nBy default the Payment Request API will be disabled for WebView. The following changes to your app code are required:\n\n### Add (or update) build dependency:\n\n### Groovy\n\n```groovy\ndependencies {\n implementation 'androidx.webkit:webkit:1.14.0'\n}\n```\n\n### Kotlin\n\n```kotlin\ndependencies {\n implementation(\"androidx.webkit:webkit:1.14.0\")\n}\n```\n\n### Version catalog\n\n```toml\n[versions]\nwebkit = \"1.14.0\"\n\n[libraries]\nandroidx-ktx = { group = \"androidx.webkit\", name = \"webkit\", version.ref = \"webkit\" }\n```\n\n### Add the following `\u003cqueries\u003e` tags to your AndroidManifest.xml:\n\n```xml\n\u003cqueries\u003e\n \u003cintent\u003e\n \u003caction android:name=\"org.chromium.intent.action.PAY\"/\u003e\n \u003c/intent\u003e\n \u003cintent\u003e\n \u003caction android:name=\"org.chromium.intent.action.IS_READY_TO_PAY\"/\u003e\n \u003c/intent\u003e\n \u003cintent\u003e\n \u003caction android:name=\"org.chromium.intent.action.UPDATE_PAYMENT_DETAILS\"/\u003e\n \u003c/intent\u003e\n\u003c/queries\u003e\n \n```\n\n### Enable the Payment Request API for the WebView you use in your App.\n\nMake sure to use the correct import statement for the code you are using. \n\n### Kotlin\n\n```kotlin\nimport android.webkit.WebSettings;\nimport android.webkit.WebView;\nimport androidx.webkit.WebSettingsCompat;\nimport androidx.webkit.WebViewFeature;\n\nAndroidView(\n factory = {\n // Update WebView settings to allow JavaScript and payment request\n settings.javaScriptEnabled = true\n WebView(it).apply {\n if (WebViewFeature.isFeatureSupported(\n WebViewFeature.PAYMENT_REQUEST)) {\n WebSettingsCompat.setPaymentRequestEnabled(settings, true);\n }\n }\n },\n update = {it.loadUrl(url)\n }\n)\n \n```\n\n### Java\n\n```java\nimport android.webkit.WebSettings;\nimport android.webkit.WebView;\nimport androidx.webkit.WebSettingsCompat;\nimport androidx.webkit.WebViewFeature;\n\nWebView webView = findViewById(R.id.webview);\nWebSettings webSettings = webView.getSettings();\n\n// Update WebView settings to allow JavaScript and payment request\nwebSettings.setJavaScriptEnabled(true);\nif (WebViewFeature.isFeatureSupported(\n WebViewFeature.PAYMENT_REQUEST)) {\n WebSettingsCompat.setPaymentRequestEnabled(webSettings, true);\n}\n \n```\n\n### Publish your integration\n\nIn order for your app to be allowed to use Google Pay within Android WebView, you must complete the\n[publish your integration guide.](/pay/api/android/guides/test-and-deploy/publish-your-integration)"]]