Google are currently running an Android Pay promotion in the UK for the festive season. Every time you use Android Pay this month (December 2016), you get a chance of winning a prize [archive]. The first five times, you also get a coin. And five coins gives you a £3 Costa gift card.

This morning, I collected my fifth coin, and was informed I could claim a £3 Costa gift card. But, in order to do so, you must tap a button which opens a link. The link went to a URL in the form:<a-very-long-json-web-token>?omitSnackbar=true&

As an aside, the URL contained a long string which I recognised as a Base64-encoded JSON web token (JWT), and knew could easily be decoded. The decoded payload looked like this (numbers replaced with xxx):

  "aud": "google",
  "iat": xxx,
  "iss": "",
  "typ": "savetowallet",
  "payload": {
    "loyaltyObjects": [],
    "offerObjects": [],
    "giftCardObjects": [
        "barcode": {
          "alternateText": "xxx",
          "type": "qrcode",
          "value": "xxx"
        "cardNumber": "xxx",
        "classId": "xxx.CostaCoffee_GC_UK_Campaign",
        "id": "",
        "kind": "walletobjects#giftCardObject",
        "state": "active",
        "version": "1"
  "origins": [

(JWTs work because they are cryptographically signed, in this case using RS256.)

Returning to the main story, Android Pay tried to open the URL in Chrome, which greeted me with the following: DNS lookup failure

The DNS lookup for failed, and still does at present. This can be confirmed using nslookup, and it even fails when using the Google public DNS servers (so it wasn't related to the DNS server used initially):

X:\> nslookup

*** can't find Non-existent domain

It looked like my £3 gift card was on the verge of a descent into a deep abyss, but I had observed that the URL ended with another URL. I stripped off the part of the URL[1], opening the remaining part starting with, and to my relief a page inviting me to claim my £3 gift card appeared. In other words, was just some kind of redirect server which wasn't even needed.

An absurd situation, which many would struggle to get themselves out of by themselves. Peculiarly, I didn't find any other references to the problem from some quick searches online, so whether I'm the only one to encounter this problem I don't know.

Perhaps Elliot[1:1] has the answer? If you know how to contact him, feel free to send him a link to this post. (And let him know that I wish him a very happy Wobs.)

  1. The Elliot from in the JWT payload. ↩︎ ↩︎