CINXE.COM
pay | Flutter package
<!DOCTYPE html> <html lang="en-us"><head><script src="https://www.googletagmanager.com/gtm.js?id=GTM-MX6DBN9" async="async"></script><script src="/static/hash-o6oemknr/js/gtm.js" async="async"></script><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="ie=edge"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta name="twitter:card" content="summary"/><meta name="twitter:site" content="@dart_lang"/><meta name="twitter:description" content="A plug-in to add support for payments on Flutter applications."/><meta name="twitter:image" content="https://pub.dev/static/hash-o6oemknr/img/pub-dev-icon-cover-image.png"/><meta property="og:type" content="website"/><meta property="og:site_name" content="Dart packages"/><meta property="og:title" content="pay | Flutter package"/><meta property="og:description" content="A plug-in to add support for payments on Flutter applications."/><meta property="og:image" content="https://pub.dev/static/hash-o6oemknr/img/pub-dev-icon-cover-image.png"/><meta property="og:url" content="https://pub.dev/packages/pay"/><title>pay | Flutter package</title><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Google+Sans+Display:wght@400&family=Google+Sans+Text:wght@400;500;700&family=Google+Sans+Mono:wght@400;700&display=swap"/><link rel="shortcut icon" href="/static/hash-o6oemknr/img/flutter-logo-32x32.png"/><link rel="stylesheet" href="https://www.gstatic.com/glue/v25_0/ccb.min.css"/><link rel="search" type="application/opensearchdescription+xml" title="Dart packages" href="/osd.xml"/><link rel="canonical" href="https://pub.dev/packages/pay"/><meta name="description" content="A plug-in to add support for payments on Flutter applications."/><link rel="alternate" type="application/atom+xml" title="Updated Packages Feed for Pub" href="/feed.atom"/><link rel="stylesheet" type="text/css" href="/static/hash-o6oemknr/material/bundle/styles.css"/><link rel="stylesheet" type="text/css" href="/static/hash-o6oemknr/css/style.css"/><script src="/static/hash-o6oemknr/material/bundle/script.min.js" defer="defer"></script><script src="/static/hash-o6oemknr/js/script.dart.js" defer="defer"></script><script src="https://www.gstatic.com/brandstudio/kato/cookie_choice_component/cookie_consent_bar.v3.js" defer="defer" data-autoload-cookie-consent-bar="true"></script><meta name="pub-page-data" content="eyJwa2dEYXRhIjp7InBhY2thZ2UiOiJwYXkiLCJ2ZXJzaW9uIjoiMi4wLjAiLCJsaWtlcyI6OTY5LCJwdWJsaXNoZXJJZCI6Imdvb2dsZS5kZXYiLCJpc0Rpc2NvbnRpbnVlZCI6ZmFsc2UsImlzTGF0ZXN0Ijp0cnVlfSwic2Vzc2lvbkF3YXJlIjpmYWxzZX0="/><link rel="preload" href="/static/hash-o6oemknr/highlight/highlight-with-init.js" as="script"/></head><body class="light-theme"><script src="/static/hash-o6oemknr/js/dark-init.js"></script><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-MX6DBN9" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript><div class="site-header"><button class="hamburger" aria-label="menu toggle"></button><a class="logo" href="/"><img class="site-logo" src="/static/hash-o6oemknr/img/pub-dev-logo.svg" alt="" width="140" height="30" role="presentation"/></a><div class="site-header-space"></div><div class="site-header-mask"></div><div class="site-header-search"><form action="/packages" method="GET"><input class="site-header-search-input" name="q" placeholder="New search..." autocomplete="on" title="Search"/></form></div><nav class="site-header-nav scroll-container"><div class="nav-login-container"><button id="-account-login" class="nav-main-button link">Sign in</button></div><div class="nav-container nav-help-container hoverable"><button class="nav-main-button">Help</button><div class="nav-hover-popup"><div class="nav-table-columns"><div class="nav-table-column"><h3>Pub.dev</h3><a class="nav-link" href="/help/search" rel="noopener" target="_blank">Searching for packages</a><a class="nav-link" href="/help/scoring" rel="noopener" target="_blank">Package scoring and pub points</a></div><div class="nav-table-column"><h3>Flutter</h3><a class="nav-link" href="https://flutter.dev/using-packages/" rel="noopener" target="_blank">Using packages</a><a class="nav-link" href="https://flutter.dev/developing-packages/" rel="noopener" target="_blank">Developing packages and plugins</a><a class="nav-link" href="https://dart.dev/tools/pub/publishing" rel="noopener" target="_blank">Publishing a package</a></div><div class="nav-table-column"><h3>Dart</h3><a class="nav-link" href="https://dart.dev/guides/packages" rel="noopener" target="_blank">Using packages</a><a class="nav-link" href="https://dart.dev/tools/pub/publishing" rel="noopener" target="_blank">Publishing a package</a></div></div></div></div><div class="nav-container nav-help-container-mobile foldable"><h3 class="foldable-button">Pub.dev <img class="foldable-icon" src="/static/hash-o6oemknr/img/nav-mobile-foldable-icon.svg" alt="toggle folding of the section" width="13" height="6"/></h3><div class="foldable-content"><a class="nav-link" href="/help/search" rel="noopener" target="_blank">Searching for packages</a><a class="nav-link" href="/help/scoring" rel="noopener" target="_blank">Package scoring and pub points</a></div></div><div class="nav-container nav-help-container-mobile foldable"><h3 class="foldable-button">Flutter <img class="foldable-icon" src="/static/hash-o6oemknr/img/nav-mobile-foldable-icon.svg" alt="toggle folding of the section" width="13" height="6"/></h3><div class="foldable-content"><a class="nav-link" href="https://flutter.dev/using-packages/" rel="noopener" target="_blank">Using packages</a><a class="nav-link" href="https://flutter.dev/developing-packages/" rel="noopener" target="_blank">Developing packages and plugins</a><a class="nav-link" href="https://dart.dev/tools/pub/publishing" rel="noopener" target="_blank">Publishing a package</a></div></div><div class="nav-container nav-help-container-mobile foldable"><h3 class="foldable-button">Dart <img class="foldable-icon" src="/static/hash-o6oemknr/img/nav-mobile-foldable-icon.svg" alt="toggle folding of the section" width="13" height="6"/></h3><div class="foldable-content"><a class="nav-link" href="https://dart.dev/guides/packages" rel="noopener" target="_blank">Using packages</a><a class="nav-link" href="https://dart.dev/tools/pub/publishing" rel="noopener" target="_blank">Publishing a package</a></div></div></nav></div><div id="banner-container"></div><main class="container"><div class="detail-wrapper -active -has-info-box"><div class="detail-header -is-loose"><div class="detail-container"><div class="detail-header-outer-block"><div class="detail-header-content-block"><h1 class="title">pay 2.0.0 <span class="pkg-page-title-copy"><img class="pkg-page-title-copy-icon filter-invert-on-dark" src="/static/hash-o6oemknr/img/content-copy-icon.svg" alt="copy "pay: ^2.0.0" to clipboard" width="18" height="18" title="Copy "pay: ^2.0.0" to clipboard" data-copy-content="pay: ^2.0.0" data-ga-click-event="copy-package-version"/><div class="pkg-page-title-copy-feedback"><span class="code">pay: ^2.0.0</span> copied to clipboard</div></span></h1><div class="metadata">Published <span><a class="-x-ago" href="" title="Feb 27, 2024" aria-label="9 months ago" aria-role="button" role="button" data-timestamp="1709053901857">9 months ago</a></span> • <a class="-pub-publisher" href="/publishers/google.dev"><img class="-pub-publisher-shield filter-invert-on-dark" src="/static/hash-o6oemknr/img/material-icon-verified.svg" alt="verified publisher" width="14" height="14" title="Published by a pub.dev verified publisher"/>google.dev</a><span class="package-badge" title="Package is compatible with Dart 3.">Dart 3 compatible</span>• Latest: <span><a href="/packages/pay" title="View the latest version of pay">2.0.0</a></span> / <span>Prerelease: <a href="/packages/pay/versions/3.0.0-beta.2" title="Visit pay 3.0.0-beta.2 page">3.0.0-beta.2</a></span></div><div class="detail-tags-and-like"><div class="detail-tags"><div class="-pub-tag-badge"><span class="tag-badge-main">SDK</span><a class="tag-badge-sub" href="/packages?q=sdk%3Aflutter" rel="nofollow" title="Packages compatible with Flutter SDK">Flutter</a></div><div class="-pub-tag-badge"><span class="tag-badge-main">Platform</span><a class="tag-badge-sub" href="/packages?q=platform%3Aandroid" rel="nofollow" title="Packages compatible with Android platform">Android</a><a class="tag-badge-sub" href="/packages?q=platform%3Aios" rel="nofollow" title="Packages compatible with iOS platform">iOS</a></div></div><div class="detail-like"><button id="-pub-like-icon-button" class="mdc-icon-button" data-ga-click-event="toggle-like" aria-pressed="false" title="Like this package"><img class="mdc-icon-button__icon" src="/static/hash-o6oemknr/img/like-inactive.svg" alt="liked status: inactive" width="18" height="18"/><img class="mdc-icon-button__icon mdc-icon-button__icon--on" src="/static/hash-o6oemknr/img/like-active.svg" alt="liked status: active" width="18" height="18"/></button><span class="likes-count"><span id="likes-count">969</span></span></div></div></div></div></div></div><div class="detail-container"><div class="detail-lead"><div class="detail-metadata-toggle"><div class="detail-metadata-toggle-icon">→</div><h3 class="detail-lead-title">Metadata</h3></div><p class="detail-lead-text">A plug-in to add support for payments on Flutter applications.</p><p class="detail-lead-more"><a class="detail-metadata-toggle">More...</a></p></div></div><div class="detail-body"><div class="detail-tabs"><div class="detail-tabs-wide-header"><div class="detail-container"><ul class="detail-tabs-header"><li class="detail-tab tab-button detail-tab-readme-title -active">Readme</li><li class="detail-tab tab-link detail-tab-changelog-title"><a href="/packages/pay/changelog" role="button">Changelog</a></li><li class="detail-tab tab-link detail-tab-example-title"><a href="/packages/pay/example" role="button">Example</a></li><li class="detail-tab tab-link detail-tab-installing-title"><a href="/packages/pay/install" role="button">Installing</a></li><li class="detail-tab tab-link detail-tab-versions-title"><a href="/packages/pay/versions" role="button">Versions</a></li><li class="detail-tab tab-link detail-tab-analysis-title"><a href="/packages/pay/score" role="button">Scores</a></li></ul></div></div><div class="detail-container detail-body-main"><div class="detail-tabs-content"><section class="tab-content detail-tab-readme-content -active markdown-body"><p><a href="https://pub.dartlang.org/packages/pay" rel="ugc"><img src="https://img.shields.io/pub/v/pay.svg" alt="pub package"></a></p> <p>A plugin to add payments to your Flutter application.</p> <h2 class="hash-header" id="platform-support">Platform Support <a href="#platform-support" class="hash-link">#</a></h2> <table> <thead> <tr> <th align="center">Android</th> <th align="center">iOS</th> </tr> </thead> <tbody> <tr> <td align="center">Google Pay</td> <td align="center">Apple Pay</td> </tr> </tbody> </table> <h2 class="hash-header" id="getting-started">Getting started <a href="#getting-started" class="hash-link">#</a></h2> <p>Before you start, create an account with the payment providers you are planning to support and follow the setup instructions:</p> <h4 id="apple-pay">Apple Pay:</h4> <ol> <li>Take a look at the <a href="https://developer.apple.com/documentation/passkit/apple_pay/setting_up_apple_pay_requirements" rel="ugc">integration requirements</a>.</li> <li>Create a <a href="https://developer.apple.com/help/account/configure-app-capabilities/configure-apple-pay#create-a-merchant-identifier" rel="ugc">merchant identifier</a> for your business.</li> <li>Create a <a href="https://developer.apple.com/help/account/configure-app-capabilities/configure-apple-pay#create-a-payment-processing-certificate" rel="ugc">payment processing certificate</a> to encrypt payment information.</li> </ol> <h4 id="google-pay">Google Pay:</h4> <ol> <li>Take a look at the <a href="https://developers.google.com/pay/api/android/overview" rel="ugc">integration requirements</a>.</li> <li>Sign up to the <a href="https://pay.google.com/business/console" rel="ugc">business console</a> and create an account.</li> </ol> <h2 class="hash-header" id="usage">Usage <a href="#usage" class="hash-link">#</a></h2> <p>To start using this plugin, add <code>pay</code> as a <a href="https://flutter.io/platform-plugins/" rel="ugc">dependency in your pubspec.yaml file</a>:</p> <pre><code class="language-yaml">dependencies: pay: ^2.0.0 </code></pre> <p>Define the configuration for your payment provider(s). Take a look at the parameters available in the documentation for <a href="https://developer.apple.com/documentation/passkit/pkpaymentrequest" rel="ugc">Apple Pay</a> and <a href="https://developers.google.com/pay/api/android/reference/request-objects" rel="ugc">Google Pay</a>, and explore the <a href="https://github.com/google-pay/flutter-plugin/tree/main/pay/example/lib/payment_configurations.dart" rel="ugc">sample configurations in this package</a>.</p> <h3 class="hash-header" id="example">Example <a href="#example" class="hash-link">#</a></h3> <p>This snippet assumes the existence a payment configuration for Apple Pay (<a href="https://github.com/google-pay/flutter-plugin/tree/main/pay/example/lib/payment_configurations.dart#L27" rel="ugc"><code>defaultApplePayConfigString</code></a>) and another one for Google Pay (<a href="https://github.com/google-pay/flutter-plugin/tree/main/pay/example/lib/payment_configurations.dart#L63" rel="ugc"><code>defaultGooglePayConfigString</code></a>):</p> <pre><code class="language-dart">import 'package:pay/pay.dart'; const _paymentItems = [ PaymentItem( label: 'Total', amount: '99.99', status: PaymentItemStatus.final_price, ) ]; ApplePayButton( paymentConfiguration: PaymentConfiguration.fromJsonString( defaultApplePayConfigString), paymentItems: _paymentItems, style: ApplePayButtonStyle.black, type: ApplePayButtonType.buy, margin: const EdgeInsets.only(top: 15.0), onPaymentResult: onApplePayResult, loadingIndicator: const Center( child: CircularProgressIndicator(), ), ), GooglePayButton( paymentConfiguration: PaymentConfiguration.fromJsonString( defaultGooglePayConfigString), paymentItems: _paymentItems, type: GooglePayButtonType.buy, margin: const EdgeInsets.only(top: 15.0), onPaymentResult: onGooglePayResult, loadingIndicator: const Center( child: CircularProgressIndicator(), ), ), void onApplePayResult(paymentResult) { // Send the resulting Apple Pay token to your server / PSP } void onGooglePayResult(paymentResult) { // Send the resulting Google Pay token to your server / PSP } </code></pre> <h3 class="hash-header" id="alternative-methods-to-load-your-payment-configurations">Alternative methods to load your payment configurations <a href="#alternative-methods-to-load-your-payment-configurations" class="hash-link">#</a></h3> <h4 id="json-strings">JSON strings</h4> <p>The example above uses the <code>PaymentConfiguration.fromJsonString</code> method to load your payment configuration from a string in JSON format (<a href="https://github.com/google-pay/flutter-plugin/tree/main/pay/example/lib/payment_configurations.dart#L27" rel="ugc">example</a>). This configuration can be retrieved from a remote location at runtime (<a href="https://github.com/google-pay/flutter-plugin/tree/main/pay/example/lib/payment_configurations.dart#L18" rel="ugc">recommended</a>) or provided at build time.</p> <h4 id="asset-files">Asset files</h4> <p>You can also place payment configurations under your <code>assets</code> folder and load them at runtime. Suppose that you add a JSON file with the name <code>google_pay_config.json</code> to your <code>assets</code> folder to configure your Google Pay integration. You can load it and use it to create a <code>PaymentConfiguration</code> object for the button (e.g.: using a <code>FutureBuilder</code>):</p> <pre><code class="language-dart">final Future<PaymentConfiguration> _googlePayConfigFuture = PaymentConfiguration.fromAsset('google_pay_config.json'); FutureBuilder<PaymentConfiguration>( future: _googlePayConfigFuture, builder: (context, snapshot) => snapshot.hasData ? GooglePayButton( paymentConfiguration: snapshot.data!, paymentItems: _paymentItems, type: GooglePayButtonType.buy, margin: const EdgeInsets.only(top: 15.0), onPaymentResult: onGooglePayResult, loadingIndicator: const Center( child: CircularProgressIndicator(), ), ) : const SizedBox.shrink()), </code></pre> <h2 class="hash-header" id="advanced-usage">Advanced usage <a href="#advanced-usage" class="hash-link">#</a></h2> <p>If you prefer to have more control over each individual request and the button separately, you can instantiate a payment client and add the buttons to your layout independently:</p> <pre><code class="language-dart">import 'package:pay/pay.dart'; const _paymentItems = [ PaymentItem( label: 'Total', amount: '99.99', status: PaymentItemStatus.final_price, ) ]; late final Pay _payClient; // When you are ready to load your configuration _payClient = Pay({ PayProvider.google_pay: PaymentConfiguration.fromJsonString( payment_configurations.defaultGooglePay), PayProvider.apple_pay: PaymentConfiguration.fromJsonString( payment_configurations.defaultApplePay), }); </code></pre> <p>As you can see, you can add multiple configurations to your payment client, one for each payment provider supported.</p> <p>Now, you can use the <code>userCanPay</code> method to determine whether the user can start a payment process with a given provider. This call returns a <code>Future<bool></code> result that you can use to decide what to do next. For example, you can feed the <code>Future</code> to a <code>FutureBuilder</code> that shows a different UI based on the result of the call:</p> <pre><code class="language-dart">@override Widget build(BuildContext context) { return FutureBuilder<bool>( future: _payClient.userCanPay(PayProvider.google_pay), builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState.done) { if (snapshot.data == true) { return RawGooglePayButton( type: GooglePayButtonType.buy, onPressed: onGooglePayPressed); } else { // userCanPay returned false // Consider showing an alternative payment method } } else { // The operation hasn't finished loading // Consider showing a loading indicator } }, ); } </code></pre> <p>Finally, handle the <code>onPressed</code> event and trigger the payment selector as follows:</p> <pre><code class="language-dart">void onGooglePayPressed() async { final result = await _payClient.showPaymentSelector( PayProvider.google_pay, _paymentItems, ); // Send the resulting Google Pay token to your server / PSP } </code></pre> <h2 class="hash-header" id="additional-resources">Additional resources <a href="#additional-resources" class="hash-link">#</a></h2> <p>Take a look at the following resources to manage your payment accounts and learn more about the APIs for the supported providers:</p> <table> <thead> <tr> <th align="left"></th> <th align="left">Google Pay</th> <th align="left">Apple Pay</th> </tr> </thead> <tbody> <tr> <td align="left">Platforms</td> <td align="left"> Android</td> <td align="left"> iOS</td> </tr> <tr> <td align="left"> Documentation</td> <td align="left"> <a href="https://developers.google.com/pay/api/android/overview" rel="ugc">Overview</a></td> <td align="left"><a href="https://developer.apple.com/apple-pay/implementation/" rel="ugc">Overview</a></td> </tr> <tr> <td align="left"> Console</td> <td align="left"> <a href="https://pay.google.com/business/console/" rel="ugc">Google Pay Business Console</a></td> <td align="left"><a href="https://developer.apple.com/account/" rel="ugc">Developer portal</a></td> </tr> <tr> <td align="left">Reference</td> <td align="left"><a href="https://developers.google.com/pay/api/android/reference/client" rel="ugc">API reference</a></td> <td align="left"> <a href="https://developer.apple.com/documentation/passkit/apple_pay/" rel="ugc">Apple Pay API</a></td> </tr> <tr> <td align="left">Style guidelines</td> <td align="left"> <a href="https://developers.google.com/pay/api/android/guides/brand-guidelines" rel="ugc">Brand guidelines</a></td> <td align="left"><a href="https://developer.apple.com/design/human-interface-guidelines/apple-pay/overview/buttons-and-marks/" rel="ugc">Buttons and Marks</a></td> </tr> </tbody> </table> <br> <sup>Note: This is not an officially supported Google product.</sup> </section></div></div></div><aside class="detail-info-box"><a class="packages-scores" href="/packages/pay/score"><div class="packages-score packages-score-like"><div class="packages-score-value -has-value"><span class="packages-score-value-number">969</span><span class="packages-score-value-sign"></span></div><div class="packages-score-label">likes</div></div><div class="packages-score packages-score-health"><div class="packages-score-value -has-value"><span class="packages-score-value-number">150</span><span class="packages-score-value-sign"></span></div><div class="packages-score-label">pub points</div></div><div class="packages-score packages-score-popularity"><div class="packages-score-value -has-value"><span class="packages-score-value-number">98</span><span class="packages-score-value-sign">%</span></div><div class="packages-score-label">popularity</div></div></a><h3 class="title">Publisher</h3><p><a href="/publishers/google.dev"><img class="-pub-publisher-shield filter-invert-on-dark" src="/static/hash-o6oemknr/img/material-icon-verified.svg" alt="verified publisher" width="14" height="14" title="Published by a pub.dev verified publisher"/>google.dev</a></p><h3 class="title pkg-infobox-metadata">Metadata</h3><p>A plug-in to add support for payments on Flutter applications.</p><p><a class="link" href="https://github.com/google-pay/flutter-plugin/tree/main/pay" rel="ugc">Repository (GitHub)</a><br/><a class="link" href="https://github.com/google-pay/flutter-plugin/issues" rel="ugc">View/report issues</a><br/><a class="link" href="https://github.com/google-pay/flutter-plugin/blob/main/CONTRIBUTING.md" rel="ugc">Contributing</a><br/></p><h3 class="title">Documentation</h3><p><a class="link" href="/documentation/pay/latest/">API reference</a><br/></p><h3 class="title">License</h3><p><img class="inline-icon-img filter-invert-on-dark" src="/static/hash-o6oemknr/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>Apache-2.0 (<a href="/packages/pay/license">license</a>)</p><h3 class="title">Dependencies</h3><p><a href="https://api.flutter.dev/">flutter</a>, <a href="https://api.flutter.dev/flutter/flutter_localizations/flutter_localizations-library.html">flutter_localizations</a>, <a href="/packages/meta" title="^1.10.0">meta</a>, <a href="/packages/pay_android" title="^2.0.0">pay_android</a>, <a href="/packages/pay_ios" title="^1.0.11">pay_ios</a>, <a href="/packages/pay_platform_interface" title="^1.0.4">pay_platform_interface</a></p><h3 class="title">More</h3><p><a href="/packages?q=dependency%3Apay" rel="nofollow">Packages that depend on pay</a></p></aside></div><script type="application/ld+json">{"@context":"http\u003a\u002f\u002fschema.org","@type":"SoftwareSourceCode","name":"pay","version":"2.0.0","description":"pay - A plug-in to add support for payments on Flutter applications.","url":"https\u003a\u002f\u002fpub.dev\u002fpackages\u002fpay","dateCreated":"2021-04-17T08\u003a48\u003a38.956970Z","dateModified":"2024-02-27T17\u003a11\u003a41.857133Z","programmingLanguage":"Dart","image":"https\u003a\u002f\u002fpub.dev\u002fstatic\u002fimg\u002fpub-dev-icon-cover-image.png","license":"https\u003a\u002f\u002fpub.dev\u002fpackages\u002fpay\u002flicense"}</script></div><div class="detail-metadata"><h3 class="detail-metadata-title"><span class="detail-metadata-toggle">←</span> Metadata</h3><div class="detail-info-box"><a class="packages-scores" href="/packages/pay/score"><div class="packages-score packages-score-like"><div class="packages-score-value -has-value"><span class="packages-score-value-number">969</span><span class="packages-score-value-sign"></span></div><div class="packages-score-label">likes</div></div><div class="packages-score packages-score-health"><div class="packages-score-value -has-value"><span class="packages-score-value-number">150</span><span class="packages-score-value-sign"></span></div><div class="packages-score-label">pub points</div></div><div class="packages-score packages-score-popularity"><div class="packages-score-value -has-value"><span class="packages-score-value-number">98</span><span class="packages-score-value-sign">%</span></div><div class="packages-score-label">popularity</div></div></a><h3 class="title">Publisher</h3><p><a href="/publishers/google.dev"><img class="-pub-publisher-shield filter-invert-on-dark" src="/static/hash-o6oemknr/img/material-icon-verified.svg" alt="verified publisher" width="14" height="14" title="Published by a pub.dev verified publisher"/>google.dev</a></p><h3 class="title pkg-infobox-metadata">Metadata</h3><p>A plug-in to add support for payments on Flutter applications.</p><p><a class="link" href="https://github.com/google-pay/flutter-plugin/tree/main/pay" rel="ugc">Repository (GitHub)</a><br/><a class="link" href="https://github.com/google-pay/flutter-plugin/issues" rel="ugc">View/report issues</a><br/><a class="link" href="https://github.com/google-pay/flutter-plugin/blob/main/CONTRIBUTING.md" rel="ugc">Contributing</a><br/></p><h3 class="title">Documentation</h3><p><a class="link" href="/documentation/pay/latest/">API reference</a><br/></p><h3 class="title">License</h3><p><img class="inline-icon-img filter-invert-on-dark" src="/static/hash-o6oemknr/img/material-icon-balance.svg" alt="" width="14" height="14" role="presentation"/>Apache-2.0 (<a href="/packages/pay/license">license</a>)</p><h3 class="title">Dependencies</h3><p><a href="https://api.flutter.dev/">flutter</a>, <a href="https://api.flutter.dev/flutter/flutter_localizations/flutter_localizations-library.html">flutter_localizations</a>, <a href="/packages/meta" title="^1.10.0">meta</a>, <a href="/packages/pay_android" title="^2.0.0">pay_android</a>, <a href="/packages/pay_ios" title="^1.0.11">pay_ios</a>, <a href="/packages/pay_platform_interface" title="^1.0.4">pay_platform_interface</a></p><h3 class="title">More</h3><p><a href="/packages?q=dependency%3Apay" rel="nofollow">Packages that depend on pay</a></p></div><p class="detail-lead-back"><a class="detail-metadata-toggle">Back</a></p></div><div id="-screenshot-carousel" class="carousel"><fab id="-carousel-prev" class="mdc-fab carousel-prev carousel-nav" data-mdc-auto-init="MDCRipple" title="Previous" data-ga-click-event="screenshot-carousel-prev-click" tabindex="0"><div class="mdc-fab__ripple"></div><img class="mdc-fab__icon" src="/static/hash-o6oemknr/img/keyboard_arrow_left.svg" alt="previous" width="24" height="24" aria-hidden="true"/></fab><div id="-image-container" class="image-container"></div><fab id="-carousel-next" class="mdc-fab carousel-next carousel-nav" data-mdc-auto-init="MDCRipple" title="Next" data-ga-click-event="screenshot-carousel-next-click" tabindex="0"><div class="mdc-fab__ripple"></div><img class="mdc-fab__icon" src="/static/hash-o6oemknr/img/keyboard_arrow_right.svg" alt="next" width="24" height="24" aria-hidden="true"/></fab><p id="-screenshot-description" class="screenshot-description"></p></div></main><footer class="site-footer"><a class="link" href="https://dart.dev/">Dart language</a><a class="link sep" href="/report?subject=package%3Apay&url=https%3A%2F%2Fpub.dev%2Fpackages%2Fpay">Report package</a><a class="link sep" href="/policy">Policy</a><a class="link sep" href="https://www.google.com/intl/en/policies/terms/">Terms</a><a class="link sep" href="https://developers.google.com/terms/">API Terms</a><a class="link sep" href="/security">Security</a><a class="link sep" href="https://www.google.com/intl/en/policies/privacy/">Privacy</a><a class="link sep" href="/help">Help</a><a class="link icon sep" href="/feed.atom"><img class="inline-icon" src="/static/hash-o6oemknr/img/rss-feed-icon.svg" alt="RSS" width="20" height="20" title="RSS/atom feed"/></a><a class="link icon github_issue" href="https://github.com/dart-lang/pub-dev/issues/new"><img class="inline-icon" src="/static/hash-o6oemknr/img/bug-report-white-96px.png" alt="bug report" width="20" height="20" title="Report an issue with this site"/></a></footer><script src="/static/hash-o6oemknr/highlight/highlight-with-init.js" defer="defer"></script></body></html>