Publisher Account API v2.0

概览

此部分介绍用于发布商帐户的方法。请使用基本认证来调用方法。

端点路径:https://api.xsolla.com

项目

创建新项目

创建新项目。

Notice: 此API方法在高负载状态下不可用。请求数量过多的情况下可能会限流。如需了解此API方法的流量控制详情,请联系您的帐户经理。

HTTP请求

Copy
Full screen
Small screen
POST https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects

参数类型描述
merchant_id
integer商户ID。
descriptor
string用于报告的短项目名称。最大长度为12个字符。
name
array of strings项目已本地化的名称数组。
url
string项目网站URL。
description
string项目已本地化的描述数组。
payment_url
stringWebhook URL。
key
string项目密钥键值。
return_url
string成功支付后,用户将被重定向至此URL。
user_billing_enabled
boolean用户的数据是否保存在艾克索拉数据库中。
show_user_in_paystation
boolean用户已保存的支付帐户、支付历史记录的相关信息是否显示在支付UI中。
locale_list
array of strings本地化设置的语言列表。
user_public_id_enabled
boolean通过用于在缴费亭付款的Public User ID启用用户详细信息验证。
components
object带有模块相关数据的对象
components.virtual_currency
object带有虚拟货币模块相关数据的对象。
components.virtual_currency.enabled
boolean此模块是否针对当前项目激活。
components.virtual_currency.custom_name
array of strings将显示在支付UI中的模块已本地化的名称。
components.items
object带有虚拟物品模块相关数据的对象。
components.items.enabled
boolean此模块是否针对当前项目激活。
components.items.custom_name
array of strings将显示在支付UI中的模块已本地化的名称。
components.simple_checkout
object带有简单结账模块相关数据的对象。
components.simple_checkout.enabled
boolean此模块是否针对当前项目激活。
components.simple_checkout.custom_name
array of strings将显示在支付UI中的模块已本地化的名称。
components.subscriptions
object带有订阅模块相关数据的对象。
components.subscriptions.enabled
boolean此模块是否针对当前项目激活。
components.subscriptions.custom_name
array of strings将显示在支付UI中的模块已本地化的名称。
send_json_to_paystation
boolean启用无令牌集成。
is_external_id_required
boolean与艾克索拉集成是否需要外部ID。
ipn_enabled
booleanWebhook是否会发送到WebhookURL。
payments_available
boolean合作伙伴是否可接收实际付款。如存在生效的签名合约且存在至少一个已启用的项目,为'true'。默认为'false'。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
POST https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects

Headers:
  Authorization: Basic <your_authorization_basic_key>
Content-Type: application/json

Body:
  {
  "autoredirect_from_status_page_in_seconds": 9,
  "cardRecurring": true,
  "components": {
    "coupons": {
      "custom_name": {
        "en": "Coupons to buy robots"
      },
      "enabled": false
    },
    "game_delivery": {
      "custom_name": {
        "en": "Robots delivery"
      },
      "enabled": false
    },
    "items": {
      "custom_name": {
        "en": "Virtual items from the Robots game"
      },
      "enabled": true
    },
    "simple_checkout": {
      "custom_name": {
        "en": "Checkout for the game with robots"
      },
      "enabled": true
    },
    "subscriptions": {
      "custom_name": {
        "en": "Subscription to the Robots game"
      },
      "enabled": false
    },
    "virtual_currency": {
      "custom_name": {
        "en": "Virtual currency from the Robots game"
      },
      "enabled": true
    }
  },
  "description": {
    "en": "The project for the game with robots. The game is in English only."
  },
  "descriptor": "Robots",
  "enabled": true,
  "ipn_enabled": false,
  "is_cancel_implemented": false,
  "is_external_id_required": false,
  "is_sandbox_available": 1,
  "is_send_email": false,
  "key": "secret19",
  "keywords": "game,robots",
  "locale_list": [
    "en"
  ],
  "name": {
    "en": "Game with Robots"
  },
  "offerwall_enabled": false,
  "payment_url": "http://example.com/webhooks",
  "return_url": "http://example.com",
  "send_json_to_paystation": false,
  "show_user_in_paystation": true,
  "status_page_return_to_game_link_name": {},
  "status_page_show_return_to_game_link": "done",
  "url": "http://example.com",
  "user_billing_enabled": true,
  "user_public_id_enabled": true,
  "users_count": 21941598,
  "xsolla_tips_enabled": false
}
curl --request POST \
  --url https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"name":{"en":"Game with Robots"},"url":"http://example.com","keywords":"game,robots","description":{"en":"The project for the game with robots. The game is in English only."},"payment_url":"http://example.com/webhooks","key":"secret19","ipn_enabled":false,"is_cancel_implemented":false,"is_external_id_required":false,"enabled":true,"return_url":"http://example.com","is_send_email":false,"is_sandbox_available":1,"locale_list":["en"],"users_count":21941598,"cardRecurring":true,"descriptor":"Robots","components":{"virtual_currency":{"enabled":true,"custom_name":{"en":"Virtual currency from the Robots game"}},"items":{"enabled":true,"custom_name":{"en":"Virtual items from the Robots game"}},"subscriptions":{"enabled":false,"custom_name":{"en":"Subscription to the Robots game"}},"coupons":{"enabled":false,"custom_name":{"en":"Coupons to buy robots"}},"game_delivery":{"enabled":false,"custom_name":{"en":"Robots delivery"}},"simple_checkout":{"enabled":true,"custom_name":{"en":"Checkout for the game with robots"}}},"user_billing_enabled":true,"show_user_in_paystation":true,"send_json_to_paystation":false,"user_public_id_enabled":true,"autoredirect_from_status_page_in_seconds":9,"status_page_show_return_to_game_link":"done","status_page_return_to_game_link_name":{},"xsolla_tips_enabled":false,"offerwall_enabled":false}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"name":{"en":"Game with Robots"},"url":"http://example.com","keywords":"game,robots","description":{"en":"The project for the game with robots. The game is in English only."},"payment_url":"http://example.com/webhooks","key":"secret19","ipn_enabled":false,"is_cancel_implemented":false,"is_external_id_required":false,"enabled":true,"return_url":"http://example.com","is_send_email":false,"is_sandbox_available":1,"locale_list":["en"],"users_count":21941598,"cardRecurring":true,"descriptor":"Robots","components":{"virtual_currency":{"enabled":true,"custom_name":{"en":"Virtual currency from the Robots game"}},"items":{"enabled":true,"custom_name":{"en":"Virtual items from the Robots game"}},"subscriptions":{"enabled":false,"custom_name":{"en":"Subscription to the Robots game"}},"coupons":{"enabled":false,"custom_name":{"en":"Coupons to buy robots"}},"game_delivery":{"enabled":false,"custom_name":{"en":"Robots delivery"}},"simple_checkout":{"enabled":true,"custom_name":{"en":"Checkout for the game with robots"}}},"user_billing_enabled":true,"show_user_in_paystation":true,"send_json_to_paystation":false,"user_public_id_enabled":true,"autoredirect_from_status_page_in_seconds":9,"status_page_show_return_to_game_link":"done","status_page_return_to_game_link_name":{},"xsolla_tips_enabled":false,"offerwall_enabled":false}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects");
var request = new RestRequest(Method.POST);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"name\":{\"en\":\"Game with Robots\"},\"url\":\"http://example.com\",\"keywords\":\"game,robots\",\"description\":{\"en\":\"The project for the game with robots. The game is in English only.\"},\"payment_url\":\"http://example.com/webhooks\",\"key\":\"secret19\",\"ipn_enabled\":false,\"is_cancel_implemented\":false,\"is_external_id_required\":false,\"enabled\":true,\"return_url\":\"http://example.com\",\"is_send_email\":false,\"is_sandbox_available\":1,\"locale_list\":[\"en\"],\"users_count\":21941598,\"cardRecurring\":true,\"descriptor\":\"Robots\",\"components\":{\"virtual_currency\":{\"enabled\":true,\"custom_name\":{\"en\":\"Virtual currency from the Robots game\"}},\"items\":{\"enabled\":true,\"custom_name\":{\"en\":\"Virtual items from the Robots game\"}},\"subscriptions\":{\"enabled\":false,\"custom_name\":{\"en\":\"Subscription to the Robots game\"}},\"coupons\":{\"enabled\":false,\"custom_name\":{\"en\":\"Coupons to buy robots\"}},\"game_delivery\":{\"enabled\":false,\"custom_name\":{\"en\":\"Robots delivery\"}},\"simple_checkout\":{\"enabled\":true,\"custom_name\":{\"en\":\"Checkout for the game with robots\"}}},\"user_billing_enabled\":true,\"show_user_in_paystation\":true,\"send_json_to_paystation\":false,\"user_public_id_enabled\":true,\"autoredirect_from_status_page_in_seconds\":9,\"status_page_show_return_to_game_link\":\"done\",\"status_page_return_to_game_link_name\":{},\"xsolla_tips_enabled\":false,\"offerwall_enabled\":false}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

payload = "{\"name\":{\"en\":\"Game with Robots\"},\"url\":\"http://example.com\",\"keywords\":\"game,robots\",\"description\":{\"en\":\"The project for the game with robots. The game is in English only.\"},\"payment_url\":\"http://example.com/webhooks\",\"key\":\"secret19\",\"ipn_enabled\":false,\"is_cancel_implemented\":false,\"is_external_id_required\":false,\"enabled\":true,\"return_url\":\"http://example.com\",\"is_send_email\":false,\"is_sandbox_available\":1,\"locale_list\":[\"en\"],\"users_count\":21941598,\"cardRecurring\":true,\"descriptor\":\"Robots\",\"components\":{\"virtual_currency\":{\"enabled\":true,\"custom_name\":{\"en\":\"Virtual currency from the Robots game\"}},\"items\":{\"enabled\":true,\"custom_name\":{\"en\":\"Virtual items from the Robots game\"}},\"subscriptions\":{\"enabled\":false,\"custom_name\":{\"en\":\"Subscription to the Robots game\"}},\"coupons\":{\"enabled\":false,\"custom_name\":{\"en\":\"Coupons to buy robots\"}},\"game_delivery\":{\"enabled\":false,\"custom_name\":{\"en\":\"Robots delivery\"}},\"simple_checkout\":{\"enabled\":true,\"custom_name\":{\"en\":\"Checkout for the game with robots\"}}},\"user_billing_enabled\":true,\"show_user_in_paystation\":true,\"send_json_to_paystation\":false,\"user_public_id_enabled\":true,\"autoredirect_from_status_page_in_seconds\":9,\"status_page_show_return_to_game_link\":\"done\",\"status_page_return_to_game_link_name\":{},\"xsolla_tips_enabled\":false,\"offerwall_enabled\":false}"

headers = {
    'content-type': "application/json",
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("POST", "/merchant/v2/merchants/{merchant_id}/projects", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Basic <your_authorization_basic_key>'
request.body = "{\"name\":{\"en\":\"Game with Robots\"},\"url\":\"http://example.com\",\"keywords\":\"game,robots\",\"description\":{\"en\":\"The project for the game with robots. The game is in English only.\"},\"payment_url\":\"http://example.com/webhooks\",\"key\":\"secret19\",\"ipn_enabled\":false,\"is_cancel_implemented\":false,\"is_external_id_required\":false,\"enabled\":true,\"return_url\":\"http://example.com\",\"is_send_email\":false,\"is_sandbox_available\":1,\"locale_list\":[\"en\"],\"users_count\":21941598,\"cardRecurring\":true,\"descriptor\":\"Robots\",\"components\":{\"virtual_currency\":{\"enabled\":true,\"custom_name\":{\"en\":\"Virtual currency from the Robots game\"}},\"items\":{\"enabled\":true,\"custom_name\":{\"en\":\"Virtual items from the Robots game\"}},\"subscriptions\":{\"enabled\":false,\"custom_name\":{\"en\":\"Subscription to the Robots game\"}},\"coupons\":{\"enabled\":false,\"custom_name\":{\"en\":\"Coupons to buy robots\"}},\"game_delivery\":{\"enabled\":false,\"custom_name\":{\"en\":\"Robots delivery\"}},\"simple_checkout\":{\"enabled\":true,\"custom_name\":{\"en\":\"Checkout for the game with robots\"}}},\"user_billing_enabled\":true,\"show_user_in_paystation\":true,\"send_json_to_paystation\":false,\"user_public_id_enabled\":true,\"autoredirect_from_status_page_in_seconds\":9,\"status_page_show_return_to_game_link\":\"done\",\"status_page_return_to_game_link_name\":{},\"xsolla_tips_enabled\":false,\"offerwall_enabled\":false}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"name\":{\"en\":\"Game with Robots\"},\"url\":\"http://example.com\",\"keywords\":\"game,robots\",\"description\":{\"en\":\"The project for the game with robots. The game is in English only.\"},\"payment_url\":\"http://example.com/webhooks\",\"key\":\"secret19\",\"ipn_enabled\":false,\"is_cancel_implemented\":false,\"is_external_id_required\":false,\"enabled\":true,\"return_url\":\"http://example.com\",\"is_send_email\":false,\"is_sandbox_available\":1,\"locale_list\":[\"en\"],\"users_count\":21941598,\"cardRecurring\":true,\"descriptor\":\"Robots\",\"components\":{\"virtual_currency\":{\"enabled\":true,\"custom_name\":{\"en\":\"Virtual currency from the Robots game\"}},\"items\":{\"enabled\":true,\"custom_name\":{\"en\":\"Virtual items from the Robots game\"}},\"subscriptions\":{\"enabled\":false,\"custom_name\":{\"en\":\"Subscription to the Robots game\"}},\"coupons\":{\"enabled\":false,\"custom_name\":{\"en\":\"Coupons to buy robots\"}},\"game_delivery\":{\"enabled\":false,\"custom_name\":{\"en\":\"Robots delivery\"}},\"simple_checkout\":{\"enabled\":true,\"custom_name\":{\"en\":\"Checkout for the game with robots\"}}},\"user_billing_enabled\":true,\"show_user_in_paystation\":true,\"send_json_to_paystation\":false,\"user_public_id_enabled\":true,\"autoredirect_from_status_page_in_seconds\":9,\"status_page_show_return_to_game_link\":\"done\",\"status_page_return_to_game_link_name\":{},\"xsolla_tips_enabled\":false,\"offerwall_enabled\":false}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects")
  .post(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "name": {
    "en": "Game with Robots"
  },
  "url": "http://example.com",
  "keywords": "game,robots",
  "description": {
    "en": "The project for the game with robots. The game is in English only."
  },
  "payment_url": "http://example.com/webhooks",
  "key": "secret19",
  "ipn_enabled": false,
  "is_cancel_implemented": false,
  "is_external_id_required": false,
  "enabled": true,
  "return_url": "http://example.com",
  "is_send_email": false,
  "is_sandbox_available": 1,
  "locale_list": [
    "en"
  ],
  "users_count": 21941598,
  "cardRecurring": true,
  "descriptor": "Robots",
  "components": {
    "virtual_currency": {
      "enabled": true,
      "custom_name": {
        "en": "Virtual currency from the Robots game"
      }
    },
    "items": {
      "enabled": true,
      "custom_name": {
        "en": "Virtual items from the Robots game"
      }
    },
    "subscriptions": {
      "enabled": false,
      "custom_name": {
        "en": "Subscription to the Robots game"
      }
    },
    "coupons": {
      "enabled": false,
      "custom_name": {
        "en": "Coupons to buy robots"
      }
    },
    "game_delivery": {
      "enabled": false,
      "custom_name": {
        "en": "Robots delivery"
      }
    },
    "simple_checkout": {
      "enabled": true,
      "custom_name": {
        "en": "Checkout for the game with robots"
      }
    }
  },
  "user_billing_enabled": true,
  "show_user_in_paystation": true,
  "send_json_to_paystation": false,
  "user_public_id_enabled": true,
  "autoredirect_from_status_page_in_seconds": 9,
  "status_page_show_return_to_game_link": "done",
  "status_page_return_to_game_link_name": {},
  "xsolla_tips_enabled": false,
  "offerwall_enabled": false
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}

获取项目

获取商户项目。

HTTP请求

Copy
Full screen
Small screen
GET https://api.xsolla.com/merchant/v2/projects/{project_id}

参数类型描述
project_id
integer项目ID。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/projects/{project_id}

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id} \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}');
$request->setRequestMethod('GET');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/projects/{project_id}", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/projects/{project_id}");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "autoredirect_from_status_page": "none",
  "autoredirect_from_status_page_in_seconds": 0,
  "cardRecurring": false,
  "components": {
    "coupons": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "ready"
    },
    "game_delivery": {
      "custom_name": [],
      "enabled": true,
      "live": false,
      "status": "testing"
    },
    "items": {
      "custom_name": [],
      "enabled": true,
      "live": false,
      "status": "configuring"
    },
    "simple_checkout": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "testing"
    },
    "subscriptions": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "configuring"
    },
    "virtual_currency": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "configuring"
    }
  },
  "description": "Array",
  "descriptor": "Robots",
  "enabled": false,
  "id": 12345,
  "img": null,
  "ipn_enabled": true,
  "is_cancel_implemented": true,
  "is_external_id_required": false,
  "is_sandbox_available": 1,
  "is_send_email": false,
  "key": "",
  "keywords": "",
  "locale_list": [
    "en"
  ],
  "name": {
    "en": "Game with Robots II"
  },
  "offerwall_enabled": false,
  "payment_url": "",
  "payments_available": false,
  "products": {
    "anti_fraud": {
      "status": "invisible"
    },
    "launcher": {
      "status": "disconnected"
    },
    "login": {
      "status": "disconnected"
    },
    "partner_network": {
      "status": "disconnected"
    },
    "pay_station": {
      "status": "disconnected"
    },
    "site_builder": {
      "status": "disconnected"
    },
    "store": {
      "status": "disconnected"
    }
  },
  "return_url": null,
  "secondary_market": [],
  "send_email_for_user_billing_purchase": false,
  "send_json_to_paystation": false,
  "show_user_in_paystation": false,
  "status_page_return_to_game_link_name": null,
  "status_page_show_return_to_game_link": "done",
  "url": "",
  "user_billing_enabled": false,
  "user_public_id_enabled": false,
  "users_count": 1,
  "xsolla_tips_enabled": null,
  "xsolla_tips_settings": []
}
{
  "autoredirect_from_status_page": "none",
  "autoredirect_from_status_page_in_seconds": 0,
  "cardRecurring": false,
  "components": {
    "coupons": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "ready"
    },
    "game_delivery": {
      "custom_name": [],
      "enabled": true,
      "live": false,
      "status": "testing"
    },
    "items": {
      "custom_name": [],
      "enabled": true,
      "live": false,
      "status": "configuring"
    },
    "simple_checkout": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "testing"
    },
    "subscriptions": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "configuring"
    },
    "virtual_currency": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "configuring"
    }
  },
  "description": "Array",
  "descriptor": "Robots",
  "enabled": false,
  "id": 12345,
  "img": null,
  "ipn_enabled": true,
  "is_cancel_implemented": true,
  "is_external_id_required": false,
  "is_sandbox_available": 1,
  "is_send_email": false,
  "key": "",
  "keywords": "",
  "locale_list": [
    "en"
  ],
  "name": {
    "en": "Game with Robots II"
  },
  "offerwall_enabled": false,
  "payment_url": "",
  "payments_available": false,
  "products": {
    "anti_fraud": {
      "status": "invisible"
    },
    "launcher": {
      "status": "disconnected"
    },
    "login": {
      "status": "disconnected"
    },
    "partner_network": {
      "status": "disconnected"
    },
    "pay_station": {
      "status": "disconnected"
    },
    "site_builder": {
      "status": "disconnected"
    },
    "store": {
      "status": "disconnected"
    }
  },
  "return_url": null,
  "secondary_market": [],
  "send_email_for_user_billing_purchase": false,
  "send_json_to_paystation": false,
  "show_user_in_paystation": false,
  "status_page_return_to_game_link_name": null,
  "status_page_show_return_to_game_link": "done",
  "url": "",
  "user_billing_enabled": false,
  "user_public_id_enabled": false,
  "users_count": 1,
  "xsolla_tips_enabled": null,
  "xsolla_tips_settings": []
}
{
  "autoredirect_from_status_page": "none",
  "autoredirect_from_status_page_in_seconds": 0,
  "cardRecurring": false,
  "components": {
    "coupons": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "ready"
    },
    "game_delivery": {
      "custom_name": [],
      "enabled": true,
      "live": false,
      "status": "testing"
    },
    "items": {
      "custom_name": [],
      "enabled": true,
      "live": false,
      "status": "configuring"
    },
    "simple_checkout": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "testing"
    },
    "subscriptions": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "configuring"
    },
    "virtual_currency": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "configuring"
    }
  },
  "description": "Array",
  "descriptor": "Robots",
  "enabled": false,
  "id": 12345,
  "img": null,
  "ipn_enabled": true,
  "is_cancel_implemented": true,
  "is_external_id_required": false,
  "is_sandbox_available": 1,
  "is_send_email": false,
  "key": "",
  "keywords": "",
  "locale_list": [
    "en"
  ],
  "name": {
    "en": "Game with Robots II"
  },
  "offerwall_enabled": false,
  "payment_url": "",
  "payments_available": false,
  "products": {
    "anti_fraud": {
      "status": "invisible"
    },
    "launcher": {
      "status": "disconnected"
    },
    "login": {
      "status": "disconnected"
    },
    "partner_network": {
      "status": "disconnected"
    },
    "pay_station": {
      "status": "disconnected"
    },
    "site_builder": {
      "status": "disconnected"
    },
    "store": {
      "status": "disconnected"
    }
  },
  "return_url": null,
  "secondary_market": [],
  "send_email_for_user_billing_purchase": false,
  "send_json_to_paystation": false,
  "show_user_in_paystation": false,
  "status_page_return_to_game_link_name": null,
  "status_page_show_return_to_game_link": "done",
  "url": "",
  "user_billing_enabled": false,
  "user_public_id_enabled": false,
  "users_count": 1,
  "xsolla_tips_enabled": null,
  "xsolla_tips_settings": []
}
{
  "autoredirect_from_status_page": "none",
  "autoredirect_from_status_page_in_seconds": 0,
  "cardRecurring": false,
  "components": {
    "coupons": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "ready"
    },
    "game_delivery": {
      "custom_name": [],
      "enabled": true,
      "live": false,
      "status": "testing"
    },
    "items": {
      "custom_name": [],
      "enabled": true,
      "live": false,
      "status": "configuring"
    },
    "simple_checkout": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "testing"
    },
    "subscriptions": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "configuring"
    },
    "virtual_currency": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "configuring"
    }
  },
  "description": "Array",
  "descriptor": "Robots",
  "enabled": false,
  "id": 12345,
  "img": null,
  "ipn_enabled": true,
  "is_cancel_implemented": true,
  "is_external_id_required": false,
  "is_sandbox_available": 1,
  "is_send_email": false,
  "key": "",
  "keywords": "",
  "locale_list": [
    "en"
  ],
  "name": {
    "en": "Game with Robots II"
  },
  "offerwall_enabled": false,
  "payment_url": "",
  "payments_available": false,
  "products": {
    "anti_fraud": {
      "status": "invisible"
    },
    "launcher": {
      "status": "disconnected"
    },
    "login": {
      "status": "disconnected"
    },
    "partner_network": {
      "status": "disconnected"
    },
    "pay_station": {
      "status": "disconnected"
    },
    "site_builder": {
      "status": "disconnected"
    },
    "store": {
      "status": "disconnected"
    }
  },
  "return_url": null,
  "secondary_market": [],
  "send_email_for_user_billing_purchase": false,
  "send_json_to_paystation": false,
  "show_user_in_paystation": false,
  "status_page_return_to_game_link_name": null,
  "status_page_show_return_to_game_link": "done",
  "url": "",
  "user_billing_enabled": false,
  "user_public_id_enabled": false,
  "users_count": 1,
  "xsolla_tips_enabled": null,
  "xsolla_tips_settings": []
}
{
  "autoredirect_from_status_page": "none",
  "autoredirect_from_status_page_in_seconds": 0,
  "cardRecurring": false,
  "components": {
    "coupons": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "ready"
    },
    "game_delivery": {
      "custom_name": [],
      "enabled": true,
      "live": false,
      "status": "testing"
    },
    "items": {
      "custom_name": [],
      "enabled": true,
      "live": false,
      "status": "configuring"
    },
    "simple_checkout": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "testing"
    },
    "subscriptions": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "configuring"
    },
    "virtual_currency": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "configuring"
    }
  },
  "description": "Array",
  "descriptor": "Robots",
  "enabled": false,
  "id": 12345,
  "img": null,
  "ipn_enabled": true,
  "is_cancel_implemented": true,
  "is_external_id_required": false,
  "is_sandbox_available": 1,
  "is_send_email": false,
  "key": "",
  "keywords": "",
  "locale_list": [
    "en"
  ],
  "name": {
    "en": "Game with Robots II"
  },
  "offerwall_enabled": false,
  "payment_url": "",
  "payments_available": false,
  "products": {
    "anti_fraud": {
      "status": "invisible"
    },
    "launcher": {
      "status": "disconnected"
    },
    "login": {
      "status": "disconnected"
    },
    "partner_network": {
      "status": "disconnected"
    },
    "pay_station": {
      "status": "disconnected"
    },
    "site_builder": {
      "status": "disconnected"
    },
    "store": {
      "status": "disconnected"
    }
  },
  "return_url": null,
  "secondary_market": [],
  "send_email_for_user_billing_purchase": false,
  "send_json_to_paystation": false,
  "show_user_in_paystation": false,
  "status_page_return_to_game_link_name": null,
  "status_page_show_return_to_game_link": "done",
  "url": "",
  "user_billing_enabled": false,
  "user_public_id_enabled": false,
  "users_count": 1,
  "xsolla_tips_enabled": null,
  "xsolla_tips_settings": []
}
{
  "autoredirect_from_status_page": "none",
  "autoredirect_from_status_page_in_seconds": 0,
  "cardRecurring": false,
  "components": {
    "coupons": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "ready"
    },
    "game_delivery": {
      "custom_name": [],
      "enabled": true,
      "live": false,
      "status": "testing"
    },
    "items": {
      "custom_name": [],
      "enabled": true,
      "live": false,
      "status": "configuring"
    },
    "simple_checkout": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "testing"
    },
    "subscriptions": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "configuring"
    },
    "virtual_currency": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "configuring"
    }
  },
  "description": "Array",
  "descriptor": "Robots",
  "enabled": false,
  "id": 12345,
  "img": null,
  "ipn_enabled": true,
  "is_cancel_implemented": true,
  "is_external_id_required": false,
  "is_sandbox_available": 1,
  "is_send_email": false,
  "key": "",
  "keywords": "",
  "locale_list": [
    "en"
  ],
  "name": {
    "en": "Game with Robots II"
  },
  "offerwall_enabled": false,
  "payment_url": "",
  "payments_available": false,
  "products": {
    "anti_fraud": {
      "status": "invisible"
    },
    "launcher": {
      "status": "disconnected"
    },
    "login": {
      "status": "disconnected"
    },
    "partner_network": {
      "status": "disconnected"
    },
    "pay_station": {
      "status": "disconnected"
    },
    "site_builder": {
      "status": "disconnected"
    },
    "store": {
      "status": "disconnected"
    }
  },
  "return_url": null,
  "secondary_market": [],
  "send_email_for_user_billing_purchase": false,
  "send_json_to_paystation": false,
  "show_user_in_paystation": false,
  "status_page_return_to_game_link_name": null,
  "status_page_show_return_to_game_link": "done",
  "url": "",
  "user_billing_enabled": false,
  "user_public_id_enabled": false,
  "users_count": 1,
  "xsolla_tips_enabled": null,
  "xsolla_tips_settings": []
}
{
  "autoredirect_from_status_page": "none",
  "autoredirect_from_status_page_in_seconds": 0,
  "cardRecurring": false,
  "components": {
    "coupons": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "ready"
    },
    "game_delivery": {
      "custom_name": [],
      "enabled": true,
      "live": false,
      "status": "testing"
    },
    "items": {
      "custom_name": [],
      "enabled": true,
      "live": false,
      "status": "configuring"
    },
    "simple_checkout": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "testing"
    },
    "subscriptions": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "configuring"
    },
    "virtual_currency": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "configuring"
    }
  },
  "description": "Array",
  "descriptor": "Robots",
  "enabled": false,
  "id": 12345,
  "img": null,
  "ipn_enabled": true,
  "is_cancel_implemented": true,
  "is_external_id_required": false,
  "is_sandbox_available": 1,
  "is_send_email": false,
  "key": "",
  "keywords": "",
  "locale_list": [
    "en"
  ],
  "name": {
    "en": "Game with Robots II"
  },
  "offerwall_enabled": false,
  "payment_url": "",
  "payments_available": false,
  "products": {
    "anti_fraud": {
      "status": "invisible"
    },
    "launcher": {
      "status": "disconnected"
    },
    "login": {
      "status": "disconnected"
    },
    "partner_network": {
      "status": "disconnected"
    },
    "pay_station": {
      "status": "disconnected"
    },
    "site_builder": {
      "status": "disconnected"
    },
    "store": {
      "status": "disconnected"
    }
  },
  "return_url": null,
  "secondary_market": [],
  "send_email_for_user_billing_purchase": false,
  "send_json_to_paystation": false,
  "show_user_in_paystation": false,
  "status_page_return_to_game_link_name": null,
  "status_page_show_return_to_game_link": "done",
  "url": "",
  "user_billing_enabled": false,
  "user_public_id_enabled": false,
  "users_count": 1,
  "xsolla_tips_enabled": null,
  "xsolla_tips_settings": []
}
{
  "autoredirect_from_status_page": "none",
  "autoredirect_from_status_page_in_seconds": 0,
  "cardRecurring": false,
  "components": {
    "coupons": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "ready"
    },
    "game_delivery": {
      "custom_name": [],
      "enabled": true,
      "live": false,
      "status": "testing"
    },
    "items": {
      "custom_name": [],
      "enabled": true,
      "live": false,
      "status": "configuring"
    },
    "simple_checkout": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "testing"
    },
    "subscriptions": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "configuring"
    },
    "virtual_currency": {
      "custom_name": [],
      "enabled": false,
      "live": false,
      "status": "configuring"
    }
  },
  "description": "Array",
  "descriptor": "Robots",
  "enabled": false,
  "id": 12345,
  "img": null,
  "ipn_enabled": true,
  "is_cancel_implemented": true,
  "is_external_id_required": false,
  "is_sandbox_available": 1,
  "is_send_email": false,
  "key": "",
  "keywords": "",
  "locale_list": [
    "en"
  ],
  "name": {
    "en": "Game with Robots II"
  },
  "offerwall_enabled": false,
  "payment_url": "",
  "payments_available": false,
  "products": {
    "anti_fraud": {
      "status": "invisible"
    },
    "launcher": {
      "status": "disconnected"
    },
    "login": {
      "status": "disconnected"
    },
    "partner_network": {
      "status": "disconnected"
    },
    "pay_station": {
      "status": "disconnected"
    },
    "site_builder": {
      "status": "disconnected"
    },
    "store": {
      "status": "disconnected"
    }
  },
  "return_url": null,
  "secondary_market": [],
  "send_email_for_user_billing_purchase": false,
  "send_json_to_paystation": false,
  "show_user_in_paystation": false,
  "status_page_return_to_game_link_name": null,
  "status_page_show_return_to_game_link": "done",
  "url": "",
  "user_billing_enabled": false,
  "user_public_id_enabled": false,
  "users_count": 1,
  "xsolla_tips_enabled": null,
  "xsolla_tips_settings": []
}

