Contents

ConsumptionRequestV1

The request body containing consumption information.

Declaration

object ConsumptionRequestV1

Properties

NameTypeDescription
accountTenureaccountTenure

(Required) The age of the customer’s account.

appAccountTokenappAccountToken

(Required) The UUID of the in-app user account that completed the in-app purchase transaction.

consumptionStatusconsumptionStatus

(Required) A value that indicates the extent to which the customer consumed the in-app purchase.

customerConsentedcustomerConsented

(Required) A Boolean value of true or false that indicates whether the customer consented to provide consumption data.

Note: The App Store server rejects requests that have a customerConsented value other than true by returning an HTTP 400 error with an InvalidCustomerConsentedError.

deliveryStatusdeliveryStatusV1

(Required) A value that indicates whether the app successfully delivered an in-app purchase that works properly.

lifetimeDollarsPurchasedlifetimeDollarsPurchased

(Required) A value that indicates the total amount, in USD, of in-app purchases the customer has made in your app, across all platforms.

lifetimeDollarsRefundedlifetimeDollarsRefunded

(Required) A value that indicates the total amount, in USD, of refunds the customer has received, in your app, across all platforms.

platformplatform

(Required) A value that indicates the platform on which the customer consumed the in-app purchase.

playTimeplayTime

(Required) A value that indicates the amount of time that the customer used the app.

refundPreferencerefundPreferenceV1

A value that indicates your preference, based on your operational logic, as to whether Apple should grant the refund.

sampleContentProvidedsampleContentProvided

(Required) A Boolean value of true or false that indicates whether you provided, prior to its purchase, a free sample or trial of the content, or information about its functionality.

userStatususerStatus

(Required) The status of the customer’s account.

Mentioned in

Discussion

Use ConsumptionRequestV1 to provide information about the customer’s consumable in-app purchase or auto-renewable subscription when you call the Send Consumption Information V1 endpoint.

To create a valid request and avoid an HTTP 400 Bad Request error, ConsumptionRequestV1 must contain all the required fields with proper data types and valid values. However, you can choose whether or not to provide information for most fields. Most fields have a valid option if you choose not to provide the information.

For example, if you choose not to provide information for the accountTenure field, set accountTenure to 0. If you choose not to provide information for the appAccountToken field, set its value to an empty string. Refer to each field’s documentation for the list of valid values, including the undeclared value where available.

The App Store server rejects requests that have a customerConsented value other than true by returning an HTTP 400 error with an InvalidCustomerConsentedError.

Provide the app account token in a consumption request

The ConsumptionRequestV1 request body requires that you set the appAccountToken to a valid value of either a UUID or an empty string. Set the appAccountToken value to the value you received in the CONSUMPTION_REQUEST notification, or, if you choose not to provide this information, set the value to an empty string.

If you receive a CONSUMPTION_REQUEST notification for a transaction, find its associated appAccountToken value as follows:

The appAccountToken value may be an empty string if your app doesn’t use app account tokens.

For more information about App Store Server Notifications versions, see App Store Server Notifications changelog.

Topics

Consumption data types

See Also

Deprecated