circle-exclamation
This documentation is currently under development. Certain sections are not yet complete and will be added shortly.

displayOn your website

Embed an “Add to Wallet” button on your website with The Wallet Crew cinto SDK (Apple/Google detection + desktop fallback).

Use The Wallet Crew cinto SDK to place an “Add to Wallet” button on any web page. Your customers can save a pass to Apple Wallet or Google Wallet directly from your site, without being sent to a separate app or flow.

The SDK detects the device and renders the right CTA automatically. On iOS it shows “Add to Apple Wallet”. On Android it shows “Add to Google Wallet”. On desktop it can fall back to a hosted page (or a QR code flow if you prefer).

chevron-rightReal-world exampleshashtag
  • A loyalty account page includes “Add to Wallet” next to the membership number.

  • A checkout confirmation page lets customers save their gift card instantly.

  • A “My tickets” page renders one button per event ticket, on mobile.

Embed “Add to Wallet” button in a web page.

UI Result

On iOS mobile device

On iOS mobile device

On Android mobile device

On Android mobile device

Otherwise

Otherwise

This button redirects the user to The Wallet Crew pass layout which looks like this :

UI Result

📌 It is possible to change this behavior and display the QRCode with a text in place of the button.

How to display the button ?

Through vanilla javascript

The third parameter may contains any option available for The Wallet Crew, to force a language use

Through npm module

Options

Concepts

Platform detection

When using the data-neostore-addToWalletButton data attribute, the component will automatically render the right button with the defined callback:

  • desktop: redirects to the pass page from The Wallet Crew

  • apple: displays the add to wallet call to action that downloads the pass

  • android: displays the add to google wallet that opens the google page

This can be overriden by using data-neostore-platform="desktop" ("desktop", "apple", or "google" options)

Language detection

The component is looking for the user browser's language and fallback to en either if the locale doesn't exist for the given platform or if the user language is not supported.

You can force the language by using data-neostore-language="fr"

Customization

The general layout is:

  • a div of your responsibility

    • a link, selector: .neostore-link

      • an image, selector .neostore-img and .neostore-link-{{ platform }} where platform is desktop, apple, android

The android and google buttons respects the google and apple design guidelines for this action. Apple guidelinearrow-up-right{target="_blank"} Google Guidelinearrow-up-right{target="_blank"}

You can still update some styles using css but remember that the link contains an image.

Advanced usage

desktop render customization

On desktop, the principal information is the url where you should redirect your users. You can update the way you render this link to display a QR Code for example using the following snippet

using external identifiers with hmac

You can retrieve the passId parameters through The Wallet Crew API. It is also possible to use the externalIdentifiers and the hmac_sha256 value of the identifiers.

hmac_sha256 should be computed with one of The Wallet Crew secret.

For example, for a customerId of SC103010 and a secret of I1M8emrrJSns4Hnuibbm45eWfLQMosPGKSp1JzKsCrXeWmhjE8lZhxC2tfSRX5IJ the hmac value should be 8c5a9ebdd9b4ac8d2307cc34192f0faed441ef724c043162f0618784173d4d93

CyberChefarrow-up-right

Exemple of hmac computing

using data-attribute

Attributes are interpreted as lower case string by the browser. To include uppercase character prefix the character with the underscore sign : y2.customer_Id will be interpreted as y2.customerId

using component

How to add analytics information ?

It is possible to specify 3 installation information that will be available in the Pass:Installed event used by the dashboard and the insights API.

  • tags : an array of string used to determine the source of this download - the utm_source and utm_campaign will automatically concatenated to the tags

  • medium: a string used to determine the medium of this download. It could be anything for example ecomm or mobileapp, etc.

  • origin: by default the url (without search parameter) of the page where the add to wallet button is used. it is possible to overrides this value

these value can be specified like this

all parameters are optional

How to get passId information ?

When the pass already exists

When the pass already exists
  1. Get an API Key on The Wallet Crew back-office :

    1. https://admin.thewalletcrew.io/tenant/~/apiKeys

    2. API Key should have the tenant.pass:read permission

When the pass already exists (2)
  1. Call the /passes API

    https://app.neostore.cloud/api/{tenantId}/passes?filter=filter[0].field=y2.customerId&filter[0].operator=equals&filter[0].value=04101234

    **curl -X 'GET' \ 'https://app.neostore.cloud/api/{tenantId}/passes?filter%5B0%5D.field%3Dy2.customerId%26filter%5B0%5D.operator%3Dequals%26filter%5B0%5D.value%**04101234**\ -H 'accept: text/plain' \ -H 'X-API-KEY: {apiKey}'**

    Result will be something like:

When the pass doesn’t exists

Third party integration

Shopify

use this liquid placeholder to display the add to wallet button :

React integration

It is possible to encapsulate the button within React using this component. You can adjust your component based on your needs :

Last updated