{"id":13550881,"url":"https://github.com/google-pay/flutter-plugin","last_synced_at":"2025-06-10T23:40:17.901Z","repository":{"id":37797533,"uuid":"313743900","full_name":"google-pay/flutter-plugin","owner":"google-pay","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-28T11:36:48.000Z","size":3582,"stargazers_count":153,"open_issues_count":31,"forks_count":135,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-03-28T12:27:26.310Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google-pay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-17T21:10:17.000Z","updated_at":"2025-03-28T11:36:51.000Z","dependencies_parsed_at":"2024-02-01T14:50:43.394Z","dependency_job_id":"ad9a9286-d377-48f6-aea7-96941f36b259","html_url":"https://github.com/google-pay/flutter-plugin","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-pay%2Fflutter-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-pay%2Fflutter-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-pay%2Fflutter-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-pay%2Fflutter-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google-pay","download_url":"https://codeload.github.com/google-pay/flutter-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-pay%2Fflutter-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259172148,"owners_count":22816514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T12:01:38.903Z","updated_at":"2025-06-10T23:40:17.886Z","avatar_url":"https://github.com/google-pay.png","language":"Dart","funding_links":[],"categories":["Dart"],"sub_categories":[],"readme":"A plugin to add payments to your Flutter application.\n  \n| \u003csub\u003epay\u003c/sub\u003e | \u003csub\u003epay_android\u003c/sub\u003e | \u003csub\u003epay_ios\u003c/sub\u003e | \u003csub\u003epay_platform_interface |\n|:---:|:---:|:---:|:---:|\n| [![pub package](https://img.shields.io/pub/v/pay.svg)](https://pub.dartlang.org/packages/pay) | [![pub package](https://img.shields.io/pub/v/pay_android.svg)](https://pub.dartlang.org/packages/pay_android) | [![pub package](https://img.shields.io/pub/v/pay_ios.svg)](https://pub.dartlang.org/packages/pay_ios) | [![pub package](https://img.shields.io/pub/v/pay_platform_interface.svg)](https://pub.dartlang.org/packages/pay_platform_interface) |\n\n## Platform Support\n| Android | iOS |\n|:---:|:---:|\n| Google Pay | Apple Pay |\n\n## Getting started\nBefore you start, create an account with the payment providers you are planning to support and follow the setup instructions:\n\n#### Apple Pay:\n1. Take a look at the [integration requirements](https://developer.apple.com/documentation/passkit/apple_pay/setting_up_apple_pay_requirements).\n2. Create a [merchant identifier](https://developer.apple.com/help/account/configure-app-capabilities/configure-apple-pay#create-a-merchant-identifier) for your business.\n3. Create a [payment processing certificate](https://developer.apple.com/help/account/configure-app-capabilities/configure-apple-pay#create-a-payment-processing-certificate) to encrypt payment information.\n\n#### Google Pay:\n1. Take a look at the [integration requirements](https://developers.google.com/pay/api/android/overview).\n2. Sign up to the [business console](https://pay.google.com/business/console) and create an account.\n\n## Installation\nThis adds the `pay` package to the [list of dependencies in your pubspec.yaml file](https://flutter.io/platform-plugins/) with the following command:\n\n```shell\nflutter pub add pay\n```\n\n## Usage\n\nDefine the configuration for your payment provider(s). Take a look at the parameters available in the documentation for [Apple Pay](https://developer.apple.com/documentation/passkit/pkpaymentrequest) and [Google Pay](https://developers.google.com/pay/api/android/reference/request-objects), and explore the [sample configurations in this package](https://github.com/google-pay/flutter-plugin/tree/main/pay/example/lib/payment_configurations.dart).\n\n### Example\nThis snippet assumes the existence of a payment configuration for Apple Pay ([`defaultApplePayConfig`](https://github.com/google-pay/flutter-plugin/tree/main/pay/example/lib/payment_configurations.dart#L29)) and another one for Google Pay ([`defaultGooglePayConfig`](https://github.com/google-pay/flutter-plugin/tree/main/pay/example/lib/payment_configurations.dart#L69)):\n\n```dart\nimport 'package:pay/pay.dart';\nimport 'payment_configurations.dart' as payment_configurations;\n\nconst _paymentItems = [\n  PaymentItem(\n    label: 'Total',\n    amount: '99.99',\n    status: PaymentItemStatus.final_price,\n  )\n];\n\nApplePayButton(\n  paymentConfiguration: payment_configurations.defaultApplePayConfig,\n  paymentItems: _paymentItems,\n  style: ApplePayButtonStyle.black,\n  type: ApplePayButtonType.buy,\n  margin: const EdgeInsets.only(top: 15.0),\n  onPaymentResult: onApplePayResult,\n  loadingIndicator: const Center(\n    child: CircularProgressIndicator(),\n  ),\n),\n\nGooglePayButton(\n  paymentConfiguration: payment_configurations.defaultGooglePayConfig,\n  paymentItems: _paymentItems,\n  type: GooglePayButtonType.buy,\n  margin: const EdgeInsets.only(top: 15.0),\n  onPaymentResult: onGooglePayResult,\n  loadingIndicator: const Center(\n    child: CircularProgressIndicator(),\n  ),\n),\n\nvoid onApplePayResult(paymentResult) {\n  // Send the resulting Apple Pay token to your server / PSP\n}\n\nvoid onGooglePayResult(paymentResult) {\n  // Send the resulting Google Pay token to your server / PSP\n}\n```\n\nTo learn more about the `pay` plugin and alternative integration paths, check out [the readme in the `pay` folder](./pay/README.md).\n\n## Other packages in this plugin\n\nThe packages in this repository follow the [federated plugin](https://docs.flutter.dev/packages-and-plugins/developing-packages#federated-plugins) architecture. Each package has a specific responsibility and can be used independently to fulfil less conventional integration needs:\n\n| Package | Description | When to use |\n|:---:|:---:|:---:|\n| [pay](./pay/) | An app-facing package with support for all the platforms supported by this plugin. | This package offers an agnostic integration for the platforms supported in this plugin and features the easiest path to add payments to your Flutter application. |\n| [pay_android](./pay_android/) | The endorsed implementation of this plugin for Android. | This package contains the necessary business logic to support the Android platform. You can integrate this package separately or use it to build your own app-facing package. |\n| [pay_ios](./pay_ios/) | The endorsed implementation of this plugin for iOS. | This package contains the necessary business logic to support the iOS platform. You can integrate this package separately or use it to build your own app-facing package. |\n| [pay_platform_interface](./pay_platform_interface/) | A common API contract for platform-specific implementations. | Folow the contract in this package to add new platforms to the plugin or create your own Android or iOS implementations. Take a look at the [guide about plugin development](https://flutter.dev/docs/development/packages-and-plugins/developing-packages#federated-plugins) to learn more. |\n\n## Additional resources\nCheck out the following resources to manage your payment accounts and learn more about the APIs for the supported providers:\n\n|  | Google Pay | Apple Pay |\n|:---|:---|:---|\n| Platforms | Android | iOS |\n| Documentation | [Overview](https://developers.google.com/pay/api/android/overview) | [Overview](https://developer.apple.com/apple-pay/implementation/)\n| Console | [Google Pay Business Console](https://pay.google.com/business/console/) |  [Developer portal](https://developer.apple.com/account/)  |\n| Reference | [API reference](https://developers.google.com/pay/api/android/reference/client) | [Apple Pay API](https://developer.apple.com/documentation/passkit/apple_pay/)\n| Style guidelines | [Brand guidelines](https://developers.google.com/pay/api/android/guides/brand-guidelines) | [Buttons and Marks](https://developer.apple.com/design/human-interface-guidelines/apple-pay/overview/buttons-and-marks/)\n\n\u003cbr\u003e\n\u003csup\u003eNote: This is not an officially supported Google product.\u003c/sup\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle-pay%2Fflutter-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle-pay%2Fflutter-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle-pay%2Fflutter-plugin/lists"}