[IAPKit][FR] Read-only order lookup by Apple or Google order ID #284
|
Hi @hyochan, Would it be possible to add a read-only order lookup to IAPKit using the store credentials and app identifiers already configured for verification? Workflow
AppleUse the App Store Server API: GET https://api.storekit.apple.com/inApps/v1/lookup/{orderId}The JWT can be generated using the existing Apple credentials and Bundle ID. Decode the payloads from
Apple Order Lookup should be described as supporting real App Store orders, not sandbox order numbers. Optional Apple subscription statusIf an GET https://api.storekit.apple.com/inApps/v1/subscriptions/{originalTransactionId}Display:
Failure of this optional request should not invalidate a successful order lookup. Google PlayUse the Google Play Developer API: GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/orders/{orderId}Display available fields such as:
The Purchase Token should be masked by default, with separate Show and Copy actions. Optional Google subscription statusFor subscription orders with a Purchase Token, additionally request: GET https://androidpublisher.googleapis.com/androidpublisher/v3/applications/{packageName}/purchases/subscriptionsv2/tokens/{purchaseToken}Display:
Failure of this optional request should not invalidate a successful order lookup. Result presentationSuggested sections:
Suggested status colors:
Known Apple and Google status values should be translated into readable labels while also showing their original raw values. Technical data and securityThe original API responses could be available in a collapsed technical section after sensitive values have been removed or masked. For Apple transactions, the technical section could state:
It should not claim that full certificate-chain verification was performed unless this is actually implemented. The feature should remain strictly read-only:
|
Replies: 1 comment 1 reply
|
Shipped — order lookup is live in the dashboard now (#285). Thanks for the thorough write-up; the spec was detailed enough to implement almost as-is. Where: project dashboard → Orders. Pick App Store or Google Play, paste the order ID, look it up. What you get, in the sections you suggested: summary (product, type, state, environment, dates, price), transaction identifiers, payment & subscription status, and a collapsible raw payload. Status colors follow your green / yellow / red / blue convention, and the Google purchase token is masked by default with separate Show and Copy actions. Both optional status fetches are implemented and, as you asked, a failure there never invalidates the order result — the reason is shown next to the order instead:
Credentials: it reuses what the project already has configured for verification, so there is usually nothing new to set up. Two caveats worth knowing:
Privacy: lookups are proxied live to the store APIs. Nothing is persisted — IAPKit keeps no record of searched order IDs or their results. Docs: https://openiap.dev/docs/kit-backend#order-lookup One note on Apple subscription status: when a customer holds several subscriptions, the status is matched to the looked-up order by its |
Shipped — order lookup is live in the dashboard now (#285). Thanks for the thorough write-up; the spec was detailed enough to implement almost as-is.
Where: project dashboard → Orders. Pick App Store or Google Play, paste the order ID, look it up.
What you get, in the sections you suggested: summary (product, type, state, environment, dates, price), transaction identifiers, payment & subscription status, and a collapsible raw payload. Status colors follow your green / yellow / red / blue convention, and the Google purchase token is masked by default with separate Show and Copy actions.
Both optional status fetches are implemented and, as you asked, a failure there never invalidates the or…