Kundenportal-API v2.0

Überblick

Der Abschnitt enthält Beschreibungen der Methoden für die Zusammenarbeit mit dem Kundenportal. Verwenden Sie Basisauthentifizierung um Methoden aufzurufen.

Endpunktpfade: https://api.xsolla.com.

Projekte

Projekt anlegen

Legt ein neues Projekt an.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
merchant_id
integer Händler-ID.
descriptor
string Kurzbezeichnung für das Projekt, wird in Berichten verwendet (maximale Zeichenlänge: 12).
name
array of strings Array der lokalisierten Projektnamen.
url
string Seiten-URL des Projekts.
description
string Array der lokalisierten Projektbeschreibungen.
payment_url
string Webhook-URL.
key
string Geheimer Schlüssel des Projekts.
return_url
string URL, zu welcher der Benutzer nach einer erfolgreichen Zahlung weitergeleitet wird.
user_billing_enabled
boolean Legt fest, ob die Benutzerdaten in der Xsolla-Datenbank verbleiben.
show_user_in_paystation
boolean Legt fest, ob die gespeicherten Zahlungskonten und die Zahlungshistorie des Benutzers im Zahlungsportal angezeigt werden.
locale_list
array of strings Liste der Sprachen, für welche die entsprechenden Einstellungen lokalisiert wurden.
user_public_id_enabled
boolean Ermöglicht die Verifizierung der Benutzerdaten mit Hilfe der öffentlichen Benutzer-ID (für Zahlungen an Verkaufsterminals).
components
object Angaben zum Modul (Objekt).
components.virtual_currency
object Angaben zum Modul "Virtuelle Währung" (Objekt).
components.virtual_currency.enabled
boolean Legt fest, ob das Modul für dieses Projekt aktiviert ist.
components.virtual_currency.custom_name
array of strings Lokalisierte Modulnamen, die im Zahlungsportal angezeigt werden.
components.items
object Angaben zum Modul "Virtuelle Gegenstände" (Objekt).
components.items.enabled
boolean Legt fest, ob das Modul für dieses Projekt aktiviert ist.
components.items.custom_name
array of strings Lokalisierte Modulnamen, die im Zahlungsportal angezeigt werden.
components.simple_checkout
object Angaben zum Modul "Einfacher Checkout" (Objekt).
components.simple_checkout.enabled
boolean Legt fest, ob das Modul für dieses Projekt aktiviert ist.
components.simple_checkout.custom_name
array of strings Lokalisierte Modulnamen, die im Zahlungsportal angezeigt werden.
components.subscriptions
object Angaben zum Modul "Abonnements" (Objekt).
components.subscriptions.enabled
boolean Legt fest, ob das Modul für dieses Projekt aktiviert ist.
components.subscriptions.custom_name
array of strings Lokalisierte Modulnamen, die im Zahlungsportal angezeigt werden.
send_json_to_paystation
boolean Aktiviert tokenlose Integration.
is_external_id_required
boolean Legt fest, ob die externe ID für die Integration mit Xsolla benötigt wird.
ipn_enabled
boolean Legt fest, ob Webhooks zur Webhook-URL gesendet werden.
payments_available
boolean Ob der Partner echte Zahlungen akzeptieren kann. "true" wenn ein unterzeichneter Vertrag vorliegt und wenigstens ein Projekt läuft. "false" als Standardwert.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}
{
  "id": 12345
}

Projekt anfordern

Ruft Informationen zu einem Projekt ab.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
project_id
integer Projekt-ID.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort
{
  "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": []
}

Projekt aktualisieren