配置项目

请前往Project configuration methods页面详细了解更改项目设置的方法。

列出所有项目

获取商户项目

HTTP请求

Copy
Full screen
Small screen
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects

参数类型描述
merchant_id
integer商户ID。
sort
string根据创建日期对列表项进行排序。可为'asc'(升序排列)或'desc'(降序排列)。默认为'asc'。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects');
$request->setRequestMethod('GET');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/merchants/{merchant_id}/projects", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
[
  {
    "cardRecurring": true,
    "components": {
      "coupons": {
        "custom_name": [],
        "live": false,
        "status": "ready"
      },
      "game_delivery": {
        "custom_name": [],
        "live": false,
        "status": "testing"
      },
      "items": {
        "custom_name": [],
        "live": false,
        "status": "configuring"
      },
      "subscriptions": {
        "custom_name": [],
        "live": false,
        "status": "configuring"
      },
      "virtual_currency": {
        "custom_name": [],
        "live": true,
        "status": "ready"
      }
    },
    "description": "",
    "enabled": true,
    "id": 242,
    "img": null,
    "name": "Farm Fresh",
    "products": {
      "anti_fraud": {
        "status": "invisible"
      },
      "launcher": {
        "status": "disconnected"
      },
      "login": {
        "status": "disconnected"
      },
      "partner_network": {
        "status": "disconnected"
      },
      "pay_station": {
        "status": "connected"
      },
      "site_builder": {
        "status": "disconnected"
      },
      "store": {
        "status": "connected"
      }
    },
    "protocolKey": "universal",
    "send_json_to_paystation": false,
    "user_billing_enabled": true
  },
  {
    "cardRecurring": false,
    "components": {},
    "description": "Array",
    "enabled": false,
    "id": 987,
    "img": null,
    "name": "Game with Robots II",
    "products": {
      "anti_fraud": {
        "status": "invisible"
      },
      "launcher": {
        "status": "disconnected"
      },
      "login": {
        "status": "disconnected"
      },
      "partner_network": {
        "status": "disconnected"
      },
      "pay_station": {
        "status": "disconnected"
      },
      "site_builder": {
        "status": "disconnected"
      },
      "store": {
        "status": "disconnected"
      }
    },
    "protocolKey": "universal",
    "send_json_to_paystation": false,
    "user_billing_enabled": false
  }
]
[
  {
    "cardRecurring": true,
    "components": {
      "coupons": {
        "custom_name": [],
        "live": false,
        "status": "ready"
      },
      "game_delivery": {
        "custom_name": [],
        "live": false,
        "status": "testing"
      },
      "items": {
        "custom_name": [],
        "live": false,
        "status": "configuring"
      },
      "subscriptions": {
        "custom_name": [],
        "live": false,
        "status": "configuring"
      },
      "virtual_currency": {
        "custom_name": [],
        "live": true,
        "status": "ready"
      }
    },
    "description": "",
    "enabled": true,
    "id": 242,
    "img": null,
    "name": "Farm Fresh",
    "products": {
      "anti_fraud": {
        "status": "invisible"
      },
      "launcher": {
        "status": "disconnected"
      },
      "login": {
        "status": "disconnected"
      },
      "partner_network": {
        "status": "disconnected"
      },
      "pay_station": {
        "status": "connected"
      },
      "site_builder": {
        "status": "disconnected"
      },
      "store": {
        "status": "connected"
      }
    },
    "protocolKey": "universal",
    "send_json_to_paystation": false,
    "user_billing_enabled": true
  },
  {
    "cardRecurring": false,
    "components": {},
    "description": "Array",
    "enabled": false,
    "id": 987,
    "img": null,
    "name": "Game with Robots II",
    "products": {
      "anti_fraud": {
        "status": "invisible"
      },
      "launcher": {
        "status": "disconnected"
      },
      "login": {
        "status": "disconnected"
      },
      "partner_network": {
        "status": "disconnected"
      },
      "pay_station": {
        "status": "disconnected"
      },
      "site_builder": {
        "status": "disconnected"
      },
      "store": {
        "status": "disconnected"
      }
    },
    "protocolKey": "universal",
    "send_json_to_paystation": false,
    "user_billing_enabled": false
  }
]
[
  {
    "cardRecurring": true,
    "components": {
      "coupons": {
        "custom_name": [],
        "live": false,
        "status": "ready"
      },
      "game_delivery": {
        "custom_name": [],
        "live": false,
        "status": "testing"
      },
      "items": {
        "custom_name": [],
        "live": false,
        "status": "configuring"
      },
      "subscriptions": {
        "custom_name": [],
        "live": false,
        "status": "configuring"
      },
      "virtual_currency": {
        "custom_name": [],
        "live": true,
        "status": "ready"
      }
    },
    "description": "",
    "enabled": true,
    "id": 242,
    "img": null,
    "name": "Farm Fresh",
    "products": {
      "anti_fraud": {
        "status": "invisible"
      },
      "launcher": {
        "status": "disconnected"
      },
      "login": {
        "status": "disconnected"
      },
      "partner_network": {
        "status": "disconnected"
      },
      "pay_station": {
        "status": "connected"
      },
      "site_builder": {
        "status": "disconnected"
      },
      "store": {
        "status": "connected"
      }
    },
    "protocolKey": "universal",
    "send_json_to_paystation": false,
    "user_billing_enabled": true
  },
  {
    "cardRecurring": false,
    "components": {},
    "description": "Array",
    "enabled": false,
    "id": 987,
    "img": null,
    "name": "Game with Robots II",
    "products": {
      "anti_fraud": {
        "status": "invisible"
      },
      "launcher": {
        "status": "disconnected"
      },
      "login": {
        "status": "disconnected"
      },
      "partner_network": {
        "status": "disconnected"
      },
      "pay_station": {
        "status": "disconnected"
      },
      "site_builder": {
        "status": "disconnected"
      },
      "store": {
        "status": "disconnected"
      }
    },
    "protocolKey": "universal",
    "send_json_to_paystation": false,
    "user_billing_enabled": false
  }
]
[
  {
    "cardRecurring": true,
    "components": {
      "coupons": {
        "custom_name": [],
        "live": false,
        "status": "ready"
      },
      "game_delivery": {
        "custom_name": [],
        "live": false,
        "status": "testing"
      },
      "items": {
        "custom_name": [],
        "live": false,
        "status": "configuring"
      },
      "subscriptions": {
        "custom_name": [],
        "live": false,
        "status": "configuring"
      },
      "virtual_currency": {
        "custom_name": [],
        "live": true,
        "status": "ready"
      }
    },
    "description": "",
    "enabled": true,
    "id": 242,
    "img": null,
    "name": "Farm Fresh",
    "products": {
      "anti_fraud": {
        "status": "invisible"
      },
      "launcher": {
        "status": "disconnected"
      },
      "login": {
        "status": "disconnected"
      },
      "partner_network": {
        "status": "disconnected"
      },
      "pay_station": {
        "status": "connected"
      },
      "site_builder": {
        "status": "disconnected"
      },
      "store": {
        "status": "connected"
      }
    },
    "protocolKey": "universal",
    "send_json_to_paystation": false,
    "user_billing_enabled": true
  },
  {
    "cardRecurring": false,
    "components": {},
    "description": "Array",
    "enabled": false,
    "id": 987,
    "img": null,
    "name": "Game with Robots II",
    "products": {
      "anti_fraud": {
        "status": "invisible"
      },
      "launcher": {
        "status": "disconnected"
      },
      "login": {
        "status": "disconnected"
      },
      "partner_network": {
        "status": "disconnected"
      },
      "pay_station": {
        "status": "disconnected"
      },
      "site_builder": {
        "status": "disconnected"
      },
      "store": {
        "status": "disconnected"
      }
    },
    "protocolKey": "universal",
    "send_json_to_paystation": false,
    "user_billing_enabled": false
  }
]
[
  {
    "cardRecurring": true,
    "components": {
      "coupons": {
        "custom_name": [],
        "live": false,
        "status": "ready"
      },
      "game_delivery": {
        "custom_name": [],
        "live": false,
        "status": "testing"
      },
      "items": {
        "custom_name": [],
        "live": false,
        "status": "configuring"
      },
      "subscriptions": {
        "custom_name": [],
        "live": false,
        "status": "configuring"
      },
      "virtual_currency": {
        "custom_name": [],
        "live": true,
        "status": "ready"
      }
    },
    "description": "",
    "enabled": true,
    "id": 242,
    "img": null,
    "name": "Farm Fresh",
    "products": {
      "anti_fraud": {
        "status": "invisible"
      },
      "launcher": {
        "status": "disconnected"
      },
      "login": {
        "status": "disconnected"
      },
      "partner_network": {
        "status": "disconnected"
      },
      "pay_station": {
        "status": "connected"
      },
      "site_builder": {
        "status": "disconnected"
      },
      "store": {
        "status": "connected"
      }
    },
    "protocolKey": "universal",
    "send_json_to_paystation": false,
    "user_billing_enabled": true
  },
  {
    "cardRecurring": false,
    "components": {},
    "description": "Array",
    "enabled": false,
    "id": 987,
    "img": null,
    "name": "Game with Robots II",
    "products": {
      "anti_fraud": {
        "status": "invisible"
      },
      "launcher": {
        "status": "disconnected"
      },
      "login": {
        "status": "disconnected"
      },
      "partner_network": {
        "status": "disconnected"
      },
      "pay_station": {
        "status": "disconnected"
      },
      "site_builder": {
        "status": "disconnected"
      },
      "store": {
        "status": "disconnected"
      }
    },
    "protocolKey": "universal",
    "send_json_to_paystation": false,
    "user_billing_enabled": false
  }
]
[
  {
    "cardRecurring": true,
    "components": {
      "coupons": {
        "custom_name": [],
        "live": false,
        "status": "ready"
      },
      "game_delivery": {
        "custom_name": [],
        "live": false,
        "status": "testing"
      },
      "items": {
        "custom_name": [],
        "live": false,
        "status": "configuring"
      },
      "subscriptions": {
        "custom_name": [],
        "live": false,
        "status": "configuring"
      },
      "virtual_currency": {
        "custom_name": [],
        "live": true,
        "status": "ready"
      }
    },
    "description": "",
    "enabled": true,
    "id": 242,
    "img": null,
    "name": "Farm Fresh",
    "products": {
      "anti_fraud": {
        "status": "invisible"
      },
      "launcher": {
        "status": "disconnected"
      },
      "login": {
        "status": "disconnected"
      },
      "partner_network": {
        "status": "disconnected"
      },
      "pay_station": {
        "status": "connected"
      },
      "site_builder": {
        "status": "disconnected"
      },
      "store": {
        "status": "connected"
      }
    },
    "protocolKey": "universal",
    "send_json_to_paystation": false,
    "user_billing_enabled": true
  },
  {
    "cardRecurring": false,
    "components": {},
    "description": "Array",
    "enabled": false,
    "id": 987,
    "img": null,
    "name": "Game with Robots II",
    "products": {
      "anti_fraud": {
        "status": "invisible"
      },
      "launcher": {
        "status": "disconnected"
      },
      "login": {
        "status": "disconnected"
      },
      "partner_network": {
        "status": "disconnected"
      },
      "pay_station": {
        "status": "disconnected"
      },
      "site_builder": {
        "status": "disconnected"
      },
      "store": {
        "status": "disconnected"
      }
    },
    "protocolKey": "universal",
    "send_json_to_paystation": false,
    "user_billing_enabled": false
  }
]
[
  {
    "cardRecurring": true,
    "components": {
      "coupons": {
        "custom_name": [],
        "live": false,
        "status": "ready"
      },
      "game_delivery": {
        "custom_name": [],
        "live": false,
        "status": "testing"
      },
      "items": {
        "custom_name": [],
        "live": false,
        "status": "configuring"
      },
      "subscriptions": {
        "custom_name": [],
        "live": false,
        "status": "configuring"
      },
      "virtual_currency": {
        "custom_name": [],
        "live": true,
        "status": "ready"
      }
    },
    "description": "",
    "enabled": true,
    "id": 242,
    "img": null,
    "name": "Farm Fresh",
    "products": {
      "anti_fraud": {
        "status": "invisible"
      },
      "launcher": {
        "status": "disconnected"
      },
      "login": {
        "status": "disconnected"
      },
      "partner_network": {
        "status": "disconnected"
      },
      "pay_station": {
        "status": "connected"
      },
      "site_builder": {
        "status": "disconnected"
      },
      "store": {
        "status": "connected"
      }
    },
    "protocolKey": "universal",
    "send_json_to_paystation": false,
    "user_billing_enabled": true
  },
  {
    "cardRecurring": false,
    "components": {},
    "description": "Array",
    "enabled": false,
    "id": 987,
    "img": null,
    "name": "Game with Robots II",
    "products": {
      "anti_fraud": {
        "status": "invisible"
      },
      "launcher": {
        "status": "disconnected"
      },
      "login": {
        "status": "disconnected"
      },
      "partner_network": {
        "status": "disconnected"
      },
      "pay_station": {
        "status": "disconnected"
      },
      "site_builder": {
        "status": "disconnected"
      },
      "store": {
        "status": "disconnected"
      }
    },
    "protocolKey": "universal",
    "send_json_to_paystation": false,
    "user_billing_enabled": false
  }
]
[
  {
    "cardRecurring": true,
    "components": {
      "coupons": {
        "custom_name": [],
        "live": false,
        "status": "ready"
      },
      "game_delivery": {
        "custom_name": [],
        "live": false,
        "status": "testing"
      },
      "items": {
        "custom_name": [],
        "live": false,
        "status": "configuring"
      },
      "subscriptions": {
        "custom_name": [],
        "live": false,
        "status": "configuring"
      },
      "virtual_currency": {
        "custom_name": [],
        "live": true,
        "status": "ready"
      }
    },
    "description": "",
    "enabled": true,
    "id": 242,
    "img": null,
    "name": "Farm Fresh",
    "products": {
      "anti_fraud": {
        "status": "invisible"
      },
      "launcher": {
        "status": "disconnected"
      },
      "login": {
        "status": "disconnected"
      },
      "partner_network": {
        "status": "disconnected"
      },
      "pay_station": {
        "status": "connected"
      },
      "site_builder": {
        "status": "disconnected"
      },
      "store": {
        "status": "connected"
      }
    },
    "protocolKey": "universal",
    "send_json_to_paystation": false,
    "user_billing_enabled": true
  },
  {
    "cardRecurring": false,
    "components": {},
    "description": "Array",
    "enabled": false,
    "id": 987,
    "img": null,
    "name": "Game with Robots II",
    "products": {
      "anti_fraud": {
        "status": "invisible"
      },
      "launcher": {
        "status": "disconnected"
      },
      "login": {
        "status": "disconnected"
      },
      "partner_network": {
        "status": "disconnected"
      },
      "pay_station": {
        "status": "disconnected"
      },
      "site_builder": {
        "status": "disconnected"
      },
      "store": {
        "status": "disconnected"
      }
    },
    "protocolKey": "universal",
    "send_json_to_paystation": false,
    "user_billing_enabled": false
  }
]

列出付款方式

返回项目启用的支付系统列表。

HTTP请求

Copy
Full screen
Small screen
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/payment_systems/search.json

参数类型描述
project_id
integer项目ID。 必需
offset
integer元素编号,从该元素开始生成列表(从0开始数)。 必需
limit
integer页面上元素数量的限制。 必需
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/payment_systems/search.json?limit=2&offset=0

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url 'https://api.xsolla.com/merchant/v2/projects/{project_id}/payment_systems/search.json?offset=0&limit=2' \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/payment_systems/search.json');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString(array(
  'offset' => '0',
  'limit' => '2'
)));

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/x-www-form-urlencoded'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/payment_systems/search.json?offset=0&limit=2");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = {
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("GET", "/merchant/v2/projects/{project_id}/payment_systems/search.json?offset=0&limit=2", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/payment_systems/search.json?offset=0&limit=2")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)=
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/payment_systems/search.json?offset=0&limit=2")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/projects/{project_id}/payment_systems/search.json?offset=0&limit=2");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "count": 337,
  "payment_systems": [
    {
      "categories": "Cash Payments",
      "countries": "Russia",
      "enabled": true,
      "id": 0987,
      "image_url": "//cdn.xsolla.net/paymentoptions/paystation/theme_33/108x63/0987.1413059097.png",
      "name": "24AllTime",
      "prices": [
        {
          "currencies": "RUB",
          "description": "cash",
          "fee_fixed_currency": "RUB",
          "fee_fixed_value": 0,
          "fee_percent": 4.8,
          "is_unknown_commission": false
        }
      ],
      "regions": "CIS"
    },
    {
      "categories": "Credit/Debit Cards",
      "countries": "Spain",
      "enabled": true,
      "id": 1267,
      "image_url": "//cdn.xsolla.net/paymentoptions/paystation/theme_33/108x63/1267.9447073574.png",
      "name": "4B Card ",
      "prices": [
        {
          "currencies": "EUR, USD",
          "description": "credit",
          "fee_fixed_currency": "USD",
          "fee_fixed_value": 0.22,
          "fee_percent": 3.99,
          "is_unknown_commission": false
        }
      ],
      "regions": "Western Europe"
    }
  ]
}
{
  "count": 337,
  "payment_systems": [
    {
      "categories": "Cash Payments",
      "countries": "Russia",
      "enabled": true,
      "id": 0987,
      "image_url": "//cdn.xsolla.net/paymentoptions/paystation/theme_33/108x63/0987.1413059097.png",
      "name": "24AllTime",
      "prices": [
        {
          "currencies": "RUB",
          "description": "cash",
          "fee_fixed_currency": "RUB",
          "fee_fixed_value": 0,
          "fee_percent": 4.8,
          "is_unknown_commission": false
        }
      ],
      "regions": "CIS"
    },
    {
      "categories": "Credit/Debit Cards",
      "countries": "Spain",
      "enabled": true,
      "id": 1267,
      "image_url": "//cdn.xsolla.net/paymentoptions/paystation/theme_33/108x63/1267.9447073574.png",
      "name": "4B Card ",
      "prices": [
        {
          "currencies": "EUR, USD",
          "description": "credit",
          "fee_fixed_currency": "USD",
          "fee_fixed_value": 0.22,
          "fee_percent": 3.99,
          "is_unknown_commission": false
        }
      ],
      "regions": "Western Europe"
    }
  ]
}
{
  "count": 337,
  "payment_systems": [
    {
      "categories": "Cash Payments",
      "countries": "Russia",
      "enabled": true,
      "id": 0987,
      "image_url": "//cdn.xsolla.net/paymentoptions/paystation/theme_33/108x63/0987.1413059097.png",
      "name": "24AllTime",
      "prices": [
        {
          "currencies": "RUB",
          "description": "cash",
          "fee_fixed_currency": "RUB",
          "fee_fixed_value": 0,
          "fee_percent": 4.8,
          "is_unknown_commission": false
        }
      ],
      "regions": "CIS"
    },
    {
      "categories": "Credit/Debit Cards",
      "countries": "Spain",
      "enabled": true,
      "id": 1267,
      "image_url": "//cdn.xsolla.net/paymentoptions/paystation/theme_33/108x63/1267.9447073574.png",
      "name": "4B Card ",
      "prices": [
        {
          "currencies": "EUR, USD",
          "description": "credit",
          "fee_fixed_currency": "USD",
          "fee_fixed_value": 0.22,
          "fee_percent": 3.99,
          "is_unknown_commission": false
        }
      ],
      "regions": "Western Europe"
    }
  ]
}
{
  "count": 337,
  "payment_systems": [
    {
      "categories": "Cash Payments",
      "countries": "Russia",
      "enabled": true,
      "id": 0987,
      "image_url": "//cdn.xsolla.net/paymentoptions/paystation/theme_33/108x63/0987.1413059097.png",
      "name": "24AllTime",
      "prices": [
        {
          "currencies": "RUB",
          "description": "cash",
          "fee_fixed_currency": "RUB",
          "fee_fixed_value": 0,
          "fee_percent": 4.8,
          "is_unknown_commission": false
        }
      ],
      "regions": "CIS"
    },
    {
      "categories": "Credit/Debit Cards",
      "countries": "Spain",
      "enabled": true,
      "id": 1267,
      "image_url": "//cdn.xsolla.net/paymentoptions/paystation/theme_33/108x63/1267.9447073574.png",
      "name": "4B Card ",
      "prices": [
        {
          "currencies": "EUR, USD",
          "description": "credit",
          "fee_fixed_currency": "USD",
          "fee_fixed_value": 0.22,
          "fee_percent": 3.99,
          "is_unknown_commission": false
        }
      ],
      "regions": "Western Europe"
    }
  ]
}
{
  "count": 337,
  "payment_systems": [
    {
      "categories": "Cash Payments",
      "countries": "Russia",
      "enabled": true,
      "id": 0987,
      "image_url": "//cdn.xsolla.net/paymentoptions/paystation/theme_33/108x63/0987.1413059097.png",
      "name": "24AllTime",
      "prices": [
        {
          "currencies": "RUB",
          "description": "cash",
          "fee_fixed_currency": "RUB",
          "fee_fixed_value": 0,
          "fee_percent": 4.8,
          "is_unknown_commission": false
        }
      ],
      "regions": "CIS"
    },
    {
      "categories": "Credit/Debit Cards",
      "countries": "Spain",
      "enabled": true,
      "id": 1267,
      "image_url": "//cdn.xsolla.net/paymentoptions/paystation/theme_33/108x63/1267.9447073574.png",
      "name": "4B Card ",
      "prices": [
        {
          "currencies": "EUR, USD",
          "description": "credit",
          "fee_fixed_currency": "USD",
          "fee_fixed_value": 0.22,
          "fee_percent": 3.99,
          "is_unknown_commission": false
        }
      ],
      "regions": "Western Europe"
    }
  ]
}
{
  "count": 337,
  "payment_systems": [
    {
      "categories": "Cash Payments",
      "countries": "Russia",
      "enabled": true,
      "id": 0987,
      "image_url": "//cdn.xsolla.net/paymentoptions/paystation/theme_33/108x63/0987.1413059097.png",
      "name": "24AllTime",
      "prices": [
        {
          "currencies": "RUB",
          "description": "cash",
          "fee_fixed_currency": "RUB",
          "fee_fixed_value": 0,
          "fee_percent": 4.8,
          "is_unknown_commission": false
        }
      ],
      "regions": "CIS"
    },
    {
      "categories": "Credit/Debit Cards",
      "countries": "Spain",
      "enabled": true,
      "id": 1267,
      "image_url": "//cdn.xsolla.net/paymentoptions/paystation/theme_33/108x63/1267.9447073574.png",
      "name": "4B Card ",
      "prices": [
        {
          "currencies": "EUR, USD",
          "description": "credit",
          "fee_fixed_currency": "USD",
          "fee_fixed_value": 0.22,
          "fee_percent": 3.99,
          "is_unknown_commission": false
        }
      ],
      "regions": "Western Europe"
    }
  ]
}
{
  "count": 337,
  "payment_systems": [
    {
      "categories": "Cash Payments",
      "countries": "Russia",
      "enabled": true,
      "id": 0987,
      "image_url": "//cdn.xsolla.net/paymentoptions/paystation/theme_33/108x63/0987.1413059097.png",
      "name": "24AllTime",
      "prices": [
        {
          "currencies": "RUB",
          "description": "cash",
          "fee_fixed_currency": "RUB",
          "fee_fixed_value": 0,
          "fee_percent": 4.8,
          "is_unknown_commission": false
        }
      ],
      "regions": "CIS"
    },
    {
      "categories": "Credit/Debit Cards",
      "countries": "Spain",
      "enabled": true,
      "id": 1267,
      "image_url": "//cdn.xsolla.net/paymentoptions/paystation/theme_33/108x63/1267.9447073574.png",
      "name": "4B Card ",
      "prices": [
        {
          "currencies": "EUR, USD",
          "description": "credit",
          "fee_fixed_currency": "USD",
          "fee_fixed_value": 0.22,
          "fee_percent": 3.99,
          "is_unknown_commission": false
        }
      ],
      "regions": "Western Europe"
    }
  ]
}
{
  "count": 337,
  "payment_systems": [
    {
      "categories": "Cash Payments",
      "countries": "Russia",
      "enabled": true,
      "id": 0987,
      "image_url": "//cdn.xsolla.net/paymentoptions/paystation/theme_33/108x63/0987.1413059097.png",
      "name": "24AllTime",
      "prices": [
        {
          "currencies": "RUB",
          "description": "cash",
          "fee_fixed_currency": "RUB",
          "fee_fixed_value": 0,
          "fee_percent": 4.8,
          "is_unknown_commission": false
        }
      ],
      "regions": "CIS"
    },
    {
      "categories": "Credit/Debit Cards",
      "countries": "Spain",
      "enabled": true,
      "id": 1267,
      "image_url": "//cdn.xsolla.net/paymentoptions/paystation/theme_33/108x63/1267.9447073574.png",
      "name": "4B Card ",
      "prices": [
        {
          "currencies": "EUR, USD",
          "description": "credit",
          "fee_fixed_currency": "USD",
          "fee_fixed_value": 0.22,
          "fee_percent": 3.99,
          "is_unknown_commission": false
        }
      ],
      "regions": "Western Europe"
    }
  ]
}

