iOS Receipt Validation - Unity IAP
Validates iOS receipt received from the client.
Source Code
var result = pluginIap.unityiOSValidate({
version : "v20220801",
parameters : {
productId : "PRODUCT_ID",
receipt : "RECEIPT",
currency : "CURRENCY",
price : "PRICE"
}
});
if(result.statusCode == 200) {
log.debug(result.body.toString());
log.debug("success");
} else {
log.debug("fail");
}
Request Parameter
Parameter | Description | Type |
---|---|---|
productUID | Product ID | string |
receipt | iOS receipt information | string |
currency | Payment Currency Code | string |
price | Item price | double |
Communication Result
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"UserID" : "String",
"PackageName" : "String",
"OrderID" : "String",
"ProductID" : "String",
"Currency" : "String",
"Price" : "String",
"Quantity" : "Integer"
}
Communication Result Details
Data Key | Description | Type |
---|---|---|
UserID | User ID | string |
PackageName | App package name | string |
ProductID | Product ID | string |
OrderID | Order ID | string |
Currency | Payment Currency Code | string |
Price | Item price | string |
Quantity | Purchase quantity | integer |