Android App Integration

Instructions detailing how to integrate Google Pay™ into an Android App using NoahPay as your gateway

Pre-requisites

Implementation Steps

Follow the instructions in the following Google guides to implement a Google Pay button in your app:

Google Pay Android developer documentation
Google Pay Android integration checklist

When setting up the tokenizationSpecification object, specify the following values for the gateway and gatewayMerchantId values:

private static JSONObject getTokenizationSpecification() {
  JSONObject tokenizationSpecification = new JSONObject();
  tokenizationSpecification.put("type", "PAYMENT_GATEWAY");
  tokenizationSpecification.put(
      "parameters",
      new JSONObject()
          .put("gateway", "noahpay")
          .put("gatewayMerchantId", "<provided to you by NoahPay>"));

  return tokenizationSpecification;
}

The Google Pay button will generate an encrypted token that you must then include in a request to the NoahPay API to:

  • Create a purchase using the card in the Google Pay payload
  • Or tokenize the card details in the Google Pay payload

The following documentation outlines the format of the two API calls:

  • Create a purchase using a wallet
  • Tokenize a card with wallet credentials