1

Implemented google pay api into my android app using https://developers.google.com/pay/api/android/guides/tutorial and https://github.com/google-pay/android-quickstart

The default country code is US and currency code is USD. My issue is that I need to use the app in Saudi-Arabia, but I cannot change the Country/Currency code. If I change it (country code: SA and currency code: SAR) an error occurs with Error code: 412.

Also, changing parameter billingAddressRequired to false is of no use as address is still mandatory for payment.

So,

  1. Can I implement google pay api for my android app in Saudi-Arabia and how to do so?

  2. Can I hide billing Address in the payment page and how to do so?

  3. Can I display total amount in the google pay payment pop-up along with the card-details and all?

Thanks in advance for your help.

Nabil
  • 654
  • 7
  • 21

1 Answers1

1

Google Pay is supported in Saudi Arabia. Refer to list of supported countries.

What parameters are you passing in?

It is working for me using the web integration with this JSFiddle. Should requests should be similar between Android and Web.

// transactionInfo
{
  displayItems: [
    {
      label: "Subtotal",
      type: "SUBTOTAL",
      price: "11.00",
    },
    {
      label: "Tax",
      type: "TAX",
      price: "1.00",
    }
  ],
  countryCode: "SA",
  currencyCode: "SAR",
  totalPriceStatus: "FINAL",
  totalPrice: "12.00",
  totalPriceLabel: "Total"
}

You can refer to the Google Pay live demos for more examples of parameters that you can pass in.

Soc
  • 7,425
  • 4
  • 13
  • 30