Apple Wallet and Google Wallet coupon API
A paper coupon gets lost, a promo code by email drowns in the inbox. A coupon in Apple Wallet or Google Wallet stays on the phone, shows up on the lock screen near your stores and is redeemed at the till with one scan. eldo wallet gives you an API to create your offers once, then send them to customers and prospects alike, each with their own value, code and expiry date.
Try this pass liveFill in the form, watch the pass and the code update, then get it on your phone.Customer journey
Integration workflow
- Create the coupon templateBack office
A coupon is a reusable template: name, description, value, promo code, expiry date, strip, colors and barcode format. Create one template per mechanic (welcome, birthday, sales, partner), not one per send. The body is
multipart/form-data: objects (colors,security) are sent as JSON strings.- curl
- SDK Node.js
- nodejs
- php
- python
- java
- csharp
- go
- ruby
- CURL
curl -L 'https://api-v2.test.eldowallet.fr/coupons' \
-H 'Accept: application/json' \
-H 'x-lang: en' \
-H 'Authorization: Bearer <token>' \
-F 'strip=@"weekend.png"' \
-F 'name="Weekend offer"' \
-F 'description="15% off storewide, Saturday and Sunday"' \
-F 'value="15%"' \
-F 'valueLabel="VALUE"' \
-F 'promoCode="WEEKEND15"' \
-F 'barcodeFormat="QR_CODE"' \
-F 'colors="{\"backgroundColor\":\"\#1f3b2d\",\"labelColor\":\"\#c8f15f\",\"foregroundColor\":\"\#ffffff\"}"' \
-F 'security="{\"enableOneTimeUse\":true}"' - Choose the security optionsBack office
Turn on
enableOneTimeUseso a coupon can only be used once. Depending on the fraud risk, adddisableIOSPassSharing(no sharing from the iPhone),disableMultipleHolders(one phone per coupon) orenableRotatingBarcode(a barcode that changes and cannot be screenshotted). - Send to your customersYour server
For a registered customer, pass their
clientId. Each recipient can have their own value, description, promo code, barcode or expiry date. Sending is asynchronous: track the operation by its ID, or get the result onwebhookUrl.- curl
- SDK Node.js
- nodejs
- php
- python
- java
- csharp
- go
- ruby
- CURL
curl -L 'https://api-v2.test.eldowallet.fr/coupons/$COUPON_ID/passes/send' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-lang: en' \
-H 'Authorization: Bearer <token>' \
-d '{
"clients": [
{
"clientId": "$CLIENT_ID"
},
{
"clientId": "$VIP_CLIENT_ID",
"value": "25%"
}
],
"webhookUrl": "https://crm.example.com/hooks/eldo"
}' - Or to prospectsYour server
No need to register the person first: without a
clientId, give first name, last name and email. Customers and prospects can be mixed in the same send. See Send to non-customers.- curl
- SDK Node.js
- nodejs
- php
- python
- java
- csharp
- go
- ruby
- CURL
curl -L 'https://api-v2.test.eldowallet.fr/coupons/$COUPON_ID/passes/send' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-lang: en' \
-H 'Authorization: Bearer <token>' \
--data-raw '{
"clients": [
{
"firstName": "Inès",
"lastName": "Roux",
"email": "ines@example.com",
"barcode": "WEEKEND-0001"
},
{
"firstName": "Paul",
"lastName": "Morel",
"email": "paul@example.com",
"barcode": "WEEKEND-0002",
"value": "20%"
}
]
}' - The customer adds the couponEnd customer
They open the link on their phone. iPhone: Apple Wallet. Android: Google Wallet. The coupon stays in the Wallet until it is used or expires.
- Redeem at the tillYour server
The till scans the barcode and redeems the coupon. A second scan is refused (
PASS_ALREADY_REDEEMED). Scanned by mistake? Undo the redemption. See Pass lifecycle.- curl
- SDK Node.js
- nodejs
- php
- python
- java
- csharp
- go
- ruby
- CURL
curl -L -X POST 'https://api-v2.test.eldowallet.fr/passes/template/$COUPON_ID/redeem/$BARCODE' \
-H 'Accept: application/json' \
-H 'x-lang: en' \
-H 'Authorization: Bearer <token>' - Change or extend an offerYour server
Change the value, promo code, description or expiry date of a coupon already sent: the customer's Wallet updates. For a whole campaign, use the bulk update. To stop an offer right away, expire the coupon.
- curl
- SDK Node.js
- nodejs
- php
- python
- java
- csharp
- go
- ruby
- CURL
curl -L -X PATCH 'https://api-v2.test.eldowallet.fr/coupons/$COUPON_ID/passes/$INSTANCE_ID' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-lang: en' \
-H 'Authorization: Bearer <token>' \
-d '{
"value": "20%",
"expirationDate": "2026-06-30T23:59:59.000Z"
}' - Remind and measureYour server
Remind customers of the offer a few days before it expires with a push notification. Track installs and redemptions per coupon, and list a customer's coupons for your support team.
Ready-made scenarios
| Scenario | Trigger | Calls |
|---|---|---|
| Welcome coupon | Customer sign-up | Coupon created with isWelcomeCoupon |
| Happy birthday | Daily cron | POST/coupons/{id}/passes/send |
| Trade fair or partner prospects | List import | POST/coupons/{id}/passes/send without clientId |
| Abandoned cart | E-commerce event | POST/coupons/{id}/passes/send with a value per customer |
| Offer extended | Marketing decision | PATCH/coupons/{id}/passes/bulk |
| End of campaign | End date reached | POST/coupons/{id}/passes/{instanceId}/expire |
| Reminder before expiry | 3 days before | POST/push-notifications |
Best practices
- One template per mechanic. Create "Birthday" once and send it every day. Don't create a new template for each campaign.
- One barcode per coupon when your till needs to know who used which voucher.
- Redeem at the till, at scan time. That is what prevents double use.
- Get consent. Sending a coupon to a prospect is still direct marketing: check the legal basis of your list.
- Test on both platforms. Apple Wallet and Google Wallet render differently. See Apple Wallet vs Google Wallet.
Learn more
- Templates and passes
- Send to non-customers
- Wallet pass barcodes
- Retail use case to combine coupons with a loyalty card
- Endpoints: POST
/couponsPOST/coupons/{id}/passes/sendPATCH/coupons/{id}/passes/{instanceId}POST/passes/template/{templateId}/redeem/{barcode}
