Hi
When you download a coupon to apple wallet, apple wallet contacts our server and passes the deviceLibaryIdentifier and serialNumber in the URL and posts the pushToken as a variable and the Authorization Header in the Header.
See
Registering a Device to Receive Push Notifications for a Pass
This is great because when Apple Wallet is looking for a list of updated coupons it passes the deviceLibraryIdentifier in the URL so only coupons installed on that device are listed.
See
Getting the Serial Numbers for Passes Associated with a Device
The problem is when the same coupon is downloaded again the deviceLibaryIdentifier can change but instead of registering the change with our servers it simply requests a list of coupons using its new deviceLibraryIdentifier which does not exist in our database as we have never receive the update. The coupon then becomes orphaned never to be updated again and we still have the old details recorded in our database because we don't know the details have changed.
If we use a different serialNumber for every Coupon, the user ends up with duplicate coupons in their wallet.
Coupons are distributed through Facebook, Twitter, Email, Websites and Text so multiple downloads of the same coupon are likely.
Does anyone have a solution?
Thanks