ExternalPurchaseCustomLink.token(for:) returns nil when isEligible is true

Environment

  • iOS 18.1+
  • StoreKit External Purchase Link Entitlement (EU)
  • App distributed via App Store in France

Problem Summary

I'm implementing external purchase links for EU users using ExternalPurchaseCustomLink. While the implementation works correctly in my TestFlight testing, some production users experience token(for:) returning nil.

Implementation

Following Apple's documentation, my flow is:

  1. Check eligibility using ExternalPurchaseCustomLink.isEligible
  2. If eligible, call ExternalPurchaseCustomLink.token(for: "ACQUISITION")
  3. Store the token for use in the external purchase flow
// Simplified implementation
guard #available(iOS 18.1, *) else { return }

let isEligible = await ExternalPurchaseCustomLink.isEligible
guard isEligible else { return }

// This returns nil for some users despite isEligible being true
let token = try await ExternalPurchaseCustomLink.token(for: "ACQUISITION")

Configuration

  • Entitlement: com.apple.developer.storekit.external-purchase-link is present
  • Info.plist: SKExternalPurchaseCustomLinkRegions set to ["fr"]
  • App is only available in France via App Store

Observed Behavior

For affected users:

  • ExternalPurchaseCustomLink.isEligible returns true
  • token(for:) returns nil (not throwing an error)
  • The token generation was never previously called for these users

Questions

  1. Under what conditions does token(for:) return nil when isEligible is true?
  2. Is there additional validation I should perform before calling token(for:)?
  3. Are there known issues with token generation on specific iOS versions?

Any guidance on debugging this issue would be appreciated.

ExternalPurchaseCustomLink.token(for:) returns nil when isEligible is true
 
 
Q