Aktualisiert ein Projekt.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
merchant_id
integer Händler-ID.
project_id
integer Projekt-ID.
descriptor
string Kurzbezeichnung für das Projekt, wird in Berichten verwendet (maximale Zeichenlänge: 12).
name
array of strings Array der lokalisierten Projektnamen.
url
string Seiten-URL des Projekts.
description
string Array der lokalisierten Projektbeschreibungen.
payment_url
string Webhook-URL.
key
string Geheimer Schlüssel des Projekts.
return_url
string URL, zu welcher der Benutzer nach einer erfolgreichen Zahlung weitergeleitet wird.
user_billing_enabled
boolean Legt fest, ob die Benutzerdaten in der Xsolla-Datenbank verbleiben.
show_user_in_paystation
boolean Legt fest, ob die gespeicherten Zahlungskonten und die Zahlungshistorie des Benutzers im Zahlungsportal angezeigt werden.
locale_list
array of strings Liste der Sprachen, für welche die entsprechenden Einstellungen lokalisiert wurden.
user_public_id_enabled
boolean Ermöglicht die Verifizierung der Benutzerdaten mit Hilfe der öffentlichen Benutzer-ID (für Zahlungen an Verkaufsterminals).
components
object Angaben zum Modul (Objekt).
components.virtual_currency
object Angaben zum Modul "Virtuelle Währung" (Objekt).
components.virtual_currency.enabled
boolean Legt fest, ob das Modul für dieses Projekt aktiviert ist.
components.virtual_currency.custom_name
array of strings Lokalisierte Modulnamen, die im Zahlungsportal angezeigt werden.
components.items
object Angaben zum Modul "Virtuelle Gegenstände" (Objekt).
components.items.enabled
boolean Legt fest, ob das Modul für dieses Projekt aktiviert ist.
components.items.custom_name
array of strings Lokalisierte Modulnamen, die im Zahlungsportal angezeigt werden.
components.simple_checkout
object Angaben zum Modul "Einfacher Checkout" (Objekt).
components.simple_checkout.enabled
boolean Legt fest, ob das Modul für dieses Projekt aktiviert ist.
components.simple_checkout.custom_name
array of strings Lokalisierte Modulnamen, die im Zahlungsportal angezeigt werden.
components.subscriptions
object Angaben zum Modul "Abonnements" (Objekt).
components.subscriptions.enabled
boolean Legt fest, ob das Modul für dieses Projekt aktiviert ist.
components.subscriptions.custom_name
array of strings Lokalisierte Modulnamen, die im Zahlungsportal angezeigt werden.
send_json_to_paystation
boolean Aktiviert tokenlose Integration.
is_external_id_required
boolean Legt fest, ob die externe ID für die Integration mit Xsolla benötigt wird.
ipn_enabled
boolean Legt fest, ob Webhooks zur Webhook-URL gesendet werden.
payments_available
boolean Ob der Partner echte Zahlungen akzeptieren kann. "true" wenn ein unterzeichneter Vertrag vorliegt und wenigstens ein Projekt läuft. "false" als Standardwert.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort

Liste der Projekte abrufen

Fordert Projekte eines Händlers an.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
merchant_id
integer Händler-ID.
sort
string Sortiert die aufgelisteten Gegenstände nach deren Erstellungsdatum. Als Wert kann entweder 'asc' (Sortierung in aufsteigender Reihenfolge) oder 'desc' (Sortierung in absteigender Reihenfolge) festgelegt werden. 'asc' ist voreingestellt.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort
[
  {
    "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
  }
]

Zahlungsart anfordern

Liefert eine Liste der für ein Projekt aktivierten Zahlungssysteme.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
project_id
integer Projekt-ID. Erforderlich.
offset
integer Elementnummer, aus der die Liste generiert wird (die Zählung beginnt bei 0). Erforderlich.
limit
integer Begrenzung der Elementanzahl auf der Seite. Erforderlich.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort
{
  "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"
    }
  ]
}

Benutzerverwaltung

Benutzer anlegen

Legt einen neuen Benutzer an.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
project_id
integer Projekt-ID.
user_id
string Benutzer-ID. Erforderlich.
user_name
string Benutzername.
user_custom
string Benutzerdefinierte Parameter zur Benutzeridentifikation.
email
string E-Mail des Benutzers.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort

Benutzer anfordern

Fordert Benutzerdaten an.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
project_id
integer Projekt-ID.
user_id
string Benutzer-ID.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort
{
  "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"
}

Benutzer aktualisieren

Aktualisiert Benutzerdaten.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
project_id
integer Projekt-ID.
user_id
string Benutzer-ID. Erforderlich.
user_name
string Benutzername.
user_custom
string Benutzerdefinierte Parameter zur Benutzeridentifikation.
email
string E-Mail des Benutzers.
enabled
boolean Legt fest, ob der Benutzer aktiv geschaltet ist. Erforderlich.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort

Transaktionsliste abrufen

