consumptionPercentage
An integer that indicates the percentage, in milliunits, of the In-App Purchase the customer consumed.
Declaration
int32 consumptionPercentageDiscussion
You can provide a consumption percentage in the ConsumptionRequest object when you call Send Consumption Information for consumable and non-consumable In-App Purchases and non-renewing subscriptions. The consumption percentage represents the portion of the product that the customer consumed.
The consumption percentage you provide is one of a variety of factors that the App Store uses to inform its refund decisions. The final refund percentage may differ from the value you provide.
Consider the following when you use this field:
If you select
GRANT_PRORATEDfor the refundPreference field, you need to provide aconsumptionPercentagegreater than0and less than100000.If the deliveryStatus value isn’t
DELIVERED, set theconsumptionPercentageto0; otherwise, the request fails with anHTTP 400error UndeliveredConsumptionPercentageNonZeroError.Don’t provide a consumption percentage for auto-renewable subscriptions, otherwise the request fails with an
HTTP 400error ConsumptionPercentageAutoRenewableSubscriptionError. The system automatically calculates the consumption percentage for auto-renewable subscriptions based on elapsed time.
Use the consumption percentage to indicate the amount of the product the customer consumed. The percentage value allows for three decimal places of precision, and is expressed as an integer, in milliunits. The following table shows several examples of valid consumption percentages, and their milliunit equivalents:
Percentage | Integer equivalent, in milliunits |
|---|---|
67.932% | 67932 |
0.015% | 15 |
40% | 40000 |
100% | 100000 |
For example, if a transaction contains a quantity of two consumable In-App Purchases, and the customer fully consumed one of them, the consumptionPercentage is 50000, which represents 50%.
If the system approves a prorated refund, the revocationPercentage field in the JWSTransactionDecodedPayload contains the revoked percentage of the transaction.