Use this page with AI

Copy this into your coding assistant and add your request.

Read https://openiap.dev/docs/apis/ios/begin-refund-request-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]
See an example request →

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")