Skip to content

consumption information sending consent inquiry

To use the 'Send Consumption Information' feature, user consent for Sending consumption information regarding in-app purchase products is required. In this regard, the Hive SDK provides a feature that queries the user about whether to consent to send the consumption information to the market.

Warning

Hive SDK's 'Inquire about consent for sending consumption information' feature is available from SDK v4 Native iOS 25.0.0 and above.

About 'Send Consumption Information'

The 'Send Consumption Information' is a feature that sends user consumption information to the market to analyze the user's consumption level and refund tendencies before processing refunds for in-app purchase products in the game.
Based on this information, the market provides refund criteria, allowing the game to prevent fraudulent use by users.

The 'Send Consumption Information' feature is provided by the Hive server API, and for detailed information on using that API, please refer to the Hive Server API > Send consumption information guide.

Note

'The "Send Consumption Information" feature is currently supported only in the Apple AppStore market, and detailed information regarding this is as follows.

  • After in-app purchases through the Apple AppStore, the Send Consumption Information API is supported for smooth refund processing and prevention of fraud.
  • To send refund information to Apple, user consent for third-party provision of personal information and consent for overseas transfer of personal information must be obtained, so the Hive SDK provides a UI for users to be notified of terms and to consent or withdraw consent.

To implement the inquiry about consent for sending consumption information for in-app purchase products, you must first set the usage of the Send Consumption Information feature for each game in the Hive console. For more details, please refer to the Console Guide > Billing > Additional Service Settings guide.

After configuring the relevant settings in the Hive console, the Inquiry of Consent for Sending Consumption Information can be implemented using the two APIs provided by the Hive SDK below.

  • showConsumeInfoAgreement
  • getConsumeInfoAgreement

showConsumeInfoAgreement

The showConsumeInfoAgreement API displays a popup UI that queries the user about their consent to send consumption information. It can be called to show the popup UI when the user purchases an in-app product or presses a separate button, and after the call, it returns the result of the consent to send as a ResultAPI and Boolean.

When purchasing a product or at the point of purchase completion, call the showConsumeInfoAgreement API of the Hive SDK to ask the user for their consent regarding the sending consumption information. You can display the in-game 'Consent Inquiry for Send Consumption Information' popup UI, and the result of the consent will be stored and managed on the Hive server.

The features of the showConsumeInfoAgreement API are as follows.

  • In-game, the 'Consent for Sending Consumption Information' popup UI can also be displayed. Therefore, users can change or withdraw their consent at any time.
  • For users who are being queried for the first time or who previously declined consent, a button asking for consent to send consumption information will be displayed, while a button asking whether to withdraw consent will be displayed for users who have previously consented.

    Example of showing 'Consent' for sending Example of showing 'Withdrawal of Consent' for sending
  • If the user withdraws their consent, the 'Inquiry about Consent for Sending Consumption Information' popup UI can be re-displayed. At this time, calling the getConsumeInfoAgreement API will provide information necessary for re-displaying, such as the user's 'last consent status' and 'last response time'. Subsequently, the game can refer to the received values to re-display the popup as shown in the example below.

    Example: Re-exposure after N days of withdrawal or cancellation

getConsumeInfoAgreement

getConsumeInfoAgreement API retrieves the user's last response information and returns the result as a ResultAPI and an object. By calling the getConsumeInfoAgreement API, there is no need to separately store the user's consent status and timing in the game, thus saving resources.

The object returned as a result contains the user's last consent value (Boolean), the time of the first response (Integer), and the time of the last response (Integer). For users who have never been exposed to the popup, a null value is returned, and if previous response information exists, the three values are returned as a single object.

Example Code

Querying Consent for Sending Consumer Information An example code using the provided API for implementation is as follows.

showConsumeInfoAgreement

using hive;    
IAPV4.showConsumeInfoAgreement((ResultAPI result, bool didAgree) => {    
  if (result.isSuccess()) {    
    // Check if the user agreed or declined the terms with didAgree.
  }    
});

getConsumeInfoAgreement

using hive;    
IAPV4.getConsumeInfoAgreement((ResultAPI result, IAPV4.IAPV4ConsumeInfoUserAgreement info) => {    
  if (result.isSuccess()) {    
    // Get the user's last agreement value and response time from info, and decide whether to show the popup.
  }    
});

showConsumeInfoAgreement

#include <HIVE_SDK_Plugin/HIVE_CPP.h>    
using namespace std;    
using namespace hive;    
IAPV4::showConsumeInfoAgreement([=](ResultAPI const & result, bool didAgree) {    
  if (result.isSuccess()) {    
    // Check if the user agreed or rejected the terms with didAgree.
  }    
}

getConsumeInfoAgreement

#include <HIVE_SDK_Plugin/HIVE_CPP.h>    
using namespace std;    
using namespace hive;    
IAPV4::getConsumeInfoAgreement([=](ResultAPI const & result, IAPV4ConsumeInfoUserAgreement* _Nullable const & info) {    
  if (result.isSuccess()) {    
    // Get the user's last consent value and response time from info, and decide whether to show the popup.
  }    
}

showConsumeInfoAgreement

import HIVEService    
IAPV4Interface.showConsumeInfoAgreement() { result, didAgree in    
  if result.isSuccess() {    
    // Check whether the user agreed or refused to the terms with didAgree.
  }    
}

getConsumeInfoAgreement

import HIVEService    
IAPV4Interface.getConsumeInfoAgreement() { result, info in    
  if result.isSuccess() {    
    // Get the user's last consent value and response time from info, and decide whether to show a popup.
  }    
}

showConsumeInfoAgreement

#import <HIVEService/HIVEService-Swift.h>    
[HIVEIAPV4 showConsumeInfoAgreementWithHandler:^(HIVEResultAPI * result, BOOL didAgree) {    
  if ([result isSuccess]) {    
    // Check if the user agreed or declined the terms with didAgree.
  }    
}];

getConsumeInfoAgreement

#import <HIVEService/HIVEService-Swift.h>    
[HIVEIAPV4 getConsumeInfoAgreementWithHandler:^(HIVEResultAPI * result, HIVEIAPV4ConsumeInfoUserAgreement * info) {    
  if ([result isSuccess]) {    
    // Get the user's last consent value and response time from info, and decide whether to show the popup.
  }    
}];