Thanks! So in our app there are plenty of digital items thats why we use Advanced Commerce API. I'm asking if Apple validates duplicated pending requests by their SKU to determine architecture for payments. The flow that is under the question is so:
User try to make payment and for some reason payment falling into pending state
On that pending state I send to our BE info that this item for that user is in pending status
BE marks such item for user as pending and will not allow user to try to purchase that item, while it in pending status (not to make several payment requests, so Apple will not charge user several times for single digital item)
BE & iOS app waits for succeed info (app waits Transaction.updates, BE for server notificatio)
On succeed notification BE unlocks digital item for user and purchase finished (from app side via .finish() method).
The problem is how we know that for some reason Apple converted pending purchase request to failed or even erased at all. In case when pending purchase changed to failed or removed by Apple -> BE and app has no notify for that-> BE still keep digital item as pending so user will not have ability to try to initiated purchase once more.
So main problems:
Best approach to save user from multiple charges for single digital item
If we must monitoring and preventing duplicated payment requests from our side how to know that pending purchase request is killed by Apple or converted to failure?