Saturday, July 2, 2022
HomeSoftware DevelopmentIntroducing the Google Pockets API

Introducing the Google Pockets API



Posted by Petra Cross, Engineer, Google Pockets and Jose Ugia, Google Developer Relations Engineer

Google Pay API for Passes is now known as Google Pockets API

Previously referred to as Google Pay API for Passes, the Google Pockets API enables you to digitize all the pieces from boarding passes to loyalty applications, and interact your prospects with notifications and real-time updates.

New options in Google Pockets API

Assist for Generic Go Sort

The Google Pay API for Passes supported 7 sorts of passes: provides, loyalty playing cards, reward playing cards, occasion tickets, boarding passes, transit tickets and vaccine playing cards. However what if you wish to subject passes or playing cards that don’t match into any of those classes, corresponding to membership playing cards, or insurance coverage playing cards?

We’re thrilled to announce help for generic passes to the Google Pockets API so you may customise your go objects to adapt to your program traits. The choices are infinite. If it’s a card and has some textual content, a barcode or a QR code, it may be saved as a generic card.

You now have the flexibleness to manage the look and design of the cardboard itself, by offering a card template that may comprise as much as 3 rows with 1-3 fields per row. You can too configure plenty of attributes such because the barcode, QR code, or a hero picture. Try our documentation to study extra about how one can create generic passes.

Whereas generic passes can be utilized to imitate the looks of any current supported go kind (corresponding to a loyalty card), we advocate you to proceed to make use of specialised go sorts when out there. For instance, once you use the boarding go kind for boarding passes your customers obtain flight delay notifications.

Grouping passes and mixing go sorts

With the brand new Google Pockets API, you may also group passes to supply a greater expertise to your customers when a number of passes are wanted. For instance, you may group the entry ticket, a parking go, and meals vouchers for a live performance.

In your consumer’s checklist of passes, your customers see a go tile with a badge displaying the variety of objects within the group. After they faucet on this tile, a carousel with all passes seems, permitting them to simply swipe between all passes within the group.

Right here is an instance JSON Internet Token payload displaying one provide and one occasion ticket, combined collectively and sharing the identical groupingId. Later, if it’s essential add or take away passes to/from the group, you need to use the REST API to replace the grouping info.

{

  “iss”“OWNER_EMAIL_ADDRESS”,

  “aud”“google”,

  “typ”“savetowallet”,

  “iat”“UNIX_TIME”,

  “origins”: [],

  “payload”: {

    “offerObjects”: [

      {

        “classId”“YOUR_ISSUER_ID.OFFER_CLASS_ID”,

        “id”“YOUR_ISSUER_ID.OFFER_ID”,

        “groupingInfo”: {

          “groupingId”“groupId1”,

          “sortIndex”2

        }

      }

    ],

    “eventTicketObjects”: [

      {

        “classId”“YOUR_ISSUER_ID.EVENT_CLASS_ID”,

        “id”“YOUR_ISSUER_ID.EVENT_ID”,

        “groupingInfo”: {

          “groupingId”“groupId1”,

          “sortIndex”1

        }

      }

    ] 

  }

}

A observe about Google Pay API for Passes:

Though we’re introducing the Google Pockets API, all current developer integrations with the earlier Google Pay Passes API will proceed to work. When the Google Pockets app is launched in only a few weeks, be certain that to make use of the brand new “Add to Google Pockets” button within the up to date button tips.

We’re actually excited to construct an incredible digital pockets expertise with you, and may’t wait to see how you employ the Google Pockets API to boost your consumer expertise.

Be taught extra

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments