General Information
How It Works
  • The API follows REST principles and is based on the JSON:API specification. All requests must include the HTTP header Content-Type: application/json.
  • The base URL for the production environment is: https://api.wata.pro/api/h2h/
  • The API response timeout is set to 1 minute/

Authentication
The API uses Bearer authentication based on a JWT token. The access token must be included in the Authorization HTTP header for every request that requires authentication.

You can get an access token in the merchant dashboard:
  1. Receive an invitation from your account manager via email.
  2. Follow the link in the email to set your password.
  3. After setting the password, log in to the merchant dashboard: https://merchant.wata.pro/login
  4. In the Terminals section, click on the card with your production terminal.
  5. A settings panel will open on the right – use it to create tokens. You can create from 1 to 5 tokens.
  6. Choose a name and set the token’s lifetime. The access token can be valid from 1 to 12 months.
  7. After this period, API requests will start returning a 401 Unauthorized HTTP status code.
WATA does not store access tokens, so they cannot be recovered. A new access token must be generated. We recommend storing the token in a secure place right after generation.


Testing
You can use the following test cards:

HTTP Status Codes
If an error occurs while processing a request, the API returns an HTTP status code other than 200.
When a 400 Bad Request is returned, the response may include detailed error information.
Example: Detailed error response
Response 400
{
   "error":{
      "code":null,
      "message":"Your request is invalid!",
      "details":"The following validation errors were found – 'Amount' is required.",
      "data":{
         
      },
      "validationErrors":[
         {
            "message":"'Amount' is required.",
            "members":[
               "amount"
            ]
         }
      ]
   }
}

Error Codes

Glossary of Terms
Payment Links
Creating a Payment Link
Use this method when the payment form is hosted on WATA’s side. The WATA payment form may include multiple payment methods, depending on the terminal issued. Each payment link is single-use and becomes invalid after the first successful payment.

Request Parameters

Response Parameters
Example: Creating a Payment Link
POST https://api.wata.pro/api/h2h/links
Content-Type: application/json
Authorization: Bearer <access-token>
{
  "amount": 1188.00,
  "currency": "RUB",
  "description": "string",
  "orderId": "string",
  "successRedirectUrl": "string",
  "failRedirectUrl": "string",
  "expirationDateTime": "2024-15-03T12:09:33.390Z"
}
Example: Response to Payment Link Creation
Response 200
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "amount": 1188.00,
  "currency": "RUB",
  "status": "Opened",
  "url": "string",
  "terminalName": "string",
  "terminalPublicId": "3fa85f22-2108-1749-a7gj-9c134g55hkl0",
  "creationTime": "2024-12-03T12:09:33.390Z",
  "orderId": "string",
  "description": "string",
  "successRedirectUrl": "string",
  "failRedirectUrl": "string",
  "expirationDateTime": "2024-15-03T12:09:33.390Z"
}

Get Payment Link by UUID

Request Parameters
Response Parameters
Example: Get Payment Link by UUID
GET https://api.wata.pro/api/h2h/links/3fa85f64-5717-4562-b3fc-2c963f66afa6
Content-Type: application/json
Authorization: Bearer <access-token>
Example: Response to Get Payment Link by UUID
Response 200
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "amount": 1188.00,
  "currency": "RUB",
  "status": "Opened",
  "url": "string",
  "terminalName": "string",
  "terminalPublicId": "3fa85f22-2108-1749-a7gj-9c134g55hkl0",
  "creationTime": "2024-12-03T12:09:33.390Z",
  "orderId": "string",
  "description": "string",
  "successRedirectUrl": "string",
  "failRedirectUrl": "string",
  "expirationDateTime": "2024-15-03T12:09:33.390Z"
}

Search Payment Links

Request Parameters
Response Parameters
Example: Search Payment Links Request
GET https://api.wata.pro/api/h2h/links/?amountFrom=10&currencies=RUB&statuses=Opened&sorting=OrderId&skipCount=5&maxResultCount=5
Content-Type: application/json
Authorization: Bearer <access-token>
Example: Search Payment Links Response
Response 200
{
  "items": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "amount": 1188.00,
      "currency": "RUB",
      "status": "Opened",
      "url": "string",
      "terminalName": "string",
      "terminalPublicId": "3fa85f22-2108-1749-a7gj-9c134g55hkl0",
      "creationTime": "2024-12-06T16:47:29.106Z",
      "orderId": "string"
    }
  ],
  "totalCount": 0
}
Transactions
Get Transaction by UUID

Request Parameters
Response Parameters
Example: Get Transaction by UUID Request
GET https://api.wata.pro/api/h2h/transactions/3a16a4f0-27b0-09d1-16da-ba8d5c63eae3
Content-Type: application/json
Authorization: Bearer <access-token>
Example: Get Transaction by UUID Response
Response 200
{
  "terminalName": "string",
  "terminalPublicId": "3a16a4dd-8c83-fa4d-897a-3b334ed0ebed",
  "type": "CardCrypto",
  "amount": 1188.00,
  "currency": "RUB",
  "status": "Paid",
  "errorCode": null,
  "errorDescription": null,
  "orderId": "string",
  "orderDescription": "string",
  "creationTime": "2024-12-04T17:41:33.744768Z",
  "paymentTime": "2024-12-04T17:41:44.434598Z",
  "totalCommission": 10,
  "sbpLink": null,
  "paymentLinkId": null,
  "id": "3a16a4f0-27b0-09d1-16da-ba8d5c63eae3"
}

Search Transactions

Request Parameters
Response Parameters
Example: Search Transactions Request
GET https://api.wata.pro/api/h2h/transactions/?amountFrom=10&currencies=RUB&statuses=Paid&sorting=OrderId&skipCount=0&maxResultCount=5
Content-Type: application/json
Authorization: Bearer <access-token>
Example: Search Transactions Response
Response 200
{
  "totalCount": 1,
  "items": [
    {
      "terminalName": "string",
      "terminalPublicId": "3a16a4dd-8c83-fa4d-897a-3b334ed0ebed",
      "type": "CardCrypto",
      "amount": 1188.00,
      "currency": "RUB",
      "status": "Paid",
      "errorCode": null,
      "errorDescription": null,
      "orderId": "string",
      "orderDescription": "string",
      "creationTime": "2024-12-05T10:32:07.739314Z",
      "paymentTime": "2024-12-05T10:32:07.739314Z ",
      "totalCommission": 10,
      "sbpLink": null,
      "paymentLinkId": null,
      "id": "3a16a4f0-27b0-09d1-16da-ba8d5c63eae3"
    }
  ]
}

Transaction Statuses
Webhook Notifications
Signature Verification
When registering, you can specify a URL to receive webhook notifications when a transaction is completed by the payer (both successful and failed). The webhook must be responded to with an HTTP status code 200. If the WATA system does not receive this code, it will keep retrying the notification with increasing intervals over the next 16 hours. The timeout for waiting on a response from the merchant's server is 1 minute. A webhook may be sent from one of two IP addresses — 62.84.126.140 or 51.250.106.150.

To ensure that the webhook notification was sent by the WATA system, the X-Signature header includes a digital RSA signature of the sent JSON. To verify the signature, use the SHA512 hash function and the public key (PKCS1), which can be obtained at https://api.wata.pro/api/h2h/public-key (see the section "Retrieving the Public Key for Signature Verification"). Use the raw JSON of the received webhook as the message.
Example: Signature verification in PHP
<?php

class SignatureVerificationService {
    public static function verify($rawWebhookJson, $signature, $publicKey) {
        $publicSignature = openssl_get_publickey($publicKey);
        $signatureBytes = base64_decode($signature);

        $result = openssl_verify($rawWebhookJson, $signatureBytes, $publicSignature, OPENSSL_ALGO_SHA512);
        openssl_free_key($publicSignature);

        return $result === 1;
    }
}
Example: Signature Verification in Java
import java.security.PublicKey;
import java.security.Signature;
import java.util.Base64;

import static java.nio.charset.StandardCharsets.UTF_8;

public class SignatureVerificationService {
    public static boolean verify(String rawWebhookJson, String signature, PublicKey publicKey) throws Exception {
        Signature publicSignature = Signature.getInstance("SHA512withRSA");
        publicSignature.initVerify(publicKey);
        publicSignature.update(rawWebhookJson.getBytes(UTF_8));

        byte[] signatureBytes = Base64.getDecoder().decode(signature);

        return publicSignature.verify(signatureBytes);
    }
}

Retrieving the Public Key for Signature Verification

Response Parameters
Example: Request to Retrieve the Public Key for Signature Verification
GET https://api.wata.pro/api/h2h/public-key 
Content-Type: application/json
Example: Response to Retrieve the Public Key for Signature Verification
Response 200
{
  "value": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoL3WIP92OShyu4Y+ecbS\nZJQyU2AW7gbg8X3KqX7dkctQL54kcxvpMySR8UMjZOCSzLuly2BFHP1pNVMPF304\nuIVpRtHtwEw3k3qE259L/7xEJHSzfehHuMlfSng7Lh/HxLW93douDCwohJvAISwF\ncXlqmNo/eJfBu9kQNlclQXFMYLHOtotZbsMM/oAJJvks7bgnN5o9RXMx8SG5rfq/\naK+BZAlEC83HTpnVrv0wpjmeleSPDSiOkWIY6BBTcg1bpH162en9XasJ/xnHLBFY\nkQSjFQw8nN17CFpd5Hkb0QpABgSEVStvaeLHF5XrWi3B/x5v8sUKsEgUnOJ7LnlH\nHQIDAQAB\n-----END PUBLIC KEY-----"
}
Webhook Notification Parameters
Example: Webhook Notification
Content-Type: application/json
X-Signature: <signature>
{
   "transactionType": "CardCrypto",
   "transactionId": "3a16a4f0-27b0-09d1-16da-ba8d5c63eae3",
   "transactionStatus": "Paid",
   "errorCode": null,
   "errorDescription": null,
   "terminalName": "string",
   "amount": 1188.00,
   "currency": "RUB",
   "orderId": "string",
   "orderDescription": "string ",
   "paymentTime": "2024-12-04T17:41:44.434598Z ",
   "commission": 10,
   "email": null
}