• Notifications
  • Messages
  • Complaints
  • Offers
  • Chats
  • Logout
  • РУС ENG

API



A preliminary check of parameters

  xml json
The URL for sending a request: defined by the seller in additional parameter settings (if the url contains "format=json" then the data is transferred in json format)
Method: POST
Request format: { "product": { "id": 0, "cnt": 0.0, "lang": "ru-RU", }, "options": [ { "id": 0, "type": "text" "value": "text" }, { "id": 0, "type": "textarea" "value": "textarea" }, { "id": 0, "type": "select" "value": "0" }, { "id": 0, "type": "checkbox" "value": "0" }, { "id": 0, "type": "radio" "value": "0" }, ... ] } <request> <product> <id>0</id> <cnt>0.0</cnt> <lang>ru-RU</lang> </product> <options> <option id="0" type="text">text</option> <option id="0" type="textarea">textarea</option> <option id="0" type="select">0</option> <option id="0" type="checkbox">0</option> <option id="0" type="radio">0</option> ... </options> </request>
Response parameters:
Name Use Comment
product\id item id integer
product\cnt number of product units integer
product\lang the information display language ru-RU | en-US
options the list of parameters
options\option value of selected parameter
id attribute - id of parameter
attribute type - parameter type:
  • "text" - text field
  • "textarea" - multi-line text area
  • "select" - drop-down list
  • "checkbox" - flag (checkbox)
  • "radio" - radio buttons
For parameters of the types "select," "checkbox," or "radio"
the ID of the selected option is transmitted as a value.
Response format: { "error": "" } <response> <error></error> </response>
Response parameters:
Name Use Comment
error the error message to be shown to the buyer The presence of this tag in the response is mandatory! An empty tag indicates the absence of errors in the selected parameters.
Please form the error text taking into account the language of the response data (product\lang).



Determining the values of the parameters of the goods upon purchase

  xml json
The URL for sending a request: https://api.digiseller.ru/api/purchases/options
Method: POST
Request headers: Accept: "application/json"
Content-Type: "application/json"
Accept: "application/xml"
Content-Type: "application/xml"
Request format: { "product_id": 0, "options": [ { "id": 0, "value": { "id": 0 } }, { "id": 0, "value": { "text": "" } }, ... ], "unit_cnt": 0, "lang": "", "ip": "" } <digiseller.request> <product_id></product_id> <options> <option> <id></id> <value><id></id></value> </option> <option> <id></id> <value><text></text></value> </option> ... </options> <unit_cnt></unit_cnt> <lang></lang> <ip></ip> </digiseller.request>
Request parameters:
NameUseComment
product\iditem idinteger
optionsproduct parameters
options\optionparameter
options\option\idparameter ID
options\option\value\idID of the selected parameter valuefor parameters of types radio buttons, checkbox and drop-down list
options\option\value\textparameter text value
unit_cntquantity of the product with a non-fixed price
langthe information display languageru-RU (by default) or en-US
ipUser IP
Response format:
{ "retval": 0, "retdesc": "", "id_po": 0 } <digiseller.response> <retval></retval> <retdesc></retdesc> <id_po></id_po> </digiseller.response>
Response parameters:
NameUseComment
retvalresult code0 - request sent
retdescdecryption of the request execution code
id_pounique ID of the selected value setused when switching to a payment form



Work with the shopping cart

1. Adding of products to the cart

