Introduction
Google Pay is a widely used mobile payment solution that offers a convenient and secure way for customers to pay for goods and services. Integrating Google Pay with Payrails allows you to provide a fast, easy-to-use payment option for your customers while leveraging our platform to route the payment to any Payment Service Provider (PSP). This guide will explain the process of integrating Google Pay into your app or website using Payrails.Pre-requisites
In order to start using Google Pay with Payrails, you must:Google Pay on Android Devices
- Google Pay Android Developer Documentation
- Google Pay Android Integration Checklist
- Google Pay Android Brand Guidelines
Google Pay on the Web
- Google Pay Web Developer Documentation
- Google Pay Web Integration Checklist
- Google Pay Web Brand Guidelines
Ways to integrate
Payrails SDK
For a more flexible implementation using our SDK, you can use our Google Pay element. See special instructions here for your client-side implementation.Server-to-server integration
You also have the option to completely manage your own client-side implementation, and use Payrails APIs with a server-to-server integration to process payments with Google Pay. With this approach, follow the Google documentation linked above to build Google Pay into your applications.Pass Google Pay configuration in lookup response to Google Pay SDK
With a server-to-server integration, you can call our lookup payment options endpoint to get available payment options and relevant configurations for each payment method. You can getallowedAuthMethods and allowedCardNetworks from the response here and pass it to the Google Pay SDK. Please contact your Payrails representative during the onboarding phase in order to set these configurations before going live.
Please setup your
gatewayMerchantId with Payrails before you start testing
your Google Pay integration in case of client owned Google Pay integration.
Payrails performs validations on the merchant Id we receive after decrypting
the token to ensure that we did not receive a forged token.Pass Google Pay payment token in request to authorize payment with Payrails
When you initiate a transaction with the Google Pay SDK, a Payment Token (paymentMethodData.tokenizationData.token) containing a JSON-formatted string is sent to the merchant app. Pass the paymentMethodData.tokenizationData.token in your call to our authorize a payment endpoint. See an example below.