Android App Integration

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

Pre-requisites

  1. Read the Google Pay Android Brand Guidelines
  2. Follow Google Pay's Deploy production environment guidelines. In this step you will obtain a merchantID. By integrating Google Pay, you agree to Google's terms of service.
  3. Contact the Fat Zebra support team to have Google Pay enabled on your account. You will be supplied a gatewayMerchantID.

Implementation Steps

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

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", "fatzebra")
          .put("gatewayMerchantId", "<provided to you by Fat Zebra>"));

  return tokenizationSpecification;
}

The Google Pay button will generate an encrypted token that you must then include in a request to the Fat Zebra 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: