Publisher Account API v2.0

Overview

The section describes methods for working with Publisher Account. Use basic authentication to call methods.

Endpoint path: https://api.xsolla.com.

Projects

Create Project

Creates a new project.

HTTP REQUEST

POST https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects

Parameter Type Description
merchant_id
integer Merchant ID.
descriptor
string Short project name for reports (up to 12 characters).
name
array of strings Array of localized project names.
url
string Project website URL.
description
string Array of localized project descriptions.
payment_url
string Webhook URL.
key
string Project secret key.
return_url
string URL to redirect the user to after a successful payment.
user_billing_enabled
boolean Whether to keep user data in the Xsolla database.
show_user_in_paystation
boolean Whether to show the user's saved payment accounts and payment history in the payment UI.
locale_list
array of strings List of languages that corresponding settings are localized to.
user_public_id_enabled
boolean Enables user details verification via Public User ID (for payments through cash kiosks).
components
object Module details (object).
components.virtual_currency
object Virtual currency module details (object).
components.virtual_currency.enabled
boolean Whether to enable the module for this project.
components.virtual_currency.custom_name
array of strings Localized module names to show in the payment UI.
components.items
object Virtual items module details (object).
components.items.enabled
boolean Whether to enable the module for this project.
components.items.custom_name
array of strings Localized module names to show in the payment UI.
components.simple_checkout
object Simple checkout module details (object).
components.simple_checkout.enabled
boolean Whether to enable the module for this project.
components.simple_checkout.custom_name
array of strings Localized module names to show in the payment UI.
components.subscriptions
object Subscriptions module details (object).
components.subscriptions.enabled
boolean Whether to enable the module for this project.
components.subscriptions.custom_name
array of strings Localized module names to show in the payment UI.
send_json_to_paystation
boolean Enables tokenless integration.
is_external_id_required
boolean Whether External ID is required for integration with Xsolla.
ipn_enabled
boolean Whether to send webhooks to the webhook URL.
payments_available
boolean Whether the partner can accept real payments. 'true' if there is a signed agreement in force and at least one enabled project. 'false' by default.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}

Get Project

Retrieves information about a project.

HTTP REQUEST

GET https://api.xsolla.com/merchant/v2/projects/{project_id}

Parameter Type Description
project_id
integer Project ID.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response
{
  "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": []
}

Update Project

Updates a project.

HTTP REQUEST

PUT https://api.xsolla.com/merchant/v2/projects/{project_id}

Parameter Type Description
merchant_id
integer Merchant ID.
project_id
integer Project ID.
descriptor
string Short project name for reports (up to 12 characters).
name
array of strings Array of localized project names.
url
string Project website URL.
description
string Array of localized project descriptions.
payment_url
string Webhook URL.
key
string Project secret key.
return_url
string URL to redirect the user to after a successful payment.
user_billing_enabled
boolean Whether to keep user data in the Xsolla database.
show_user_in_paystation
boolean Whether to show the user's saved payment accounts and payment history in the payment UI.
locale_list
array of strings List of languages that corresponding settings are localized to.
user_public_id_enabled
boolean Enables user details verification via Public User ID (for payments through cash kiosks).
components
object Module details (object).
components.virtual_currency
object Virtual currency module details (object).
components.virtual_currency.enabled
boolean Whether to enable the module for this project.
components.virtual_currency.custom_name
array of strings Localized module names to show in the payment UI.
components.items
object Virtual items module details (object).
components.items.enabled
boolean Whether to enable the module for this project.
components.items.custom_name
array of strings Localized module names to show in the payment UI.
components.simple_checkout
object Simple checkout module details (object).
components.simple_checkout.enabled
boolean Whether to enable the module for this project.
components.simple_checkout.custom_name
array of strings Localized module names to show in the payment UI.
components.subscriptions
object Subscriptions module details (object).
components.subscriptions.enabled
boolean Whether to enable the module for this project.
components.subscriptions.custom_name
array of strings Localized module names to show in the payment UI.
send_json_to_paystation
boolean Enables tokenless integration.
is_external_id_required
boolean Whether External ID is required for integration with Xsolla.
ipn_enabled
boolean Whether to send webhooks to the webhook URL.
payments_available
boolean Whether the partner can accept real payments. 'true' if there is a signed agreement in force and at least one enabled project. 'false' by default.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
PUT https://api.xsolla.com/merchant/v2/projects/{project_id}

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

Body:
  {
  "description": {
    "en": "The project for the second part of the game with robots. The game is in English only."
  },
  "name": {
    "en": "Game with Robots II"
  }
}
curl --request PUT \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id} \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"name":{"en":"Game with Robots II"},"description":{"en":"The project for the second part of the game with robots. The game is in English only."}}'
<?php

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

