Google Pay 2.0 Test in Live Environment

This page can be used to test Google Pay API version 2.0 in live environment. No payment will be processed. View source.

Price: USD $1.00


  

Will make the following request for a Stripe token from Google Pay:

new PaymentRequest([{
  supportedMethods: 'https://google.com/pay',
  data: {
    apiVersion: 2,
    apiVersionMinor: 0,
    allowedPaymentMethods: [{
      type: 'CARD',
      parameters: {
        allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'],
        allowedCardNetworks: ['AMEX', 'DISCOVER', 'INTERAC', 'JCB', 'VISA', 'MASTERCARD'],
      },
      tokenizationSpecification: {
        type: 'PAYMENT_GATEWAY',
        parameters: {
          'gateway': 'stripe',
          // Please use your own Stripe live public key.
          'stripe:publishableKey': 'pk_live_lNk21zqKM2BENZENh3rzCUgo',
          'stripe:version': '2016-07-06',
        },
      },
    }],
    transactionInfo: {
      countryCode: 'US',
      currencyCode: 'USD',
      totalPriceStatus: 'FINAL',
      totalPrice: '1.00',
    },
    // Please use your own Google Pay merchant ID.
    merchantInfo: {
      merchantName: 'Rouslan Solomakhin',
      merchantId: '00184145120947117657',
    },
  },
}], {
  total: {
    label: 'Tots',
    amount: {
      currency: 'USD',
      value: '1.00',
    },
  },
  displayItems: [
    { label: 'Widget #1', amount: { currency: 'USD', value: '0.75' }, },
    { label: 'Widget #2', amount: { currency: 'USD', value: '0.25' }, },
  ],
});

Based on the Google Pay tutorial.

A transaction may fail if the Stripe account encounters any issues. If that happens, try using the test environment.