Isaac Sekamatte
Isaac Sekamatte

Reputation: 5608

Specifying google pay tokenization

I am trying to implement google pay for the first time. I am having a challenge of how to specify the the gateway and gatewayMarchantId. What I have is google console a account and don't know where to find this information.

private static JSONObject getTokenizationSpecification() throws JSONException {
    JSONObject tokenizationSpecification = new JSONObject();
    tokenizationSpecification.put("type", "PAYMENT_GATEWAY");
    tokenizationSpecification.put(
            "parameters",
            new JSONObject()
                    .put("gateway", "example")
                    .put("gatewayMerchantId", "exampleGatewayMerchantId"));

    return tokenizationSpecification;
}

what do I replace example and gatewayMerchantId with for my payment to work?

Upvotes: 1

Views: 1958

Answers (1)

Jose L Ugia
Jose L Ugia

Reputation: 6260

Google Pay uses your preferred gateway (see supported processors as of today) to process the payment. To do that, you need to specify the identification details of the gateway. You can typically find these inside of your processor/gateway's online console. You can see an example of how that looks like in the TokenizationSpecification reference.

If you also need production access to Google Pay, you can do that using the following form. The team will get back to you as quickly as possible after you do that. Once you have production access, you'll be granted a merchant identifier that you can use to perform payments in your production environment. Note that this identifier is Google Pay specific only, and you need it in addition to your gateway merchant identifier.

Hope it helps.

Upvotes: 5

Related Questions