customer_id as member ID, and a QR or Code 128 that a POS
or kiosk resolves with Masivo. Each
customer has at most one card. The customer opens claim_url and adds it to Apple Wallet or
Google Wallet with no app install and no login.
Dashboard setup (credentials and the loyalty template) is in
Wallet pass credentials and
Loyalty cards.
Prerequisites
- SERVER API key and
x-account-id - An active loyalty template with a main reward
- Apple and/or Google credentials saved for the platforms you will use
- A registered customer
1. Issue the card
POST /customers/{id}/loyalty-wallet-passes
Example response:
ISSUED, repeat calls return the
same claim_url. After a revoke, the next call creates a new card with a new
link.
Send claim_url only to that customer (email, SMS, WhatsApp, or an in-app
button). It opens that customer’s card. claim_url detects the OS and opens
Apple Wallet on iPhone and Google Wallet on Android. Desktop sees both
buttons.
2. Read the card
GET /customers/{id}/loyalty-wallet-passes
404 when the customer has no card.
It never creates one. Use it to decide whether to show an
Add to Wallet button.
points_balance and tier_id are the values last sent to the phone. For the
live balance, read the customer.
3. Use the card at the POS or kiosk
The card QR holds a scan token (msv_lp_...), not the customer_id. It is
random, unique per card, and stops working when the card is revoked. Resolve
it with Masivo from the POS or kiosk backend, with its SERVER API key.
Identify the customer (earn points)
POST /loyalty-wallet-passes/scan
customer_id. No code is
sent. Use it for actions that only add value, like a purchase event. See
Send an event.
Confirm the owner (redeem, sign in)
Anyone can photograph a card, so confirm the owner before anything that spends balance or shows account data.1
Request the code
Call Masivo puts a one-minute code on the customer’s wallet card and does
not return it:While it is valid, the card shows the code in its OTP field (where the
card shows ”-” the rest of the time), and the QR itself carries the
code. When it expires, Masivo takes it off the card.
POST /auth/totp with the scanned
value as pass_token:2
Get the code
The customer reads the code from the card, or shows the card again and
you scan it: a QR of digits only is the code.
3
Verify it
Call
GET /auth/totp/verify?code=....
A match returns the customer and their wallet: redeem or start the
session.
Apple Wallet usually shows the code within seconds, and the lock screen
shows “Tu código es …”. Google Wallet shows it when the customer opens or
reopens the card. The push fallback goes to the merchant app through the
account Firebase project. It is a transactional message, so it does not need
marketing push consent. Its
data includes type: "MASIVO_TOTP" and the
code, so the app can fill it in.
4. Live updates
Masivo refreshes the card after anything that changes the points balance, another reward balance, or the customer tier:- Events that accumulate or redeem points
- Event reversals and coupon reversals
- Coupon redeems
- Tier upgrades and scheduled tier downgrades
claim_url.
5. Revoke
POST /loyalty-wallet-passes/{id}/revoke
claim_url stops working. Masivo also revokes the card when the customer is
deleted or merged into another customer.
Frequently asked questions
Can a customer have more than one loyalty card?
Can a customer have more than one loyalty card?
No. One card per customer. A second POST returns the existing card.
Which rewards does the card show?
Which rewards does the card show?
The template main reward shows next to the tier. Every other reward
with a balance in the customer wallet is listed by name, sorted A to Z.
Apple Wallet shows the first one next to the customer ID and all of them
on the back. Google Wallet shows up to 10 in the card details.
Google Wallet rejects the card
Google Wallet rejects the card
Loyalty cards need a logo or icon on the template. In Demo mode the Gmail
on the phone must also be a test account. See
Wallet pass credentials.
The balance on the phone is behind
The balance on the phone is behind
Wallet updates usually take a few seconds. If the phone is offline, it
updates when it reconnects.