DEV Community

Cover image for An NFC card at the register that opens your Instagram: the URL, iPhone vs Android, locking and the QR fallback
Pocket Factory
Pocket Factory

Posted on

An NFC card at the register that opens your Instagram: the URL, iPhone vs Android, locking and the QR fallback

I run Pocket Factory, which sells pre-programmed NFC cards, so I have a stake in this topic. Everything below works with a blank tag and a free app. You don't need to buy anything from me.

Here's a common question for a coffee counter: "Can I leave a card by the register that opens our Instagram when someone taps it?" Yes. But a few details decide whether the card works for every customer or only for some of them. This post covers those details: what to write to the tag, how iPhone and Android handle it, how much memory you need, when to lock the tag, where to put it, and how to test it.

If you've read my earlier post on writing a Google review link to an NFC tag, the chip side is the same. What's different here is the Instagram link and the coffee counter.

TL;DR

Decision Do this Why
Link format https://www.instagram.com/yourhandle/ as an NDEF URI record iPhone background reading and Android both handle https; Instagram opens the app if it's installed
Don't use instagram://user?username=... App-specific URL schemes aren't a reliable background-read target; customers without the app get nothing
Clean the link Remove ?igsh=... and ?utm_source=qr from the share link Shorter payload, and you're not passing your own share-tracking token around
Chip NTAG213 is enough; NTAG215 gives headroom A profile URL is about 40 bytes
Lock it? Yes, once it's tested A counter card is a public object; an unlocked tag can be rewritten by anyone with a phone
Fallback A printed QR code with the same URL Covers phones with NFC turned off and iPhones older than the XS
Placement In a holder near the register, not on top of the payment terminal or on bare metal Metal detunes the tag, and two NFC targets side by side confuse people

1. Get the right Instagram link

In the Instagram app, go to your profile, tap Share profile, and copy the link. You'll get something like this:

https://www.instagram.com/yourcafe?igsh=MWx0bTNh...&utm_source=qr
Enter fullscreen mode Exit fullscreen mode

Trim it to the canonical profile URL:

https://www.instagram.com/yourcafe/
Enter fullscreen mode Exit fullscreen mode

Three reasons to trim it:

  1. Size. The query string can double the payload.
  2. Behavior. The clean URL is what Instagram's app link handling expects. It opens the profile in the app when the app is installed and in the browser when it isn't.
  3. Hygiene. igsh is a share identifier tied to your share action. A card on a counter doesn't need it.

Open the trimmed URL on your own phone before you write anything. If it doesn't land on your profile, fix it now.

2. Write it as an https URI record, not an app scheme

It's tempting to write instagram://user?username=yourcafe so the tap "goes straight to the app." Don't.

  • On iPhone, background tag reading (the mode where you just hold the phone near the tag with no app open) is built around URL records. Apple's Core NFC background reading docs describe it working with universal links and a small set of system schemes. A random app scheme isn't something you can count on.
  • If a customer doesn't have Instagram installed, an app-specific scheme dead-ends. An https link opens the web profile instead.
  • An https link to instagram.com already opens the app on phones that have it, through universal links on iOS and app links on Android.

