MutableRevenueInfo class

The mutable version of the RevenueInfo class with information about purchases.

The instance of the MutableRevenueInfo class should be sent to the AppMetrica server using the reportRevenue method of the AppMetrica class.

Properties

payload

Additional information to be passed about the purchase. For instance, it can be used for categorizing your products.

productID

ID of the product purchased. The value can contain up to 200 characters.

quantity

Quantity of products purchased.

receiptData

Details about the in-app purchase order from App Store. This property is used for validating purchases in the app.

transactionID

Transaction ID transactionIdentifier from the SKPaymentTransaction class. This property is used for validating purchases in the app.

Property descriptions

payload

var payload: [AnyHashable : Any]

Additional information to be passed about the purchase. For instance, it can be used for categorizing your products.

You must pass the AnyHashable object that can be converted to a valid JSON. The maximum size of the value is 30 KB.

productID

var productID: String

ID of the product purchased. The value can contain up to 200 characters.

quantity

var quantity: UInt

Quantity of products purchased.

It is used in the following formula:

Revenue = quantity * price.

Note

The value cannot be negative. If the value is equal to 0, the purchase is ignored.

receiptData

var receiptData: Data

Details about the in-app purchase order from App Store. This property is used for validating purchases in the app. For more information, see the Apple documentation.

See the example of getting receiptData in the Sending Revenue section.

Alert

The value must be received before invoking SKPaymentQueue.default().finishTransaction(transaction) and transmitted along with transactionID.

transactionID

var transactionID: String

Transaction ID transactionIdentifier from the SKPaymentTransaction class. This property is used for validating purchases in the app.

See the example of getting transactionIdentifier in the Sending Revenue section.

Alert

The value must be received before invoking SKPaymentQueue.default().finishTransaction(transaction) and transmitted along with receiptData.