Facebook wants to prove it drives brick-and-mortar foot traffic with its latest feature test. TechCrunch has discovered a previously unreported Facebook feature where users can scan a personalized QR code to score discounts or bonuses when they buy something in-person at certain shops. Some users see the Rewards feature listed in the More tab of their Facebook mobile app.

When asked, Facebook told us it has been running the test over the past few months, and provided this statement: “To help businesses continue to connect with customers where they are, we’re running a small test that enables people to use the Facebook app to collect and redeem rewards when they make a purchase at a participating store.”

Facebook Rewards could benefit users, merchants and the social network. People could earn free discounts just for being Facebook users. Merchants could lure people to their stores, earning a higher margin than the Rewards they give while fostering repeat customers and word-of-mouth promotion. Facebook could become more appealing to users while earning ad revenue from businesses looking to promote their Rewards giveaways via ads. The feature could also give Facebook more data on who buys what where, which it can use to improve the relevance of ad targeting and News Feed content.

Snap Inc. has been pushing its own way to drive people to brick-and-mortar stores and track their visits. Brands can buy Sponsored Geofilters ads that let Snapchat users overlay special graphics related to a business over their photos and videos when they’re nearby. Snap then shares this info with the business through its “Snap to Store” program.

Facebook has been toying with in-store discounts since 2012 when it launched Offers. It revamped the feature last year, and now Offers can be redeemed both online and offline. They use a special barcode and promo code that’s either scanned at the shop or entered in the online checkout flow. Facebook once said that viral sharing of Offers was a big hit.

Meanwhile, Facebook has been working on a wide variety of ways to “close the loop,” proving how its online ads lead to offline purchases. Facebook works with data providers like Datalogix, Epsilon, Acxiom and BlueKai to index people’s offline purchases. It also has forged partnerships with point of sale software systems Square and Marketo to track which ads lead to purchases, or even just to store visits by matching GPS, Wi-Fi, radio signals, cell towers and beacons with a store’s location coordinates.

Rewards seems more positioned as a loyalty program. Instead of the offer having a code to scan, Rewards assigns the user a single personal QR code they can scan everywhere. People could potentially scan their code every time they come to a shop, like building up stamps for a free sandwich on a loyalty program card.

Because Facebook Rewards lives in your phone in an app everyone already has rather than a loseable card or a new app you must download, it could compete with Belly, LevelUp, Punchcard and other apps. We’ll see if Facebook gets good enough results from this test to more widely roll-out and promote Rewards. But it’s another unsettling moment where loyalty startups might suddenly find themselves in the path of the big blue steamroller.