用户管理

创建用户

创建新用户。

HTTP请求

Copy
Full screen
Small screen
POST https://api.xsolla.com/merchant/v2/projects/{project_id}/users

参数类型描述
project_id
integer项目ID。
user_id
string用户ID。 必需
user_name
string用户名。
user_custom
string用户标识的自定义参数。
email
string用户电子邮件。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
POST https://api.xsolla.com/merchant/v2/projects/{project_id}/users

Headers:
  Authorization: Basic <your_authorization_basic_key>
Content-Type: application/json

Body:
  {
  "email": "philipp-email@email.com",
  "user_id": "1230984",
  "user_name": "Philipp"
}
curl --request POST \
  --url 'https://api.xsolla.com/merchant/v2/projects/{project_id}/users' \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"user_id":"1230984","user_name":"Philipp","email":"philipp-email@email.com"}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"user_id":"1230984","user_name":"Philipp","email":"philipp-email@email.com"}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/users');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setQuery(new http\QueryString(array(
  'limit' => '100',
  'offset' => '100'
)));

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/users");
var request = new RestRequest(Method.POST);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"user_id\":\"1230984\",\"user_name\":\"Philipp\",\"email\":\"philipp-email@email.com\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

payload = "{\"user_id\":\"1230984\",\"user_name\":\"Philipp\",\"email\":\"philipp-email@email.com\"}"

headers = {
    'content-type': "application/json",
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("POST", "/merchant/v2/projects/{project_id}/users", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/users")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Basic <your_authorization_basic_key>'
request.body = "{\"user_id\":\"1230984\",\"user_name\":\"Philipp\",\"email\":\"philipp-email@email.com\"}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"user_id\":\"1230984\",\"user_name\":\"Philipp\",\"email\":\"philipp-email@email.com\"}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/users")
  .post(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "user_id": "1230984",
  "user_name": "Philipp",
  "email": "philipp-email@email.com"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.xsolla.com/merchant/v2/projects/{project_id}/users");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应

获取用户

检索用户数据。

HTTP请求

Copy
Full screen
Small screen
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}

参数类型描述
project_id
integer项目ID。
user_id
string用户ID。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id} \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}');
$request->setRequestMethod('GET');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/projects/{project_id}/users/{user_id}", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "balance": 300,
  "email": "d.jack-email@email.com",
  "enabled": false,
  "register_date": "2019-01-30T10:24:53+00:00",
  "user_custom": "custom",
  "user_id": "1234",
  "user_name": "d.jack",
  "wallet_amount": 0,
  "wallet_currency": "USD"
}
{
  "balance": 300,
  "email": "d.jack-email@email.com",
  "enabled": false,
  "register_date": "2019-01-30T10:24:53+00:00",
  "user_custom": "custom",
  "user_id": "1234",
  "user_name": "d.jack",
  "wallet_amount": 0,
  "wallet_currency": "USD"
}
{
  "balance": 300,
  "email": "d.jack-email@email.com",
  "enabled": false,
  "register_date": "2019-01-30T10:24:53+00:00",
  "user_custom": "custom",
  "user_id": "1234",
  "user_name": "d.jack",
  "wallet_amount": 0,
  "wallet_currency": "USD"
}
{
  "balance": 300,
  "email": "d.jack-email@email.com",
  "enabled": false,
  "register_date": "2019-01-30T10:24:53+00:00",
  "user_custom": "custom",
  "user_id": "1234",
  "user_name": "d.jack",
  "wallet_amount": 0,
  "wallet_currency": "USD"
}
{
  "balance": 300,
  "email": "d.jack-email@email.com",
  "enabled": false,
  "register_date": "2019-01-30T10:24:53+00:00",
  "user_custom": "custom",
  "user_id": "1234",
  "user_name": "d.jack",
  "wallet_amount": 0,
  "wallet_currency": "USD"
}
{
  "balance": 300,
  "email": "d.jack-email@email.com",
  "enabled": false,
  "register_date": "2019-01-30T10:24:53+00:00",
  "user_custom": "custom",
  "user_id": "1234",
  "user_name": "d.jack",
  "wallet_amount": 0,
  "wallet_currency": "USD"
}
{
  "balance": 300,
  "email": "d.jack-email@email.com",
  "enabled": false,
  "register_date": "2019-01-30T10:24:53+00:00",
  "user_custom": "custom",
  "user_id": "1234",
  "user_name": "d.jack",
  "wallet_amount": 0,
  "wallet_currency": "USD"
}
{
  "balance": 300,
  "email": "d.jack-email@email.com",
  "enabled": false,
  "register_date": "2019-01-30T10:24:53+00:00",
  "user_custom": "custom",
  "user_id": "1234",
  "user_name": "d.jack",
  "wallet_amount": 0,
  "wallet_currency": "USD"
}

更新用户

更新用户信息。

HTTP请求

Copy
Full screen
Small screen
PUT https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}

参数类型描述
project_id
integer项目ID。
user_id
string用户ID。 必需
user_name
string用户名。
user_custom
string用户标识的自定义参数。
email
string用户电子邮件。
enabled
boolean此用户是否已启用。 必需
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
PUT https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}

Headers:
  Authorization: Basic <your_authorization_basic_key>
Content-Type: application/json

Body:
  {
  "email": "z.checky-email@email.com",
  "user_id": "1234",
  "user_name": "z.jecky"
}
curl --request PUT \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id} \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"user_id":"1234","user_name":"z.jecky","email":"z.checky-email@email.com"}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"user_id":"1234","user_name":"z.jecky","email":"z.checky-email@email.com"}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}');
$request->setRequestMethod('PUT');
$request->setBody($body);

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}");
var request = new RestRequest(Method.PUT);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"user_id\":\"1234\",\"user_name\":\"z.jecky\",\"email\":\"z.checky-email@email.com\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

payload = "{\"user_id\":\"1234\",\"user_name\":\"z.jecky\",\"email\":\"z.checky-email@email.com\"}"

headers = {
    'content-type': "application/json",
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("PUT", "/merchant/v2/projects/{project_id}/users/{user_id}", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Basic <your_authorization_basic_key>'
request.body = "{\"user_id\":\"1234\",\"user_name\":\"z.jecky\",\"email\":\"z.checky-email@email.com\"}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"user_id\":\"1234\",\"user_name\":\"z.jecky\",\"email\":\"z.checky-email@email.com\"}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}")
  .put(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "user_id": "1234",
  "user_name": "z.jecky",
  "email": "z.checky-email@email.com"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应

列示所有操作

列示所有操作。

HTTP请求

Copy
Full screen
Small screen
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/users/transactions.json

参数类型描述
project_id
integer项目ID。
user_id
string用户ID。 必需
datetime_from
datetime日期范围的开始时间。 必需
datetime_to
datetime日期范围的结束时间。 必需
transaction_type
string操作的类型,可以是'payment'、'coupon'、'inGamePurchase'、'internal'或'cancellation'。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/users/transactions.json?datetime_from=2018-12-28T15:00:00Z&datetime_to=2018-12-28T15:10:00Z

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url 'https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/users/transactions.json?datetime_from=2018-12-28T15%3A00%3A00Z&datetime_to=2018-12-28T15%3A10%3A00Z' \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/users/transactions.json');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString(array(
  'datetime_from' => '2018-12-28T15:00:00Z',
  'datetime_to' => '2018-12-28T15:10:00Z'
)));

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/users/transactions.json?datetime_from=2018-12-28T15%3A00%3A00Z&datetime_to=2018-12-28T15%3A10%3A00Z");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/merchants/{merchant_id}/users/transactions.json?datetime_from=2018-12-28T15%3A00%3A00Z&datetime_to=2018-12-28T15%3A10%3A00Z", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/users/transactions.json?datetime_from=2018-12-28T15%3A00%3A00Z&datetime_to=2018-12-28T15%3A10%3A00Z")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/users/transactions.json?datetime_from=2018-12-28T15%3A00%3A00Z&datetime_to=2018-12-28T15%3A10%3A00Z")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/users/transactions.json?datetime_from=2018-12-28T15%3A00%3A00Z&datetime_to=2018-12-28T15%3A10%3A00Z");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
[
  {
    "amount": 12,
    "comment": null,
    "coupon_code": "RdPv0MLwEj2XF11",
    "currency": null,
    "date": "2018-12-28T15:02:29+03:00",
    "digital_operation_type": "add",
    "external_id": null,
    "operation_id": 178199125,
    "project": {
      "id": 123683,
      "localized_name": "Testing"
    },
    "status": "notified",
    "sum": null,
    "transaction_id": null,
    "transaction_type": "coupon",
    "user_balance": 68088,
    "user_custom": null,
    "user_id": "coupons",
    "user_name": null,
    "virtual_items": [
      {
        "amount": 1,
        "virtual_item": {
          "localized_name": "Item2",
          "sku": "002"
        }
      },
      {
        "amount": 123,
        "virtual_item": {
          "localized_name": "Item3",
          "sku": "003"
        }
      }
    ]
  },
  {
    "amount": -0.01,
    "comment": null,
    "coupon_code": null,
    "currency": null,
    "date": "2018-12-28T15:01:10+03:00",
    "digital_operation_type": "add",
    "external_id": null,
    "operation_id": 159199054,
    "project": {
      "id": 17558,
      "localized_name": "Test Project 1"
    },
    "status": "notified",
    "sum": null,
    "transaction_id": null,
    "transaction_type": "inGamePurchase",
    "user_balance": 152.46,
    "user_custom": null,
    "user_id": "buy_virtual_currency",
    "user_name": null,
    "virtual_items": [
      {
        "amount": 1,
        "virtual_item": {
          "localized_name": "Chicken",
          "sku": "22"
        }
      }
    ]
  }
]
[
  {
    "amount": 12,
    "comment": null,
    "coupon_code": "RdPv0MLwEj2XF11",
    "currency": null,
    "date": "2018-12-28T15:02:29+03:00",
    "digital_operation_type": "add",
    "external_id": null,
    "operation_id": 178199125,
    "project": {
      "id": 123683,
      "localized_name": "Testing"
    },
    "status": "notified",
    "sum": null,
    "transaction_id": null,
    "transaction_type": "coupon",
    "user_balance": 68088,
    "user_custom": null,
    "user_id": "coupons",
    "user_name": null,
    "virtual_items": [
      {
        "amount": 1,
        "virtual_item": {
          "localized_name": "Item2",
          "sku": "002"
        }
      },
      {
        "amount": 123,
        "virtual_item": {
          "localized_name": "Item3",
          "sku": "003"
        }
      }
    ]
  },
  {
    "amount": -0.01,
    "comment": null,
    "coupon_code": null,
    "currency": null,
    "date": "2018-12-28T15:01:10+03:00",
    "digital_operation_type": "add",
    "external_id": null,
    "operation_id": 159199054,
    "project": {
      "id": 17558,
      "localized_name": "Test Project 1"
    },
    "status": "notified",
    "sum": null,
    "transaction_id": null,
    "transaction_type": "inGamePurchase",
    "user_balance": 152.46,
    "user_custom": null,
    "user_id": "buy_virtual_currency",
    "user_name": null,
    "virtual_items": [
      {
        "amount": 1,
        "virtual_item": {
          "localized_name": "Chicken",
          "sku": "22"
        }
      }
    ]
  }
]
[
  {
    "amount": 12,
    "comment": null,
    "coupon_code": "RdPv0MLwEj2XF11",
    "currency": null,
    "date": "2018-12-28T15:02:29+03:00",
    "digital_operation_type": "add",
    "external_id": null,
    "operation_id": 178199125,
    "project": {
      "id": 123683,
      "localized_name": "Testing"
    },
    "status": "notified",
    "sum": null,
    "transaction_id": null,
    "transaction_type": "coupon",
    "user_balance": 68088,
    "user_custom": null,
    "user_id": "coupons",
    "user_name": null,
    "virtual_items": [
      {
        "amount": 1,
        "virtual_item": {
          "localized_name": "Item2",
          "sku": "002"
        }
      },
      {
        "amount": 123,
        "virtual_item": {
          "localized_name": "Item3",
          "sku": "003"
        }
      }
    ]
  },
  {
    "amount": -0.01,
    "comment": null,
    "coupon_code": null,
    "currency": null,
    "date": "2018-12-28T15:01:10+03:00",
    "digital_operation_type": "add",
    "external_id": null,
    "operation_id": 159199054,
    "project": {
      "id": 17558,
      "localized_name": "Test Project 1"
    },
    "status": "notified",
    "sum": null,
    "transaction_id": null,
    "transaction_type": "inGamePurchase",
    "user_balance": 152.46,
    "user_custom": null,
    "user_id": "buy_virtual_currency",
    "user_name": null,
    "virtual_items": [
      {
        "amount": 1,
        "virtual_item": {
          "localized_name": "Chicken",
          "sku": "22"
        }
      }
    ]
  }
]
[
  {
    "amount": 12,
    "comment": null,
    "coupon_code": "RdPv0MLwEj2XF11",
    "currency": null,
    "date": "2018-12-28T15:02:29+03:00",
    "digital_operation_type": "add",
    "external_id": null,
    "operation_id": 178199125,
    "project": {
      "id": 123683,
      "localized_name": "Testing"
    },
    "status": "notified",
    "sum": null,
    "transaction_id": null,
    "transaction_type": "coupon",
    "user_balance": 68088,
    "user_custom": null,
    "user_id": "coupons",
    "user_name": null,
    "virtual_items": [
      {
        "amount": 1,
        "virtual_item": {
          "localized_name": "Item2",
          "sku": "002"
        }
      },
      {
        "amount": 123,
        "virtual_item": {
          "localized_name": "Item3",
          "sku": "003"
        }
      }
    ]
  },
  {
    "amount": -0.01,
    "comment": null,
    "coupon_code": null,
    "currency": null,
    "date": "2018-12-28T15:01:10+03:00",
    "digital_operation_type": "add",
    "external_id": null,
    "operation_id": 159199054,
    "project": {
      "id": 17558,
      "localized_name": "Test Project 1"
    },
    "status": "notified",
    "sum": null,
    "transaction_id": null,
    "transaction_type": "inGamePurchase",
    "user_balance": 152.46,
    "user_custom": null,
    "user_id": "buy_virtual_currency",
    "user_name": null,
    "virtual_items": [
      {
        "amount": 1,
        "virtual_item": {
          "localized_name": "Chicken",
          "sku": "22"
        }
      }
    ]
  }
]
[
  {
    "amount": 12,
    "comment": null,
    "coupon_code": "RdPv0MLwEj2XF11",
    "currency": null,
    "date": "2018-12-28T15:02:29+03:00",
    "digital_operation_type": "add",
    "external_id": null,
    "operation_id": 178199125,
    "project": {
      "id": 123683,
      "localized_name": "Testing"
    },
    "status": "notified",
    "sum": null,
    "transaction_id": null,
    "transaction_type": "coupon",
    "user_balance": 68088,
    "user_custom": null,
    "user_id": "coupons",
    "user_name": null,
    "virtual_items": [
      {
        "amount": 1,
        "virtual_item": {
          "localized_name": "Item2",
          "sku": "002"
        }
      },
      {
        "amount": 123,
        "virtual_item": {
          "localized_name": "Item3",
          "sku": "003"
        }
      }
    ]
  },
  {
    "amount": -0.01,
    "comment": null,
    "coupon_code": null,
    "currency": null,
    "date": "2018-12-28T15:01:10+03:00",
    "digital_operation_type": "add",
    "external_id": null,
    "operation_id": 159199054,
    "project": {
      "id": 17558,
      "localized_name": "Test Project 1"
    },
    "status": "notified",
    "sum": null,
    "transaction_id": null,
    "transaction_type": "inGamePurchase",
    "user_balance": 152.46,
    "user_custom": null,
    "user_id": "buy_virtual_currency",
    "user_name": null,
    "virtual_items": [
      {
        "amount": 1,
        "virtual_item": {
          "localized_name": "Chicken",
          "sku": "22"
        }
      }
    ]
  }
]
[
  {
    "amount": 12,
    "comment": null,
    "coupon_code": "RdPv0MLwEj2XF11",
    "currency": null,
    "date": "2018-12-28T15:02:29+03:00",
    "digital_operation_type": "add",
    "external_id": null,
    "operation_id": 178199125,
    "project": {
      "id": 123683,
      "localized_name": "Testing"
    },
    "status": "notified",
    "sum": null,
    "transaction_id": null,
    "transaction_type": "coupon",
    "user_balance": 68088,
    "user_custom": null,
    "user_id": "coupons",
    "user_name": null,
    "virtual_items": [
      {
        "amount": 1,
        "virtual_item": {
          "localized_name": "Item2",
          "sku": "002"
        }
      },
      {
        "amount": 123,
        "virtual_item": {
          "localized_name": "Item3",
          "sku": "003"
        }
      }
    ]
  },
  {
    "amount": -0.01,
    "comment": null,
    "coupon_code": null,
    "currency": null,
    "date": "2018-12-28T15:01:10+03:00",
    "digital_operation_type": "add",
    "external_id": null,
    "operation_id": 159199054,
    "project": {
      "id": 17558,
      "localized_name": "Test Project 1"
    },
    "status": "notified",
    "sum": null,
    "transaction_id": null,
    "transaction_type": "inGamePurchase",
    "user_balance": 152.46,
    "user_custom": null,
    "user_id": "buy_virtual_currency",
    "user_name": null,
    "virtual_items": [
      {
        "amount": 1,
        "virtual_item": {
          "localized_name": "Chicken",
          "sku": "22"
        }
      }
    ]
  }
]
[
  {
    "amount": 12,
    "comment": null,
    "coupon_code": "RdPv0MLwEj2XF11",
    "currency": null,
    "date": "2018-12-28T15:02:29+03:00",
    "digital_operation_type": "add",
    "external_id": null,
    "operation_id": 178199125,
    "project": {
      "id": 123683,
      "localized_name": "Testing"
    },
    "status": "notified",
    "sum": null,
    "transaction_id": null,
    "transaction_type": "coupon",
    "user_balance": 68088,
    "user_custom": null,
    "user_id": "coupons",
    "user_name": null,
    "virtual_items": [
      {
        "amount": 1,
        "virtual_item": {
          "localized_name": "Item2",
          "sku": "002"
        }
      },
      {
        "amount": 123,
        "virtual_item": {
          "localized_name": "Item3",
          "sku": "003"
        }
      }
    ]
  },
  {
    "amount": -0.01,
    "comment": null,
    "coupon_code": null,
    "currency": null,
    "date": "2018-12-28T15:01:10+03:00",
    "digital_operation_type": "add",
    "external_id": null,
    "operation_id": 159199054,
    "project": {
      "id": 17558,
      "localized_name": "Test Project 1"
    },
    "status": "notified",
    "sum": null,
    "transaction_id": null,
    "transaction_type": "inGamePurchase",
    "user_balance": 152.46,
    "user_custom": null,
    "user_id": "buy_virtual_currency",
    "user_name": null,
    "virtual_items": [
      {
        "amount": 1,
        "virtual_item": {
          "localized_name": "Chicken",
          "sku": "22"
        }
      }
    ]
  }
]
[
  {
    "amount": 12,
    "comment": null,
    "coupon_code": "RdPv0MLwEj2XF11",
    "currency": null,
    "date": "2018-12-28T15:02:29+03:00",
    "digital_operation_type": "add",
    "external_id": null,
    "operation_id": 178199125,
    "project": {
      "id": 123683,
      "localized_name": "Testing"
    },
    "status": "notified",
    "sum": null,
    "transaction_id": null,
    "transaction_type": "coupon",
    "user_balance": 68088,
    "user_custom": null,
    "user_id": "coupons",
    "user_name": null,
    "virtual_items": [
      {
        "amount": 1,
        "virtual_item": {
          "localized_name": "Item2",
          "sku": "002"
        }
      },
      {
        "amount": 123,
        "virtual_item": {
          "localized_name": "Item3",
          "sku": "003"
        }
      }
    ]
  },
  {
    "amount": -0.01,
    "comment": null,
    "coupon_code": null,
    "currency": null,
    "date": "2018-12-28T15:01:10+03:00",
    "digital_operation_type": "add",
    "external_id": null,
    "operation_id": 159199054,
    "project": {
      "id": 17558,
      "localized_name": "Test Project 1"
    },
    "status": "notified",
    "sum": null,
    "transaction_id": null,
    "transaction_type": "inGamePurchase",
    "user_balance": 152.46,
    "user_custom": null,
    "user_id": "buy_virtual_currency",
    "user_name": null,
    "virtual_items": [
      {
        "amount": 1,
        "virtual_item": {
          "localized_name": "Chicken",
          "sku": "22"
        }
      }
    ]
  }
]

添加虚拟物品

向用户帐户添加虚拟物品。

Notice: 此API方法在高负载状态下不可用。请求数量过多的情况下可能会限流。如需了解此API方法的流量控制详情,请联系您的帐户经理。

HTTP请求

Copy
Full screen
Small screen
POST https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/add

参数类型描述
project_id
integer项目ID。
user_id
string用户ID。
virtual_items
array带有虚拟物品相关数据的数组。
virtual_items.virtual_item
object带有虚拟物品相关数据的对象。
virtual_items.virtual_item.sku
string物品的唯一ID。
virtual_items.amount
integer物品数量。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
POST https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/add

Headers:
  Authorization: Basic <your_authorization_basic_key>
Content-Type: application/json

Body:
  {
  "comment": "New item",
  "virtual_items": [
    {
      "amount": "1",
      "virtual_item": {
        "sku": "12394"
      }
    }
  ]
}
curl --request POST \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/add \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"virtual_items":[{"virtual_item":{"sku":"12394"},"amount":"1"}],"comment":"New item"}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"virtual_items":[{"virtual_item":{"sku":"12394"},"amount":"1"}],"comment":"New item"}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/add');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/add");
var request = new RestRequest(Method.POST);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"virtual_items\":[{\"virtual_item\":{\"sku\":\"12394\"},\"amount\":\"1\"}],\"comment\":\"New item\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

