• 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/json" | "text/xml"
Request parameters:
Name Use Comment
id_seller your id
XML response format: JSON response format: json xml <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/json" | "text/xml"
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: json xml <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.com

URL and request format https://api.digiseller.com/api/apilogin
Method: POST
Request headers: Content-Type: application/json
Accept: application/json
Content-Type: text/xml
Accept: text/xml
JSON request format: XML request format: json xml <apilogin.request> <seller_id>0</seller_id> <timestamp>1000111001</timestamp> <sign>153611851a66f06dbd69f3a40a1cd7502d18f3516edbf951468b8da5f2bf4c3f</sign> </apilogin.request> { "seller_id": 0, "timestamp": 1000111001, "sign": "153611851a66f06dbd69f3a40a1cd7502d18f3516edbf951468b8da5f2bf4c3f" }
Request parameters:
Name Use Comment
seller_id seller ID integer
timestamp request time request time
sign Signature string, is generated by the SHA256 hash function from the string obtained by concatenation of the following parameters:

1. Seller's API key (sent to WebMoney Keeper)
2. 2. timestamp (current time)

sign=SHA256(API ключ + timestamp)

Signature formation examples
Check if the "sign" here field is formed correctly
JSON response format: XML response format: json xml <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.com
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). Valid: 120 minutes string



Permission list

The URL for sending a request: https://api.digiseller.com/api/token/perms?token={token}
Method: GET
Request headers: Accept: "application/json"
Request parameters:
NameUseComment
token access token,
min. permission: [ API tokens ]: Permission list
method to get access token
Response format:
[ "token_get_perms", ... ]
Response parameters:
NameUseComment
*Full API access
description_createProducts / Create
description_editProducts / Edit
description_viewProducts / View
content_uploadContent / Adding
content_changeContent / Edit
content_deleteContent / Delete
gallery_addGallery / Adding
gallery_changeGallery / Edit
option_readParameters / View
option_addParameters / Create
option_editParameters / Edit
option_deleteParameters / Delete
view_operationsOperations / View all operations
view_invoiceOperations / Invoice details
sales_statistics_viewStatistics / Sales statistics
agent_sales_statistics_viewStatistics / Sales statistics as an agent
view_personal_offerAffiliate program / Individual offer
read_commission_templateComission templates / View
create_commission_templateComission templates / Create
edit_commission_templateComission templates / Edit
delete_commission_templateComission templates / Delete
apply_commission_templateComission templates / Apply
debates_readCorrespondence with buyers / View
debates_writeCorrespondence with buyers / Send
debates_deleteCorrespondence with buyers / Delete
token_get_permsAPI tokens / Permission list

* empty array means no access (http status 401 or 403).
* The token must be obtained using an API key that has access to get the list of token permissions.

Search and verification of payments by a unique code

  json xml
The URL for sending a request: https://api.digiseller.com/api/purchases/unique-code/{unique-code}?token={token} - main address
https://oplata.info/api/purchases/unique-code/{unique-code}?token={token} - reserve address
Method: GET
Request headers: Accept: application/json Accept: text/xml
Request parameters:
Name Use Comment
unique_code unique 16-digit code that the user gets after payment a string of 16 characters
token access token,
min. permission: [ Operations ]: Invoice details
method for creating access token
Response format:
XML response example JSON response example
<digiseller.response> <retval></retval> <retdesc></retdesc> <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> <unique_code_state> <state></state> <date_check></date_check> <date_delivery></date_delivery> <date_confirmed></date_confirmed> <date_refuted></date_refuted> </unique_code_state> <options> <option id=""> <name></name> <value></value> <variant_id>0</variant_id> </option> <option id=""> <name></name> <value></value> <variant_id></variant_id> </option> ... </options> </digiseller.response> { "retval": 0, "retdesc": "", "inv": 0, "id_goods": 0, "amount": 0.0, "type_curr": "", "profit": "", "amount_usd": 0.0, "date_pay": "", "email": "", "agent_id": 0, "agent_percent": 0, "unit_goods": 0, "cnt_goods": 0, "promo_code": "", "bonus_code": "", "cart_uid": "", "unique_code_state": { "state": 0, "date_check": "", "date_delivery": "", "date_confirmed": "", "date_refuted": "" }, "options":[ {"id": 0, "name": "", "value": "", "variant_id": 0}, {"id": 0, "name": "", "value": "", "variant_id": null} ... ] }
response parameters:
name use comment
retval result code 0 - request completed
retdesc decryption of the request execution code
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
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 order
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
make sure to check this value!
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
unique_code_state unique code (status and verification dates) optional field
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
unique_code_state\date_check verification date string. optional field
unique_code_state\date_delivery delivery date string. optional field
unique_code_state\date_confirmed confirmation date string. optional field
unique_code_state\date_refuted date of refute string. optional field
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\value parameter value chosen or specified by the customer
options\option\variant_id parameter variant ID, according to buyer's choice integer. can be null (only for field with type 'radio' or 'select')

Sales information by order number

  json xml
The URL for sending a request: https://api.digiseller.com/api/purchase/info/{invoice_id}?token={token}
Method: GET
Request headers: Accept: application/json Accept: text/xml
Request parameters:
Name Use Comment
invoice_id Digiseller order number integer
token access token,
min. permission: [ Operations ]: Invoice details
method for creating access token
Response format:
JSON response example XML response example
<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> <date_pay></date_pay> <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> <payment_aggregator></payment_aggregator> <account></account> <email></email> <phone></phone> <skype></skype> <whatsapp></whatsapp> <ip_address></ip_address> </buyer_info> <owner></owner> <day_lock></day_lock> <lock_state></lock_state> <profit></profit> <agent_fee></agent_fee> </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": "", "date_pay": null, "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": "", "payment_aggregator": "", "account": null, "email": "", "phone": null, "skype": null, "whatsapp": null, "ip_address": null }, "owner": 0, "day_lock": 0, "lock_state": "", "profit": null, "agent_fee": 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 order string
content\date_pay payment confirmation date string. optional field
content\agent_id partner ID if the sale was made through a partner integer
content\agent_percent partner commission
content\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
content\unit_goods unit of the purchased product only for products with a non-fixed price
content\cnt_goods number of units of the purchased product only for products with a non-fixed price
content\promo_code promo code used by the customer during payment only if a promo code was used during payment
content\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, whether or not the feedback is deleted false | 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 variant ID, according to buyer's choice 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\payment_aggregator payment provider 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
content\buyer_info\ip_address customer IP address
content\owner marketplace
content\day_lock holding period, days integer
content\lock_state holding status string, possible values:
free;
locked.
content\profit Credited to account float. optional field
content\agent_fee Agent fee float. optional field