Wallet pass lifecycle
A pass goes through a few simple states. Knowing them avoids two classic mistakes: chasing a customer who already has the card, and accepting the same coupon twice.
The states
| State | What happened | How to know |
|---|---|---|
| Sent | eldo wallet created the pass and its link. The email or SMS went out if you asked for it. | Response of the create call |
| Installed | The customer added the pass to Apple Wallet or Google Wallet. Their device now gets updates. | pass.installed webhook, status filter on GET/clients |
| Uninstalled | The customer removed the pass from their phone. | pass.uninstalled webhook |
| Redeemed | The pass was scanned and validated. | POST/passes/template/{templateId}/redeem/{barcode} |
| Expired | The expiry date has passed. The pass stays in the Wallet, marked as expired. | Pass expiry date |
Webhooks are set at wallet level. See Webhooks.
Nudge inactive customers
A customer got their card but never installed it? POST/clients/reminder-inactive reminds every inactive customer (all) or a given list (specific).
Redeem and unredeem
At scan time, your till or access control calls POST/passes/template/{templateId}/redeem/{barcode} with the template id and the scanned barcode.
The pass becomes "redeemed". A second scan of the same pass is rejected with PASS_ALREADY_REDEEMED.
Cashier made a mistake? Cancel with POST/passes/template/{templateId}/unredeem/{barcode}. On a pass that was never redeemed, the API returns PASS_NOT_REDEEMED.
- curl
- SDK Node.js
- nodejs
- php
- python
- java
- csharp
- go
- ruby
- CURL
curl -L -X POST 'https://api-v2.test.eldowallet.fr/passes/template/$TEMPLATE_ID/redeem/$BARCODE' \
-H 'Accept: application/json' \
-H 'x-lang: en' \
-H 'Authorization: Bearer <token>'
Let eldo wallet validate the pass, not just your till. The status updates in the customer’s Wallet and in your stats.
Set a status directly
| Pass | Endpoint | Statuses |
|---|---|---|
| Coupon | PUT/coupons/{id}/passes/{instanceId}/status | UNUSED, USED, EXPIRED |
| Coupon (expire now) | POST/coupons/{id}/passes/{instanceId}/expire | |
| Transit | PUT/transits/{transitId}/passes/{barcode}/status | UNUSED, USED |
| Event | PUT/events/{id}/passes/{barcode}/status |
Expiry
- Loyalty card:
validityblock on PATCH/store-cards.expirationTypeisNO_EXPIRATION,AT_DATETIME(fixed date) orAFTER_PERIOD(a duration after creation, in years, months or weeks). - Coupon:
expirationDateon the template, overridable per customer when sending. - Transit:
expirationDateon the pass, or for a whole trip with PATCH/transits/{transitId}/passes/trip/{tripNumber}.
Once expired, the pass stays greyed out in the customer’s Wallet as a receipt.
The status filter on GET/clients accepts active, inactive, deleted, canceled and expired.