Skip to main content
Version: 6.1.0

GetStoreInfo

Returns the client-side configuration of the given store, such as the API and pay station URLs a client needs to open the store's checkout. Currently only Xsolla returns store info.

ServiceOperation
appStoreGET_STORE_INFO

Method Parameters​

ParameterDescription
storeIdThe store to query, e.g. "xsolla". Refer to the current available store IDs here.
note
  • Xsolla (xsolla) returns storeApiBaseUrl, payStationBaseUrl, projectId, sandbox and consumeOnPurchase.
    • payStationBaseUrl is https://sandbox-secure.xsolla.com/paystation4 when the integration's sandbox is on, and https://secure.xsolla.com/paystation4 when it is off.
    • consumeOnPurchase tells the client whether brainCloud consumes a purchased item on the server. When it is true, the client must not consume the item itself. It is only true when the setting is on and the integration has both a project id and an API key — without the API key the server skips the consume, so the client still has to do it. The API key itself is never returned.
    • If the app has no Xsolla integration configured, only storeApiBaseUrl and payStationBaseUrl are returned.
  • Other stores currently return an empty storeInfo.
  • An unknown storeId fails with HTTP 400 and reason code INVALID_STORE_ID (40700).

Usage​

http://localhost:3000
string storeId = "xsolla";
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.GetStoreInfo(storeId, successCallback, failureCallback);
JSON Response
{
"data": {
"storeInfo": {
"storeApiBaseUrl": "https://store.xsolla.com/api",
"payStationBaseUrl": "https://sandbox-secure.xsolla.com/paystation4",
"projectId": "123456",
"sandbox": true,
"consumeOnPurchase": true
}
},
"status": 200
}