Google Pay Implementation

Developers can use this documentation to implement google pay.

Overview

Google Pay is a mobile payment service developed by Google to power in-app, online, and in-person contactless purchases on mobile devices, so you can make payments with Android phones, tablets, or watches. Google Pay is supported for all major web browsers and devices, including Apple devices.

Implementation

  1. To enable Google Pay on your Approvely account: Upload screenshots of your site + checkout flow + domain name to Approvely so we can verify them with Google Pay.
  2. Once verified by the Approvely team, Google Pay will be enabled on your account, and the Google Pay button will automatically appear in prebuilt UI checkout options.
  3. If you are adding your own implementation the following components will render the Google Pay button:
import {CoinflowGooglePayButton} from '@coinflowlabs/react';

<CoinflowGooglePayButton
  env={'prod' | 'sandbox'}
  wallet={{
    publicKey: PublicKey,
    signMessage: (message: UInt8Array) => Promise,
    sendTransaction: (transaction: Transaction | VersionedTransaction) => Promise
  }}
  blockchain={'solana'}
  merchantId={merchantId}
  connection={connection}
  handleHeightChange={handleHeightChange}
  amount={amount}
  color={'black' | 'white'}
/>
import {CoinflowGooglePayButton} from '@coinflowlabs/react';

<CoinflowGooglePayButton
  env={'prod' | 'sandbox'}
  sessionKey={'USER_SESSION_KEY'} //Get from: https://docs.coinflow.cash/reference/getsessionkey
  merchantId={merchantId}
  handleHeightChange={handleHeightChange}
  subtotal={{cents: 100, currency: Currency.USD}}
  color={'black' | 'white'}
/>


📘

GooglePay button will not render on Safari!

Testing Google Pay

When testing Google Pay on sandbox, you will need to use a real credit card. Approvely will NOT charge your card.