Google Pay 2.0 Test

This page can be used to test Google Pay API version 2.0. 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 public key.
          'stripe:publishableKey': 'pk_live_51I9BgbBM4NK0LRL5IptoTliS9Oliur3l2dxKLkvTBeXbtLh5ES8eCU0jhXjrof5apgiMW9sEWpPHFiFPe2K1oSOG00JVlmcvNX',
          'stripe:version': '2018-10-31',
        },
      },
    }],
    transactionInfo: {
      countryCode: 'US',
      currencyCode: 'USD',
      totalPriceStatus: 'FINAL',
      totalPrice: '1.00',
    },
    // Please use your own Google Pay merchant ID.
    merchantInfo: {
      merchantName: 'Liquan Gu',
      merchantId: '12033799061467295567',
    },
  },
}], {
  total: {
    label: 'Tots',
    amount: {
      currency: 'USD',
      value: '1.00',
    },
  },
});

Based on the Google Pay tutorial.