Listet alle Transaktionen eines Benutzers auf.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
project_id
integer Projekt-ID.
user_id
string Benutzer-ID. Erforderlich.
datetime_from
datetime Beginn des Zeitraums. Erforderlich.
datetime_to
datetime Ende des Zeitraums. Erforderlich.
transaction_type
string Transaktionsart; als Wert lässt sich entweder "payment", "coupon", "inGamePurchase", "internal" oder "cancellation" festlegen.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort
[
  {
    "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"
        }
      }
    ]
  }
]

Virtuelle Gegenstände hinzufügen

Fügt dem Konto eines Benutzers virtuelle Gegenstände hinzu.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
project_id
integer Projekt-ID.
user_id
string Benutzer-ID.
virtual_items
array Virtuelle Gegenstände (Array).
virtual_items.virtual_item
object Angaben zum virtuellem Gegenstand (Objekt).
virtual_items.virtual_item.sku
string Eindeutige ID des Gegenstands.
virtual_items.amount
integer Gegenstandsmenge.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort

Virtuellen Gegenstand anfordern

Listet virtuelle Gegenstände auf, die einem Benutzer gehören.

HTTP-ANFRAGE

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

Parameter Type Beschreibung
project_id
integer Projekt-ID.
user_id
string Benutzer-ID.
offset
integer Elementnummer, aus der die Liste generiert wird (die Zählung beginnt bei 0).
limit
integer Begrenzung der Elementanzahl auf der Seite.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort
[
  {
    "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
  }
]

Virtuelle Gegenstände entfernen

Entfernt virtuelle Gegenstände aus dem Konto eines Benutzers.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
project_id
integer Projekt-ID.
user_id
string Benutzer-ID.
virtual_items
array Virtuelle Gegenstände (Array).
virtual_items.virtual_item
object Angaben zum virtuellem Gegenstand (Objekt).
virtual_items.virtual_item.sku
string Eindeutige ID des Gegenstands.
virtual_items.amount
integer Gegenstandsmenge.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort

Benutzer-Kontostand aktualisieren

Aktualisiert den Kontostand eines Benutzers.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
project_id
integer Projekt-ID.
user_id
string Benutzer-ID.
int
float Menge der virtuellen Währung.
comment
string Grund für die Änderung des Kontostands.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}
{
  "amount": 400
}

Alle Benutzer abrufen

Listet alle Benutzer auf.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
project_id
integer Projekt-ID. Erforderlich.
user_requisites
string Benutzer-ID oder -name.
email
string E-Mail des Benutzers.
offset
integer Elementnummer, aus der die Liste generiert wird (die Zählung beginnt bei 0). Erforderlich.
limit
integer Begrenzung der Elementanzahl auf der Seite. Erforderlich.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort
{
  "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
}

Alle virtuellen Gegenständen abrufen

Virtuelle Gegenstände aller Projektbenutzer abrufen.

HTTP-ANFRAGE

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

Parameter Type Beschreibung
project_id
integer Projekt-ID.
user_id
string Benutzer-ID.
offset
integer Elementnummer, aus der die Liste generiert wird (die Zählung beginnt bei 0).
limit
integer Begrenzung der Elementanzahl auf der Seite.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort
[
  {
    "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"
      }
    ]
  }
]

Berichte

Transaktionen durchsuchen

Fordert eine Liste der Transaktionen basierend auf bestimmten Suchparametern an.

Note: Sie können die Liste im JSON-, CSV- oder XLS-Format anfordern.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
merchant_id
integer Händler-ID. Erforderlich.
format
string Datenformat: json / csv / xls. Erforderlich.
datetime_from
datetime Beginn des Zeitraums.
datetime_to
datetime Ende des Zeitraums.
project_id
integer Projekt-ID.
show_dry_run
boolean Legt fest, ob testweise durchgeführte Transaktionen miteinbezogen werden.
transaction_id
integer ID der Transaktion.
phone
string Telefonnummer des Benutzers (im internationalen Format).
user_id
string Benutzer-ID.
user_name
string Benutzername.
user_custom
string Benutzerdefinierte Parameter zur Benutzeridentifikation.
email
string E-Mail des Benutzers.
external_id
string Externe ID der Transaktion.
offset
integer Elementnummer, aus der die Liste generiert wird (die Zählung beginnt bei 0).
limit
integer Begrenzung der Elementanzahl auf der Seite.
transaction_type
string Transaktionsart; als Wert lässt sich entweder "payment", "coupon", "inGamePurchase", "internal" oder "cancellation" festlegen.
status
string Zusätzlicher Transaktionsstatus: created / processing / done / canceled / error / review / refunded / awaitingRefund.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort
[
  {
    "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
    }
  }
]