In NDEF terms you want a single URI record (TNF 0x01, type U) with prefix byte 0x04 (https://) followed by www.instagram.com/yourcafe/. Every mainstream writer app does this for you when you choose "URL" or "Link". In NFC Tools it's Write → Add a record → URL/URI.

One record only. Don't add a text record "for context" next to it. Some readers show a chooser or ignore the URL when there are several records, and that's the opposite of a one-tap experience.

3. NTAG213 vs NTAG215 vs NTAG216

Chip User memory Fits an Instagram profile URL?
NTAG213 144 bytes Yes, easily
NTAG215 504 bytes Yes, with lots of headroom
NTAG216 888 bytes Yes, but you're paying for memory you won't use

After the 0x04 prefix byte, www.instagram.com/yourcafe/ is around 27–40 bytes depending on the handle. The NDEF and TLV overhead adds a handful more. Any of the three works. Pick on price, availability and card format, not memory.

4. Lock it after you test it

A card on a café counter is a public object. If the tag is unlocked and has no password, anyone with a writer app can overwrite it with their own link. Most people never would. It only takes one.

Testing order:

  1. Write the URL.
  2. Test it on an iPhone and an Android phone (see the matrix below).
  3. Lock it. In NFC Tools this is Other → Lock tag.

Locking is permanent. You can't unlock it, and you can't change the link afterwards. If you ever change your handle, you replace the card. Treat that as a feature on a public counter.

5. Add the QR fallback

NFC covers most phones, but not every customer:

  • iPhone XS or newer reads tags in the background. Older iPhones need the NFC reader in Control Center, and most people don't know it's there.
  • On Android, NFC can be switched off in settings.
  • Some people just prefer the camera.

So print a QR code of the same trimmed URL on the card or holder. A few practical notes:

  • Make it at least about 2 cm (0.8 in) across for a counter-distance scan.
  • Use dark on light with a quiet zone around it. Don't put the code over your logo art.
  • Scan it from roughly where the customer will stand, not from 10 cm away.

The printed line under it can be as plain as "Tap or scan to follow."

6. Placement at a coffee counter

What I've seen work at counters:

  • Near the register, not on the payment terminal. A customer who's just tapped their card to pay shouldn't have to guess which thing to tap next. Keep a hand's width between the terminal and the follow card, and label the follow card clearly.
  • Not on bare metal. A tag lying flat on a stainless counter can read badly or not at all. Use an acrylic or wood holder, or a small stand, so there's a few millimetres of air or plastic underneath.
  • One card, one job. If you also want Google reviews or tips, use separate cards with separate labels: follow at the register, review at pickup, tip link on the jar. One tag can only open one URL, and that's a good thing.
  • Where people wait. The moment between paying and getting the drink is when people have a free hand and nothing to do.

A card or a stand? A stand reads from a step back and explains itself at a self-serve shelf. A card is flatter, cheaper, and fits next to a card reader on a crowded counter. Both run on the same chip and the same URL. I wrote a longer comparison of Instagram stands vs tap cards for coffee shops that includes other sellers.

7. Test matrix

Run this once before you lock the tag, and once after you place it in its holder:

Test Expected
iPhone XS or newer, screen on, Instagram installed Banner appears; tap opens your profile in the Instagram app
Same iPhone, Instagram not installed (or a friend's phone) Banner appears; opens instagram.com/yourcafe in Safari
Android with NFC on, Instagram installed Opens the profile in the app (or a chooser the first time)
Android with NFC off Nothing happens. This is why the QR code is there
QR scan from customer distance Opens the same profile
Phone in a thick case Still reads within about 1–2 cm; if not, move the tag up in the holder
Tag sitting in the holder on the actual counter Same result as on the desk. If not, check for metal underneath

8. If you'd rather not build it

The DIY route is a blank NTAG213 card, a free writer app and ten minutes. It's the cheapest option and works fine if you follow the steps above.

If you want your logo printed on the card, the link written and locked before it arrives, and the QR printed on the back, that's what my company does. Pocket Factory makes personalized NFC cards that open your Instagram, starting at $19 for one card with no subscription.

  • A printed QR backup is included by default.
  • No battery or charging is needed.
  • Cards work with iPhone XS or newer and NFC Android, with the QR backup for everything else.
  • Cards ship from the USA, locked.
  • Most standard orders are expected to be produced and shipped within approximately 3–5 business days; delays are possible.

Stand-style products from other sellers are a good fit if your counter has room and you want something readable from further away.


Questions about NDEF records, a phone that won't read a tag, or a counter that's eating your signal? Ask in the comments. I'll answer the technical ones whether or not you're a customer.

Top comments (0)