Pass functionality

The Gift to Wallet API uses API Keys for authentication that are tied to a specific user account.
Restrictions to your user account also apply to the API key which means that if you have only access to certain templates, you’ll obviously only see these templates, even if your Customer account contains more. The API Key needs to be passed in the Authorization HTTP Header (see below for details).

General concept

Pass functionality defines what a pass actually does if it is used. You can set up the following by adding a pass functionality to your template:
  • Loyalty program (collecting points for each purchase)
  • Stamp card (collect stamps)
  • Stamp card (initial value of stamps that can be used until no stamps are left)
  • Valid once per day
  • Prepaid cards
In general you can think of the concept as follows:
  • a template defines how a pass looks
  • a pass functionality defines what the pass can be used for

Using a pass

When a pass is used by a user, gifttowallet’s backend systems need to know about that. The easiest way to ensure that is to use the Smart Scan App. It can be used right away and the actions defined by your pass functionality will be triggered automatically.

If you want to integrate your existing system (e.g. a CRM or a Point of Sale/POS system), you can leverage the gifttowallet API and create so called App Scans. An App Scan is the representation of a pass usage in gifttowallet.

Creating passes that use the functionality

Obviously before you can start scanning passes, your users need to be able to save them on their phones and gifttowallet has various options that will fit your needs to do that:

Add a functionality to a template

In order to add a functionality to a template, go to the detail view of a template. You’ll see a section that allows you to add a functionality. Click on “Add functionality”

On the next screen, select one of the available functionalities.

You’ll now be presented with the default values that have been set based on the type of functionality you’ve chosen. They will work right out of the box but you can make changes as needed.

After you’ve saved your settings, you’ll be redirected back to the detail view of your template and see an overview of the newly added functionality.

You’ll notice two things:

  • if there was no field on your template that displays the value of a pass, the system has added one automatically.
    The following placeholders are available for pass functionalities:
    • {storedValue} – displays the value of a pass
    • {functionality.initialValue} – the initial value you have defined
    • {functionality.maximumValue} – the maximum value a card can have
    • {functionality.minimumValue} – the minimum value a card can have

This means that you can display the current number of stamps of a stamp card by inserting {storedValue} of {functionality.maximumValue}. If the value is 3 and the maximum value is 10, you’ll see “3 of 10” on the pass.

  • An app configuration for the gifttowallet Smart Scan App has been created (or an existing one is displayed if there was one) alongside a configuration link and a configuration QR code.
    You can use this link or QR code to download and configure the app and scan passes right away.

Validation of prepaid cards

For prepaid cards the Smart Scan App will ask for the price that the user wants to purchase items for. The system will automatically deduct the price from the amount on the card. The app shows you the amount that is left on the pass directly after scanning it.