Tools for Payment Device Integration: Parsomatic

Integrating a payment peripheral into a POS app (or other payment app) can be challenging, even under the best of circumstances. It helps to have good documentation. It helps even more to have good tools.

ID TECH offers a number of free tools to make the integration process easier. One of our most popular tools, Parsomatic, is hosted on this site (go here). Another tool that gets heavy use not only by customers but by ID TECH’s internal support staff is our Encrypt/Decrypt Tool (go here). We also have a Windows-based (.NET) utility, which works with all current-production (and some older) ID TECH products, that we call UDemo (or the Universal SDK Demo). It’s available, with many other demos and utilities, on our downloads page.

If you’re starting to do an integration, or you’re new to EMV and need a quick tag-lookup utility that can also parse arbitrary blocks of TLV data, you’ll want to take a look at Parsomatic.

A screen capture of the Parsomatic tool by ID TECH

Parsomatic (click to enlarge)

Parsomatic is one of ID TECH’s most popular tools. It’s a self-contained HTML page (no external dependencies, no server logic) that you can use in any web browser, on any platform, online or off-. You would typically use it in one of three scenarios.

  1. If you’re wondering what a particular EMV tag does, use the small tag lookup text-entry field at the top of the page to do a quick lookup. In the screen shot above, we’ve entered ‘5F20’, which turns out to be Cardholder Name. This is a standard EMVCo-defined industry tag. But you can use Parsomatic to look up ID TECH proprietary tags as well, of which there are over 100.
  2. If you have a block of hex data containing TLV (tag-length-value) data, you can paste the data into the main data text-area, then check the “TLVs only” checkbox (as shown above; look closely); then click the Parse button . Parsomatic has a recursive descent parser that will parse all TLVs, including nested TLVs, and report the results in two different ways (see below).
  3. If you have executed a transaction on an ID TECH device (whether magstripe, contact EMV, or contactless), the device will output a sizable block of data, wrapped in a protocol wrapper. Parsomatic can parse that data and display it graphically, in a way that lets you see exactly what each byte means.

After parsing data, Parsomatic displays it in two ways. The first section of the display shows multiple lines of hex data in color-coded text, with TLV tags in blue, length values in orange, data in black, and anything that couldn’t be parsed in red. If you hover over any of the color-coded items, you can see a CSS-stylized tooltip explaining what you’re looking at. In the screen shot above, the cursor is hovering over a TLV tag, 5F2A. The tooltip shows that this is the Transaction Currency Code. (In the data shown above, the code is 0840, which is the code for U.S. dollars.)

The second way Parsomatic displays data is in a large table:

The text is (again) color-coded, with tag names in blue, lengths in orange, etc.

If you’ve pasted transaction data into the window, and the data is EMV (tag) data, and if that data contains Tag 95, all the bit flags in Tag 95 will be shown at the bottom of the page:

Note that Tag 95 contains five bytes of data; only the first three are shown in the example above.

In chip-card transactions, Tag 95 is important in determining whether a transaction will be approved, or declined. Some of the possible reasons for a decline are shown in the screen-grab. In this example, the top bit of byte 3 is turned on, indicating “Cardholder verification was not successful,” and also bit 5 is turned on, indicating “PIN entry required and PIN pad not present or not working.” Parsomatic automatically highlights any turned-on bits in yellow, so you can see at a glance what’s going on.

Parsomatic’s logic is pure JavaScript, and all the code is in the HTML file, so you can easily browse the source code with any editor. Note that the code’s parser is designed to be failsoft, meaning that any bytes that can’t be interpreted will simply be ignored (but painted on the screen in red), rather than causing parsing to abort with an exception. The parser will attempt to ignore unknown bytes and continue parsing, on the theory that you may well want to know what the rest of your data means even if some of it didn’t parse correctly.

Parsomatic is a great learning tool if you’re just getting started using ID TECH products or doing EMV payment apps. It’s also a useful troubleshooting tool. (And it’s free! What’s not to like?)

Got questions about payment technology? Give our experts a call: Dial 1-800-984-1010 any time.

Related Articles