Skip to main content
Version: 6.0.0

CachePurchasePayloadContext

Caches a payload context to retreive as fallback if the store API cannot provide the payload.

ServiceOperation
appStoreCACHE_PURCHASE_PAYLOAD_CONTEXT

Method Parameters​

ParameterDescription
storeIdThe store platform.
iapIdThe app store's IAP ID.
payloadThe payload string to cache. Send in the payload associated with the product being purchased, as returned by the GetSalesInventory() call. ( formatted as __bc: [versionId, itemId, priceId, referencePrice, promotionId])

Usage​

http://localhost:3000
string storeId = "googlePlay";
string iapId = "xxxxxxxx";
string payload = "__bc:[1,itemid,0,199,-1]";

SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};

_bc.AppstoreService.CachePurchasePayloadContext(storeId, iapId, payload, successCallback, failureCallback);
JSON Response
{
"data": {},
"status": 200
}