I'm testing the Android Pay API. I generated the public key by using the command
PaymentMethodTokenizationParameters parameters =
PaymentMethodTokenizationParameters.newBuilder()
.setPaymentMethodTokenizationType(PaymentMethodTokenizationType.NETWORK_TOKEN)
.addParameter("publicKey", "Key Here")
.build();