Transaktion abrufen

Ruft die vollständigen Transaktionsdaten mittels ID ab.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
merchant_id
integer Händler-ID. Erforderlich.
transaction_id
integer ID der Transaktion. Erforderlich.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort
{
  "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"
  }
}

Transaktionen abrufen

Fordert eine Liste aller Transaktionen zu einem bestimmten Zeitraum / einer bestimmten Auszahlung / einem bestimmten Bericht auf.

Note: Sie können die Liste im JSON-, CSV- oder XLS-Format anfordern.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
merchant_id
integer Händler-ID. Erforderlich.
format
string Datenformat: json / csv / xls. Erforderlich.
datetime_from
datetime Beginn des Zeitraums. Erforderlich.
datetime_to
datetime Ende des Zeitraums. Erforderlich.
project_id
integer Projekt-ID.
show_dry_run
boolean Legt fest, ob testweise durchgeführte Transaktionen miteinbezogen werden.
transfer_id
integer ID der Auszahlung.
report_id
integer ID des Finanzberichts.
limit
integer Begrenzung der Elementanzahl auf der Seite.
offset
integer Elementnummer, aus der die Liste generiert wird (die Zählung beginnt bei 0).
in_transfer_currency
boolean Rechnet alle Finanzdaten in die Währung um, welche für die Auszahlungen verwendet wird (standardmäßig ist die Währung festgelegt, die für Bezahlungen verwendet wird). Erforderlich.
show_total
boolean Fügt die Gesamtsumme zum Bericht hinzu. Erforderlich.
status
string Status der Transaktion. Mögliche Werte: 'done', 'canceled' oder 'error'.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort
[
  {
    "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
      }
    }
  }
]

Auszahlungen abrufen

Ruft die Aufschlüsselung der Auszahlungen in der Währung ab.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
merchant_id
integer Händler-ID. Erforderlich.
datetime_from
datetime Beginn des Zeitraums.
datetime_to
datetime Ende des Zeitraums.
integer ID des Rechtssubjekts, das zum Entwickler gehört.
status
string Status der Transaktion. Mögliche Werte: 'done', 'canceled' oder 'error'.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort
[
  {
    "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
  }
]

Berichte abrufen

Fordert die Liste der Finanzberichte für einen bestimmten Zeitraum an.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
merchant_id
integer Händler-ID.
datetime_from
datetime Beginn des Zeitraums.
datetime_to
datetime Ende des Zeitraums.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort
[
  {
    "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
  }
]

Erstattungsanfrage

Sendet eine Anfrage bezüglich Kostenrückerstattung, um dem Benutzer eine Zahlung zurückzuerstatten.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
merchant_id
integer Händler-ID. Erforderlich.
transaction_id
integer ID der Transaktion. Erforderlich.
description
string Grund für die Kostenrückerstattung. Erforderlich.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort

Support

Ereignisse abrufen

Listet alle Ereignisse auf.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
merchant_id
integer Händler-ID. Erforderlich.
offset
integer Elementnummer, aus der die Liste generiert wird (die Zählung beginnt bei 0).
limit
integer Begrenzung der Elementanzahl auf der Seite.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort
[
  {
    "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"
    ]
  }
]

Tickets abrufen

Listet alle Support-Tickets auf.

HTTP-ANFRAGE

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

Parameter Typ Beschreibung
merchant_id
integer Händler-ID. Erforderlich.
datetime_from
datetime Beginn des Zeitraums.
datetime_to
datetime Ende des Zeitraums.
status
string Ticketstatus.
type
string Tickettyp.
offset
integer Elementnummer, aus der die Liste generiert wird (die Zählung beginnt bei 0).
limit
integer Begrenzung der Elementanzahl auf der Seite.
sender
string Wer hat das Ticket erstellt. Als Wert lässt sich entweder 'partner', 'user' oder null festlegen.
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
Anfrage
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);
Antwort
[
  {
    "author_name": "niko",
    "created_at": "2018-04-08T18:21:16+00:00",
    "id": 2586512,
    "is_audio": false,