Voyado Engage

Server-to-server distribution

Email

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

The below is an example when using Voyado.
We can provide the same functionality for other loyalty systems as well as long as there’s an API that supports the actions.

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

server-to-server_wallet_distribution.webp

Automatically open wallet pass

The user experience differs between Apple Wallet and Google Wallet regarding the flow after adding a pass. On iOS, after adding a pass via Apple Wallet, the user is returned to the webpage. In contrast, with Google Wallet, the user remains within the Google Wallet app or web interface.

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

US-UK_Add_to_Apple_Wallet_RGB_101421.webp
SE_Add_to_Apple_Wallet_RGB_102021.webp

Google Wallet buttons

se_add_to_google_wallet_add-wallet-badge.webp
enUS_add_to_google_wallet_add-wallet-badge.webp

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

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.