PurchaseVerificationData class

Represents the data that is used to verify purchases.

The property source helps you to determine the method to verify purchases. Different source of purchase has different methods of verifying purchases.

Both platforms have 2 ways to verify purchase data. You can either choose to verify the data locally using localVerificationData or verify the data using your own server with serverVerificationData.

For details on how to verify your purchase on iOS, you can refer to Apple's document about About Receipt Validation.

On Android, all purchase information should also be verified manually. See Verify a purchase.

It is preferable to verify purchases using a server with serverVerificationData.

If the platform is iOS, it is possible the data can be null or your validation of this data turns out invalid. When this happens, Call InAppPurchaseConnection.refreshPurchaseVerificationData to get a new PurchaseVerificationData object. And then you can validate the receipt data again using one of the methods mentioned in Receipt Validation.

You should never use any purchase data until verified.


PurchaseVerificationData({@required String localVerificationData, @required String serverVerificationData, @required IAPSource source})
Creates a PurchaseVerificationData object with the provided information.


hashCode int
The hash code for this object. [...]
read-only, inherited
localVerificationData String
The data used for local verification. [...]
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
serverVerificationData String
The data used for server verification. [...]
source IAPSource
Indicates the source of the purchase.


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
Returns a string representation of this object.


operator ==(Object other) bool
The equality operator. [...]