Configure Smart Tap with API

This page describes how to use an API to configure Smart Tap.

Create a redemption issuer account for Smart Tap

To make a redemption issuer account, perform the following three tasks:

  1. Make an issuer account.
  2. Assign public key(s) and key version(s).
  3. Get the auto-generated collector ID.

Make an issuer account

To create issuer accounts with the API, see Create issuer accounts programmatically.

To make an issuer account manually, Apply for Google Pay API for Passes access.

Assign public key(s) and key version(s)

The public key and its key version are provided to you by the terminal provider.

To assign public keys and key versions, use an authorized service account key to make a REST call to the following endpoint:

PATCH https://www.googleapis.com/walletobjects/v1/issuer/<issuerid>

Include the following in the body of the REST call:

{
  "smartTapMerchantData": {
    "authenticationKeys": [{
        "id": 1,
        "publicKeyPem": "<my_public_key>"
      },
      {
        "id": 2,
        "publicKeyPem": "..."
      }
    ]
  }
}

The response includes the body you sent and an extra field, smartTapMerchantData.smartTapMerchantId. This is the collector ID of the redemption issuer account. Provide the collector ID and other information to the terminal provider and merchant to Enable a merchant for Smart Tap.

For more information on how to use the issuer endpoint, see the API reference.

Get the auto-generated collector ID

There's another way to view the collector ID. Use an authorized service account key to make a REST call to the following endpoint:

GET https://www.googleapis.com/walletobjects/v1/issuer/<issuerid>

The response includes the field, smartTapMerchantData.smartTapMerchantId. This is the collector ID of the redemption issuer account. Provide the collector ID and other information to the terminal provider and merchant to Enable a merchant for Smart Tap.

For more information on how to use the issuer endpoint, see the API reference.

Enable a Pass for Smart Tap redemption

To configure classes and objects so that Passes can be redeemed with Smart Tap, follow the instructions in this section.

If the values below and the redemption issuer account are set up correctly, the Pass shows a near field communication (NFC) icon on Google Pay. Only merchants that set up Smart Tap capable terminals can redeem Passes with the NFC icon.

Configure class

To configure a class so that its objects are NFC-enabled, make a patch request and set the following values:

  class.enableSmartTap = true
  class.redemptionIssuers[] = ["issuer_id_1",... ,"issuer_id_n"]

Once you set the class properties above, all objects under this class are NFC-enabled. To see a NFC icon, you must configure the object for Smart Tap, and set up the redemption issuers. To determine the redemption issuers, see Determine the redemption issuer account.

Configure object

To configure an object so that it's NFC-enabled, configure the class for Smart Tap. Then, set the following value that's conveyed from your Pass to the terminal:

  object.smartTapRedemptionValue = "string value to be conveyed over NFC"

This value is transmitted when the NFC is tapped. See Value transmitted from the Pass for more details.