iOS beginRefundRequestIOS

Initiate a refund request for a product. On iOS 15+, presents the StoreKit refund sheet. On macOS, opens Apple's Report a Problem site.

Wraps Transaction.beginRefundRequest(in:) — presents the refund-request sheet on iOS 15+. macOS has no equivalent window-scene sheet, so the implementation opens https://reportaproblem.apple.com in the default browser and returns immediately. See the Apple StoreKit reference.

Signature

swift
func beginRefundRequestIOS(sku: String) async throws -> String?

Parameters#

  • sku (required, string) — Product identifier to refund.

Returns#

Promise<string | null> — Refund request status string, or null for an unknown StoreKit result. The macOS browser fallback also returns null because the refund is completed outside the app.

Example

swift
let status = try await OpenIapModule.shared.beginRefundRequestIOS(sku: "com.app.premium")