payload = "{\"virtual_items\":[{\"virtual_item\":{\"sku\":\"12394\"},\"amount\":\"1\"}],\"comment\":\"New item\"}"

headers = {
    'content-type': "application/json",
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("POST", "/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/add", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/add")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Basic <your_authorization_basic_key>'
request.body = "{\"virtual_items\":[{\"virtual_item\":{\"sku\":\"12394\"},\"amount\":\"1\"}],\"comment\":\"New item\"}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"virtual_items\":[{\"virtual_item\":{\"sku\":\"12394\"},\"amount\":\"1\"}],\"comment\":\"New item\"}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/add")
  .post(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "virtual_items": [
    {
      "virtual_item": {
        "sku": "12394"
      },
      "amount": "1"
    }
  ],
  "comment": "New item"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/add");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应

获取虚拟物品

获取用户虚拟物品。

HTTP请求

Copy
Full screen
Small screen
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items

参数Type描述
project_id
integer项目ID。
user_id
string用户ID。
offset
integer元素编号,从该元素开始生成列表(从0开始数)。
limit
integer页面上元素数量的限制。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items?limit=100&offset=0

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url 'https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items?offset=0&limit=100' \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString(array(
  'offset' => '0',
  'limit' => '100'
)));

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items?offset=0&limit=100");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items?offset=0&limit=100", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items?offset=0&limit=100")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items?offset=0&limit=100")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items?offset=0&limit=100");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
[
  {
    "advertisement_type": null,
    "enabled": true,
    "id": 161358,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "T-34-3",
    "quantity": 1,
    "sku": "12394",
    "virtual_currency_price": null
  },
  {
    "advertisement_type": null,
    "enabled": true,
    "id": 163100,
    "image_url": "https://static.xsolla.com/misc/publisher_account/virtual_item_default_image.png",
    "localized_name": "Helmet",
    "quantity": 1,
    "sku": "8651",
    "virtual_currency_price": null
  }
]
[
  {
    "advertisement_type": null,
    "enabled": true,
    "id": 161358,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "T-34-3",
    "quantity": 1,
    "sku": "12394",
    "virtual_currency_price": null
  },
  {
    "advertisement_type": null,
    "enabled": true,
    "id": 163100,
    "image_url": "https://static.xsolla.com/misc/publisher_account/virtual_item_default_image.png",
    "localized_name": "Helmet",
    "quantity": 1,
    "sku": "8651",
    "virtual_currency_price": null
  }
]
[
  {
    "advertisement_type": null,
    "enabled": true,
    "id": 161358,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "T-34-3",
    "quantity": 1,
    "sku": "12394",
    "virtual_currency_price": null
  },
  {
    "advertisement_type": null,
    "enabled": true,
    "id": 163100,
    "image_url": "https://static.xsolla.com/misc/publisher_account/virtual_item_default_image.png",
    "localized_name": "Helmet",
    "quantity": 1,
    "sku": "8651",
    "virtual_currency_price": null
  }
]
[
  {
    "advertisement_type": null,
    "enabled": true,
    "id": 161358,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "T-34-3",
    "quantity": 1,
    "sku": "12394",
    "virtual_currency_price": null
  },
  {
    "advertisement_type": null,
    "enabled": true,
    "id": 163100,
    "image_url": "https://static.xsolla.com/misc/publisher_account/virtual_item_default_image.png",
    "localized_name": "Helmet",
    "quantity": 1,
    "sku": "8651",
    "virtual_currency_price": null
  }
]
[
  {
    "advertisement_type": null,
    "enabled": true,
    "id": 161358,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "T-34-3",
    "quantity": 1,
    "sku": "12394",
    "virtual_currency_price": null
  },
  {
    "advertisement_type": null,
    "enabled": true,
    "id": 163100,
    "image_url": "https://static.xsolla.com/misc/publisher_account/virtual_item_default_image.png",
    "localized_name": "Helmet",
    "quantity": 1,
    "sku": "8651",
    "virtual_currency_price": null
  }
]
[
  {
    "advertisement_type": null,
    "enabled": true,
    "id": 161358,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "T-34-3",
    "quantity": 1,
    "sku": "12394",
    "virtual_currency_price": null
  },
  {
    "advertisement_type": null,
    "enabled": true,
    "id": 163100,
    "image_url": "https://static.xsolla.com/misc/publisher_account/virtual_item_default_image.png",
    "localized_name": "Helmet",
    "quantity": 1,
    "sku": "8651",
    "virtual_currency_price": null
  }
]
[
  {
    "advertisement_type": null,
    "enabled": true,
    "id": 161358,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "T-34-3",
    "quantity": 1,
    "sku": "12394",
    "virtual_currency_price": null
  },
  {
    "advertisement_type": null,
    "enabled": true,
    "id": 163100,
    "image_url": "https://static.xsolla.com/misc/publisher_account/virtual_item_default_image.png",
    "localized_name": "Helmet",
    "quantity": 1,
    "sku": "8651",
    "virtual_currency_price": null
  }
]
[
  {
    "advertisement_type": null,
    "enabled": true,
    "id": 161358,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "T-34-3",
    "quantity": 1,
    "sku": "12394",
    "virtual_currency_price": null
  },
  {
    "advertisement_type": null,
    "enabled": true,
    "id": 163100,
    "image_url": "https://static.xsolla.com/misc/publisher_account/virtual_item_default_image.png",
    "localized_name": "Helmet",
    "quantity": 1,
    "sku": "8651",
    "virtual_currency_price": null
  }
]

删除物品

从用户帐户中删除虚拟物品。

HTTP请求

Copy
Full screen
Small screen
POST https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/remove

参数类型描述
project_id
integer项目ID。
user_id
string用户ID。
virtual_items
array带有虚拟物品相关数据的数组。
virtual_items.virtual_item
object带有虚拟物品相关数据的对象。
virtual_items.virtual_item.sku
string物品的唯一ID。
virtual_items.amount
integer物品数量。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
POST https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/remove

Headers:
  Authorization: Basic <your_authorization_basic_key>
Content-Type: application/json

Body:
  {
  "comment": "Delete the item",
  "virtual_items": [
    {
      "amount": "1",
      "virtual_item": {
        "sku": "8651"
      }
    }
  ]
}
curl --request POST \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/remove \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"virtual_items":[{"virtual_item":{"sku":"8651"},"amount":"1"}],"comment":"Delete the item"}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"virtual_items":[{"virtual_item":{"sku":"8651"},"amount":"1"}],"comment":"Delete the item"}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/remove');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/remove");
var request = new RestRequest(Method.POST);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"virtual_items\":[{\"virtual_item\":{\"sku\":\"8651\"},\"amount\":\"1\"}],\"comment\":\"Delete the item\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

payload = "{\"virtual_items\":[{\"virtual_item\":{\"sku\":\"8651\"},\"amount\":\"1\"}],\"comment\":\"Delete the item\"}"

headers = {
    'content-type': "application/json",
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("POST", "/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/remove", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/remove")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Basic <your_authorization_basic_key>'
request.body = "{\"virtual_items\":[{\"virtual_item\":{\"sku\":\"8651\"},\"amount\":\"1\"}],\"comment\":\"Delete the item\"}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"virtual_items\":[{\"virtual_item\":{\"sku\":\"8651\"},\"amount\":\"1\"}],\"comment\":\"Delete the item\"}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/remove")
  .post(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "virtual_items": [
    {
      "virtual_item": {
        "sku": "8651"
      },
      "amount": "1"
    }
  ],
  "comment": "Delete the item"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/virtual_items/remove");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应

更改余额

更改余额。

HTTP请求

Copy
Full screen
Small screen
POST https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/recharge

参数类型描述
project_id
integer项目ID。
user_id
string用户ID。
amount
float虚拟货币数量。
comment
string更改余额的原因。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
POST https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/recharge

Headers:
  Authorization: Basic <your_authorization_basic_key>
Content-Type: application/json

Body:
  {
  "amount": "100",
  "comment": "Updated balance",
  "project_id": {project_id},
  "user_id": "1234"
}
curl --request POST \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/recharge \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"project_id":{project_id},"user_id":"1234","amount":"100","comment":"Updated balance"}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"project_id":{project_id},"user_id":"1234","amount":"100","comment":"Updated balance"}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/recharge');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/recharge");
var request = new RestRequest(Method.POST);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"project_id\":{project_id},\"user_id\":\"1234\",\"amount\":\"100\",\"comment\":\"Updated balance\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

payload = "{\"project_id\":{project_id},\"user_id\":\"1234\",\"amount\":\"100\",\"comment\":\"Updated balance\"}"

headers = {
    'content-type': "application/json",
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("POST", "/merchant/v2/projects/{project_id}/users/{user_id}/recharge", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/recharge")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Basic <your_authorization_basic_key>'
request.body = "{\"project_id\":{project_id},\"user_id\":\"1234\",\"amount\":\"100\",\"comment\":\"Updated balance\"}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"project_id\":{project_id},\"user_id\":\"1234\",\"amount\":\"100\",\"comment\":\"Updated balance\"}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/recharge")
  .post(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "project_id": {project_id},
  "user_id": "1234",
  "amount": "100",
  "comment": "Updated balance"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.xsolla.com/merchant/v2/projects/{project_id}/users/{user_id}/recharge");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}

列示所有用户

列示所有用户。

Notice: 此API方法在高负载状态下不可用。请求数量过多的情况下可能会限流。如需了解此API方法的流量控制详情,请联系您的帐户经理。

HTTP请求

Copy
Full screen
Small screen
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/users

参数类型描述
project_id
integer项目ID。 必需
user_requisites
string用户ID。
email
string用户电子邮件。
offset
integer元素编号,从该元素开始生成列表(从0开始数)。 必需
limit
integer页面上元素数量的限制。 必需
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/users?limit=100&offset=0

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url 'https://api.xsolla.com/merchant/v2/projects/{project_id}/users?limit=100&offset=0' \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.xsolla.com/merchant/v2/projects/{project_id}/users?limit=100&offset=0",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Basic <your_authorization_basic_key>"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/users?limit=100&offset=0");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/projects/{project_id}/users?limit=100&offset=0", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/users?limit=100&offset=0")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://api.xsolla.com/merchant/v2/projects/{project_id}/users?limit=100&offset=0")
  .header("authorization", "Basic <your_authorization_basic_key>")
  .asString();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/projects/{project_id}/users?limit=100&offset=0");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "data": [
    {
      "balance": 400,
      "email": "z.checky-email@email.com",
      "enabled": false,
      "register_date": "2019-01-30T10:24:53+00:00",
      "user_custom": "jecky",
      "user_id": "1234",
      "user_name": "z.jecky",
      "wallet_amount": 0,
      "wallet_currency": "USD"
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-01-31T13:19:10+00:00",
      "user_custom": null,
      "user_id": "1234918",
      "user_name": "testUser",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-01-31T13:21:10+00:00",
      "user_custom": "custom",
      "user_id": "12340099999",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-02-01T07:32:35+00:00",
      "user_custom": "custom",
      "user_id": "1230984",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-02-01T07:32:49+00:00",
      "user_custom": "custom",
      "user_id": "123099884",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    }
  ],
  "recordsTotal": 5
}
{
  "data": [
    {
      "balance": 400,
      "email": "z.checky-email@email.com",
      "enabled": false,
      "register_date": "2019-01-30T10:24:53+00:00",
      "user_custom": "jecky",
      "user_id": "1234",
      "user_name": "z.jecky",
      "wallet_amount": 0,
      "wallet_currency": "USD"
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-01-31T13:19:10+00:00",
      "user_custom": null,
      "user_id": "1234918",
      "user_name": "testUser",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-01-31T13:21:10+00:00",
      "user_custom": "custom",
      "user_id": "12340099999",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-02-01T07:32:35+00:00",
      "user_custom": "custom",
      "user_id": "1230984",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-02-01T07:32:49+00:00",
      "user_custom": "custom",
      "user_id": "123099884",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    }
  ],
  "recordsTotal": 5
}
{
  "data": [
    {
      "balance": 400,
      "email": "z.checky-email@email.com",
      "enabled": false,
      "register_date": "2019-01-30T10:24:53+00:00",
      "user_custom": "jecky",
      "user_id": "1234",
      "user_name": "z.jecky",
      "wallet_amount": 0,
      "wallet_currency": "USD"
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-01-31T13:19:10+00:00",
      "user_custom": null,
      "user_id": "1234918",
      "user_name": "testUser",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-01-31T13:21:10+00:00",
      "user_custom": "custom",
      "user_id": "12340099999",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-02-01T07:32:35+00:00",
      "user_custom": "custom",
      "user_id": "1230984",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-02-01T07:32:49+00:00",
      "user_custom": "custom",
      "user_id": "123099884",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    }
  ],
  "recordsTotal": 5
}
{
  "data": [
    {
      "balance": 400,
      "email": "z.checky-email@email.com",
      "enabled": false,
      "register_date": "2019-01-30T10:24:53+00:00",
      "user_custom": "jecky",
      "user_id": "1234",
      "user_name": "z.jecky",
      "wallet_amount": 0,
      "wallet_currency": "USD"
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-01-31T13:19:10+00:00",
      "user_custom": null,
      "user_id": "1234918",
      "user_name": "testUser",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-01-31T13:21:10+00:00",
      "user_custom": "custom",
      "user_id": "12340099999",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-02-01T07:32:35+00:00",
      "user_custom": "custom",
      "user_id": "1230984",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-02-01T07:32:49+00:00",
      "user_custom": "custom",
      "user_id": "123099884",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    }
  ],
  "recordsTotal": 5
}
{
  "data": [
    {
      "balance": 400,
      "email": "z.checky-email@email.com",
      "enabled": false,
      "register_date": "2019-01-30T10:24:53+00:00",
      "user_custom": "jecky",
      "user_id": "1234",
      "user_name": "z.jecky",
      "wallet_amount": 0,
      "wallet_currency": "USD"
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-01-31T13:19:10+00:00",
      "user_custom": null,
      "user_id": "1234918",
      "user_name": "testUser",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-01-31T13:21:10+00:00",
      "user_custom": "custom",
      "user_id": "12340099999",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-02-01T07:32:35+00:00",
      "user_custom": "custom",
      "user_id": "1230984",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-02-01T07:32:49+00:00",
      "user_custom": "custom",
      "user_id": "123099884",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    }
  ],
  "recordsTotal": 5
}
{
  "data": [
    {
      "balance": 400,
      "email": "z.checky-email@email.com",
      "enabled": false,
      "register_date": "2019-01-30T10:24:53+00:00",
      "user_custom": "jecky",
      "user_id": "1234",
      "user_name": "z.jecky",
      "wallet_amount": 0,
      "wallet_currency": "USD"
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-01-31T13:19:10+00:00",
      "user_custom": null,
      "user_id": "1234918",
      "user_name": "testUser",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-01-31T13:21:10+00:00",
      "user_custom": "custom",
      "user_id": "12340099999",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-02-01T07:32:35+00:00",
      "user_custom": "custom",
      "user_id": "1230984",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-02-01T07:32:49+00:00",
      "user_custom": "custom",
      "user_id": "123099884",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    }
  ],
  "recordsTotal": 5
}
{
  "data": [
    {
      "balance": 400,
      "email": "z.checky-email@email.com",
      "enabled": false,
      "register_date": "2019-01-30T10:24:53+00:00",
      "user_custom": "jecky",
      "user_id": "1234",
      "user_name": "z.jecky",
      "wallet_amount": 0,
      "wallet_currency": "USD"
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-01-31T13:19:10+00:00",
      "user_custom": null,
      "user_id": "1234918",
      "user_name": "testUser",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-01-31T13:21:10+00:00",
      "user_custom": "custom",
      "user_id": "12340099999",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-02-01T07:32:35+00:00",
      "user_custom": "custom",
      "user_id": "1230984",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-02-01T07:32:49+00:00",
      "user_custom": "custom",
      "user_id": "123099884",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    }
  ],
  "recordsTotal": 5
}
{
  "data": [
    {
      "balance": 400,
      "email": "z.checky-email@email.com",
      "enabled": false,
      "register_date": "2019-01-30T10:24:53+00:00",
      "user_custom": "jecky",
      "user_id": "1234",
      "user_name": "z.jecky",
      "wallet_amount": 0,
      "wallet_currency": "USD"
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-01-31T13:19:10+00:00",
      "user_custom": null,
      "user_id": "1234918",
      "user_name": "testUser",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-01-31T13:21:10+00:00",
      "user_custom": "custom",
      "user_id": "12340099999",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-02-01T07:32:35+00:00",
      "user_custom": "custom",
      "user_id": "1230984",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    },
    {
      "balance": 0,
      "email": "test@xsolla.com",
      "enabled": true,
      "register_date": "2019-02-01T07:32:49+00:00",
      "user_custom": "custom",
      "user_id": "123099884",
      "user_name": "test_user",
      "wallet_amount": 0,
      "wallet_currency": null
    }
  ],
  "recordsTotal": 5
}

获取所有虚拟物品

获取项目所有用户的虚拟物品。

HTTP请求

Copy
Full screen
Small screen
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/users/virtual_items/total

参数Type描述
project_id
integer项目ID。
user_id
string用户ID。
offset
integer元素编号,从该元素开始生成列表(从0开始数)。
limit
integer页面上元素数量的限制。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/users/virtual_items/total?limit=100&offset=0

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url 'https://api.xsolla.com/merchant/v2/projects/{project_id}/users/virtual_items/total?offset=0&limit=100' \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.xsolla.com/merchant/v2/projects/{project_id}/users/virtual_items/total?offset=0&limit=100",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Basic <your_authorization_basic_key>"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/virtual_items/total?offset=0&limit=100");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/projects/{project_id}/users/virtual_items/total?offset=0&limit=100", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/virtual_items/total?offset=0&limit=100")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://api.xsolla.com/merchant/v2/projects/{project_id}/users/virtual_items/total?offset=0&limit=100")
  .header("authorization", "Basic <your_authorization_basic_key>")
  .asString();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/projects/{project_id}/users/virtual_items/total?offset=0&limit=100");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
[
  {
    "user_id": "1234",
    "virtual_items": [
      {
        "id": 162958,
        "quantity": 1,
        "sku": "12394"
      }
    ]
  }
]
[
  {
    "user_id": "1234",
    "virtual_items": [
      {
        "id": 162958,
        "quantity": 1,
        "sku": "12394"
      }
    ]
  }
]
[
  {
    "user_id": "1234",
    "virtual_items": [
      {
        "id": 162958,
        "quantity": 1,
        "sku": "12394"
      }
    ]
  }
]
[
  {
    "user_id": "1234",
    "virtual_items": [
      {
        "id": 162958,
        "quantity": 1,
        "sku": "12394"
      }
    ]
  }
]
[
  {
    "user_id": "1234",
    "virtual_items": [
      {
        "id": 162958,
        "quantity": 1,
        "sku": "12394"
      }
    ]
  }
]
[
  {
    "user_id": "1234",
    "virtual_items": [
      {
        "id": 162958,
        "quantity": 1,
        "sku": "12394"
      }
    ]
  }
]
[
  {
    "user_id": "1234",
    "virtual_items": [
      {
        "id": 162958,
        "quantity": 1,
        "sku": "12394"
      }
    ]
  }
]
[
  {
    "user_id": "1234",
    "virtual_items": [
      {
        "id": 162958,
        "quantity": 1,
        "sku": "12394"
      }
    ]
  }
]

报告

搜索所有交易

基于特定搜索参数获取交易列表。将在API的响应中返回JSON、CSV或XLS。

HTTP请求

Copy
Full screen
Small screen
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/search.{format}

参数类型描述
merchant_id
integer商户 ID。 必需
format
string数据格式:json / csv / xls。 必需
datetime_from
datetime日期范围的开始时间。
datetime_to
datetime日期范围的结束时间。
project_id
integer项目ID。
show_dry_run
boolean是否包括测试交易。
transaction_id
integer交易ID。
phone
string用户电话号码(采用国际格式)。user.email
user_id
string用户ID。
user_name
string用户名。
user_custom
string用户标识的自定义参数。
email
string用户电子邮件。
external_id
string交易外部ID。
offset
integer元素编号,从该元素开始生成列表(从0开始数)。
limit
integer页面上元素数量的限制。
transaction_type
string操作的类型,可以是"payment"、"coupon"、"inGamePurchase"、"internal"或"cancellation"。
status
string其他交易状态:created/processing/done/canceled/error/review/refunded/awaitingRefund。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/search.json?datetime_from=2019-02-08T10:00:00Z&datetime_to=2019-02-08T10:15:00Z

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url 'https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/search.json?datetime_from=2019-02-08T10%3A00%3A00Z&datetime_to=2019-02-08T10%3A15%3A00Z' \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/search.json');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString(array(
  'datetime_from' => '2019-02-08T10:00:00Z',
  'datetime_to' => '2019-02-08T10:15:00Z'
)));

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/search.json?datetime_from=2019-02-08T10%3A00%3A00Z&datetime_to=2019-02-08T10%3A15%3A00Z");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/merchants/{merchant_id}/reports/transactions/search.json?datetime_from=2019-02-08T10%3A00%3A00Z&datetime_to=2019-02-08T10%3A15%3A00Z", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/search.json?datetime_from=2019-02-08T10%3A00%3A00Z&datetime_to=2019-02-08T10%3A15%3A00Z")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/search.json?datetime_from=2019-02-08T10%3A00%3A00Z&datetime_to=2019-02-08T10%3A15%3A00Z")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/search.json?datetime_from=2019-02-08T10%3A00%3A00Z&datetime_to=2019-02-08T10%3A15%3A00Z");
xhr.setRequestHeader("authorization", "Basic MjM0MDpaSGdiU0RWUDZMdEFKVld1");

