Monday, May 30, 2022
HomeWordPress 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 referred to as Google Pockets API

Previously referred to as Google Pay API for Passes, the Google Pockets API helps you to digitize the whole lot from boarding passes to loyalty applications, and have interaction your clients with notifications and real-time updates.

New options in Google Pockets API

Assist for Generic Move Sort

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

We’re thrilled to announce assist for generic passes to the Google Pockets API so you’ll be able to customise your move objects to adapt to your program traits. The choices are countless. 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 pliability to manage the look and design of the cardboard itself, by offering a card template that may include 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 tips on how to create generic passes.

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

Grouping passes and mixing move sorts

With the brand new Google Pockets API, you too can group passes to supply a greater expertise to your customers when a number of passes are wanted. For instance, you’ll be able to group the entry ticket, a parking move, and meals vouchers for a live performance.

In your consumer’s checklist of passes, your customers see a move tile with a badge displaying the variety of objects within the group. Once 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 Net Token payload displaying one provide and one occasion ticket, combined collectively and sharing the identical groupingId. Later, if you should add or take away passes to/from the group, you should use the REST API to replace the grouping data.

{

  “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 present developer integrations with the earlier Google Pay Passes API will proceed to work. When the Google Pockets app is launched in just some weeks, be sure that to make use of the brand new “Add to Google Pockets” button within the up to date button pointers.

We’re actually excited to construct a terrific digital pockets expertise with you, and might’t wait to see how you employ the Google Pockets API to reinforce your consumer expertise.

Be taught extra

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments