Skip to main content

General Information

How it works

  • The API is built on REST principles based on the JSON-API specification
  • Requests must include the HTTP header Content-Type=application/json
  • Response timeout: 1 minute

For requests with a body, you must pass the header:

Content-Type: application/json

Environments

Production

https://dg-api.wata.pro/api

Authentication

API access uses Bearer authentication based on a JWT token (hereafter, access token).

The access token is passed in every protected request in the HTTP header:

Authorization: Bearer <access_token>

You can obtain an access token in the merchant personal account:

  1. Get an invitation from your personal manager by email
  2. Follow the link in the email to set a password
  3. After creating a password, log in to the merchant personal account (https://merchant.wata.pro/login)
  4. In the "Terminals" section, click the terminal tile
  5. A settings panel will open on the right, where you can create tokens. You can create from 1 to 5 tokens
  6. Come up with a name and choose the token's lifetime. The access token lifetime is from 1 to 12 months
  7. After this period expires, requests to the API will start returning HTTP 401 status code. Make sure to set up a reminder to reissue the access token in the personal account in advance and replace it in your system.

Important:

  • Store the access token in a secure place
  • WATA does not store the access token in plain form
  • An existing access token cannot be recovered
  • If necessary, generate a new access token
  • Choose the access token lifetime deliberately — from 1 to 12 months
  • After expiration, the API will return HTTP 401.

Rate limiting

To ensure stable service operation and protect the API from polling load, a rate limit is applied to GET requests to the API.

The following requests are limited

GET api/v3/steam/order
GET api/v3/topup/orders
GET api/v3/vouchers/order
GET api/stars/order
GET api/v1/deposit/order

All other methods (POST, PUT, etc.) and endpoints are not limited

Limit size

  • 1 GET request per 30 seconds

What happens when the limit is exceeded

  • HTTP 429 (Too Many Requests) is returned
  • The response indicates after how many seconds the request can be repeated

Recommendation

Use webhook notifications to receive updates. Polling requests are intended only for infrequent status checks or a fallback scenario


Webhook notifications

In the terminal you can specify a URL where webhook notifications will be sent when the payer pays the transaction (for Digital Goods + Acquiring) or when the order is fulfilled (for Digital Goods + Deposit).

For the webhook workflow and notification parameters, see the WATA Acquiring API documentation.


HTTP statuses

CodeMeaningDescription
200OKRequest processed successfully
400Bad requestThe data in the request is invalid. Check the request, fix the data, and resend it
401UnauthorizedNo access token was provided, or the provided access token has expired. Refresh the access token
403ForbiddenYou do not have access to the requested endpoint
500Server errorPlease contact support with a description of the problem and the request body

If a 400 code is received, a response with error details is returned in the response body.

Example response with error details:

Response 400

{
"error":{
"code":null,
"message":"Your request is invalid!",
"details":"The following errors were found during validation - 'Amount' must be filled.",
"data":{

},
"validationErrors":[
{
"message":"'Amount' must be filled.",
"members":[
"amount"
]
}
]
}
}

Error codes

CodeDescription
ORD_1001Order not found
ORD_1002Such an order already exists
ORD_1003Payment error, order amount (amount) is below the minimum
ORD_1004Order payment deadline has expired
ORD_1005Payment error, order amount (amount) exceeds the maximum
ORD_1006Payment error, please contact the store
ORD_1007Order is not in the pending confirmation status
PL_1001Incorrect payment link amount (the amount is too small or too large)
PL_1002Incorrect payment link currency (creating links in this currency is prohibited)
PL_1003The payment link is unavailable or has already been paid
STM_1001Steam top-up calculation error
STM_1002Steam account does not exist
STM_1003The payment amount must be between 100 RUB and 50,000 RUB
STM_1004Payment error, please contact the store
STR_1001The request contains errors, check that the data is correct
STR_1002User not found
STR_1003Incorrect number of Stars in the order (from 50 to 50,000 units)
STR_1004Error creating the order
TPP_1001Product not found
TPP_1002Incorrect fields passed for placing the order
TPP_1003Product is not available for purchase
TPP_1004User not found, check that the data is correct
VCR_1001Voucher not found
VCR_1002Incorrect Count for the voucher
VCR_1003Out of stock