xhr.send(data);
响应
[
  {
    "payment_details": {
      "payment": {
        "amount": 86.68,
        "amount_from_ps": 86.68,
        "currency": "RUB"
      },
      "sales_tax": {
        "amount": 0,
        "percent": 0
      }
    },
    "purchase": {
      "pin_codes": {
        "amount": null,
        "content": null,
        "currency": null
      },
      "simple_checkout": {
        "amount": 0,
        "currency": "RUB"
      },
      "subscription": {
        "name": null
      },
      "virtual_currency": {
        "amount": 0,
        "name": "Maple"
      },
      "virtual_items": "Duck"
    },
    "transaction": {
      "dry_run": 2,
      "external_id": null,
      "id": 141819657,
      "is_refund_allowed": 1,
      "payment_method": {
        "id": 98,
        "name": "PayPal"
      },
      "project": {
        "id": 89753,
        "name": "Farm II Project"
      },
      "refund_reason": "Test payment",
      "status": "canceled",
      "transfer_date": "2019-02-08T13:14:08+03:00"
    },
    "user": {
      "country": "RU",
      "custom": null,
      "email": "j.johns@transaction.com",
      "id": "j.johns",
      "name": "j.johns",
      "phone": null
    }
  }
]
[
  {
    "payment_details": {
      "payment": {
        "amount": 86.68,
        "amount_from_ps": 86.68,
        "currency": "RUB"
      },
      "sales_tax": {
        "amount": 0,
        "percent": 0
      }
    },
    "purchase": {
      "pin_codes": {
        "amount": null,
        "content": null,
        "currency": null
      },
      "simple_checkout": {
        "amount": 0,
        "currency": "RUB"
      },
      "subscription": {
        "name": null
      },
      "virtual_currency": {
        "amount": 0,
        "name": "Maple"
      },
      "virtual_items": "Duck"
    },
    "transaction": {
      "dry_run": 2,
      "external_id": null,
      "id": 141819657,
      "is_refund_allowed": 1,
      "payment_method": {
        "id": 24,
        "name": "PayPal"
      },
      "project": {
        "id": 89753,
        "name": "Farm II Project"
      },
      "refund_reason": "Test payment",
      "status": "canceled",
      "transfer_date": "2019-02-08T13:14:08+03:00"
    },
    "user": {
      "country": "RU",
      "custom": null,
      "email": "j.johns@transaction.com",
      "id": "j.johns",
      "name": "j.johns",
      "phone": null
    }
  }
]
[
  {
    "payment_details": {
      "payment": {
        "amount": 86.68,
        "amount_from_ps": 86.68,
        "currency": "RUB"
      },
      "sales_tax": {
        "amount": 0,
        "percent": 0
      }
    },
    "purchase": {
      "pin_codes": {
        "amount": null,
        "content": null,
        "currency": null
      },
      "simple_checkout": {
        "amount": 0,
        "currency": "RUB"
      },
      "subscription": {
        "name": null
      },
      "virtual_currency": {
        "amount": 0,
        "name": "Maple"
      },
      "virtual_items": "Duck"
    },
    "transaction": {
      "dry_run": 2,
      "external_id": null,
      "id": 141819657,
      "is_refund_allowed": 1,
      "payment_method": {
        "id": 24,
        "name": "PayPal"
      },
      "project": {
        "id": 89753,
        "name": "Farm II Project"
      },
      "refund_reason": "Test payment",
      "status": "canceled",
      "transfer_date": "2019-02-08T13:14:08+03:00"
    },
    "user": {
      "country": "RU",
      "custom": null,
      "email": "j.johns@transaction.com",
      "id": "j.johns",
      "name": "j.johns",
      "phone": null
    }
  }
]
[
  {
    "payment_details": {
      "payment": {
        "amount": 86.68,
        "amount_from_ps": 86.68,
        "currency": "RUB"
      },
      "sales_tax": {
        "amount": 0,
        "percent": 0
      }
    },
    "purchase": {
      "pin_codes": {
        "amount": null,
        "content": null,
        "currency": null
      },
      "simple_checkout": {
        "amount": 0,
        "currency": "RUB"
      },
      "subscription": {
        "name": null
      },
      "virtual_currency": {
        "amount": 0,
        "name": "Maple"
      },
      "virtual_items": "Duck"
    },
    "transaction": {
      "dry_run": 2,
      "external_id": null,
      "id": 141819657,
      "is_refund_allowed": 1,
      "payment_method": {
        "id": 24,
        "name": "PayPal"
      },
      "project": {
        "id": 89753,
        "name": "Farm II Project"
      },
      "refund_reason": "Test payment",
      "status": "canceled",
      "transfer_date": "2019-02-08T13:14:08+03:00"
    },
    "user": {
      "country": "RU",
      "custom": null,
      "email": "j.johns@transaction.com",
      "id": "j.johns",
      "name": "j.johns",
      "phone": null
    }
  }
]
[
  {
    "payment_details": {
      "payment": {
        "amount": 86.68,
        "amount_from_ps": 86.68,
        "currency": "RUB"
      },
      "sales_tax": {
        "amount": 0,
        "percent": 0
      }
    },
    "purchase": {
      "pin_codes": {
        "amount": null,
        "content": null,
        "currency": null
      },
      "simple_checkout": {
        "amount": 0,
        "currency": "RUB"
      },
      "subscription": {
        "name": null
      },
      "virtual_currency": {
        "amount": 0,
        "name": "Maple"
      },
      "virtual_items": "Duck"
    },
    "transaction": {
      "dry_run": 2,
      "external_id": null,
      "id": 141819657,
      "is_refund_allowed": 1,
      "payment_method": {
        "id": 24,
        "name": "PayPal"
      },
      "project": {
        "id": 89753,
        "name": "Farm II Project"
      },
      "refund_reason": "Test payment",
      "status": "canceled",
      "transfer_date": "2019-02-08T13:14:08+03:00"
    },
    "user": {
      "country": "RU",
      "custom": null,
      "email": "j.johns@transaction.com",
      "id": "j.johns",
      "name": "j.johns",
      "phone": null
    }
  }
]
[
  {
    "payment_details": {
      "payment": {
        "amount": 86.68,
        "amount_from_ps": 86.68,
        "currency": "RUB"
      },
      "sales_tax": {
        "amount": 0,
        "percent": 0
      }
    },
    "purchase": {
      "pin_codes": {
        "amount": null,
        "content": null,
        "currency": null
      },
      "simple_checkout": {
        "amount": 0,
        "currency": "RUB"
      },
      "subscription": {
        "name": null
      },
      "virtual_currency": {
        "amount": 0,
        "name": "Maple"
      },
      "virtual_items": "Duck"
    },
    "transaction": {
      "dry_run": 2,
      "external_id": null,
      "id": 141819657,
      "is_refund_allowed": 1,
      "payment_method": {
        "id": 24,
        "name": "PayPal"
      },
      "project": {
        "id": 89753,
        "name": "Farm II Project"
      },
      "refund_reason": "Test payment",
      "status": "canceled",
      "transfer_date": "2019-02-08T13:14:08+03:00"
    },
    "user": {
      "country": "RU",
      "custom": null,
      "email": "j.johns@transaction.com",
      "id": "j.johns",
      "name": "j.johns",
      "phone": null
    }
  }
]
[
  {
    "payment_details": {
      "payment": {
        "amount": 86.68,
        "amount_from_ps": 86.68,
        "currency": "RUB"
      },
      "sales_tax": {
        "amount": 0,
        "percent": 0
      }
    },
    "purchase": {
      "pin_codes": {
        "amount": null,
        "content": null,
        "currency": null
      },
      "simple_checkout": {
        "amount": 0,
        "currency": "RUB"
      },
      "subscription": {
        "name": null
      },
      "virtual_currency": {
        "amount": 0,
        "name": "Maple"
      },
      "virtual_items": "Duck"
    },
    "transaction": {
      "dry_run": 2,
      "external_id": null,
      "id": 141819657,
      "is_refund_allowed": 1,
      "payment_method": {
        "id": 24,
        "name": "PayPal"
      },
      "project": {
        "id": 89753,
        "name": "Farm II Project"
      },
      "refund_reason": "Test payment",
      "status": "canceled",
      "transfer_date": "2019-02-08T13:14:08+03:00"
    },
    "user": {
      "country": "RU",
      "custom": null,
      "email": "j.johns@transaction.com",
      "id": "j.johns",
      "name": "j.johns",
      "phone": null
    }
  }
]
[
  {
    "payment_details": {
      "payment": {
        "amount": 86.68,
        "amount_from_ps": 86.68,
        "currency": "RUB"
      },
      "sales_tax": {
        "amount": 0,
        "percent": 0
      }
    },
    "purchase": {
      "pin_codes": {
        "amount": null,
        "content": null,
        "currency": null
      },
      "simple_checkout": {
        "amount": 0,
        "currency": "RUB"
      },
      "subscription": {
        "name": null
      },
      "virtual_currency": {
        "amount": 0,
        "name": "Maple"
      },
      "virtual_items": "Duck"
    },
    "transaction": {
      "dry_run": 2,
      "external_id": null,
      "id": 141819657,
      "is_refund_allowed": 1,
      "payment_method": {
        "id": 24,
        "name": "PayPal"
      },
      "project": {
        "id": 89753,
        "name": "Farm II Project"
      },
      "refund_reason": "Test payment",
      "status": "canceled",
      "transfer_date": "2019-02-08T13:14:08+03:00"
    },
    "user": {
      "country": "RU",
      "custom": null,
      "email": "j.johns@transaction.com",
      "id": "j.johns",
      "name": "j.johns",
      "phone": null
    }
  }
]

获取交易

按ID获取完整交易信息。

HTTP请求

Copy
Full screen
Small screen
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/details

参数类型描述
merchant_id
integer商户 ID。 必需
transaction_id
integer交易ID。 必需
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/details

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/details \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/details');
$request->setRequestMethod('GET');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/details");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/details", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/details")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/details")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/details");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "customer_details": {
    "billing_address": "",
    "bin": "",
    "browser_language": "",
    "country": "US",
    "ip": "209.11.22.33",
    "paystation_country": "",
    "phone": null,
    "timezone": "",
    "user_id": "user1",
    "user_name": "John Smith"
  },
  "finance_details": {
    "payment": {
      "amount": "0.04",
      "currency": "USD"
    },
    "payment_method_fee": {
      "amount": "0.01",
      "currency": "USD"
    },
    "payment_method_sum": {
      "amount": "0.04",
      "currency": "USD"
    },
    "payout": {
      "amount": "1.25",
      "currency": "RUB"
    },
    "payout_currency_rate": "62.4080582524",
    "repatriation_commission": {
      "amount": "0",
      "currency": "USD"
    },
    "sales_tax": {
      "amount": "0",
      "currency": "USD"
    },
    "direct_wht": {
      "amount": "0",
      "currency": "USD"
    },
    "vat": {
      "amount": "0.01",
      "currency": "USD"
    },
    "xsolla_balance_sum": {
      "amount": "0",
      "currency": "USD"
    },
    "xsolla_fee": {
      "amount": "0",
      "currency": "USD"
    }
  },
  "payment_details": {
    "card_holdername": null,
    "card_issuer": "AWESOME BANK",
    "card_month": "01",
    "card_number": "6759649826438453",
    "card_scheme": "MASTERCARD",
    "card_year": "2020",
    "customer_firstname": "",
    "customer_lastname": "",
    "enrollment": false,
    "ps_account": "8c12345ef8ce398b98b655b68",
    "zip_code": ""
  },
  "subscription_details": {
    "is_payment_from_subscription": false,
    "is_subscription_created": true
  },
  "transaction_details": {
    "amount": "0.04",
    "cancellation_date": null,
    "country": "US",
    "currency": "USD",
    "custom_parameters": null,
    "foreign_invoice": null,
    "gift_recipient_email": null,
    "gift_recipient_id": null,
    "payment_date": "2019-03-21 16:15:37",
    "payment_method": "1380",
    "payment_method_name": "Credit/Debit Cards",
    "project": "21092",
    "project_name": "Farm Fresh",
    "purchase": {
      "checkout": {
        "amount": "0",
        "currency": "USD"
      },
      "pin_codes": {
        "amount": "0",
        "content": null,
        "currency": null
      },
      "total": {
        "amount": "0.03",
        "currency": "USD"
      },
      "virtual_currency": {
        "amount": "0.03",
        "currency": "USD",
        "name": "Gold coins",
        "quantity": "2"
      },
      "virtual_items": null
    },
    "refund_comment": null,
    "refund_reason": null,
    "status": "done",
    "user_id": "user1"
  }
}
{
  "customer_details": {
    "billing_address": "",
    "bin": "",
    "browser_language": "",
    "country": "US",
    "ip": "209.11.22.33",
    "paystation_country": "",
    "phone": null,
    "timezone": "",
    "user_id": "user1",
    "user_name": "John Smith"
  },
  "finance_details": {
    "payment": {
      "amount": "0.04",
      "currency": "USD"
    },
    "payment_method_fee": {
      "amount": "0.01",
      "currency": "USD"
    },
    "payment_method_sum": {
      "amount": "0.04",
      "currency": "USD"
    },
    "payout": {
      "amount": "1.25",
      "currency": "RUB"
    },
    "payout_currency_rate": "62.4080582524",
    "repatriation_commission": {
      "amount": "0",
      "currency": "USD"
    },
    "sales_tax": {
      "amount": "0",
      "currency": "USD"
    },
    "direct_wht": {
      "amount": "0",
      "currency": "USD"
    },
    "vat": {
      "amount": "0.01",
      "currency": "USD"
    },
    "xsolla_balance_sum": {
      "amount": "0",
      "currency": "USD"
    },
    "xsolla_fee": {
      "amount": "0",
      "currency": "USD"
    }
  },
  "payment_details": {
    "card_holdername": null,
    "card_issuer": "AWESOME BANK",
    "card_month": "01",
    "card_number": "6759649826438453",
    "card_scheme": "MASTERCARD",
    "card_year": "2020",
    "customer_firstname": "",
    "customer_lastname": "",
    "enrollment": false,
    "ps_account": "8c12345ef8ce398b98b655b68",
    "zip_code": ""
  },
  "subscription_details": {
    "is_payment_from_subscription": false,
    "is_subscription_created": true
  },
  "transaction_details": {
    "amount": "0.04",
    "cancellation_date": null,
    "country": "US",
    "currency": "USD",
    "custom_parameters": null,
    "foreign_invoice": null,
    "gift_recipient_email": null,
    "gift_recipient_id": null,
    "payment_date": "2019-03-21 16:15:37",
    "payment_method": "1380",
    "payment_method_name": "Credit/Debit Cards",
    "project": "21092",
    "project_name": "Farm Fresh",
    "purchase": {
      "checkout": {
        "amount": "0",
        "currency": "USD"
      },
      "pin_codes": {
        "amount": "0",
        "content": null,
        "currency": null
      },
      "total": {
        "amount": "0.03",
        "currency": "USD"
      },
      "virtual_currency": {
        "amount": "0.03",
        "currency": "USD",
        "name": "Gold coins",
        "quantity": "2"
      },
      "virtual_items": null
    },
    "refund_comment": null,
    "refund_reason": null,
    "status": "done",
    "user_id": "user1"
  }
}
{
  "customer_details": {
    "billing_address": "",
    "bin": "",
    "browser_language": "",
    "country": "US",
    "ip": "209.11.22.33",
    "paystation_country": "",
    "phone": null,
    "timezone": "",
    "user_id": "user1",
    "user_name": "John Smith"
  },
  "finance_details": {
    "payment": {
      "amount": "0.04",
      "currency": "USD"
    },
    "payment_method_fee": {
      "amount": "0.01",
      "currency": "USD"
    },
    "payment_method_sum": {
      "amount": "0.04",
      "currency": "USD"
    },
    "payout": {
      "amount": "1.25",
      "currency": "RUB"
    },
    "payout_currency_rate": "62.4080582524",
    "repatriation_commission": {
      "amount": "0",
      "currency": "USD"
    },
    "sales_tax": {
      "amount": "0",
      "currency": "USD"
    },
    "direct_wht": {
      "amount": "0",
      "currency": "USD"
    },
    "vat": {
      "amount": "0.01",
      "currency": "USD"
    },
    "xsolla_balance_sum": {
      "amount": "0",
      "currency": "USD"
    },
    "xsolla_fee": {
      "amount": "0",
      "currency": "USD"
    }
  },
  "payment_details": {
    "card_holdername": null,
    "card_issuer": "AWESOME BANK",
    "card_month": "01",
    "card_number": "6759649826438453",
    "card_scheme": "MASTERCARD",
    "card_year": "2020",
    "customer_firstname": "",
    "customer_lastname": "",
    "enrollment": false,
    "ps_account": "8c12345ef8ce398b98b655b68",
    "zip_code": ""
  },
  "subscription_details": {
    "is_payment_from_subscription": false,
    "is_subscription_created": true
  },
  "transaction_details": {
    "amount": "0.04",
    "cancellation_date": null,
    "country": "US",
    "currency": "USD",
    "custom_parameters": null,
    "foreign_invoice": null,
    "gift_recipient_email": null,
    "gift_recipient_id": null,
    "payment_date": "2019-03-21 16:15:37",
    "payment_method": "1380",
    "payment_method_name": "Credit/Debit Cards",
    "project": "21092",
    "project_name": "Farm Fresh",
    "purchase": {
      "checkout": {
        "amount": "0",
        "currency": "USD"
      },
      "pin_codes": {
        "amount": "0",
        "content": null,
        "currency": null
      },
      "total": {
        "amount": "0.03",
        "currency": "USD"
      },
      "virtual_currency": {
        "amount": "0.03",
        "currency": "USD",
        "name": "Gold coins",
        "quantity": "2"
      },
      "virtual_items": null
    },
    "refund_comment": null,
    "refund_reason": null,
    "status": "done",
    "user_id": "user1"
  }
}
{
  "customer_details": {
    "billing_address": "",
    "bin": "",
    "browser_language": "",
    "country": "US",
    "ip": "209.11.22.33",
    "paystation_country": "",
    "phone": null,
    "timezone": "",
    "user_id": "user1",
    "user_name": "John Smith"
  },
  "finance_details": {
    "payment": {
      "amount": "0.04",
      "currency": "USD"
    },
    "payment_method_fee": {
      "amount": "0.01",
      "currency": "USD"
    },
    "payment_method_sum": {
      "amount": "0.04",
      "currency": "USD"
    },
    "payout": {
      "amount": "1.25",
      "currency": "RUB"
    },
    "payout_currency_rate": "62.4080582524",
    "repatriation_commission": {
      "amount": "0",
      "currency": "USD"
    },
    "sales_tax": {
      "amount": "0",
      "currency": "USD"
    },
    "direct_wht": {
      "amount": "0",
      "currency": "USD"
    },
    "vat": {
      "amount": "0.01",
      "currency": "USD"
    },
    "xsolla_balance_sum": {
      "amount": "0",
      "currency": "USD"
    },
    "xsolla_fee": {
      "amount": "0",
      "currency": "USD"
    }
  },
  "payment_details": {
    "card_holdername": null,
    "card_issuer": "AWESOME BANK",
    "card_month": "01",
    "card_number": "6759649826438453",
    "card_scheme": "MASTERCARD",
    "card_year": "2020",
    "customer_firstname": "",
    "customer_lastname": "",
    "enrollment": false,
    "ps_account": "8c12345ef8ce398b98b655b68",
    "zip_code": ""
  },
  "subscription_details": {
    "is_payment_from_subscription": false,
    "is_subscription_created": true
  },
  "transaction_details": {
    "amount": "0.04",
    "cancellation_date": null,
    "country": "US",
    "currency": "USD",
    "custom_parameters": null,
    "foreign_invoice": null,
    "gift_recipient_email": null,
    "gift_recipient_id": null,
    "payment_date": "2019-03-21 16:15:37",
    "payment_method": "1380",
    "payment_method_name": "Credit/Debit Cards",
    "project": "21092",
    "project_name": "Farm Fresh",
    "purchase": {
      "checkout": {
        "amount": "0",
        "currency": "USD"
      },
      "pin_codes": {
        "amount": "0",
        "content": null,
        "currency": null
      },
      "total": {
        "amount": "0.03",
        "currency": "USD"
      },
      "virtual_currency": {
        "amount": "0.03",
        "currency": "USD",
        "name": "Gold coins",
        "quantity": "2"
      },
      "virtual_items": null
    },
    "refund_comment": null,
    "refund_reason": null,
    "status": "done",
    "user_id": "user1"
  }
}
{
  "customer_details": {
    "billing_address": "",
    "bin": "",
    "browser_language": "",
    "country": "US",
    "ip": "209.11.22.33",
    "paystation_country": "",
    "phone": null,
    "timezone": "",
    "user_id": "user1",
    "user_name": "John Smith"
  },
  "finance_details": {
    "payment": {
      "amount": "0.04",
      "currency": "USD"
    },
    "payment_method_fee": {
      "amount": "0.01",
      "currency": "USD"
    },
    "payment_method_sum": {
      "amount": "0.04",
      "currency": "USD"
    },
    "payout": {
      "amount": "1.25",
      "currency": "RUB"
    },
    "payout_currency_rate": "62.4080582524",
    "repatriation_commission": {
      "amount": "0",
      "currency": "USD"
    },
    "sales_tax": {
      "amount": "0",
      "currency": "USD"
    },
    "direct_wht": {
      "amount": "0",
      "currency": "USD"
    },
    "vat": {
      "amount": "0.01",
      "currency": "USD"
    },
    "xsolla_balance_sum": {
      "amount": "0",
      "currency": "USD"
    },
    "xsolla_fee": {
      "amount": "0",
      "currency": "USD"
    }
  },
  "payment_details": {
    "card_holdername": null,
    "card_issuer": "AWESOME BANK",
    "card_month": "01",
    "card_number": "6759649826438453",
    "card_scheme": "MASTERCARD",
    "card_year": "2020",
    "customer_firstname": "",
    "customer_lastname": "",
    "enrollment": false,
    "ps_account": "8c12345ef8ce398b98b655b68",
    "zip_code": ""
  },
  "subscription_details": {
    "is_payment_from_subscription": false,
    "is_subscription_created": true
  },
  "transaction_details": {
    "amount": "0.04",
    "cancellation_date": null,
    "country": "US",
    "currency": "USD",
    "custom_parameters": null,
    "foreign_invoice": null,
    "gift_recipient_email": null,
    "gift_recipient_id": null,
    "payment_date": "2019-03-21 16:15:37",
    "payment_method": "1380",
    "payment_method_name": "Credit/Debit Cards",
    "project": "21092",
    "project_name": "Farm Fresh",
    "purchase": {
      "checkout": {
        "amount": "0",
        "currency": "USD"
      },
      "pin_codes": {
        "amount": "0",
        "content": null,
        "currency": null
      },
      "total": {
        "amount": "0.03",
        "currency": "USD"
      },
      "virtual_currency": {
        "amount": "0.03",
        "currency": "USD",
        "name": "Gold coins",
        "quantity": "2"
      },
      "virtual_items": null
    },
    "refund_comment": null,
    "refund_reason": null,
    "status": "done",
    "user_id": "user1"
  }
}
{
  "customer_details": {
    "billing_address": "",
    "bin": "",
    "browser_language": "",
    "country": "US",
    "ip": "209.11.22.33",
    "paystation_country": "",
    "phone": null,
    "timezone": "",
    "user_id": "user1",
    "user_name": "John Smith"
  },
  "finance_details": {
    "payment": {
      "amount": "0.04",
      "currency": "USD"
    },
    "payment_method_fee": {
      "amount": "0.01",
      "currency": "USD"
    },
    "payment_method_sum": {
      "amount": "0.04",
      "currency": "USD"
    },
    "payout": {
      "amount": "1.25",
      "currency": "RUB"
    },
    "payout_currency_rate": "62.4080582524",
    "repatriation_commission": {
      "amount": "0",
      "currency": "USD"
    },
    "sales_tax": {
      "amount": "0",
      "currency": "USD"
    },
    "direct_wht": {
      "amount": "0",
      "currency": "USD"
    },
    "vat": {
      "amount": "0.01",
      "currency": "USD"
    },
    "xsolla_balance_sum": {
      "amount": "0",
      "currency": "USD"
    },
    "xsolla_fee": {
      "amount": "0",
      "currency": "USD"
    }
  },
  "payment_details": {
    "card_holdername": null,
    "card_issuer": "AWESOME BANK",
    "card_month": "01",
    "card_number": "6759649826438453",
    "card_scheme": "MASTERCARD",
    "card_year": "2020",
    "customer_firstname": "",
    "customer_lastname": "",
    "enrollment": false,
    "ps_account": "8c12345ef8ce398b98b655b68",
    "zip_code": ""
  },
  "subscription_details": {
    "is_payment_from_subscription": false,
    "is_subscription_created": true
  },
  "transaction_details": {
    "amount": "0.04",
    "cancellation_date": null,
    "country": "US",
    "currency": "USD",
    "custom_parameters": null,
    "foreign_invoice": null,
    "gift_recipient_email": null,
    "gift_recipient_id": null,
    "payment_date": "2019-03-21 16:15:37",
    "payment_method": "1380",
    "payment_method_name": "Credit/Debit Cards",
    "project": "21092",
    "project_name": "Farm Fresh",
    "purchase": {
      "checkout": {
        "amount": "0",
        "currency": "USD"
      },
      "pin_codes": {
        "amount": "0",
        "content": null,
        "currency": null
      },
      "total": {
        "amount": "0.03",
        "currency": "USD"
      },
      "virtual_currency": {
        "amount": "0.03",
        "currency": "USD",
        "name": "Gold coins",
        "quantity": "2"
      },
      "virtual_items": null
    },
    "refund_comment": null,
    "refund_reason": null,
    "status": "done",
    "user_id": "user1"
  }
}
{
  "customer_details": {
    "billing_address": "",
    "bin": "",
    "browser_language": "",
    "country": "US",
    "ip": "209.11.22.33",
    "paystation_country": "",
    "phone": null,
    "timezone": "",
    "user_id": "user1",
    "user_name": "John Smith"
  },
  "finance_details": {
    "payment": {
      "amount": "0.04",
      "currency": "USD"
    },
    "payment_method_fee": {
      "amount": "0.01",
      "currency": "USD"
    },
    "payment_method_sum": {
      "amount": "0.04",
      "currency": "USD"
    },
    "payout": {
      "amount": "1.25",
      "currency": "RUB"
    },
    "payout_currency_rate": "62.4080582524",
    "repatriation_commission": {
      "amount": "0",
      "currency": "USD"
    },
    "sales_tax": {
      "amount": "0",
      "currency": "USD"
    },
    "direct_wht": {
      "amount": "0",
      "currency": "USD"
    },
    "vat": {
      "amount": "0.01",
      "currency": "USD"
    },
    "xsolla_balance_sum": {
      "amount": "0",
      "currency": "USD"
    },
    "xsolla_fee": {
      "amount": "0",
      "currency": "USD"
    }
  },
  "payment_details": {
    "card_holdername": null,
    "card_issuer": "AWESOME BANK",
    "card_month": "01",
    "card_number": "6759649826438453",
    "card_scheme": "MASTERCARD",
    "card_year": "2020",
    "customer_firstname": "",
    "customer_lastname": "",
    "enrollment": false,
    "ps_account": "8c12345ef8ce398b98b655b68",
    "zip_code": ""
  },
  "subscription_details": {
    "is_payment_from_subscription": false,
    "is_subscription_created": true
  },
  "transaction_details": {
    "amount": "0.04",
    "cancellation_date": null,
    "country": "US",
    "currency": "USD",
    "custom_parameters": null,
    "foreign_invoice": null,
    "gift_recipient_email": null,
    "gift_recipient_id": null,
    "payment_date": "2019-03-21 16:15:37",
    "payment_method": "1380",
    "payment_method_name": "Credit/Debit Cards",
    "project": "21092",
    "project_name": "Farm Fresh",
    "purchase": {
      "checkout": {
        "amount": "0",
        "currency": "USD"
      },
      "pin_codes": {
        "amount": "0",
        "content": null,
        "currency": null
      },
      "total": {
        "amount": "0.03",
        "currency": "USD"
      },
      "virtual_currency": {
        "amount": "0.03",
        "currency": "USD",
        "name": "Gold coins",
        "quantity": "2"
      },
      "virtual_items": null
    },
    "refund_comment": null,
    "refund_reason": null,
    "status": "done",
    "user_id": "user1"
  }
}
{
  "customer_details": {
    "billing_address": "",
    "bin": "",
    "browser_language": "",
    "country": "US",
    "ip": "209.11.22.33",
    "paystation_country": "",
    "phone": null,
    "timezone": "",
    "user_id": "user1",
    "user_name": "John Smith"
  },
  "finance_details": {
    "payment": {
      "amount": "0.04",
      "currency": "USD"
    },
    "payment_method_fee": {
      "amount": "0.01",
      "currency": "USD"
    },
    "payment_method_sum": {
      "amount": "0.04",
      "currency": "USD"
    },
    "payout": {
      "amount": "1.25",
      "currency": "RUB"
    },
    "payout_currency_rate": "62.4080582524",
    "repatriation_commission": {
      "amount": "0",
      "currency": "USD"
    },
    "sales_tax": {
      "amount": "0",
      "currency": "USD"
    },
    "direct_wht": {
      "amount": "0",
      "currency": "USD"
    },
    "vat": {
      "amount": "0.01",
      "currency": "USD"
    },
    "xsolla_balance_sum": {
      "amount": "0",
      "currency": "USD"
    },
    "xsolla_fee": {
      "amount": "0",
      "currency": "USD"
    }
  },
  "payment_details": {
    "card_holdername": null,
    "card_issuer": "AWESOME BANK",
    "card_month": "01",
    "card_number": "6759649826438453",
    "card_scheme": "MASTERCARD",
    "card_year": "2020",
    "customer_firstname": "",
    "customer_lastname": "",
    "enrollment": false,
    "ps_account": "8c12345ef8ce398b98b655b68",
    "zip_code": ""
  },
  "subscription_details": {
    "is_payment_from_subscription": false,
    "is_subscription_created": true
  },
  "transaction_details": {
    "amount": "0.04",
    "cancellation_date": null,
    "country": "US",
    "currency": "USD",
    "custom_parameters": null,
    "foreign_invoice": null,
    "gift_recipient_email": null,
    "gift_recipient_id": null,
    "payment_date": "2019-03-21 16:15:37",
    "payment_method": "1380",
    "payment_method_name": "Credit/Debit Cards",
    "project": "21092",
    "project_name": "Farm Fresh",
    "purchase": {
      "checkout": {
        "amount": "0",
        "currency": "USD"
      },
      "pin_codes": {
        "amount": "0",
        "content": null,
        "currency": null
      },
      "total": {
        "amount": "0.03",
        "currency": "USD"
      },
      "virtual_currency": {
        "amount": "0.03",
        "currency": "USD",
        "name": "Gold coins",
        "quantity": "2"
      },
      "virtual_items": null
    },
    "refund_comment": null,
    "refund_reason": null,
    "status": "done",
    "user_id": "user1"
  }
}