The URL for sending a request: //shop.digiseller.ru/xml/shop_cart_add.asp
Method: POST
Content-Type: application/x-www-form-urlencoded
Request format: product_id=1239468&product_cnt=2&typecurr=wmr&email=buyer_@email@mail.com&lang=ru-RU&cart_uid=6420808B4ACC46BEBB04749EC63FF062&id_po=22418804
Request parameters:
Name Use Comment
product_id item id integer
product_cnt number of product units integer > 0. the number of product units is increased by the value of product_cnt if a second request to add products with the same product_id is made
typecurr payment method WMR | WMZ | WME | WMX | PCR | QSP | PYU | RCC | MTS | TL2 | BLN | MGF | BNK | GRN
email customer's email optional, used for calculating discounts
lang language (of error messages) ru-RU | en-US
cart_uid cart UID (if any) or an empty string when the product is first added to the cart
id_po unique ID of the selected value set only for products with mandatory parameters, the value previously obtained by API method
JSON response format: { "cart_err": "0", "cart_cnt": "3", "cart_uid": "C1253F4ABD9C4EDEA79048AFA3E6FB60", "currency": "RUR", "cart_curr": ["USD", "RUR", "EUR", "UAH"], "products": [{ "id": "1847398", "item_id": "986716", "name": "Grand Theft Auto V ", "available": "1", "price": "289", "currency": "RUR", "cnt_item": "1", "cnt_lock": "0" }, { "id": "2272915", "item_id": "986719", "name": "Xbox Live Gold 14 дней (RUS/EU/USA) +48 часов в подарок", "available": "1", "price": "149", "currency": "RUR", "cnt_item": "2", "cnt_lock": "0" }] }
Response parameters:
Name Use Comment
cart_err result code 0 - request completed
1 – one of the request parameters is not specified
1 – the product is not C169
2 – the max number of products in the cart has been exceeded - 50
3 – too many carts have been recently opened from this IP address
4 – the specified cart wasn’t found
5 – the product cannot be paid for with the specified method (typecurr)
8 – the cart contains products from sellers accepting direct payments to their purses
100,101,102 – product payment is temporarily unavailable
103 – unknown error B168 "
cart_cnt total number of products in the cart integer
cart_uid Cart UID string
products the list of products in the cart
products\id id of the position in the cart (not to be confused with product id) integer
products\item_id item ID integer
products\name item name
products\available availability of goods for purchase 1 | 0
products\price price
products\currency
products\cnt_item number of items in the cart integer
products\cnt_lock 1, if it is impossible to buy more than 1 number of goods (the type of goods is universal or with a dynamic price) 1 | 0

2. Getting a list of in-cart products + updating product quantities in the cart

URL and request format: //shop.digiseller.ru/xml/shop_cart_lst.asp
Method: POST
Content-Type: application/x-www-form-urlencoded
Request parameters:
Name Use Comment
cart_uid Cart UID
cart_curr price currency. optional parameter USD | RUR | EUR | UAH | mBTC
item_id id of the position in the cart (not to be confused with product id) that needs to be changed (optional) if unspecified, the method is called exclusively for displaying the contents of the cart.
product_cnt product quantity (optional parameter) integer. if specified, the quantity of item_id is replaced (not increased by!) by the value of product_cnt
lang language (product name display)
JSON response format:
response sample
{ "cart_err": "0", "cart_cnt":"1", "amount":"4,67", "currency":"USD", "cart_curr":["USD", "RUR", "EUR", "UAH"], "products":[ { "id":"2192430", "item_id":"540078", "name":"Музыкант Том 1", "available":"1", "price":"1,87", "currency":"USD", "cnt_item":"1", "cnt_lock":"1" }, { "id":"1942216", "item_id":"540079", "name":"Болотный Кот", "available":"1", "price":"0,93", "currency":"USD", "cnt_item":"2", "cnt_lock":"1" }, { "id":"1970323", "item_id":"541147", "name":"ИС-3, Боевое крещение", "available":"1", "price":"1,87", "currency":"USD", "cnt_item":"1", "cnt_lock":"1" } ] }
Response parameters:
Name Use Comment
cart_err result code 0 - request completed
1 – one of the request parameters is not specified
1 – the product is not C169
2 – the max number of products in the cart has been exceeded - 50
3 – too many carts have been recently opened from this IP address
4 – the specified cart wasn’t found
5 – the product cannot be paid for with the specified method (typecurr)
8 – the cart contains products from sellers accepting direct payments to their purses
100,101,102 – product payment is temporarily unavailable
103 – unknown error B168 "
cart_cnt total number of products in the cart integer
cart_uid Cart UID string
products the list of products in the cart similar to parameter description above in 1. Adding product to the cart



Jump to payment

An example of sending the user through FORM POST: <form id="digiselller_form" action="https://oplata.info/asp2/pay.asp" method="post"> <input type="hidden" name="id_d" value="2038820" /> <input type="hidden" name="cart_uid" value="" /> <input type="hidden" name="typecurr" value="WMZ" /> <input type="hidden" name="email" value="test@test.com" /> <input type="hidden" name="lang" value="ru-RU" /> <input type="hidden" name="failpage" value="https://plati.market/itm/world-of-warcraft/2038820" /> <input type="hidden" name="agent" value="63712" /> <input type="hidden" name="promocode" value="" /> <input type="hidden" name="unit_cnt" value="" /> <input type="hidden" name="id_po" value="" /> <input type="hidden" name="havetoshowoptions" value="" /> </form> <script type="text/javascript">$(document).ready(function(){$("#digiselller_form").submit();});</script>
Request parameters:
Name Use Comment
id_d item id integer — can be unspecified if cart_uid is specified.
cart_uid Cart UID can be unspecified if id_d is specified. UID is obtained from the “work” method work with the cart 1.
typecurr payment method WMR | WMZ | WME | WMX | PCR | QSP | PYU | RCC | MTS | TL2 | BLN | MGF | BNK | GRN
email customer's email optional parameter
lang язык интерфейса ru-RU | en-US (optional parameter)
failpage the address of the page that the user will be forwarded to if the payment is canceled http-ссылка (optional parameter)
unit_cnt the product count for products with a non-fixed price integer (optional parameter)
id_po unique ID of the selected value set only for products with mandatory parameters, the value previously obtained by API method
agent Partner ID integer (optional parameter)
havetoshowoptions 1, if no values are collected on the merchant's site for items with parameters, and you want the form to be displayed on the payment page 0 | 1 (optional parameter)



