{
  "id": 1044078,
  "title": "Google Pay Integration in Flutter with One Button",
  "url": "https://urgent.news/2026/08/15/google-pay-integration-in-flutter-with-one-button",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-15T13:30:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/mryadavgulshan/google-pay-integration-in-flutter-with-one-button-1kj9"
  },
  "original_language": "en",
  "account": "This article demonstrates how to incorporate Google Pay into a Flutter application with a single button. Users can tap the button, select a pre-known card, confirm with their fingerprint, and the payment data is transmitted. Google Pay is the preferred payment method due to its ease of integration, as Google has handled the complexities. The article covers the necessary dependencies, configuring Android, and implementing the one-button payment flow.\n\nTo begin, add the following dependencies in the pubspec.yaml file: flutter, pay_android: ^1.0.0, and google_pay_button: ^0.1.0. The pay_android plugin wraps the native Android Google Pay API, and google_pay_button renders the branded Google Pay button, adhering to Google's button guidelines.\n\nConfigure Android by ensuring the minSdkVersion is 21 or higher and adding the Google Pay meta-data to the AndroidManifest.xml. Create an assets/google_pay.json file containing payment configurations such as provider, environment, merchantName, merchantId, allowedCardNetworks, allowedAuthMethods, and gateway details. Don't forget to register this asset in pubspec.yaml.\n\nImplement the one-button payment flow in Flutter by creating a CheckoutPage and importing the required packages. Inside the _CheckoutPageState, initialize the PaymentConfiguration from the assets/google_pay.json file. In the _onGooglePayPressed method, confirm that the device can pay, present the Google Pay sheet, and handle the result. If the result is successful, send the result.token to your backend for verification.",
  "summary": "So, in this article, I will be showing you how you can add Google Pay to your Flutter app with literally one button. No card-number form, no CVV field, no \"add a payment method\" screen. The user taps the Google Pay button, picks a card that Google Pay already knows, confirms with their fingerprint, and the payment data is on its way. I keep getting asked about payments in Flutter, and after…",
  "key_points": [
    "Add dependencies in pubspec.yaml: flutter, payandroid, googlepaybutton",
    "Configure Android with minSdkVersion 21 and Google Pay meta-data",
    "Implement one-button payment flow with CheckoutPage and PaymentConfiguration"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}