列示所有操作

以不同数据格式获取指定数据范围/传输/报告的所有交易的信息。将在API的响应中返回JSON、CSV或XLS。

Notice: 此API方法在高负载状态下不可用。请求数量过多的情况下可能会限流。如需了解此API方法的流量控制详情,请联系您的帐户经理。

HTTP请求

Copy
Full screen
Small screen
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/registry.{format}

参数类型描述
merchant_id
integer商户 ID。 必需
format
string数据格式:json / csv / xls。 必需
merchant_of_records
string在册商户。可以是xsollamerchant或不指定。如果为merchant,则返回通过合作伙伴直接帐户进行的交易。如果为xsolla,则返回非通过合作伙伴直接帐户进行的交易。如未指定,则返回所有交易。
datetime_from
datetime日期范围的开始时间。 必需
datetime_to
datetime日期范围的结束时间。 必需
project_id
integer项目ID。
show_dry_run
boolean是否包括测试交易。
transfer_id
integer交易传输 ID。
report_id
integer财务报告 ID。
limit
integer页面上元素数量的限制。
offset
integer元素编号,从该元素开始生成列表(从0开始数)。
in_transfer_currency
boolean是否用支出币种(默认为支付币种)显示所有财务数据。 必需
show_total
boolean是否在文件结尾添加总计值行。 必需
status
string交易状态。可以是'done'、'canceled'或'error'。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/registry.json?datetime_from=2019-02-10T15:30:00Z&datetime_to=2019-02-11T16:00:00Z&project_id=21092&status=done

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url 'https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/registry.json?status=done&datetime_from=2019-02-10T15%3A30%3A00Z&datetime_to=2019-02-11T16%3A00%3A00Z&project_id=21092' \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/registry.json');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString(array(
  'status' => 'done',
  'datetime_from' => '2019-02-10T15:30:00Z',
  'datetime_to' => '2019-02-11T16:00:00Z',
  'project_id' => '21092'
)));

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/registry.json?status=done&datetime_from=2019-02-10T15%3A30%3A00Z&datetime_to=2019-02-11T16%3A00%3A00Z&project_id=21092");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/merchants/{merchant_id}/reports/transactions/registry.json?status=done&datetime_from=2019-02-10T15%3A30%3A00Z&datetime_to=2019-02-11T16%3A00%3A00Z&project_id=21092", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/registry.json?status=done&datetime_from=2019-02-10T15%3A30%3A00Z&datetime_to=2019-02-11T16%3A00%3A00Z&project_id=21092")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/registry.json?status=done&datetime_from=2019-02-10T15%3A30%3A00Z&datetime_to=2019-02-11T16%3A00%3A00Z&project_id=21092")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/registry.json?status=done&datetime_from=2019-02-10T15%3A30%3A00Z&datetime_to=2019-02-11T16%3A00%3A00Z&project_id=21092");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
[
  {
    "payment_details": {
      "chargebackPenalty": {
        "amount": 0
      },
      "commission_agent": {
        "amount": 0,
        "percent": 0
      },
      "commission_agent_fixed": 0,
      "commission_ps": {
        "amount": 0,
        "fixed_amount": 0,
        "percent": 0
      },
      "commission_ps_from_vat": {
        "amount": 0
      },
      "commission_user": {
        "amount": 0.01,
        "percent": 33.33
      },
      "commission_xsolla": {
        "amount": 0,
        "fixed_amount": 0,
        "percent": 5
      },
      "cpa_network_commission": {
        "amount": 0,
        "percent": 0
      },
      "payment": {
        "amount": 0.03,
        "amount_from_ps": 0,
        "currency": "USD"
      },
      "payout": {
        "amount": 0.02,
        "amount_from_ps": 0,
        "currency": "RUB",
        "fx_rate": 64.1386407767,
        "percent": 100
      },
      "direct_wht": {
        "amount": 0,
        "percent": 0
      }
      "refundPenalty": {
        "amount": 0
      },
      "repatriation_costs": {
        "amount": 0,
        "percent": 0
      },
      "sales_tax": {
        "amount": 0,
        "percent": 0
      },
      "vat": {
        "amount": 0,
        "percent": 0,
        "user_amount": 0,
        "user_percent": 0
      }
    },
    "purchase": {
      "friend": {
        "email": null,
        "user_id": null
      },
      "items_amount": 1,
      "pin_codes": {
        "amount": null,
        "content": null,
        "currency": null
      },
      "purchase_amount": 0.02,
      "simple_checkout": {
        "amount": null,
        "currency": null
      },
      "subscription": {
        "name": null,
        "plan_id": null,
        "subscription_id": null
      },
      "virtual_currency": {
        "amount": 0.02,
        "currency": "USD"
      },
      "virtual_currency_amount": 1,
      "virtual_items": {
        "amount": null,
        "content": null,
        "currency": null
      }
    },
    "transaction": {
      "custom_parameters": null,
      "direct_account": 0,
      "dry_run": 0,
      "external_id": null,
      "id": 418756634,
      "payment_method": {
        "class": "Digital Payment Methods",
        "id": 2760,
        "name": "Your Balance"
      },
      "project": {
        "id": 21092,
        "name": "Smith"
      },
      "refund_reason": null,
      "refund_reason_comment": null,
      "status": "done",
      "transfer_date": "2019-02-11T13:32:00+03:00"
    },
    "user": {
      "country": "US",
      "custom": null,
      "email": "t.lucky@transaction.com",
      "id": "a.smith",
      "marketplace": "Pay Station",
      "name": "Tom",
      "phone": null,
      "ip": "209.11.22.33"
    },
    "user_balance": {
      "payment_currency": {
        "deduction_amount": 0,
        "payout_amount_from_balance": 0.02,
        "purchase_amount_from_balance": 0.02
      }
    }
  }
]
[
  {
    "payment_details": {
      "chargebackPenalty": {
        "amount": 0
      },
      "commission_agent": {
        "amount": 0,
        "percent": 0
      },
      "commission_agent_fixed": 0,
      "commission_ps": {
        "amount": 0,
        "fixed_amount": 0,
        "percent": 0
      },
      "commission_ps_from_vat": {
        "amount": 0
      },
      "commission_user": {
        "amount": 0.01,
        "percent": 33.33
      },
      "commission_xsolla": {
        "amount": 0,
        "fixed_amount": 0,
        "percent": 5
      },
      "cpa_network_commission": {
        "amount": 0,
        "percent": 0
      },
      "payment": {
        "amount": 0.03,
        "amount_from_ps": 0,
        "currency": "USD"
      },
      "payout": {
        "amount": 0.02,
        "amount_from_ps": 0,
        "currency": "RUB",
        "fx_rate": 64.1386407767,
        "percent": 100
      },
      "direct_wht": {
        "amount": 0,
        "percent": 0
      }
      "refundPenalty": {
        "amount": 0
      },
      "repatriation_costs": {
        "amount": 0,
        "percent": 0
      },
      "sales_tax": {
        "amount": 0,
        "percent": 0
      },
      "vat": {
        "amount": 0,
        "percent": 0,
        "user_amount": 0,
        "user_percent": 0
      }
    },
    "purchase": {
      "friend": {
        "email": null,
        "user_id": null
      },
      "items_amount": 1,
      "pin_codes": {
        "amount": null,
        "content": null,
        "currency": null
      },
      "purchase_amount": 0.02,
      "simple_checkout": {
        "amount": null,
        "currency": null
      },
      "subscription": {
        "name": null,
        "plan_id": null,
        "subscription_id": null
      },
      "virtual_currency": {
        "amount": 0.02,
        "currency": "USD"
      },
      "virtual_currency_amount": 1,
      "virtual_items": {
        "amount": null,
        "content": null,
        "currency": null
      }
    },
    "transaction": {
      "custom_parameters": null,
      "direct_account": 0,
      "dry_run": 0,
      "external_id": null,
      "id": 418756634,
      "payment_method": {
        "class": "Digital Payment Methods",
        "id": 2760,
        "name": "Your Balance"
      },
      "project": {
        "id": 21092,
        "name": "Smith"
      },
      "refund_reason": null,
      "refund_reason_comment": null,
      "status": "done",
      "transfer_date": "2019-02-11T13:32:00+03:00"
    },
    "user": {
      "country": "US",
      "custom": null,
      "email": "t.lucky@transaction.com",
      "id": "a.smith",
      "marketplace": "Pay Station",
      "name": "Tom",
      "phone": null,
      "ip": "209.11.22.33"
    },
    "user_balance": {
      "payment_currency": {
        "deduction_amount": 0,
        "payout_amount_from_balance": 0.02,
        "purchase_amount_from_balance": 0.02
      }
    }
  }
]
[
  {
    "payment_details": {
      "chargebackPenalty": {
        "amount": 0
      },
      "commission_agent": {
        "amount": 0,
        "percent": 0
      },
      "commission_agent_fixed": 0,
      "commission_ps": {
        "amount": 0,
        "fixed_amount": 0,
        "percent": 0
      },
      "commission_ps_from_vat": {
        "amount": 0
      },
      "commission_user": {
        "amount": 0.01,
        "percent": 33.33
      },
      "commission_xsolla": {
        "amount": 0,
        "fixed_amount": 0,
        "percent": 5
      },
      "cpa_network_commission": {
        "amount": 0,
        "percent": 0
      },
      "payment": {
        "amount": 0.03,
        "amount_from_ps": 0,
        "currency": "USD"
      },
      "payout": {
        "amount": 0.02,
        "amount_from_ps": 0,
        "currency": "RUB",
        "fx_rate": 64.1386407767,
        "percent": 100
      },
      "direct_wht": {
        "amount": 0,
        "percent": 0
      }
      "refundPenalty": {
        "amount": 0
      },
      "repatriation_costs": {
        "amount": 0,
        "percent": 0
      },
      "sales_tax": {
        "amount": 0,
        "percent": 0
      },
      "vat": {
        "amount": 0,
        "percent": 0,
        "user_amount": 0,
        "user_percent": 0
      }
    },
    "purchase": {
      "friend": {
        "email": null,
        "user_id": null
      },
      "items_amount": 1,
      "pin_codes": {
        "amount": null,
        "content": null,
        "currency": null
      },
      "purchase_amount": 0.02,
      "simple_checkout": {
        "amount": null,
        "currency": null
      },
      "subscription": {
        "name": null,
        "plan_id": null,
        "subscription_id": null
      },
      "virtual_currency": {
        "amount": 0.02,
        "currency": "USD"
      },
      "virtual_currency_amount": 1,
      "virtual_items": {
        "amount": null,
        "content": null,
        "currency": null
      }
    },
    "transaction": {
      "custom_parameters": null,
      "direct_account": 0,
      "dry_run": 0,
      "external_id": null,
      "id": 418756634,
      "payment_method": {
        "class": "Digital Payment Methods",
        "id": 2760,
        "name": "Your Balance"
      },
      "project": {
        "id": 21092,
        "name": "Smith"
      },
      "refund_reason": null,
      "refund_reason_comment": null,
      "status": "done",
      "transfer_date": "2019-02-11T13:32:00+03:00"
    },
    "user": {
      "country": "US",
      "custom": null,
      "email": "t.lucky@transaction.com",
      "id": "a.smith",
      "marketplace": "Pay Station",
      "name": "Tom",
      "phone": null,
      "ip": "209.11.22.33"
    },
    "user_balance": {
      "payment_currency": {
        "deduction_amount": 0,
        "payout_amount_from_balance": 0.02,
        "purchase_amount_from_balance": 0.02
      }
    }
  }
]
[
  {
    "payment_details": {
      "chargebackPenalty": {
        "amount": 0
      },
      "commission_agent": {
        "amount": 0,
        "percent": 0
      },
      "commission_agent_fixed": 0,
      "commission_ps": {
        "amount": 0,
        "fixed_amount": 0,
        "percent": 0
      },
      "commission_ps_from_vat": {
        "amount": 0
      },
      "commission_user": {
        "amount": 0.01,
        "percent": 33.33
      },
      "commission_xsolla": {
        "amount": 0,
        "fixed_amount": 0,
        "percent": 5
      },
      "cpa_network_commission": {
        "amount": 0,
        "percent": 0
      },
      "payment": {
        "amount": 0.03,
        "amount_from_ps": 0,
        "currency": "USD"
      },
      "payout": {
        "amount": 0.02,
        "amount_from_ps": 0,
        "currency": "RUB",
        "fx_rate": 64.1386407767,
        "percent": 100
      },
      "direct_wht": {
        "amount": 0,
        "percent": 0
      }
      "refundPenalty": {
        "amount": 0
      },
      "repatriation_costs": {
        "amount": 0,
        "percent": 0
      },
      "sales_tax": {
        "amount": 0,
        "percent": 0
      },
      "vat": {
        "amount": 0,
        "percent": 0,
        "user_amount": 0,
        "user_percent": 0
      }
    },
    "purchase": {
      "friend": {
        "email": null,
        "user_id": null
      },
      "items_amount": 1,
      "pin_codes": {
        "amount": null,
        "content": null,
        "currency": null
      },
      "purchase_amount": 0.02,
      "simple_checkout": {
        "amount": null,
        "currency": null
      },
      "subscription": {
        "name": null,
        "plan_id": null,
        "subscription_id": null
      },
      "virtual_currency": {
        "amount": 0.02,
        "currency": "USD"
      },
      "virtual_currency_amount": 1,
      "virtual_items": {
        "amount": null,
        "content": null,
        "currency": null
      }
    },
    "transaction": {
      "custom_parameters": null,
      "direct_account": 0,
      "dry_run": 0,
      "external_id": null,
      "id": 418756634,
      "payment_method": {
        "class": "Digital Payment Methods",
        "id": 2760,
        "name": "Your Balance"
      },
      "project": {
        "id": 21092,
        "name": "Smith"
      },
      "refund_reason": null,
      "refund_reason_comment": null,
      "status": "done",
      "transfer_date": "2019-02-11T13:32:00+03:00"
    },
    "user": {
      "country": "US",
      "custom": null,
      "email": "t.lucky@transaction.com",
      "id": "a.smith",
      "marketplace": "Pay Station",
      "name": "Tom",
      "phone": null,
      "ip": "209.11.22.33"
    },
    "user_balance": {
      "payment_currency": {
        "deduction_amount": 0,
        "payout_amount_from_balance": 0.02,
        "purchase_amount_from_balance": 0.02
      }
    }
  }
]
[
  {
    "payment_details": {
      "chargebackPenalty": {
        "amount": 0
      },
      "commission_agent": {
        "amount": 0,
        "percent": 0
      },
      "commission_agent_fixed": 0,
      "commission_ps": {
        "amount": 0,
        "fixed_amount": 0,
        "percent": 0
      },
      "commission_ps_from_vat": {
        "amount": 0
      },
      "commission_user": {
        "amount": 0.01,
        "percent": 33.33
      },
      "commission_xsolla": {
        "amount": 0,
        "fixed_amount": 0,
        "percent": 5
      },
      "cpa_network_commission": {
        "amount": 0,
        "percent": 0
      },
      "payment": {
        "amount": 0.03,
        "amount_from_ps": 0,
        "currency": "USD"
      },
      "payout": {
        "amount": 0.02,
        "amount_from_ps": 0,
        "currency": "RUB",
        "fx_rate": 64.1386407767,
        "percent": 100
      },
      "direct_wht": {
        "amount": 0,
        "percent": 0
      }
      "refundPenalty": {
        "amount": 0
      },
      "repatriation_costs": {
        "amount": 0,
        "percent": 0
      },
      "sales_tax": {
        "amount": 0,
        "percent": 0
      },
      "vat": {
        "amount": 0,
        "percent": 0,
        "user_amount": 0,
        "user_percent": 0
      }
    },
    "purchase": {
      "friend": {
        "email": null,
        "user_id": null
      },
      "items_amount": 1,
      "pin_codes": {
        "amount": null,
        "content": null,
        "currency": null
      },
      "purchase_amount": 0.02,
      "simple_checkout": {
        "amount": null,
        "currency": null
      },
      "subscription": {
        "name": null,
        "plan_id": null,
        "subscription_id": null
      },
      "virtual_currency": {
        "amount": 0.02,
        "currency": "USD"
      },
      "virtual_currency_amount": 1,
      "virtual_items": {
        "amount": null,
        "content": null,
        "currency": null
      }
    },
    "transaction": {
      "custom_parameters": null,
      "direct_account": 0,
      "dry_run": 0,
      "external_id": null,
      "id": 418756634,
      "payment_method": {
        "class": "Digital Payment Methods",
        "id": 2760,
        "name": "Your Balance"
      },
      "project": {
        "id": 21092,
        "name": "Smith"
      },
      "refund_reason": null,
      "refund_reason_comment": null,
      "status": "done",
      "transfer_date": "2019-02-11T13:32:00+03:00"
    },
    "user": {
      "country": "US",
      "custom": null,
      "email": "t.lucky@transaction.com",
      "id": "a.smith",
      "marketplace": "Pay Station",
      "name": "Tom",
      "phone": null,
      "ip": "209.11.22.33"
    },
    "user_balance": {
      "payment_currency": {
        "deduction_amount": 0,
        "payout_amount_from_balance": 0.02,
        "purchase_amount_from_balance": 0.02
      }
    }
  }
]
[
  {
    "payment_details": {
      "chargebackPenalty": {
        "amount": 0
      },
      "commission_agent": {
        "amount": 0,
        "percent": 0
      },
      "commission_agent_fixed": 0,
      "commission_ps": {
        "amount": 0,
        "fixed_amount": 0,
        "percent": 0
      },
      "commission_ps_from_vat": {
        "amount": 0
      },
      "commission_user": {
        "amount": 0.01,
        "percent": 33.33
      },
      "commission_xsolla": {
        "amount": 0,
        "fixed_amount": 0,
        "percent": 5
      },
      "cpa_network_commission": {
        "amount": 0,
        "percent": 0
      },
      "payment": {
        "amount": 0.03,
        "amount_from_ps": 0,
        "currency": "USD"
      },
      "payout": {
        "amount": 0.02,
        "amount_from_ps": 0,
        "currency": "RUB",
        "fx_rate": 64.1386407767,
        "percent": 100
      },
      "direct_wht": {
        "amount": 0,
        "percent": 0
      }
      "refundPenalty": {
        "amount": 0
      },
      "repatriation_costs": {
        "amount": 0,
        "percent": 0
      },
      "sales_tax": {
        "amount": 0,
        "percent": 0
      },
      "vat": {
        "amount": 0,
        "percent": 0,
        "user_amount": 0,
        "user_percent": 0
      }
    },
    "purchase": {
      "friend": {
        "email": null,
        "user_id": null
      },
      "items_amount": 1,
      "pin_codes": {
        "amount": null,
        "content": null,
        "currency": null
      },
      "purchase_amount": 0.02,
      "simple_checkout": {
        "amount": null,
        "currency": null
      },
      "subscription": {
        "name": null,
        "plan_id": null,
        "subscription_id": null
      },
      "virtual_currency": {
        "amount": 0.02,
        "currency": "USD"
      },
      "virtual_currency_amount": 1,
      "virtual_items": {
        "amount": null,
        "content": null,
        "currency": null
      }
    },
    "transaction": {
      "custom_parameters": null,
      "direct_account": 0,
      "dry_run": 0,
      "external_id": null,
      "id": 418756634,
      "payment_method": {
        "class": "Digital Payment Methods",
        "id": 2760,
        "name": "Your Balance"
      },
      "project": {
        "id": 21092,
        "name": "Smith"
      },
      "refund_reason": null,
      "refund_reason_comment": null,
      "status": "done",
      "transfer_date": "2019-02-11T13:32:00+03:00"
    },
    "user": {
      "country": "US",
      "custom": null,
      "email": "t.lucky@transaction.com",
      "id": "a.smith",
      "marketplace": "Pay Station",
      "name": "Tom",
      "phone": null,
      "ip": "209.11.22.33"
    },
    "user_balance": {
      "payment_currency": {
        "deduction_amount": 0,
        "payout_amount_from_balance": 0.02,
        "purchase_amount_from_balance": 0.02
      }
    }
  }
]
[
  {
    "payment_details": {
      "chargebackPenalty": {
        "amount": 0
      },
      "commission_agent": {
        "amount": 0,
        "percent": 0
      },
      "commission_agent_fixed": 0,
      "commission_ps": {
        "amount": 0,
        "fixed_amount": 0,
        "percent": 0
      },
      "commission_ps_from_vat": {
        "amount": 0
      },
      "commission_user": {
        "amount": 0.01,
        "percent": 33.33
      },
      "commission_xsolla": {
        "amount": 0,
        "fixed_amount": 0,
        "percent": 5
      },
      "cpa_network_commission": {
        "amount": 0,
        "percent": 0
      },
      "payment": {
        "amount": 0.03,
        "amount_from_ps": 0,
        "currency": "USD"
      },
      "payout": {
        "amount": 0.02,
        "amount_from_ps": 0,
        "currency": "RUB",
        "fx_rate": 64.1386407767,
        "percent": 100
      },
      "direct_wht": {
        "amount": 0,
        "percent": 0
      }
      "refundPenalty": {
        "amount": 0
      },
      "repatriation_costs": {
        "amount": 0,
        "percent": 0
      },
      "sales_tax": {
        "amount": 0,
        "percent": 0
      },
      "vat": {
        "amount": 0,
        "percent": 0,
        "user_amount": 0,
        "user_percent": 0
      }
    },
    "purchase": {
      "friend": {
        "email": null,
        "user_id": null
      },
      "items_amount": 1,
      "pin_codes": {
        "amount": null,
        "content": null,
        "currency": null
      },
      "purchase_amount": 0.02,
      "simple_checkout": {
        "amount": null,
        "currency": null
      },
      "subscription": {
        "name": null,
        "plan_id": null,
        "subscription_id": null
      },
      "virtual_currency": {
        "amount": 0.02,
        "currency": "USD"
      },
      "virtual_currency_amount": 1,
      "virtual_items": {
        "amount": null,
        "content": null,
        "currency": null
      }
    },
    "transaction": {
      "custom_parameters": null,
      "direct_account": 0,
      "dry_run": 0,
      "external_id": null,
      "id": 418756634,
      "payment_method": {
        "class": "Digital Payment Methods",
        "id": 2760,
        "name": "Your Balance"
      },
      "project": {
        "id": 21092,
        "name": "Smith"
      },
      "refund_reason": null,
      "refund_reason_comment": null,
      "status": "done",
      "transfer_date": "2019-02-11T13:32:00+03:00"
    },
    "user": {
      "country": "US",
      "custom": null,
      "email": "t.lucky@transaction.com",
      "id": "a.smith",
      "marketplace": "Pay Station",
      "name": "Tom",
      "phone": null,
      "ip": "209.11.22.33"
    },
    "user_balance": {
      "payment_currency": {
        "deduction_amount": 0,
        "payout_amount_from_balance": 0.02,
        "purchase_amount_from_balance": 0.02
      }
    }
  }
]
[
  {
    "payment_details": {
      "chargebackPenalty": {
        "amount": 0
      },
      "commission_agent": {
        "amount": 0,
        "percent": 0
      },
      "commission_agent_fixed": 0,
      "commission_ps": {
        "amount": 0,
        "fixed_amount": 0,
        "percent": 0
      },
      "commission_ps_from_vat": {
        "amount": 0
      },
      "commission_user": {
        "amount": 0.01,
        "percent": 33.33
      },
      "commission_xsolla": {
        "amount": 0,
        "fixed_amount": 0,
        "percent": 5
      },
      "cpa_network_commission": {
        "amount": 0,
        "percent": 0
      },
      "payment": {
        "amount": 0.03,
        "amount_from_ps": 0,
        "currency": "USD"
      },
      "payout": {
        "amount": 0.02,
        "amount_from_ps": 0,
        "currency": "RUB",
        "fx_rate": 64.1386407767,
        "percent": 100
      },
      "direct_wht": {
        "amount": 0,
        "percent": 0
      }
      "refundPenalty": {
        "amount": 0
      },
      "repatriation_costs": {
        "amount": 0,
        "percent": 0
      },
      "sales_tax": {
        "amount": 0,
        "percent": 0
      },
      "vat": {
        "amount": 0,
        "percent": 0,
        "user_amount": 0,
        "user_percent": 0
      }
    },
    "purchase": {
      "friend": {
        "email": null,
        "user_id": null
      },
      "items_amount": 1,
      "pin_codes": {
        "amount": null,
        "content": null,
        "currency": null
      },
      "purchase_amount": 0.02,
      "simple_checkout": {
        "amount": null,
        "currency": null
      },
      "subscription": {
        "name": null,
        "plan_id": null,
        "subscription_id": null
      },
      "virtual_currency": {
        "amount": 0.02,
        "currency": "USD"
      },
      "virtual_currency_amount": 1,
      "virtual_items": {
        "amount": null,
        "content": null,
        "currency": null
      }
    },
    "transaction": {
      "custom_parameters": null,
      "direct_account": 0,
      "dry_run": 0,
      "external_id": null,
      "id": 418756634,
      "payment_method": {
        "class": "Digital Payment Methods",
        "id": 2760,
        "name": "Your Balance"
      },
      "project": {
        "id": 21092,
        "name": "Smith"
      },
      "refund_reason": null,
      "refund_reason_comment": null,
      "status": "done",
      "transfer_date": "2019-02-11T13:32:00+03:00"
    },
    "user": {
      "country": "US",
      "custom": null,
      "email": "t.lucky@transaction.com",
      "id": "a.smith",
      "marketplace": "Pay Station",
      "name": "Tom",
      "phone": null,
      "ip": "209.11.22.33"
    },
    "user_balance": {
      "payment_currency": {
        "deduction_amount": 0,
        "payout_amount_from_balance": 0.02,
        "purchase_amount_from_balance": 0.02
      }
    }
  }
]