$body = new http\Message\Body;
$body->append('{"name":{"en":"Game with Robots II"},"description":{"en":"The project for the second part of the game with robots. The game is in English only."}}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_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}");
var request = new RestRequest(Method.PUT);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"name\":{\"en\":\"Game with Robots II\"},\"description\":{\"en\":\"The project for the second part of the game with robots. The game is in English only.\"}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

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

payload = "{\"name\":{\"en\":\"Game with Robots II\"},\"description\":{\"en\":\"The project for the second part of the game with robots. The game is in English only.\"}}"

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

conn.request("PUT", "/merchant/v2/projects/{project_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}")

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 = "{\"name\":{\"en\":\"Game with Robots II\"},\"description\":{\"en\":\"The project for the second part of the game with robots. The game is in English only.\"}}"

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 II\"},\"description\":{\"en\":\"The project for the second part of the game with robots. The game is in English only.\"}}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_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({
  "name": {
    "en": "Game with Robots II"
  },
  "description": {
    "en": "The project for the second part of the game with robots. The game is in English only."
  }
});

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}");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
Response

Get Projects List

Gets projects of a merchant.

HTTP REQUEST

GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/projects

Parameter Type Description
merchant_id
integer Merchant ID.
sort
string Sorting the list items by their creation date. Can be 'asc' (sort in ascending order) and 'desc' (sort in descending order). Default is 'asc'.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response
[
  {
    "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
  }
]

Get Payment Methods

Returns the list of payment systems enabled for a project.

HTTP REQUEST

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

Parameter Type Description
project_id
integer Project ID. Required.
offset
integer Number of the element from which the list is generated (the count starts from 0). Required.
limit
integer Limit for the number of elements on the page. Required.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response
{
  "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"
    }
  ]
}

User Management

Create User

Creates a new user.

HTTP REQUEST

POST https://api.xsolla.com/merchant/v2/projects/{project_id}/users

Parameter Type Description
project_id
integer Project ID.
user_id
string User ID. Required.
user_name
string Username.
user_custom
string Custom parameter for user identification.
email
string User email.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response

Get User

Retrieves user details.

HTTP REQUEST

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

Parameter Type Description
project_id
integer Project ID.
user_id
string User ID.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response
{
  "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"
}

Update User

Updates user details.

HTTP REQUEST

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

Parameter Type Description
project_id
integer Project ID.
user_id
string User ID. Required.
user_name
string Username.
user_custom
string Custom parameter for user identification.
email
string User email.
enabled
boolean Whether the user is enabled. Required.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response

Get Transactions List

Lists all transactions of a user.

HTTP REQUEST

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

Parameter Type Description
project_id
integer Project ID.
user_id
string User ID. Required.
datetime_from
datetime Period start. Required.
datetime_to
datetime Period end. Required.
transaction_type
string Type of transaction, can be 'payment', 'coupon', 'inGamePurchase', 'internal', or 'cancellation'.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response
[
  {
    "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"
        }
      }
    ]
  }
]

Add Virtual Items

Adds virtual items to a user's account.

HTTP REQUEST

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

Parameter Type Description
project_id
integer Project ID.
user_id
string User ID.
virtual_items
array Virtual items (array).
virtual_items.virtual_item
object Virtual item details (object).
virtual_items.virtual_item.sku
string Unique item ID.
virtual_items.amount
integer Item quantity.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response

Get Virtual Items

Retrieves a list of virtual items owned by a user.

HTTP REQUEST

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

Parameter Type Description
project_id
integer Project ID.
user_id
string User ID.
offset
integer Number of the element from which the list is generated (the count starts from 0).
limit
integer Limit for the number of elements on the page.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response
[
  {
    "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
  }
]

Delete Virtual Items

Removes virtual items from a user's account.

HTTP REQUEST

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

Parameter Type Description
project_id
integer Project ID.
user_id
string User ID.
virtual_items
array Virtual items (array).
virtual_items.virtual_item
object Virtual item details (object).
virtual_items.virtual_item.sku
string Unique item ID.
virtual_items.amount
integer Item quantity.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response

Update User Balance

Updates the balance of a user.

HTTP REQUEST

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

Parameter Type Description
project_id
integer Project ID.
user_id
string User ID.
amount
float Virtual currency quantity.
comment
string Reason for changing the balance.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}

Get All Users

Lists all users.

HTTP REQUEST

GET https://api.xsolla.com/merchant/v2/projects/{project_id}/users

Parameter Type Description
project_id
integer Project ID. Required.
user_requisites
string User ID or name.
email
string User email.
offset
integer Number of the element from which the list is generated (the count starts from 0). Required.
limit
integer Limit for the number of elements on the page. Required.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response
{
  "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
}

Get All Virtual Items

Get virtual items of all the project's users.

HTTP REQUEST

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

Parameter Type Description
project_id
integer Project ID.
user_id
string User ID.
offset
integer Number of the element from which the list is generated (the count starts from 0).
limit
integer Limit for the number of elements on the page.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response
[
  {
    "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"
      }
    ]
  }
]

Reports

Find Transactions

Gets a list of transactions based on specific search parameters.

Note: You can get the list in JSON, CSV, or XLS format.

HTTP REQUEST

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

Parameter Type Description
merchant_id
integer Merchant ID. Required.
format
string Data format: json / csv / xls. Required.
datetime_from
datetime Period start.
datetime_to
datetime Period end.
project_id
integer Project ID.
show_dry_run
boolean Whether to include test transactions.
transaction_id
integer Transaction ID.
phone
string Phone number in international format.
user_id
string User ID.
user_name
string Username.
user_custom
string Custom parameter for user identification.
email
string User email.
external_id
string Transaction external ID.
offset
integer Number of the element from which the list is generated (the count starts from 0).
limit
integer Limit for the number of elements on the page.
transaction_type
string Type of transaction, can be "payment", "coupon", "inGamePurchase", "internal", or "cancellation".
status
string Additional transaction status: created/processing/done/canceled/error/review/refunded/awaitingRefund.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response
[
  {
    "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
    }
  }
]

Get Transaction

Gets full transaction info by ID.

HTTP REQUEST

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

Parameter Type Description
merchant_id
integer Merсhant ID. Required.
transaction_id
integer Transaction ID. Required.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response
{
  "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"
    },
    "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"
    },
    "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"
    },
    "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"
    },
    "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"
    },
    "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"
    },
    "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"
    },
    "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"
    },
    "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"
  }
}

Get Transactions

Gets all transactions for a specified period/payout/report.

Note: You can get the list in JSON, CSV, or XLS format.

HTTP REQUEST

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

Parameter Type Description
merchant_id
integer Merchant ID. Required.
format
string Data format: json / csv / xls. Required.
datetime_from
datetime Period start. Required.
datetime_to
datetime Period end. Required.
project_id
integer Project ID.
show_dry_run
boolean Whether to include test transactions.
transfer_id
integer Payout ID.
report_id
integer Financial report ID.
limit
integer Limit for the number of elements on the page.
offset
integer Number of the element from which the list is generated (the count starts from 0).
in_transfer_currency
boolean Converts all financial data to the payout currency (the pay-in currency is used by default). Required.
show_total
boolean Adds totals to the report. Required.
status
string Transaction status. Can be 'done', 'canceled', or 'error'.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response
[
  {
    "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
      },
      "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
    },
    "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
      },
      "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
    },
    "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
      },
      "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
    },
    "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
      },
      "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
    },
    "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
      },
      "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
    },
    "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
      },
      "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
    },
    "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
      },
      "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
    },
    "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
      },
      "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
    },
    "user_balance": {
      "payment_currency": {
        "deduction_amount": 0,
        "payout_amount_from_balance": 0.02,
        "purchase_amount_from_balance": 0.02
      }
    }
  }
]

Get Payouts

Gets payouts breakdown in currency.

HTTP REQUEST

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

Parameter Type Description
merchant_id
integer Merchant ID. Required.
datetime_from
datetime Period start.
datetime_to
datetime Period end.
integer ID of the developer's legal entity.
status
string Transaction status. Can be 'done', 'canceled', or 'error'.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response
[
  {
    "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
  },
  {
    "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
  },
  {
    "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
  }
]
[
  {
    "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
  },
  {
    "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
  },
  {
    "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
  }
]
[
  {
    "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
  },
  {
    "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
  },
  {
    "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
  }
]
[
  {
    "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
  },
  {
    "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
  },
  {
    "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
  }
]
[
  {
    "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
  },
  {
    "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
  },
  {
    "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
  }
]
[
  {
    "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
  },
  {
    "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
  },
  {
    "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
  }
]
[
  {
    "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
  },
  {
    "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
  },
  {
    "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
  }
]
[
  {
    "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
  },
  {
    "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
  },
  {
    "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
  }
]

Get Reports

Gets the list of financial reports over a specified period.

HTTP REQUEST

GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/reports

Parameter Type Description
merchant_id
integer Merchant ID.
datetime_from
datetime Period start.
datetime_to
datetime Period end.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response
[
  {
    "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
  }
]

Refund Request

Sends a refund request to return a payment to a user.

HTTP REQUEST

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

Parameter Type Description
merchant_id
integer Merchant ID. Required.
transaction_id
integer Transaction ID. Required.
description
string Reason for refund. Required.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response

Support

Get Events

Lists all events.

HTTP REQUEST

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

Parameter Type Description
merchant_id
integer Merchant ID. Required.
offset
integer Number of the element from which the list is generated (the count starts from 0).
limit
integer Limit for the number of elements on the page.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response
[
  {
    "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"
    ]
  }
]

Get Tickets

Lists all support tickets.

HTTP REQUEST

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

Parameter Type Description
merchant_id
integer Merchant ID. Required.
datetime_from
datetime Period start.
datetime_to
datetime Period end.
status
string Ticket status.
type
string Ticket type.
offset
integer Number of the element from which the list is generated (the count starts from 0).
limit
integer Limit for the number of elements on the page.
sender
string Who created the ticket. Can be 'partner', 'user', or null.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Request
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);
Response
[
  {
    "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"