Инструменты страницы
REST interface
The API remains backward compatible in the following cases:
- a new optional parameter appears in the request;
- a new parameter appears in the response;
- the order of parameters in the response changes.
Interactions are implemented as HTTP POST requests to specific URLs (separate URL for each request type). Parameters are passed as parameters of POST requests. Parameter values must be URL encoded.
The result of processing a request is returned as a JSON object. For example:
{"errorCode":"12","errorMessage":"Empty amount"}
To authorize the store's access to the payment gateway system, any request from the store must contain the store's name and password that the store representative entered when registering the store in the system. The values of the login and password are passed in the following parameters:
Name | Type | Mandatory | Description |
---|---|---|---|
|
AN..30 | Yes | The Store login received on the connection |
|
AN..30 | Yes | The Store password received on the connection |
The syntax of the requests differs depending on the chosen payment scheme (one-phase or two-phase). The requests for each of them are described below.
Content type of the request must be «application/x-www-form-urlencoded».
All the text fields must be in the Unicode encoding (UTF-8).
Special characters in REST request must be URL encoded. For example, the password «qwe?rt%y» must be passed as «qwe%0Frt%25y». Additional information about URL encoding is available here: https://www.w3schools.com/tags/ref_urlencode.ASP
If errorCode
= 0, the request was processed by the Payment Gateway without system errors (notably, errorCode
does not show order status).