Search code examples
android-pay

I get error 405 when I tap Android Pay buy with now button?


I'm trying to integrate Android Pay API with my mobile app.

I have production access for Android Pay.

In the checkout page, tapping Buy with Android Pay button I get the error code 405.

The following is the adb logcat:

: I/request/result code: requestCode: 66036, resultCode: 1 
: I/GWalletErrorCode: 405
: I/AdjustCallback: Activity Resumed
: I/request/result code: requestCode: 1001, resultCode: 1
: I/GWalletErrorCode: 405
:  I/AdjustCallback: Activity Resumed

Any help is appreciated.


Solution

  • According to WalletConstants, the error code 405 is ERROR_CODE_MERCHANT_ACCOUNT_ERROR.

    As explained here, this means you're trying to use Android Pay with the production environement, but your app is not signed with the correct key:

    When your app is pointed to the Android Pay production environment, the Android Pay API returns ERROR_CODE_MERCHANT_ACCOUNT_ERROR (405) if the signing key fingerprint used to sign the Android app does not match the release key fingerprint registered with Google Play. This typically occurs after an app in development switches from the test environment to the production environment