Use this page with AI
Copy this into your coding assistant and add your request.
Read https://openiap.dev/docs/apis/ios/get-transaction-jws-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 getTransactionJwsIOS
Get the transaction JWS for server-side validation (iOS 15+, macOS 14+).
Returns Transaction.jsonRepresentation (signed JWS) — pass to your backend for cryptographic validation. See the Apple StoreKit reference.
Signature
swift
func getTransactionJwsIOS(sku: String) async throws -> String?Parameters#
sku(required,string) — Product identifier.
Returns#
Promise<string | null> — Signed JWS for the latest transaction, or null.
Example
swift
let jws = try await OpenIapModule.shared.getTransactionJwsIOS(sku: "com.app.premium")Returns the StoreKit 2 JWS representation of the most recent verified transaction for the given product, or null when none exists. Compare with isTransactionVerifiedIOS for local-only checks, and getReceiptDataIOS for the legacy bundle-wide receipt. See Purchase for the parsed transaction shape.