Reputation: 23
A user claims that he bought a in-app and sends me a Order ID from Apple receipt email that looks like MKQHK4Y9LF. In our database there are only Transaction IDs collected from reseipt verification prosses that looks like 1000000566193414. How to check whether the in-app were purchased having only the Order ID from the user's Apple receipt email?
Upvotes: 2
Views: 1395
Reputation: 41
Apple now has api to get order detail from order id in receipt email.
Api document: https://developer.apple.com/documentation/appstoreserverapi/look_up_order_id/
Endpoint: https://api.storekit.itunes.apple.com/inApps/v1/lookup/{orderId}. {orderId} is the Order ID from Apple receipt email.
Here is sample output after verfify and decode response from above api:
{"transactionId":"590001341267***","originalTransactionId":"590001341267***","bundleId":"[my bundle id]","productId":"***.item1","purchaseDate":1694069947000,"originalPurchaseDate":1694069947000,"quantity":1,"type":"Consumable","inAppOwnershipType":"PURCHASED","signedDate":1726583845040,"environment":"Production","transactionReason":"PURCHASE","storefront":"VNM","storefrontId":"143471","price":49000000,"currency":"VND"}
transactionId/originalTransactionId is Transaction IDs that you collected from receipt verification proccess.
Upvotes: 0
Reputation: 470
Trust me there are no ways to link the data you have stored in your DB against email data (MKQHK4Y9LF) you received from User.
Using verify purchase you get original txn Id and other details but not the Id sent in Email. Apple considers that a PI.
The only way to get to know that is the userID, with each txn(subscription) you must be(should be) storing user id (emailID).
There should be a mapping of userID (email, guid etc) and original_transaction_id
Upvotes: 0