Consider these guidelines for the following scenarios when you integrate with the Google Pay API. The scenarios depend on your buyflow and user experience (UX).
You provide shipping
If you provide shipping, set
true and customize
PaymentDataRequest object. This way, users can select or modify a shipping
addresss at the same time that they select or modify their payment information.
You set existingPaymentMethodRequired
If you set
set the user's payment method at checkout to default to Google Pay when
existingPaymentMethodRequired set to
IsReadytoPay only returns
true for users who either
already have a card on file in their Google account, or already have a tokenized card provisioned
in their Google Pay app. It depends on your customizations.
You have an item view
If you have an item view, integrate and display Google Pay on the item listing page so that the
user can easily select their payment information with Google Pay and complete the purchase from
that page. You can set Google Pay as the default when
You have a cart view
If you have a cart view, integrate with the API and display Google Pay so that the user can
easily see all of the items within the cart, as well as a final, total associated price. You can
set Google Pay as the default when
You have Guest Checkout
If you have Guest Checkout, integrate with the API and specify in your request what information
you need in order to create an account. For example, the Google Pay API can return an email
address when you set
true in your
PaymentDataRequest object, or the API can return a name
when you set
CardParameters and define the
You have a wallet view
If you have a wallet view, ensure that you've customized your
in this view to match your
IsReadytoPay request in your buyflow. For example, if
IsReadytoPay request for your buyflow, your wallet screen has the same
parameter set. If your
IsReadytoPay request is customized to request
PaymentDataRequest object, your wallet screen has the same parameter
You charge for subscriptions
If you charge for subscriptions, integrate with the API and allow users to change the backing payment instrument within Google Pay anytime.
You charge immediately after you invoke Google Pay
If you charge immediately after you invoke Google Pay, ensure that a final, total associated
price is shown to the user before you invoke Google Pay.Then, set
COMPLETE_IMMEDIATE_PURCHASE so that users see a Pay button within the
Google Pay chooser. This customization bypasses a traditional confirmation screen before the user
You want to use data returned from the API for purposes other than transactions
If you'd like to use any data returned by the Google Pay API for any purpose other than a transaction, you must obtain separate, express consent from the user.
For example, the Google Pay API can return an email address when you set
true in your
PaymentDataRequest object. If
you wish to use this email address for mailing list purposes, you need to get separate, express
consent from the user, and you must request it from the user outside of the purchase flow.
Otherwise, data returned by the Google Pay API is used only for transaction purposes, which include order confirmation, shipping notifications, shipping tracking, cancellations, refunds, and refund notifications.