Use this page with AI
Copy this into your coding assistant and add your request.
Read https://openiap.dev/docs/apis/ios/get-pending-transactions-ios and https://openiap.dev/llms.txt. Follow the reading instructions, detailed reference, and linked guides relevant to my task before making changes.
Inspect my existing project and reuse its framework and conventions. Ask me for missing product decisions. Implement the requested behavior and run the applicable checks.
Show the working result, the commands and actual test results, and any remaining limitations. Keep your explanation brief.
My request: [describe what customers should be able to do]iOS getPendingTransactionsIOS
Retrieve all pending transactions in the StoreKit queue.
Iterates Transaction.unfinished to surface transactions still awaiting finish(). See the Apple StoreKit reference.
Swift, Flutter, and Godot also run this query on macOS. Match the returned transaction ID, product, store identity, and known environment to the receipt being handled. Revoked or upgraded receipts alone do not establish current access.
A past expiration date is not a final no-access verdict. Call subscriptionStatusIOS with the receipt's product ID and inspect every returned subscription-group status, not just the first. This API omits transaction identity, so match the receipt separately as described above.
Preserve verified subscription-group access when any current status is subscribed or inGracePeriod; gracePeriodExpirationDate marks the end of billing grace. Do not rely on getActiveSubscriptions alone: its expiration-based isActive can be false during grace. Record no access only when the read succeeds with at least one status, every status is expired, revoked or inBillingRetryPeriod, and every entry has verified renewalInfo. Empty or failed reads, unknown states and missing or unverified renewal information are unresolved: leave the receipt unfinished. A failure alone neither grants nor revokes access.
Once a trusted matching receipt is confirmed inactive and that decision is recorded, finish it explicitly to stop replaying it. A failed verification or status check alone is never a reason to finish a purchase.
Signature
func getPendingTransactionsIOS() async throws -> [PurchaseIOS]Returns#
Promise<PurchaseIOS[]> — array of StoreKit transactions in the iOS-specific shape. See Purchase for the full field reference.
Example
let txs = try await OpenIapModule.shared.getPendingTransactionsIOS()