To effectively distribute wallet passes to your members display Add to Apple/Google Wallet buttons in multiple places. Here you can find the assets for Add to Apple Wallet and Add to Google Wallet.
Emails
- Wallet pass launch email
- Digital receipts
- Newsletters
- Campaigns
Web
- Signup flow
- My pages
- Receipt page
Signup flow
A great way to distribute passes is directly after
the member has signed up. You can automatically display a wallet pass for a member to add.
In-store
A great way to get members to download your pass is in-store. You can print QR-codes that takes a user to a page where they can get their pass.
Technical setup
We can provide the same functionality for other loyalty systems as well as long as there’s an API that supports the actions.
Get pass access links via API
Use the below endpoint to get direct links to the Apple/Google Wallet passes. This is meant to be used server-to-server and uses a secure API-key. This is the recommended method that gives you full control over the user experience and is the most secure.
| Endpoint | |
|---|---|
| URL | GET https://voyado-integration.washere.io/api/cards/{cardId}/contact/{contactId} |
| Auth header | Authorization: apikey {apiKey} |
| Response | JSON |
| Replace values | |
|---|---|
{apiKey} |
API-key you’ve been provided by WasHere. |
{cardId} |
Card id you’ve been provided by WasHere. |
{contactId} |
Voyado contact id of the member. |
Response
{
"appleWalletPassUrl": "https://...",
"googleWalletPassUrl": "https://...",
"expiredAt": "2024-03-16T12:14:57.347Z"
}
Desktop: Show a QR code
If the user is on desktop, display a QR code that links to their pass. The add-to-wallet flow on desktop is not intuitive; scanning a QR code lets users complete the flow on their phone in the native Apple/Google Wallet experience, reducing friction and improving conversion.
Diagram
Automatically open wallet pass
Below is an example in React, using NextJS, how to automatically show the card.
Example code
'use client';
import { useEffect } from 'react';
import { useRouter } from 'next/navigation';
type WalletUrls = {
apple?: string;
google?: string;
};
export default function RegistrationSuccess({ walletUrls }: { walletUrls: WalletUrls }) {
const router = useRouter();
function isIOS() {
return /iPhone|iPad|iPod/i.test(navigator.userAgent);
}
function isAndroid() {
return /Android/i.test(navigator.userAgent);
}
useEffect(() = {
if (walletUrls) {
if (isIOS() && walletUrls.apple) {
window.location.href = walletUrls.apple;
} else if (isAndroid() && walletUrls.google) {
window.location.href = walletUrls.google;
}
}
}, [walletUrls]);
return <><><>;
}
<>Automatically opens the Apple Wallet pass on iOS and Google Wallet on Android, otherwise do nothing.
Assets
Apple Wallet buttons
Google Wallet buttons
Apple Wallet guidelines and files
Click here to visit the Apple developer site.
Google Wallet guidelines and files
Click here to visit the Google developer site.
Article last reviewed
Comments
0 comments
Please sign in to leave a comment.