JeriCommerce lets you generate tokens to create two types of links for your customers: download links for their wallet pass (Apple Wallet / Google Wallet) and session links to log them directly into the Customer App.
These links are perfect for sending via email campaigns, SMS messages, or embedding in your own website or app.
What You Need ¶
-
Your API Key, from Settings > Technical > API Keys. See Authentication through the API.
-
Your program slug or program ID, from Settings > Technical > Program Information.
-
The customer's email address
How It Works ¶
-
Call the endpoint below with the customer's email and the type of token you need.
-
The API returns an
accessToken. -
Encode the token in Base64 and build the URL using the formats below.
Endpoint ¶
GET https://api.jericommerce.com/v1/programs/{program_slug}/customers/token?email={customerEmail}&token_type=download&expires_in=7d
| Parameter | Required | Notes |
|---|---|---|
email |
Yes | The customer's email address, URL encoded. |
token_type |
Yes | download for a loyalty card download link, or auth for a Customer App session link. |
expires_in |
No | How long the token is valid, in seconds or as a time span such as 10h, 2 days, or 7d. |
If you don't send expires_in, the token doesn't expire. Anyone with the link can use it for as long as it exists, so always set an expiration that fits how you share the link.
A successful request returns 200:
{
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Wallet Pass Download Links ¶
To generate a link where the customer can download their loyalty card, request a token with token_type=download and build the URL:
https://jeri.link/{program-slug}/download?token={base64Token} When the customer opens this link, they will see a page to choose between Apple Wallet and Google Wallet.
JeriCommerce already syncs this download URL automatically through integrations. If you use Shopify or Klaviyo, you may not need to generate this link manually. See Synchronize the download URL Loyalty card with Shopify profiles, Sync Custom Fields with Shopify, and Sync Custom Fields with Klaviyo for details.
Customer App Session Links ¶
To generate a link that logs the customer directly into a specific section of the Customer App, request a token with token_type=auth and build the URL with a redirectTo path:
https://jeri.link/{program-slug}/{base64Token}?redirectTo={path}
The customer must already have a loyalty card for this token type.
Available Sections ¶
| Path | Where it goes |
|---|---|
profile |
Customer profile |
loyalty/rewards |
Available rewards |
loyalty/earning-flows |
Ways to earn points |
referrals |
Referral program |
coupons |
Customer coupons |
transactions |
Transaction history |
For example, use the loyalty/rewards path to send customers directly to their rewards page from a promotional email. |
URL Formats at a Glance ¶
| Link type | URL format |
|---|---|
| Download | https://jeri.link/{slug}/download?token={base64Token} |
| Session | https://jeri.link/{slug}/{base64Token}?redirectTo={path} |
Errors ¶
| Code | Status | Meaning |
|---|---|---|
CUSTOMER_NOT_REGISTERED |
400 |
No customer with that email exists in the program. |
CUSTOMER_HAS_NO_USER_DATA |
412 |
The customer has no profile data yet. Create it with the customer endpoint. |
CUSTOMER_HAS_NO_PASSES_FOR_THIS_PROGRAM |
412 |
auth only. The customer doesn't have a loyalty card yet. |