Oleg Sydorov
Oleg Sydorov

Reputation: 709

How to get EMV tag 9F19 Token Requestor ID?

I want to recognize the concrete NFC type - Apple, Google, Samsung Pay etc. is used in the EMV contactless transaction. Tag 0x9f6e helps me to differ phisycal card and NFC, but not exact payment system. There are a lot of information about tag 9F19 and its` values:

MasterCard:
50110030273 – APPLE_PAY
50120834693 – ANDROID_PAY
50139059239 – SAMSUNG_PAY

But I found nothing about how to get this tag 9F19. Is it EMV or ISO 7816 command? Or something esle? Please, help me. Or tell another way to get the information needed.

I try to find 9f19 using READ RECORD by all range but not succeeded:

for sfi = 1; sfi <= 31; sfi++ {

        for rec := 1; rec <= 16; rec++ {

            apdu.Write([]byte{0x00, 0xB2, byte(rec), (sfi << 3) | 4, 0x00})
            cmd = smartcard.CommandAPDU(apdu.Bytes())
            if !cmd.IsValid() {
                panic("not valid apdu")
            }
            response.RAPDU, err = card.TransmitAPDU(cmd)
            if err != nil {
                panic(err)
            }
            if response.RAPDU.SW() != 0x9000 {
                fmt.Println("No data for record", rec)
                apdu.Reset()
                continue
            }
            tlvTag, err = bertlv.Find(0x9f19, response.RAPDU.Data())
            if err != nil {
                apdu.Reset()
                continue
            }
            fmt.Println("9F19 answer found at record ", rec)
            response.printResult()
            break
        }
    }

Upvotes: 2

Views: 2906

Answers (1)

iso8583.info support
iso8583.info support

Reputation: 2270

Tag 0x9F19 Token Requestor ID returned in Read Record reply.

You need Select Application, then Send GPO command according contactless payment specification and hopefully receive Tag 0x94 Application File Locator (AFL) with list of Short File Identifiers (SFI).

Then you need to Read Records and parse reply TAGs.

Upvotes: 1

Related Questions