'About field "customerConsented" in ConsumptionRequest when handle CONSUMPTION_REQUEST notification in iOS app purchase

https://developer.apple.com/documentation/appstoreserverapi/customerconsented From Apple's document, it says "A Boolean value that indicates whether the customer consented to provide consumption data to the App Store."

https://developer.apple.com/documentation/appstoreserverapi/send_consumption_information And from this one: "If the customer provided consent, respond by calling this API and sending the consumption data in the ConsumptionRequest to the App Store. If not, don’t respond to the CONSUMPTION_REQUEST notification."

But how do we know the customer agrees to provide consumption data or not? How do we ask him, or just pass true for this value? Please help me, I searched everything I could, include videos from WWDC2021 but I still can't understand.



Solution 1:[1]

This WWDC21 video explains it a bit:

https://developer.apple.com/videos/play/wwdc2021/10175

Timecode: 20:10

[The way I understand it is] you basically display a dialogue BEFORE you initiate the StoreKit.Transaction.beginRefundRequest. This dialogue has to display what data will be provided to Apple.

In addition you can either just provide an "ok" button (implicit approval), or provide a checkbox that you have to check or uncheck (explicit, required in certain jurisdictions, legally stronger).

You need to save that checkbox value for when the CONSUMPTION_REQUEST hits your server.

If the consumer does not consent or makes the refund request outside your app and not via StoreKit.Transaction.beginRefundRequest you have to ignore the CONSUMPTION_REQUEST. Apple will only use the supplied data if customerConsented is true.

Edit: It might also be possible to just add the implied consent for data sharing in case of a refund to your privacy rules and terms & conditions. But I am no lawyer.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1