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

API



Registration of partners on your site

1. Obtaining the request number and captcha

URL and request format: //shop.digiseller.ru/xml/agent_get.asp?id_seller=1
Method: GET
Content-Type: "text/xml" | "text/json"
Request parameters:
Name Use Comment
id_seller your id
XML response format: JSON response format: xml json <digiseller.response> <retval>0</retval> <retdesc></retdesc> <id_seller>1</id_seller> <id_request>993811</id_request> <img_url><![CDATA[//shop.digiseller.ru/asp/turing_num.asp?nocash=8933&id=993811]]></img_url> </digiseller.response> { "retval":"0", "retdesc":"", "id_seller":"1", "id_request":"993812", "img_url":"//shop.digiseller.ru/asp/turing_num.asp?nocash=3021&id=993812" }
Response parameters:
Name Use Comment
retval result code 0 - request completed
1 - unknown registration error
retdesc error text for retval != 0
id_request the request number for the next step integer
img_url the URL of the captcha image string. you show an image and ask the user (partner) to enter the captcha code and submit the result on the next step

2. Captcha verification and partner registration

URL and request format: //shop.digiseller.ru/xml/agent_check.asp?id_seller=1&id_request=986409&turing_num=9196&email=test@yandex.ru&redirect_url=http://www.site.ru/welcome_partner.html
Method: GET
Content-Type: "text/xml" | "text/json"
Request parameters:
Name Use Comment
id_seller your id
id_request request number received on the previous step integer
turing_num the verification number entered by the partner (captcha) integer
r_email user (partner) email string. A verification email will be sent to this address
r_redirect_url URL for redirection string. This URL will be used for redirecting newly-registered partners after they click the link in the verification email
XML response format: JSON response format: xml json <digiseller.response> <retval>0</retval> <retdesc></retdesc> <id_seller>1</id_seller> <id_request>993814</id_request> <id_agent>0</id_agent> </digiseller.response> { "retval":"0", "retdesc":"", "id_seller":"1", "id_request":"993817", "id_agent":"0" }
Response parameters:
Name Use Comment
retval result code 0 – request made. A registration confirmation email has been sent to the partner’s email
-1..-5 the input parameter is missing or incorrect
1 – invalid id_request
2 - id_request has already been used
3 – there have been 3 errors in a row while entering the captcha code. Please start again.
4 – the captcha code was entered incorrectly
-50 – registration to this address has already been initiated
80 – the email address contains invalid characters
retdesc error text for retval != 0
id_agent id_agent=0 in combination with retval=0 : registration has not been completed yet. id_agent>0 in combination with retval=0 : registration has been completed, partner id integer

Getting the token for api.digiseller.ru

URL and request format https://api.digiseller.ru/api/apilogin
Method: POST
Request headers: Content-Type: "text/xml" | "text/json" | "application/json" Accept: "text/xml" | "text/json" | "application/json"
XML request format: JSON request format: xml json <apilogin.request> <login>SampleSeller</login> <timestamp>1000111001</timestamp> <sign>153611851a66f06dbd69f3a40a1cd7502d18f3516edbf951468b8da5f2bf4c3f</sign> </apilogin.request> { "login": "SampleSeller", "timestamp": 1000111001, "sign": "153611851a66f06dbd69f3a40a1cd7502d18f3516edbf951468b8da5f2bf4c3f" }
Request parameters:
Name Use Comment
login seller login string
timestamp request time request time
sign Signature string, is formed as SHA256 from the string obtained by concatenating the following parameters: The
  • Seller password in Digiseller (case sensitive)
  • Seller API_GUID (sent to WM message )
  • timestamp (current time) sign = SHA256 (password + API_GUID + timestamp)
Request encoding: UTF-8
XML response format: JSON response format: xml json <apilogin.response> <retval>0</retval> <desc></desc> <token>9e27b1c1dade42b192805a46f735adc1</token> <seller_id>123456</seller_id> <valid_thru>2019-06-17T12:35:39.8385039Z</valid_thru> </apilogin.response> { "retval": 0, "desc": "", "token": "9e27b1c1dade42b192805a46f735adc1", "seller_id": 123456, "valid_thru": "2019-06-17T12:35:39.8385039Z" }
Response parameters:
Name Use Comment
retval result code number, possible values:
0 - success
-1 - incorrect login or signature
-2 - account has been temporarily suspended
-3 - runtime error
-4 - the condition of uniqueness timestamp is not fulfilled
desc description of result code string
token access token A string that is used later to identify the user in the methods of api.digiseller.ru
token is valid 2 hours after receiving
after the expiration of the token's validity period, API methods for working with goods return the status 401 (Unauthorized)
seller_id seller ID integer
valid_thru The time to which the token is valid (UTC) string

Search and verification of payments by a unique code

The URL for sending a request: http://shop.digiseller.ru/xml/check_unique_code.asp - main address
https://www.oplata.info/xml/check_unique_code.asp - reserve address
Method: POST
Request format: xml json <digiseller.request> <id_seller></id_seller> <unique_code></unique_code> <sign></sign> </digiseller.request> { "id_seller":, "unique_code":"", "sign":"" }
Request parameters:
Name Use Comment
id_seller seller ID:
integer
unique_code unique 16-digit code that the user gets after payment a string of 16 characters
sign a signature formed as a function MD5(string_for_signature)
string for signature: "id_seller" + ":" + "unique_code" + ":" + "your password for the service"
Response format:
request sent
a sample of a JSON response
xml json <digiseller.response> <retval></retval> <retdesc></retdesc> <id_seller></id_seller> <unique_code></unique_code> <inv></inv> <id_goods></id_goods> <amount></amount> <type_curr></type_curr> <profit></profit> <amount_usd></amount_usd> <date_pay></date_pay> <email></email> <agent_id></agent_id> <agent_percent></agent_percent> <query_string></query_string> <unit_goods></unit_goods> <cnt_goods></cnt_goods> <promo_code></promo_code> <bonus_code></bonus_code> <cart_uid></cart_uid> <options> <option id=""> <name></name> <user_data></user_data> </option> <option id=""> <name></name> <user_data></user_data> </option> </options> </digiseller.response> { "retval":"0", "retdesc":"", "id_seller":"", "unique_code":"", "inv":"", "id_goods":"", "amount":"", "type_curr":"", "profit":"", "amount_usd":"", "date_pay":"", "email":"", "agent_id":"", "agent_percent":"", "unit_goods":"", "cnt_goods":"", "promo_code":"", "bonus_code":"", "cart_uid":"", "options":[{"id":"","name":"","user_data":""}, {"id":"","name":"","user_data":""}] }
Response parameters:
Name Use Comment
retval Result code 0 - Request completed
retdesc decryption of the request execution code
id_seller seller’s identifier passed in the request
unique_code unique 16-digit code passed in the request
inv unique number of a paid invoice in the Digiseller accounting system
we strongly recommend saving this value to the database and check it for uniqueness every time to avoid duplicate deposits
integer
id_goods paid product identifier integer
amount amount credited to your account
make sure to check this value!
type_curr currency of payment credited to your account (not the payment type!) WMZ | WMR | WME | WMX
amount_usd payment amount in USD
profit amount credited to your account (net of commissions)
date_pay date and time of payment
email customer's email
name_invoice the invoice name
lang buyer`s language
agent_id partner ID if the sale was made through a partner
agent_percent partner commission
query_string base64-encoded string containing a set of parameters that were additionally passed from your site to the oplata.info payment page. The parameters may contain a User ID, values for tracking payment conversion, etc.
After base64_decode, the string will look like this: "param1=value1&param2=value2&..."
Example:
bWVtYmVyX2lkPTIzNDE2NTQ0JnNvdXJjZT1yZWd1bGFyJmxheW91dF9pZD0xNSZnYV9jbGllbnRfaWQ9MjI2ODYyNDMyLjE0NjY2Njg5ODkmZm9ybV9pZD03

After base64_decode:
member_id=23416544&source=regular&layout_id=15&ga_client_id=226862432.1466668989&form_id=7
unit_goods unit of the purchased product only for products with a non-fixed price
cnt_goods number of units of the purchased product only for products with a non-fixed price
promo_code promo code used by the customer during payment only if a promo code was used during payment
bonus_code promo code given to the buyer as a bonus after payment only if a promo code was given after payment
cart_uid cart UID only if the product was purchased via the shopping cart
options the list of parameters only for products with additional parameters
options\option the parameter that the customer chose or specified attribute id - unique parameter identifier
options\option\name parameter name
options\option\user_data parameter value chosen or specified by the customer

Retrieving purchase information by invoice number

The URL for sending a request: https://api.digiseller.ru/api/purchase/info/{invoice_id}?token={token}
Method: GET
Request parameters:
Name Use Comment
invoice_id the invoice number in the Digiseller system integer
token access token Method for creating access token
Response format:
xml json <response> <retval>0</retval> <retdesc></retdesc> <errors></errors> <content> <item_id>0</item_id> <cart_uid></cart_uid> <name></name> <amount>0</amount> <currency_type></currency_type> <invoice_state>0</invoice_state> <purchase_date></purchase_date> <agent_id></agent_id> <agent_percent></agent_percent> <query_string></query_string> <unit_goods></unit_goods> <cnt_goods></cnt_goods> <promocode></promocode> <bonuscode></bonuscode> <feedback> <deleted></deleted> <feedback></feedback> <feedback_type></feedback_type> <coment></comment> </feedback> <unique_code_state> <state></state> <date_check></date_check> <date_delivery></date_delivery> <date_refuted></date_refuted> <date_confirmed></date_confirmed> </unique_code_state> <options> <option> <id></id> <name></name> <user_data></user_data> </option> <option> <id></id> <name></name> <user_data></user_data> <user_data_id></user_data_id> </option> </options> <buyer_info> <payment_method></payment_method> <account></account> <email></email> <phone></phone> <skype></skype> <whatsapp></whatsapp> </buyer_info> </content> </response> { "retval": 0, "retdesc": null, "errors": null, "content": { "item_id": 0, "cart_uid": null, "name": "", "amount": 0, "currency_type": "", "invoice_state": 0, "purchase_date": "", "agent_id": null, "agent_percent": null, "query_string": null, "unit_goods": null, "cnt_goods": null, "promo_code": null, "bonus_code": null, "feedback": { "deleted": false, "feedback": "", "feedback_type": "", "comment": "" }, "unique_code_state": { "state": 0, "date_check": null, "date_delivery": null, "date_refuted": null, "date_confirmed": null }, "options": [ {"id":"","name":"","user_data":"", "user_data_id": 123123}, {"id":"","name":"","user_data":"", "user_data_id": null} ], "buyer_info": { "payment_method": "", "account": null, "email": "", "phone": null, "skype": null, "whatsapp": null } } }
Response parameters:
Name Use Comment
retval Result code 0 - success, 1 - error. Detailed information in field 'errors'
retdesc Description of result code Detailed information in field 'errors'
errors Result code Null - errors count is 0. if request is invalid, in this field this field will contain an array of errors
errors\code Error Code String
errors\message Description of result code String
content Response body
content\item_id Paid product identifier Integer
content\cart_uid Cart UID Only if the product was purchased via the shopping cart
content\name The invoice name String
content\amount Amount credited to your account
make sure to check this value!
content\currency_type Currency of payment credited to your account (not the payment type!) WMZ | WMR | WME | WMU
content\invoice_state State of an invoice Number, possible values:
1 - payment is expected
2 - cancellation of payment
3 - successful payment
4 - payment overdue
35 - refund (not completed by the buyer)
5 - refund
content\purchase_date Date and time of payment String
content\agent_id Partner ID if the sale was made through a partner Integer
content\agent_percent Partner commission
query_string base64-encoded string containing a set of parameters that were additionally passed from your site to the oplata.info payment page. The parameters may contain a User ID, values for tracking payment conversion, etc.
After base64_decode, the string will look like this: "param1=value1&param2=value2&..."
Example:
bWVtYmVyX2lkPTIzNDE2NTQ0JnNvdXJjZT1yZWd1bGFyJmxheW91dF9pZD0xNSZnYV9jbGllbnRfaWQ9MjI2ODYyNDMyLjE0NjY2Njg5ODkmZm9ybV9pZD03

After base64_decode:
member_id=23416544&source=regular&layout_id=15&ga_client_id=226862432.1466668989&form_id=7
unit_goods Unit of the purchased product Only for products with a non-fixed price
cnt_goods Number of units of the purchased product Only for products with a non-fixed price
promo_code Promo code used by the customer during payment Only if a promo code was used during payment
bonus_code Promo code given to the buyer as a bonus after payment Only if a promo code was given after payment
content\feedback Response left by buyer
content\feedback\deleted Flag removed or not feedback true | false
content\feedback\feedback Text content of feedback
content\feedback\feedback_type Type of feedback "positive" or "negative"
content\feedback\comment Seller comment String
content\unique_code_state Unique code (status and verification dates) Optional field
content\unique_code_state\state Transaction status Integer, possible values:
1 - unique code not verified
2 - goods delivered, delivery not confirmed and not refuted
3 - goods delivered, delivery confirmed
4 - goods delivered, but refuted
5 - unique code verified, goods not delivered
content\unique_code_state\date_check Verification date String. optional field
content\unique_code_state\date_delivery Delivery date String. optional field
content\unique_code_state\date_refuted Date of refute String. optional field
content\unique_code_state\date_confirmed Confirmation date String. optional field
content\options The list of parameters Only for products with additional parameters
content\options\option The parameter that the customer chose or specified
content\options\option\id Unique parameter identifier Integer
content\options\option\name Parameter name String
content\options\option\user_data Parameter value chosen or specified by the customer String
content\options\option\user_data_id Parameter id chosen or specified by the customer Integer. can be null (only for field with type 'radio' or 'select')
content\buyer_info Buyer information
content\buyer_info\payment_method Payment method String
content\buyer_info\account Account from which payment was made If payment via WebMoney
content\buyer_info\email Customer's email
content\buyer_info\phone Buyer phone number If it was specified
content\buyer_info\skype Skype ID If it was specified
content\buyer_info\whatsapp WhatsApp buyer ID If it was specified