Contents

paymentQueue(_:didRevokeEntitlementsForProductIdentifiers:)

Tells an observer that the customer is no longer entitled to one or more Family Sharing purchases.

Declaration

optional func paymentQueue(_ queue: SKPaymentQueue, didRevokeEntitlementsForProductIdentifiers productIdentifiers: [String])

Parameters

  • queue:

    The payment queue that calls the delegate method.

  • productIdentifiers:

    The list of product identifiers with revoked entitlements.

Mentioned in

Discussion

The system calls this delegate method whenever App Store revokes in-app purchases for a family member based on changes in Family Sharing, or when the purchaser gets a refund for an in-app purchase. Implement this method in your payment queue observer to reestablish a user’s access to products. Revoked transactions have the cancellation_date populated in the receipt.

For products with Family Sharing enabled, the following conditions may trigger this method in the family member’s app:

  • The purchaser receives a refund for a non-consumable or an auto-renewable subscription they shared.

  • The purchaser leaves the family group in which they were sharing subscriptions or non-consumables.

  • The purchaser disables Family Sharing for a non-consumable or stops sharing a subscription.

  • The purchaser hides an app, which makes their non-consumable purchase unavailable for sharing.

  • The family member leaves the group and no longer gets access to shared purchases.

  • The family organizer stops sharing payment in iCloud family settings. This change affects non-consumables.

By leaving a family group, or disabling sharing in any of the ways listed above, family members are no longer entitled to family-shared purchases. The productIdentifiers parameter contains the revoked product IDs. Your app needs to check the receipt on the device, which the system automatically updates prior to calling this method, and provide the correct level of access for the in-app purchases.

If you receive App Store Server Notifications, your server receives a notificationType REVOKE for the family member when the conditions listed above occur.

StoreKit also calls this method in the purchaser’s app when the purchaser receives a refund for a non-consumable or an auto-renewable subscription, regardless if the product is shared with the family. If you receive App Store Server Notifications, your server receives a notificationType REFUND for the purchaser.

If you use server-side receipt validation with the App Store, call your server to reprocess the receipt and update your purchase records.

See Also

Family Sharing