列示所有汇款

按货币获取出款细目。

Notice: 此API方法在高负载状态下不可用。请求数量过多的情况下可能会限流。如需了解此API方法的流量控制详情,请联系您的帐户经理。

HTTP请求

Copy
Full screen
Small screen
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/summary/transfer

参数类型描述
merchant_id
integer商户 ID。 必需
datetime_from
datetime日期范围的开始时间。
datetime_to
datetime日期范围的结束时间。
integer开发者法律实体ID。
status
string交易状态。可以是'done'、'canceled'或'error'。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/summary/transfer?status=done

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url 'https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/summary/transfer?status=done' \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/summary/transfer');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString(array(
  'status' => 'done'
)));

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/summary/transfer?status=done");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/merchants/{merchant_id}/reports/transactions/summary/transfer?status=done", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'
require 'openssl'

url = URI("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/summary/transfer?status=done")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/summary/transfer?status=done")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/summary/transfer?status=done");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
[
  {
    "IsoCurrency": "RUB",
    "PaymentsAmount": 223679.84,
    "SumCommissionAgent": 11329.58,
    "SumCommissionUserTaxes": 153.67,
    "SumItems": 571325.13,
    "SumNominalSum": 214792.98,
    "SumOutProject": 551096.13,
    "SumPayoutSum": 193316.71,
    "TaxesOfPayments": 171.56,
    "DirectTaxesOfPayments": 0.46
  },
  {
    "IsoCurrency": "USD",
    "PaymentsAmount": 482.58,
    "SumCommissionAgent": 77.51,
    "SumCommissionUserTaxes": 0.07,
    "SumItems": 243777.62,
    "SumNominalSum": 493.09,
    "SumOutProject": 241787.62,
    "SumPayoutSum": 462.62,
    "TaxesOfPayments": 0.14,
    "DirectTaxesOfPayments": 0.14
  },
  {
    "IsoCurrency": "EUR",
    "PaymentsAmount": 608.2,
    "SumCommissionAgent": 55.71,
    "SumCommissionUserTaxes": 90.94,
    "SumItems": 156238.62,
    "SumNominalSum": 607.26,
    "SumOutProject": 156158.62,
    "SumPayoutSum": 460.8,
    "TaxesOfPayments": 90.94,
    "DirectTaxesOfPayments": 0.07
  }
]
[
  {
    "IsoCurrency": "RUB",
    "PaymentsAmount": 223679.84,
    "SumCommissionAgent": 11329.58,
    "SumCommissionUserTaxes": 153.67,
    "SumItems": 571325.13,
    "SumNominalSum": 214792.98,
    "SumOutProject": 551096.13,
    "SumPayoutSum": 193316.71,
    "TaxesOfPayments": 171.56,
    "DirectTaxesOfPayments": 0.46
  },
  {
    "IsoCurrency": "USD",
    "PaymentsAmount": 482.58,
    "SumCommissionAgent": 77.51,
    "SumCommissionUserTaxes": 0.07,
    "SumItems": 243777.62,
    "SumNominalSum": 493.09,
    "SumOutProject": 241787.62,
    "SumPayoutSum": 462.62,
    "TaxesOfPayments": 0.14,
    "DirectTaxesOfPayments": 0.14
  },
  {
    "IsoCurrency": "EUR",
    "PaymentsAmount": 608.2,
    "SumCommissionAgent": 55.71,
    "SumCommissionUserTaxes": 90.94,
    "SumItems": 156238.62,
    "SumNominalSum": 607.26,
    "SumOutProject": 156158.62,
    "SumPayoutSum": 460.8,
    "TaxesOfPayments": 90.94,
    "DirectTaxesOfPayments": 0.07
  }
]
[
  {
    "IsoCurrency": "RUB",
    "PaymentsAmount": 223679.84,
    "SumCommissionAgent": 11329.58,
    "SumCommissionUserTaxes": 153.67,
    "SumItems": 571325.13,
    "SumNominalSum": 214792.98,
    "SumOutProject": 551096.13,
    "SumPayoutSum": 193316.71,
    "TaxesOfPayments": 171.56,
    "DirectTaxesOfPayments": 0.46
  },
  {
    "IsoCurrency": "USD",
    "PaymentsAmount": 482.58,
    "SumCommissionAgent": 77.51,
    "SumCommissionUserTaxes": 0.07,
    "SumItems": 243777.62,
    "SumNominalSum": 493.09,
    "SumOutProject": 241787.62,
    "SumPayoutSum": 462.62,
    "TaxesOfPayments": 0.14,
    "DirectTaxesOfPayments": 0.14
  },
  {
    "IsoCurrency": "EUR",
    "PaymentsAmount": 608.2,
    "SumCommissionAgent": 55.71,
    "SumCommissionUserTaxes": 90.94,
    "SumItems": 156238.62,
    "SumNominalSum": 607.26,
    "SumOutProject": 156158.62,
    "SumPayoutSum": 460.8,
    "TaxesOfPayments": 90.94,
    "DirectTaxesOfPayments": 0.07
  }
]
[
  {
    "IsoCurrency": "RUB",
    "PaymentsAmount": 223679.84,
    "SumCommissionAgent": 11329.58,
    "SumCommissionUserTaxes": 153.67,
    "SumItems": 571325.13,
    "SumNominalSum": 214792.98,
    "SumOutProject": 551096.13,
    "SumPayoutSum": 193316.71,
    "TaxesOfPayments": 171.56,
    "DirectTaxesOfPayments": 0.46
  },
  {
    "IsoCurrency": "USD",
    "PaymentsAmount": 482.58,
    "SumCommissionAgent": 77.51,
    "SumCommissionUserTaxes": 0.07,
    "SumItems": 243777.62,
    "SumNominalSum": 493.09,
    "SumOutProject": 241787.62,
    "SumPayoutSum": 462.62,
    "TaxesOfPayments": 0.14,
    "DirectTaxesOfPayments": 0.14
  },
  {
    "IsoCurrency": "EUR",
    "PaymentsAmount": 608.2,
    "SumCommissionAgent": 55.71,
    "SumCommissionUserTaxes": 90.94,
    "SumItems": 156238.62,
    "SumNominalSum": 607.26,
    "SumOutProject": 156158.62,
    "SumPayoutSum": 460.8,
    "TaxesOfPayments": 90.94,
    "DirectTaxesOfPayments": 0.07
  }
]
[
  {
    "IsoCurrency": "RUB",
    "PaymentsAmount": 223679.84,
    "SumCommissionAgent": 11329.58,
    "SumCommissionUserTaxes": 153.67,
    "SumItems": 571325.13,
    "SumNominalSum": 214792.98,
    "SumOutProject": 551096.13,
    "SumPayoutSum": 193316.71,
    "TaxesOfPayments": 171.56,
    "DirectTaxesOfPayments": 0.46
  },
  {
    "IsoCurrency": "USD",
    "PaymentsAmount": 482.58,
    "SumCommissionAgent": 77.51,
    "SumCommissionUserTaxes": 0.07,
    "SumItems": 243777.62,
    "SumNominalSum": 493.09,
    "SumOutProject": 241787.62,
    "SumPayoutSum": 462.62,
    "TaxesOfPayments": 0.14,
    "DirectTaxesOfPayments": 0.14
  },
  {
    "IsoCurrency": "EUR",
    "PaymentsAmount": 608.2,
    "SumCommissionAgent": 55.71,
    "SumCommissionUserTaxes": 90.94,
    "SumItems": 156238.62,
    "SumNominalSum": 607.26,
    "SumOutProject": 156158.62,
    "SumPayoutSum": 460.8,
    "TaxesOfPayments": 90.94,
    "DirectTaxesOfPayments": 0.07
  }
]
[
  {
    "IsoCurrency": "RUB",
    "PaymentsAmount": 223679.84,
    "SumCommissionAgent": 11329.58,
    "SumCommissionUserTaxes": 153.67,
    "SumItems": 571325.13,
    "SumNominalSum": 214792.98,
    "SumOutProject": 551096.13,
    "SumPayoutSum": 193316.71,
    "TaxesOfPayments": 171.56,
    "DirectTaxesOfPayments": 0.46
  },
  {
    "IsoCurrency": "USD",
    "PaymentsAmount": 482.58,
    "SumCommissionAgent": 77.51,
    "SumCommissionUserTaxes": 0.07,
    "SumItems": 243777.62,
    "SumNominalSum": 493.09,
    "SumOutProject": 241787.62,
    "SumPayoutSum": 462.62,
    "TaxesOfPayments": 0.14,
    "DirectTaxesOfPayments": 0.14
  },
  {
    "IsoCurrency": "EUR",
    "PaymentsAmount": 608.2,
    "SumCommissionAgent": 55.71,
    "SumCommissionUserTaxes": 90.94,
    "SumItems": 156238.62,
    "SumNominalSum": 607.26,
    "SumOutProject": 156158.62,
    "SumPayoutSum": 460.8,
    "TaxesOfPayments": 90.94,
    "DirectTaxesOfPayments": 0.07
  }
]
[
  {
    "IsoCurrency": "RUB",
    "PaymentsAmount": 223679.84,
    "SumCommissionAgent": 11329.58,
    "SumCommissionUserTaxes": 153.67,
    "SumItems": 571325.13,
    "SumNominalSum": 214792.98,
    "SumOutProject": 551096.13,
    "SumPayoutSum": 193316.71,
    "TaxesOfPayments": 171.56,
    "DirectTaxesOfPayments": 0.46
  },
  {
    "IsoCurrency": "USD",
    "PaymentsAmount": 482.58,
    "SumCommissionAgent": 77.51,
    "SumCommissionUserTaxes": 0.07,
    "SumItems": 243777.62,
    "SumNominalSum": 493.09,
    "SumOutProject": 241787.62,
    "SumPayoutSum": 462.62,
    "TaxesOfPayments": 0.14,
    "DirectTaxesOfPayments": 0.14
  },
  {
    "IsoCurrency": "EUR",
    "PaymentsAmount": 608.2,
    "SumCommissionAgent": 55.71,
    "SumCommissionUserTaxes": 90.94,
    "SumItems": 156238.62,
    "SumNominalSum": 607.26,
    "SumOutProject": 156158.62,
    "SumPayoutSum": 460.8,
    "TaxesOfPayments": 90.94,
    "DirectTaxesOfPayments": 0.07
  }
]
[
  {
    "IsoCurrency": "RUB",
    "PaymentsAmount": 223679.84,
    "SumCommissionAgent": 11329.58,
    "SumCommissionUserTaxes": 153.67,
    "SumItems": 571325.13,
    "SumNominalSum": 214792.98,
    "SumOutProject": 551096.13,
    "SumPayoutSum": 193316.71,
    "TaxesOfPayments": 171.56,
    "DirectTaxesOfPayments": 0.46
  },
  {
    "IsoCurrency": "USD",
    "PaymentsAmount": 482.58,
    "SumCommissionAgent": 77.51,
    "SumCommissionUserTaxes": 0.07,
    "SumItems": 243777.62,
    "SumNominalSum": 493.09,
    "SumOutProject": 241787.62,
    "SumPayoutSum": 462.62,
    "TaxesOfPayments": 0.14,
    "DirectTaxesOfPayments": 0.14
  },
  {
    "IsoCurrency": "EUR",
    "PaymentsAmount": 608.2,
    "SumCommissionAgent": 55.71,
    "SumCommissionUserTaxes": 90.94,
    "SumItems": 156238.62,
    "SumNominalSum": 607.26,
    "SumOutProject": 156158.62,
    "SumPayoutSum": 460.8,
    "TaxesOfPayments": 90.94,
    "DirectTaxesOfPayments": 0.07
  }
]

列示所有报告

获取指定数据范围的财务报告列表。

HTTP请求

Copy
Full screen
Small screen
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports

参数类型描述
merchant_id
integer商户 ID。
datetime_from
datetime日期范围的开始时间。
datetime_to
datetime日期范围的结束时间。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports');
$request->setRequestMethod('GET');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/merchants/{merchant_id}/reports", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
[
  {
    "agreement_document_id": "Organization Inc_RUB",
    "currency": "RUB",
    "is_direct_payout": false,
    "is_draft_by_agreement": true,
    "month": "January",
    "report_id": 57613,
    "year": 2019
  },
  {
    "agreement_document_id": "Organization Inc_EUR",
    "currency": "USD",
    "is_direct_payout": false,
    "is_draft_by_agreement": true,
    "month": "January",
    "report_id": 57619,
    "year": 2019
  }
]
[
  {
    "agreement_document_id": "Organization Inc_RUB",
    "currency": "RUB",
    "is_direct_payout": false,
    "is_draft_by_agreement": true,
    "month": "January",
    "report_id": 57613,
    "year": 2019
  },
  {
    "agreement_document_id": "Organization Inc_EUR",
    "currency": "USD",
    "is_direct_payout": false,
    "is_draft_by_agreement": true,
    "month": "January",
    "report_id": 57619,
    "year": 2019
  }
]
[
  {
    "agreement_document_id": "Organization Inc_RUB",
    "currency": "RUB",
    "is_direct_payout": false,
    "is_draft_by_agreement": true,
    "month": "January",
    "report_id": 57613,
    "year": 2019
  },
  {
    "agreement_document_id": "Organization Inc_EUR",
    "currency": "USD",
    "is_direct_payout": false,
    "is_draft_by_agreement": true,
    "month": "January",
    "report_id": 57619,
    "year": 2019
  }
]
[
  {
    "agreement_document_id": "Organization Inc_RUB",
    "currency": "RUB",
    "is_direct_payout": false,
    "is_draft_by_agreement": true,
    "month": "January",
    "report_id": 57613,
    "year": 2019
  },
  {
    "agreement_document_id": "Organization Inc_EUR",
    "currency": "USD",
    "is_direct_payout": false,
    "is_draft_by_agreement": true,
    "month": "January",
    "report_id": 57619,
    "year": 2019
  }
]
[
  {
    "agreement_document_id": "Organization Inc_RUB",
    "currency": "RUB",
    "is_direct_payout": false,
    "is_draft_by_agreement": true,
    "month": "January",
    "report_id": 57613,
    "year": 2019
  },
  {
    "agreement_document_id": "Organization Inc_EUR",
    "currency": "USD",
    "is_direct_payout": false,
    "is_draft_by_agreement": true,
    "month": "January",
    "report_id": 57619,
    "year": 2019
  }
]
[
  {
    "agreement_document_id": "Organization Inc_RUB",
    "currency": "RUB",
    "is_direct_payout": false,
    "is_draft_by_agreement": true,
    "month": "January",
    "report_id": 57613,
    "year": 2019
  },
  {
    "agreement_document_id": "Organization Inc_EUR",
    "currency": "USD",
    "is_direct_payout": false,
    "is_draft_by_agreement": true,
    "month": "January",
    "report_id": 57619,
    "year": 2019
  }
]
[
  {
    "agreement_document_id": "Organization Inc_RUB",
    "currency": "RUB",
    "is_direct_payout": false,
    "is_draft_by_agreement": true,
    "month": "January",
    "report_id": 57613,
    "year": 2019
  },
  {
    "agreement_document_id": "Organization Inc_EUR",
    "currency": "USD",
    "is_direct_payout": false,
    "is_draft_by_agreement": true,
    "month": "January",
    "report_id": 57619,
    "year": 2019
  }
]
[
  {
    "agreement_document_id": "Organization Inc_RUB",
    "currency": "RUB",
    "is_direct_payout": false,
    "is_draft_by_agreement": true,
    "month": "January",
    "report_id": 57613,
    "year": 2019
  },
  {
    "agreement_document_id": "Organization Inc_EUR",
    "currency": "USD",
    "is_direct_payout": false,
    "is_draft_by_agreement": true,
    "month": "January",
    "report_id": 57619,
    "year": 2019
  }
]

退款请求

发送退款请求。资金将退回给用户。请在高级诀窍中了解详细退款过程。

Notice: 此API方法在高负载状态下不可用。请求数量过多的情况下可能会限流。如需了解此API方法的流量控制详情,请联系您的帐户经理。

HTTP请求

Copy
Full screen
Small screen
PUT https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/refund

参数类型描述
merchant_id
integer商户 ID。 必需
transaction_id
integer交易ID。 必需
email
string用户电子邮件。
description
string退款原因。 必需

该方法可能返回以下响应:

HTTP代码消息描述
204 No content-无错误。
200 OKThe request for a refund has been accepted. Xsolla CS will manually complete the refund. It may take up to two business days.无错误。
200 OKThe request for a refund has been accepted. Xsolla CS will automatically send the customer an email with alternative refund options as the user's method does not support direct refunds.无错误。
401 Unauthorized-访问被拒绝。
404 Not foundTransaction ID not valid. Please check payment credentials. Otherwise, contact Xsolla support at support@xsolla.com.未找到交易。
422 Unprocessable EntityWe are processing the refund request. This may take up to two business days.请求参数无效。
422 Unprocessable EntityWe are reaching the user for the information required for the refund. For details, contact Xsolla Support.请求参数无效。
422 Unprocessable EntityIncorrect payment status. Refund is possible only for payments with "completed" or "error" status.请求参数无效。
422 Unprocessable EntityTo process this request, the customer's email address field must be filled. Please specify the customer's email address and try again.请求参数无效。
422 Unprocessable EntityFull refund is unavailable because there are successful partial refunds for this transaction.请求参数无效。
422 Unprocessable EntityRefund failed. Please contact Xsolla Support to process it manually.请求参数无效。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
PUT https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/refund

Headers:
  Authorization: Basic <your_authorization_basic_key>
Content-Type: application/json

Body:
  {
  "description": "test refund request"
}
curl --request PUT \
  --url https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/refund \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"description":"test refund request"}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"description":"test refund request"}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/refund');
$request->setRequestMethod('PUT');
$request->setBody($body);

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/refund");
var request = new RestRequest(Method.PUT);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"description\":\"test refund request\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

payload = "{\"description\":\"test refund request\"}"

headers = {
    'content-type': "application/json",
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("PUT", "/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/refund", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/refund")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Basic <your_authorization_basic_key>'
request.body = "{\"description\":\"test refund request\"}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"description\":\"test refund request\"}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/refund")
  .put(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "description": "test refund request"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/refund");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应

部分退款请求

发送部分退款请求向用户退还部分付款。请注意,部分退款只适用于使用信用卡进行的付款。请在高级诀窍中了解详细退款过程。

HTTP请求

Copy
Full screen
Small screen
PUT https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/partial_refund

参数类型描述
merchant_id
integer商户 ID。 必需
transaction_id
integer交易ID。 必需
refund_amount
float以购买货币表示的退款金额。 必需
description
string退款原因。 必需
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
PUT https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/partial_refund

Headers:
  Authorization: Basic <your_authorization_basic_key>
Content-Type: application/json

Body:
  {
"refund_amount":"1.50",
"description": "test refund request"
}
curl --request PUT \
  --url https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/partial_refund \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"refund_amount":"1.50", "description":"test refund request"}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"refund_amount":"1.50", "description":"test refund request"}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/partial_refund');
$request->setRequestMethod('PUT');
$request->setBody($body);

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/partial_refund");
var request = new RestRequest(Method.PUT);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"refund_amount\":\"1.50\", \"description\":\"test refund request\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

payload = "{\"refund_amount\":\"1.50\", \"description\":\"test refund request\"}"

headers = {
    'content-type': "application/json",
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("PUT", "/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/partial_refund", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/partial_refund")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Basic <your_authorization_basic_key>'
request.body = "{\"refund_amount\":\"1.50\", \"description\":\"test refund request\"}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"refund_amount\":\"1.50\", \"description\":\"test refund request\"}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/partial_refund")
  .put(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
"refund_amount":"1.50",
"description": "test refund request"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports/transactions/{transaction_id}/partial_refund");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应

支持

列示所有事件

列出所有活动。

HTTP请求

Copy
Full screen
Small screen
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/events/messages

参数类型描述
merchant_id
integer商户ID。 必需
offset
integer元素编号,从该元素开始生成列表(从0开始数)。
limit
integer页面上元素数量的限制。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/events/messages?limit=3

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url 'https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/events/messages?limit=3' \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/events/messages');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString(array(
  'limit' => '3'
)));

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/events/messages?limit=3");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/merchants/{merchant_id}/events/messages?limit=3", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/events/messages?limit=3")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/events/messages?limit=3")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/events/messages?limit=3");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
[
  {
    "agent_id": null,
    "complete_description": "The following payments were refunded:<br/>ID: 417462222, Amount: 6.39 RUB, User: v.williams1<br/>",
    "id": 15495324081345,
    "sender": null,
    "short_message": "Refund notification",
    "tag_list": [
      "info"
    ]
  },
  {
    "agent_id": null,
    "complete_description": "paysafecard<br/>",
    "id": 15495216109954,
    "sender": null,
    "short_message": "The following payment systems were activated for project 12345. Project for Paysafecard I",
    "tag_list": [
      "info"
    ]
  },
  {
    "agent_id": null,
    "complete_description": "paysafecard<br/>",
    "id": 15496296100621,
    "sender": null,
    "short_message": "The following payment systems were activated for project 12346. Project for Paysafecard II",
    "tag_list": [
      "info"
    ]
  }
]
[
  {
    "agent_id": null,
    "complete_description": "The following payments were refunded:<br/>ID: 417462222, Amount: 6.39 RUB, User: v.williams1<br/>",
    "id": 15495324081345,
    "sender": null,
    "short_message": "Refund notification",
    "tag_list": [
      "info"
    ]
  },
  {
    "agent_id": null,
    "complete_description": "paysafecard<br/>",
    "id": 15495216109954,
    "sender": null,
    "short_message": "The following payment systems were activated for project 12345. Project for Paysafecard I",
    "tag_list": [
      "info"
    ]
  },
  {
    "agent_id": null,
    "complete_description": "paysafecard<br/>",
    "id": 15496296100621,
    "sender": null,
    "short_message": "The following payment systems were activated for project 12346. Project for Paysafecard II",
    "tag_list": [
      "info"
    ]
  }
]
[
  {
    "agent_id": null,
    "complete_description": "The following payments were refunded:<br/>ID: 417462222, Amount: 6.39 RUB, User: v.williams1<br/>",
    "id": 15495324081345,
    "sender": null,
    "short_message": "Refund notification",
    "tag_list": [
      "info"
    ]
  },
  {
    "agent_id": null,
    "complete_description": "paysafecard<br/>",
    "id": 15495216109954,
    "sender": null,
    "short_message": "The following payment systems were activated for project 12345. Project for Paysafecard I",
    "tag_list": [
      "info"
    ]
  },
  {
    "agent_id": null,
    "complete_description": "paysafecard<br/>",
    "id": 15496296100621,
    "sender": null,
    "short_message": "The following payment systems were activated for project 12346. Project for Paysafecard II",
    "tag_list": [
      "info"
    ]
  }
]
[
  {
    "agent_id": null,
    "complete_description": "The following payments were refunded:<br/>ID: 417462222, Amount: 6.39 RUB, User: v.williams1<br/>",
    "id": 15495324081345,
    "sender": null,
    "short_message": "Refund notification",
    "tag_list": [
      "info"
    ]
  },
  {
    "agent_id": null,
    "complete_description": "paysafecard<br/>",
    "id": 15495216109954,
    "sender": null,
    "short_message": "The following payment systems were activated for project 12345. Project for Paysafecard I",
    "tag_list": [
      "info"
    ]
  },
  {
    "agent_id": null,
    "complete_description": "paysafecard<br/>",
    "id": 15496296100621,
    "sender": null,
    "short_message": "The following payment systems were activated for project 12346. Project for Paysafecard II",
    "tag_list": [
      "info"
    ]
  }
]
[
  {
    "agent_id": null,
    "complete_description": "The following payments were refunded:<br/>ID: 417462222, Amount: 6.39 RUB, User: v.williams1<br/>",
    "id": 15495324081345,
    "sender": null,
    "short_message": "Refund notification",
    "tag_list": [
      "info"
    ]
  },
  {
    "agent_id": null,
    "complete_description": "paysafecard<br/>",
    "id": 15495216109954,
    "sender": null,
    "short_message": "The following payment systems were activated for project 12345. Project for Paysafecard I",
    "tag_list": [
      "info"
    ]
  },
  {
    "agent_id": null,
    "complete_description": "paysafecard<br/>",
    "id": 15496296100621,
    "sender": null,
    "short_message": "The following payment systems were activated for project 12346. Project for Paysafecard II",
    "tag_list": [
      "info"
    ]
  }
]
[
  {
    "agent_id": null,
    "complete_description": "The following payments were refunded:<br/>ID: 417462222, Amount: 6.39 RUB, User: v.williams1<br/>",
    "id": 15495324081345,
    "sender": null,
    "short_message": "Refund notification",
    "tag_list": [
      "info"
    ]
  },
  {
    "agent_id": null,
    "complete_description": "paysafecard<br/>",
    "id": 15495216109954,
    "sender": null,
    "short_message": "The following payment systems were activated for project 12345. Project for Paysafecard I",
    "tag_list": [
      "info"
    ]
  },
  {
    "agent_id": null,
    "complete_description": "paysafecard<br/>",
    "id": 15496296100621,
    "sender": null,
    "short_message": "The following payment systems were activated for project 12346. Project for Paysafecard II",
    "tag_list": [
      "info"
    ]
  }
]
[
  {
    "agent_id": null,
    "complete_description": "The following payments were refunded:<br/>ID: 417462222, Amount: 6.39 RUB, User: v.williams1<br/>",
    "id": 15495324081345,
    "sender": null,
    "short_message": "Refund notification",
    "tag_list": [
      "info"
    ]
  },
  {
    "agent_id": null,
    "complete_description": "paysafecard<br/>",
    "id": 15495216109954,
    "sender": null,
    "short_message": "The following payment systems were activated for project 12345. Project for Paysafecard I",
    "tag_list": [
      "info"
    ]
  },
  {
    "agent_id": null,
    "complete_description": "paysafecard<br/>",
    "id": 15496296100621,
    "sender": null,
    "short_message": "The following payment systems were activated for project 12346. Project for Paysafecard II",
    "tag_list": [
      "info"
    ]
  }
]
[
  {
    "agent_id": null,
    "complete_description": "The following payments were refunded:<br/>ID: 417462222, Amount: 6.39 RUB, User: v.williams1<br/>",
    "id": 15495324081345,
    "sender": null,
    "short_message": "Refund notification",
    "tag_list": [
      "info"
    ]
  },
  {
    "agent_id": null,
    "complete_description": "paysafecard<br/>",
    "id": 15495216109954,
    "sender": null,
    "short_message": "The following payment systems were activated for project 12345. Project for Paysafecard I",
    "tag_list": [
      "info"
    ]
  },
  {
    "agent_id": null,
    "complete_description": "paysafecard<br/>",
    "id": 15496296100621,
    "sender": null,
    "short_message": "The following payment systems were activated for project 12346. Project for Paysafecard II",
    "tag_list": [
      "info"
    ]
  }
]

