Skip to main content

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​

  1. 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.

    POST/couponsTry it
    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}"'
  2. Choose the security optionsBack office

    Turn on enableOneTimeUse so a coupon can only be used once. Depending on the fraud risk, add disableIOSPassSharing (no sharing from the iPhone), disableMultipleHolders (one phone per coupon) or enableRotatingBarcode (a barcode that changes and cannot be screenshotted).

  3. 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 on webhookUrl.

    POST/coupons/{id}/passes/sendTry it
    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"
    }'
  4. 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.

    POST/coupons/{id}/passes/sendTry it
    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%"
    }
    ]
    }'
  5. 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.

  6. 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.

    POST/passes/template/{templateId}/redeem/{barcode}Try it
    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>'
  7. 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.

    PATCH/coupons/{id}/passes/{instanceId}Try it
    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"
    }'
  8. 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​

ScenarioTriggerCalls
Welcome couponCustomer sign-upCoupon created with isWelcomeCoupon
Happy birthdayDaily cronPOST/coupons/{id}/passes/send
Trade fair or partner prospectsList importPOST/coupons/{id}/passes/send without clientId
Abandoned cartE-commerce eventPOST/coupons/{id}/passes/send with a value per customer
Offer extendedMarketing decisionPATCH/coupons/{id}/passes/bulk
End of campaignEnd date reachedPOST/coupons/{id}/passes/{instanceId}/expire
Reminder before expiry3 days beforePOST/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​

API news, once a month

New endpoints, upcoming changes, guides and use cases. No spam, one-click unsubscribe.

Report a technical problem

An API error, a pass that does not update, an email that does not arrive? Describe the problem: our technical team will answer.

For a fast answer, include:

  • The method and endpoint (e.g. POST /clients)
  • The error code returned (errorCode) and the body sent
  • The date and time of the call
  • The identifiers involved (customer, template, pass)

Never include an API token or a password.

AI assistant

Beta

Loading…

AI-generated answers (Claude): double-check important details.

Sign in to use the assistant