Setup individual payment methods

1. Initialize payment

The URL for sending a request: Is taken from settings from the "Payment URL" field
Method: POST
Content-Type: application/x-www-form-urlencoded
Request format: invoice_id=12345&amount=10.00&currency=USD&description=товар&lang=ru-RU&payment_id=8&return_url=https://www.digiseller.market/info/buy.asp?id_i=12345&uid=FB4902995B8EDC36D9DC66F743E9E9CF9607284928E3CD484A0AA
Request parameters:
Name Use Comment
invoice_id Digiseller order number integer
amount Payment amount Two decimal places, the fractional part is separated by a dot.
currency Currency of payment USD | RUB | EUR
description Payment name
lang локаль ru-RU | en-US
email Customer's email/td>
payment_id The ID of the payment method chosen by the buyer
return_url The address of the page to return the buyer after payment

2. Update payment status

URL and request format: https://digiseller.market/callback/api
Method: GET
Content-Type: application/x-www-form-urlencoded
Request format: invoice_id=12345&amount=10.00&currency=USD&status=paid&signature=FB4902995B8EDC36D9DC66F743E9E9CF9607284928E3CD484A0AA
Request parameters:
Name Use Comment
invoice_id Digiseller order number integer
amount Payment amount Two decimal places, the fractional part is separated by a dot.
currency Currency of payment USD | RUB | EUR
status Payment status paid | wait | canceled | refunded | error
signature Request signature See signature generation
error Error text broadcast to the customer Parameter is not involved in the formation of the signature

3. Receiving payment status

URL and request format: Is taken from settings from the "Payment status URL" field
Method: GET
Content-Type: application/x-www-form-urlencoded
Request format: invoice_id=12345&amount=10.00&currency=USD&seller_id=8531&signature=FB4902995B8EDC36D9DC66F743E9E9CF9607284928E3CD484A0AA
Request parameters:
Name Use Comment
invoice_id Digiseller order number integer
seller_id your id
amount Payment amount Two decimal places, the fractional part is separated by a dot.
currency Currency of payment USD | RUB | EUR
signature Request signature See signature generation
JSON response format: { "invoice_id": "12345", "amount":"10.00", "currency":"USD", "status":"paid", "signature":"FB4902995B8EDC36D9DC66F743E9E9CF9607284928E3CD484A0AA", "error":"" }
Response parameters:
Name Use Comment
invoice_id Digiseller order number integer
amount Payment amount Two decimal places, the fractional part is separated by a dot.
currency Currency of payment USD | RUB | EUR
status Payment status paid | wait | canceled | refunded | error
signature Request signature See signature generation
error Error text broadcast to the customer Parameter is not involved in the formation of the signature
integrator Name of the payment integrator through which the payment was initiated (made) Parameter is not involved in the formation of the signature

4. Signature

To form a query/response signature, a string must be formed from the query/response data as follows: for each pair (key, value), in alphabetical order of keys, first the key is written, then the ":" character (colon), then the value. Each key:value pair ends with ";" (semicolon)

Parameters: 1. The hash function is SHA256
2. The secret key is taken from the settings
Signature generation 1. Generate a string from the query data
2. Generate HMAC for this string, according to the common algorithm of HMAC generation RFC 2104. In PHP, for example, this is done with the hash_hmac function, using its private key and the hash function specified in the parameter set. Выходная строка должна быть в формате HEX.
Sample: Request data: invoice_id=12345&amount=10.00&currency=USD&seller_id=8531
Resulting string: amount:10.00;currency:USD;invoice_id:12345;seller_id:8531;

Response data: {"invoice_id":"12345", "amount":"10.00", "currency":"USD", "status":"paid"}
Resulting string: amount:10.00;currency:USD;invoice_id:12345;status:paid;