列示所有问题

列示所有问题。

Notice: 此API方法在高负载状态下不可用。请求数量过多的情况下可能会限流。如需了解此API方法的流量控制详情,请联系您的帐户经理。

HTTP请求

Copy
Full screen
Small screen
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/support/tickets

参数类型描述
merchant_id
integer商户ID。 必需
datetime_from
datetime日期范围的开始时间。
datetime_to
datetime日期范围的结束时间。
status
string问题的状态。
type
string问题的类型。
offset
integer元素编号,从该元素开始生成列表(从0开始数)。
limit
integer页面上元素数量的限制。
sender
string问题提交者。可以是'partner'、'user'或null。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/support/tickets?datetime_from=2018-04-08T18:21:16Z&datetime_to=2018-04-08T18:21:17Z

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url 'https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/support/tickets?datetime_from=2018-04-08T18%3A21%3A16Z&datetime_to=2018-04-08T18%3A21%3A17Z' \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/support/tickets');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString(array(
  'datetime_from' => '2018-04-08T18:21:16Z',
  'datetime_to' => '2018-04-08T18:21:17Z'
)));

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/support/tickets?datetime_from=2018-04-08T18%3A21%3A16Z&datetime_to=2018-04-08T18%3A21%3A17Z");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/merchants/{merchant_id}/support/tickets?datetime_from=2018-04-08T18%3A21%3A16Z&datetime_to=2018-04-08T18%3A21%3A17Z", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/support/tickets?datetime_from=2018-04-08T18%3A21%3A16Z&datetime_to=2018-04-08T18%3A21%3A17Z")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/support/tickets?datetime_from=2018-04-08T18%3A21%3A16Z&datetime_to=2018-04-08T18%3A21%3A17Z")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/support/tickets?datetime_from=2018-04-08T18%3A21%3A16Z&datetime_to=2018-04-08T18%3A21%3A17Z");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
[
  {
    "author_name": "niko",
    "created_at": "2018-04-08T18:21:16+00:00",
    "id": 2586512,
    "is_audio": false,
    "requester_email": "project@inproject.com",
    "sender": "user",
    "status": "closed",
    "subject": "Re: Re: Payment - request to check",
    "title": "#2586512. Test project. Email",
    "transaction_id": 0,
    "type": "incident",
    "updated_at": "2018-05-07T08:00:56+00:00",
    "vote": 0
  }
]
[
  {
    "author_name": "niko",
    "created_at": "2018-04-08T18:21:16+00:00",
    "id": 2586512,
    "is_audio": false,
    "requester_email": "project@inproject.com",
    "sender": "user",
    "status": "closed",
    "subject": "Re: Re: Payment - request to check",
    "title": "#2586512. Test project. Email",
    "transaction_id": 0,
    "type": "incident",
    "updated_at": "2018-05-07T08:00:56+00:00",
    "vote": 0
  }
]
[
  {
    "author_name": "niko",
    "created_at": "2018-04-08T18:21:16+00:00",
    "id": 2586512,
    "is_audio": false,
    "requester_email": "project@inproject.com",
    "sender": "user",
    "status": "closed",
    "subject": "Re: Re: Payment - request to check",
    "title": "#2586512. Test project. Email",
    "transaction_id": 0,
    "type": "incident",
    "updated_at": "2018-05-07T08:00:56+00:00",
    "vote": 0
  }
]
[
  {
    "author_name": "niko",
    "created_at": "2018-04-08T18:21:16+00:00",
    "id": 2586512,
    "is_audio": false,
    "requester_email": "project@inproject.com",
    "sender": "user",
    "status": "closed",
    "subject": "Re: Re: Payment - request to check",
    "title": "#2586512. Test project. Email",
    "transaction_id": 0,
    "type": "incident",
    "updated_at": "2018-05-07T08:00:56+00:00",
    "vote": 0
  }
]
[
  {
    "author_name": "niko",
    "created_at": "2018-04-08T18:21:16+00:00",
    "id": 2586512,
    "is_audio": false,
    "requester_email": "project@inproject.com",
    "sender": "user",
    "status": "closed",
    "subject": "Re: Re: Payment - request to check",
    "title": "#2586512. Test project. Email",
    "transaction_id": 0,
    "type": "incident",
    "updated_at": "2018-05-07T08:00:56+00:00",
    "vote": 0
  }
]
[
  {
    "author_name": "niko",
    "created_at": "2018-04-08T18:21:16+00:00",
    "id": 2586512,
    "is_audio": false,
    "requester_email": "project@inproject.com",
    "sender": "user",
    "status": "closed",
    "subject": "Re: Re: Payment - request to check",
    "title": "#2586512. Test project. Email",
    "transaction_id": 0,
    "type": "incident",
    "updated_at": "2018-05-07T08:00:56+00:00",
    "vote": 0
  }
]
[
  {
    "author_name": "niko",
    "created_at": "2018-04-08T18:21:16+00:00",
    "id": 2586512,
    "is_audio": false,
    "requester_email": "project@inproject.com",
    "sender": "user",
    "status": "closed",
    "subject": "Re: Re: Payment - request to check",
    "title": "#2586512. Test project. Email",
    "transaction_id": 0,
    "type": "incident",
    "updated_at": "2018-05-07T08:00:56+00:00",
    "vote": 0
  }
]
[
  {
    "author_name": "niko",
    "created_at": "2018-04-08T18:21:16+00:00",
    "id": 2586512,
    "is_audio": false,
    "requester_email": "project@inproject.com",
    "sender": "user",
    "status": "closed",
    "subject": "Re: Re: Payment - request to check",
    "title": "#2586512. Test project. Email",
    "transaction_id": 0,
    "type": "incident",
    "updated_at": "2018-05-07T08:00:56+00:00",
    "vote": 0
  }
]

获取工单说明

列示所有回复。

Notice: 此API方法在高负载状态下不可用。请求数量过多的情况下可能会限流。如需了解此API方法的流量控制详情,请联系您的帐户经理。

HTTP请求

Copy
Full screen
Small screen
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/support/tickets/{ticket_id}/comments

参数类型描述
merchant_id
integer商户ID。
ticket_id
integer问题ID。
Copy
Full screen
Small screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/support/tickets/{ticket_id}/comments

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/support/tickets/{ticket_id}/comments \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/support/tickets/{ticket_id}/comments');
$request->setRequestMethod('GET');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/support/tickets/{ticket_id}/comments");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/merchants/{merchant_id}/support/tickets/{ticket_id}/comments", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/support/tickets/{ticket_id}/comments")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/support/tickets/{ticket_id}/comments")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/support/tickets/{ticket_id}/comments");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
[
  {
    "author_name": "niko",
    "body": "<div class=\"zd-comment\">\n<p dir=\"auto\">Dear Partner,</p>\n\n<p dir=\"auto\">Thank you for your email.</p>\n\n<p dir=\"auto\">But I want to inform you that I no longer work at Organization Inc. since April 5, 2018.</p>\n\n<p dir=\"auto\">For any follow-up business with Organization Inc., please contact: Paul (<a href=\"mailto:paul@project.com\" rel=\"noreferrer\">paul@project.com</a>) or Ardi at (<a href=\"mailto:ardikusumahin@project.com\" rel=\"noreferrer\">ardikusumahin@project.com</a>). </p>\n\n<p dir=\"auto\">Thank you again for everything. I wish you all the best.</p>\n\n<p dir=\"auto\">=================================================================</p>\n\n<p dir=\"auto\">Dear Mitra,</p>\n\n<p dir=\"auto\">Terima kasih atas email Anda.</p>\n\n<p dir=\"auto\">Tetapi saya sudah bekerja lagi di Organization Inc. sejak tanggal 5 April 2018.</p>\n\n<p dir=\"auto\">Untuk hubungan bisnis selanjutnya dengan Organization Inc., silakan menghubungi: Paul (<a href=\"mailto:paul@project.com\" rel=\"noreferrer\">paul@project.com</a>) atau Ardi di (<a href=\"mailto:ardikusumahin@project.com\" rel=\"noreferrer\">ardikusumahin@project.com</a>).</p>\n\n<p dir=\"auto\">Terima kasih sekali lagi untuk semuanya. Saya berharap yang terbaik untuk Anda.</p>\n\n<p dir=\"auto\">Best Regards,</p>\n\n<p dir=\"auto\">Moch. Niko Dechandra\n<br>Business Dev. Division\n<br>Organization Inc.</p>\n</div>",
    "created_at": "2018-04-08T18:21:17Z",
    "id": 499819963847,
    "public": true
  },
  {
    "author_name": "Nika",
    "body": "<div class=\"zd-comment\">Hello, <br>We have resent the request to the correct email. <br>We are sorry for bothering you and wish you all the best, Niko!<br><br><br>\n\n<span class=\"collapse-signature\"></span><div class=\"signature\"><p dir=\"auto\">Senior PayPal Expert</p></div>\n</div>",
    "created_at": "2018-04-08T19:54:18Z",
    "id": 499842589137,
    "public": true
  }
]
[
  {
    "author_name": "niko",
    "body": "<div class=\"zd-comment\">\n<p dir=\"auto\">Dear Partner,</p>\n\n<p dir=\"auto\">Thank you for your email.</p>\n\n<p dir=\"auto\">But I want to inform you that I no longer work at Organization Inc. since April 5, 2018.</p>\n\n<p dir=\"auto\">For any follow-up business with Organization Inc., please contact: Paul (<a href=\"mailto:paul@project.com\" rel=\"noreferrer\">paul@project.com</a>) or Ardi at (<a href=\"mailto:ardikusumahin@project.com\" rel=\"noreferrer\">ardikusumahin@project.com</a>). </p>\n\n<p dir=\"auto\">Thank you again for everything. I wish you all the best.</p>\n\n<p dir=\"auto\">=================================================================</p>\n\n<p dir=\"auto\">Dear Mitra,</p>\n\n<p dir=\"auto\">Terima kasih atas email Anda.</p>\n\n<p dir=\"auto\">Tetapi saya sudah bekerja lagi di Organization Inc. sejak tanggal 5 April 2018.</p>\n\n<p dir=\"auto\">Untuk hubungan bisnis selanjutnya dengan Organization Inc., silakan menghubungi: Paul (<a href=\"mailto:paul@project.com\" rel=\"noreferrer\">paul@project.com</a>) atau Ardi di (<a href=\"mailto:ardikusumahin@project.com\" rel=\"noreferrer\">ardikusumahin@project.com</a>).</p>\n\n<p dir=\"auto\">Terima kasih sekali lagi untuk semuanya. Saya berharap yang terbaik untuk Anda.</p>\n\n<p dir=\"auto\">Best Regards,</p>\n\n<p dir=\"auto\">Moch. Niko Dechandra\n<br>Business Dev. Division\n<br>Organization Inc.</p>\n</div>",
    "created_at": "2018-04-08T18:21:17Z",
    "id": 499819963847,
    "public": true
  },
  {
    "author_name": "Nika",
    "body": "<div class=\"zd-comment\">Hello, <br>We have resent the request to the correct email. <br>We are sorry for bothering you and wish you all the best, Niko!<br><br><br>\n\n<span class=\"collapse-signature\"></span><div class=\"signature\"><p dir=\"auto\">Senior PayPal Expert</p></div>\n</div>",
    "created_at": "2018-04-08T19:54:18Z",
    "id": 499842589137,
    "public": true
  }
]
[
  {
    "author_name": "niko",
    "body": "<div class=\"zd-comment\">\n<p dir=\"auto\">Dear Partner,</p>\n\n<p dir=\"auto\">Thank you for your email.</p>\n\n<p dir=\"auto\">But I want to inform you that I no longer work at Organization Inc. since April 5, 2018.</p>\n\n<p dir=\"auto\">For any follow-up business with Organization Inc., please contact: Paul (<a href=\"mailto:paul@project.com\" rel=\"noreferrer\">paul@project.com</a>) or Ardi at (<a href=\"mailto:ardikusumahin@project.com\" rel=\"noreferrer\">ardikusumahin@project.com</a>). </p>\n\n<p dir=\"auto\">Thank you again for everything. I wish you all the best.</p>\n\n<p dir=\"auto\">=================================================================</p>\n\n<p dir=\"auto\">Dear Mitra,</p>\n\n<p dir=\"auto\">Terima kasih atas email Anda.</p>\n\n<p dir=\"auto\">Tetapi saya sudah bekerja lagi di Organization Inc. sejak tanggal 5 April 2018.</p>\n\n<p dir=\"auto\">Untuk hubungan bisnis selanjutnya dengan Organization Inc., silakan menghubungi: Paul (<a href=\"mailto:paul@project.com\" rel=\"noreferrer\">paul@project.com</a>) atau Ardi di (<a href=\"mailto:ardikusumahin@project.com\" rel=\"noreferrer\">ardikusumahin@project.com</a>).</p>\n\n<p dir=\"auto\">Terima kasih sekali lagi untuk semuanya. Saya berharap yang terbaik untuk Anda.</p>\n\n<p dir=\"auto\">Best Regards,</p>\n\n<p dir=\"auto\">Moch. Niko Dechandra\n<br>Business Dev. Division\n<br>Organization Inc.</p>\n</div>",
    "created_at": "2018-04-08T18:21:17Z",
    "id": 499819963847,
    "public": true
  },
  {
    "author_name": "Nika",
    "body": "<div class=\"zd-comment\">Hello, <br>We have resent the request to the correct email. <br>We are sorry for bothering you and wish you all the best, Niko!<br><br><br>\n\n<span class=\"collapse-signature\"></span><div class=\"signature\"><p dir=\"auto\">Senior PayPal Expert</p></div>\n</div>",
    "created_at": "2018-04-08T19:54:18Z",
    "id": 499842589137,
    "public": true
  }
]
[
  {
    "author_name": "niko",
    "body": "<div class=\"zd-comment\">\n<p dir=\"auto\">Dear Partner,</p>\n\n<p dir=\"auto\">Thank you for your email.</p>\n\n<p dir=\"auto\">But I want to inform you that I no longer work at Organization Inc. since April 5, 2018.</p>\n\n<p dir=\"auto\">For any follow-up business with Organization Inc., please contact: Paul (<a href=\"mailto:paul@project.com\" rel=\"noreferrer\">paul@project.com</a>) or Ardi at (<a href=\"mailto:ardikusumahin@project.com\" rel=\"noreferrer\">ardikusumahin@project.com</a>). </p>\n\n<p dir=\"auto\">Thank you again for everything. I wish you all the best.</p>\n\n<p dir=\"auto\">=================================================================</p>\n\n<p dir=\"auto\">Dear Mitra,</p>\n\n<p dir=\"auto\">Terima kasih atas email Anda.</p>\n\n<p dir=\"auto\">Tetapi saya sudah bekerja lagi di Organization Inc. sejak tanggal 5 April 2018.</p>\n\n<p dir=\"auto\">Untuk hubungan bisnis selanjutnya dengan Organization Inc., silakan menghubungi: Paul (<a href=\"mailto:paul@project.com\" rel=\"noreferrer\">paul@project.com</a>) atau Ardi di (<a href=\"mailto:ardikusumahin@project.com\" rel=\"noreferrer\">ardikusumahin@project.com</a>).</p>\n\n<p dir=\"auto\">Terima kasih sekali lagi untuk semuanya. Saya berharap yang terbaik untuk Anda.</p>\n\n<p dir=\"auto\">Best Regards,</p>\n\n<p dir=\"auto\">Moch. Niko Dechandra\n<br>Business Dev. Division\n<br>Organization Inc.</p>\n</div>",
    "created_at": "2018-04-08T18:21:17Z",
    "id": 499819963847,
    "public": true
  },
  {
    "author_name": "Nika",
    "body": "<div class=\"zd-comment\">Hello, <br>We have resent the request to the correct email. <br>We are sorry for bothering you and wish you all the best, Niko!<br><br><br>\n\n<span class=\"collapse-signature\"></span><div class=\"signature\"><p dir=\"auto\">Senior PayPal Expert</p></div>\n</div>",
    "created_at": "2018-04-08T19:54:18Z",
    "id": 499842589137,
    "public": true
  }
]
[
  {
    "author_name": "niko",
    "body": "<div class=\"zd-comment\">\n<p dir=\"auto\">Dear Partner,</p>\n\n<p dir=\"auto\">Thank you for your email.</p>\n\n<p dir=\"auto\">But I want to inform you that I no longer work at Organization Inc. since April 5, 2018.</p>\n\n<p dir=\"auto\">For any follow-up business with Organization Inc., please contact: Paul (<a href=\"mailto:paul@project.com\" rel=\"noreferrer\">paul@project.com</a>) or Ardi at (<a href=\"mailto:ardikusumahin@project.com\" rel=\"noreferrer\">ardikusumahin@project.com</a>). </p>\n\n<p dir=\"auto\">Thank you again for everything. I wish you all the best.</p>\n\n<p dir=\"auto\">=================================================================</p>\n\n<p dir=\"auto\">Dear Mitra,</p>\n\n<p dir=\"auto\">Terima kasih atas email Anda.</p>\n\n<p dir=\"auto\">Tetapi saya sudah bekerja lagi di Organization Inc. sejak tanggal 5 April 2018.</p>\n\n<p dir=\"auto\">Untuk hubungan bisnis selanjutnya dengan Organization Inc., silakan menghubungi: Paul (<a href=\"mailto:paul@project.com\" rel=\"noreferrer\">paul@project.com</a>) atau Ardi di (<a href=\"mailto:ardikusumahin@project.com\" rel=\"noreferrer\">ardikusumahin@project.com</a>).</p>\n\n<p dir=\"auto\">Terima kasih sekali lagi untuk semuanya. Saya berharap yang terbaik untuk Anda.</p>\n\n<p dir=\"auto\">Best Regards,</p>\n\n<p dir=\"auto\">Moch. Niko Dechandra\n<br>Business Dev. Division\n<br>Organization Inc.</p>\n</div>",
    "created_at": "2018-04-08T18:21:17Z",
    "id": 499819963847,
    "public": true
  },
  {
    "author_name": "Nika",
    "body": "<div class=\"zd-comment\">Hello, <br>We have resent the request to the correct email. <br>We are sorry for bothering you and wish you all the best, Niko!<br><br><br>\n\n<span class=\"collapse-signature\"></span><div class=\"signature\"><p dir=\"auto\">Senior PayPal Expert</p></div>\n</div>",
    "created_at": "2018-04-08T19:54:18Z",
    "id": 499842589137,
    "public": true
  }
]
[
  {
    "author_name": "niko",
    "body": "<div class=\"zd-comment\">\n<p dir=\"auto\">Dear Partner,</p>\n\n<p dir=\"auto\">Thank you for your email.</p>\n\n<p dir=\"auto\">But I want to inform you that I no longer work at Organization Inc. since April 5, 2018.</p>\n\n<p dir=\"auto\">For any follow-up business with Organization Inc., please contact: Paul (<a href=\"mailto:paul@project.com\" rel=\"noreferrer\">paul@project.com</a>) or Ardi at (<a href=\"mailto:ardikusumahin@project.com\" rel=\"noreferrer\">ardikusumahin@project.com</a>). </p>\n\n<p dir=\"auto\">Thank you again for everything. I wish you all the best.</p>\n\n<p dir=\"auto\">=================================================================</p>\n\n<p dir=\"auto\">Dear Mitra,</p>\n\n<p dir=\"auto\">Terima kasih atas email Anda.</p>\n\n<p dir=\"auto\">Tetapi saya sudah bekerja lagi di Organization Inc. sejak tanggal 5 April 2018.</p>\n\n<p dir=\"auto\">Untuk hubungan bisnis selanjutnya dengan Organization Inc., silakan menghubungi: Paul (<a href=\"mailto:paul@project.com\" rel=\"noreferrer\">paul@project.com</a>) atau Ardi di (<a href=\"mailto:ardikusumahin@project.com\" rel=\"noreferrer\">ardikusumahin@project.com</a>).</p>\n\n<p dir=\"auto\">Terima kasih sekali lagi untuk semuanya. Saya berharap yang terbaik untuk Anda.</p>\n\n<p dir=\"auto\">Best Regards,</p>\n\n<p dir=\"auto\">Moch. Niko Dechandra\n<br>Business Dev. Division\n<br>Organization Inc.</p>\n</div>",
    "created_at": "2018-04-08T18:21:17Z",
    "id": 499819963847,
    "public": true
  },
  {
    "author_name": "Nika",
    "body": "<div class=\"zd-comment\">Hello, <br>We have resent the request to the correct email. <br>We are sorry for bothering you and wish you all the best, Niko!<br><br><br>\n\n<span class=\"collapse-signature\"></span><div class=\"signature\"><p dir=\"auto\">Senior PayPal Expert</p></div>\n</div>",
    "created_at": "2018-04-08T19:54:18Z",
    "id": 499842589137,
    "public": true
  }
]
[
  {
    "author_name": "niko",
    "body": "<div class=\"zd-comment\">\n<p dir=\"auto\">Dear Partner,</p>\n\n<p dir=\"auto\">Thank you for your email.</p>\n\n<p dir=\"auto\">But I want to inform you that I no longer work at Organization Inc. since April 5, 2018.</p>\n\n<p dir=\"auto\">For any follow-up business with Organization Inc., please contact: Paul (<a href=\"mailto:paul@project.com\" rel=\"noreferrer\">paul@project.com</a>) or Ardi at (<a href=\"mailto:ardikusumahin@project.com\" rel=\"noreferrer\">ardikusumahin@project.com</a>). </p>\n\n<p dir=\"auto\">Thank you again for everything. I wish you all the best.</p>\n\n<p dir=\"auto\">=================================================================</p>\n\n<p dir=\"auto\">Dear Mitra,</p>\n\n<p dir=\"auto\">Terima kasih atas email Anda.</p>\n\n<p dir=\"auto\">Tetapi saya sudah bekerja lagi di Organization Inc. sejak tanggal 5 April 2018.</p>\n\n<p dir=\"auto\">Untuk hubungan bisnis selanjutnya dengan Organization Inc., silakan menghubungi: Paul (<a href=\"mailto:paul@project.com\" rel=\"noreferrer\">paul@project.com</a>) atau Ardi di (<a href=\"mailto:ardikusumahin@project.com\" rel=\"noreferrer\">ardikusumahin@project.com</a>).</p>\n\n<p dir=\"auto\">Terima kasih sekali lagi untuk semuanya. Saya berharap yang terbaik untuk Anda.</p>\n\n<p dir=\"auto\">Best Regards,</p>\n\n<p dir=\"auto\">Moch. Niko Dechandra\n<br>Business Dev. Division\n<br>Organization Inc.</p>\n</div>",
    "created_at": "2018-04-08T18:21:17Z",
    "id": 499819963847,
    "public": true
  },
  {
    "author_name": "Nika",
    "body": "<div class=\"zd-comment\">Hello, <br>We have resent the request to the correct email. <br>We are sorry for bothering you and wish you all the best, Niko!<br><br><br>\n\n<span class=\"collapse-signature\"></span><div class=\"signature\"><p dir=\"auto\">Senior PayPal Expert</p></div>\n</div>",
    "created_at": "2018-04-08T19:54:18Z",
    "id": 499842589137,
    "public": true
  }
]
[
  {
    "author_name": "niko",
    "body": "<div class=\"zd-comment\">\n<p dir=\"auto\">Dear Partner,</p>\n\n<p dir=\"auto\">Thank you for your email.</p>\n\n<p dir=\"auto\">But I want to inform you that I no longer work at Organization Inc. since April 5, 2018.</p>\n\n<p dir=\"auto\">For any follow-up business with Organization Inc., please contact: Paul (<a href=\"mailto:paul@project.com\" rel=\"noreferrer\">paul@project.com</a>) or Ardi at (<a href=\"mailto:ardikusumahin@project.com\" rel=\"noreferrer\">ardikusumahin@project.com</a>). </p>\n\n<p dir=\"auto\">Thank you again for everything. I wish you all the best.</p>\n\n<p dir=\"auto\">=================================================================</p>\n\n<p dir=\"auto\">Dear Mitra,</p>\n\n<p dir=\"auto\">Terima kasih atas email Anda.</p>\n\n<p dir=\"auto\">Tetapi saya sudah bekerja lagi di Organization Inc. sejak tanggal 5 April 2018.</p>\n\n<p dir=\"auto\">Untuk hubungan bisnis selanjutnya dengan Organization Inc., silakan menghubungi: Paul (<a href=\"mailto:paul@project.com\" rel=\"noreferrer\">paul@project.com</a>) atau Ardi di (<a href=\"mailto:ardikusumahin@project.com\" rel=\"noreferrer\">ardikusumahin@project.com</a>).</p>\n\n<p dir=\"auto\">Terima kasih sekali lagi untuk semuanya. Saya berharap yang terbaik untuk Anda.</p>\n\n<p dir=\"auto\">Best Regards,</p>\n\n<p dir=\"auto\">Moch. Niko Dechandra\n<br>Business Dev. Division\n<br>Organization Inc.</p>\n</div>",
    "created_at": "2018-04-08T18:21:17Z",
    "id": 499819963847,
    "public": true
  },
  {
    "author_name": "Nika",
    "body": "<div class=\"zd-comment\">Hello, <br>We have resent the request to the correct email. <br>We are sorry for bothering you and wish you all the best, Niko!<br><br><br>\n\n<span class=\"collapse-signature\"></span><div class=\"signature\"><p dir=\"auto\">Senior PayPal Expert</p></div>\n</div>",
    "created_at": "2018-04-08T19:54:18Z",
    "id": 499842589137,
    "public": true
  }
]