Issues with Promotional Offers — Purchase Fails or Discount Not Applied

I am developing and testing Apple Promotional Offers and encountered issues during implementation.

  1. Purchase Failure

When using the following API, the promotional purchase sheet is displayed, but after attempting payment, the transaction fails.
API:
public static func promotionalOffer( offerID: String, keyID: String, nonce: UUID, signature: Data, timestamp: Int ) -> Product.PurchaseOption

Observed behavior:

  • Alert shows:
    • Unable to Purchase [Environment: Xcode]
    • Not Eligible for Offer
  • Console logs:
    • AMSErrorDomain Code=305
    • ASDErrorDomain Code=3903
  1. Discount Not Applied

When calling this API, there are no errors, but the promotional price is not applied, and the user still sees the original price.
API:
public static func promotionalOffer( _ offerID: String, compactJWS: String ) -> [Product.PurchaseOption]

  1. Questions
  • Does Promotional Offers support testing with .storekit files in Xcode?
  • Can Promotional Offers be tested with sandbox accounts using real offers configured in App Store Connect?
  • How should I troubleshoot and resolve the above issues?
    • Could it be related to the subscription history of the sandbox account?
    • Do I need to use TestFlight instead of Xcode to test certain scenarios?
    • Could this be caused by signature parameters or StoreKit configuration?
Issues with Promotional Offers — Purchase Fails or Discount Not Applied
 
 
Q