Skip to main content

Google Pay

FeatureDescription
Payment Logo-Usage Guidelines
Integration Methods
  1. ✅ Hosted Checkout
  2. ✅ Embedded
  3. ✅ Server-to-Server
Recommended RegionsGlobal
Virtual Industry Support
Subscription Support✅ Varies by industry
Supported SaaSAll integrated SaaS platforms
Supported Open-Source Platforms
  1. ✅ Magento
  2. ✅ WordPress/Woocommerce
  3. ✅ OpenCart
  4. ✅ PrestaShop
  5. ✅ ZenCart

Integration Method

Embedded

View the complete Google Pay Embedded integration solution.

Server to Server

To use this integration mode, you need to become an official Google Pay developer.

  1. Google Pay Developer Account Registration and Configuration
  1. Create Merchant ID
  • After registration, a Merchant ID will be generated, which can be viewed in Google Pay Console → API access → Merchant Info.
  1. Configure Google Pay API Key
  • Create a project in the Google Cloud Console.
  • Enable Google Pay API for Web/Android.
  • Get the API Key.
  1. To obtain the Google Pay Payment Token, see the complete Google Pay example, pass the Token to Oceanpayment via the pay_accountNumber parameter and call Server to Server.
const paymentsClient = new google.payments.api.PaymentsClient({ environment: 'TEST' });

const request = {
apiVersion: 2,
apiVersionMinor: 0,
allowedPaymentMethods: [{
type: 'CARD',
parameters: {
allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
allowedCardNetworks: ['VISA', 'MASTERCARD'],
},
tokenizationSpecification: {
type: 'PAYMENT_GATEWAY',
parameters: {
'gateway': 'oceanpayment',
'gatewayMerchantId': 'oceanpayment',
},
},
}],
merchantInfo: {
merchantName: 'OceanPayment',
merchantId: 'BCR2DN4TWW...',
},
transactionInfo: {
totalPriceStatus: 'FINAL',
totalPrice: '10.00',
currencyCode: 'USD',
},
};

paymentsClient.loadPaymentData(request).then(paymentData => {
const token = paymentData.paymentMethodData.tokenizationData.token;
//Send token to the server for transaction processing.
});