void RequestToken([NotNull] Action <Token> onSuccess, [CanBeNull] Action <Error> onError) { var urlBuilder = new StringBuilder(string.Format("https://api.xsolla.com/merchant/v2/merchants/{0}/token", XsollaSettings.MerchantId)); var headers = new List <WebRequestHeader>() { WebRequestHeader.ContentTypeHeader(), WebRequestHeader.AuthBasic("API KEY") }; var jsonData = JsonUtility.ToJson(GenerateTestToken()); print(jsonData); WebRequestHelper.Instance.PostRequest(urlBuilder.ToString(), jsonData, new WWWForm(), headers, onSuccess, onError); }