Vouchers + Acquiring
Getting the list of services and vouchers
Get the list of services and vouchers within services
Response parameters
| Parameter | Type | Comment |
|---|---|---|
| categoryId | Number | Service number |
| categoryName | String | Service name |
| type | String | Digital goods category ("VoucherCode") |
| fields | List | The list of required parameters for placing an order |
| vouchers | List | The list of vouchers within the service |
| id | Number | Voucher number |
| name | String | Voucher name |
| price | Number | The voucher's acquisition cost, in RUB |
| minPrice | Number | The minimum sale price, in RUB (acquisition cost plus the minimum WATA commission) |
| isAvailable | true/false | Voucher availability |
| stock | Number | Number of available vouchers |
Purchasing vouchers
Create an order to purchase vouchers and get a payment link.
The merchant income is the vouchers' sale price minus the WATA commission (% of the price) and the vouchers' acquisition cost
Request parameters
| Parameter | Required | Type | Comment |
|---|---|---|---|
| voucherId | Yes | Number | Voucher number. To get voucher numbers, use the "Getting the list of services and vouchers" method |
| amount | Yes | Number | The vouchers' sale price in rubles (the payment link is created for this amount). Value constraints: minPrice*count <= amount <= minPrice*count*1.5 |
| count | Yes | Number | Number of vouchers to purchase |
| orderId | Yes | String | Order number |
| Yes | String | User's email | |
| description | Yes | String | Comments on the order |
| successRedirectUrl | No | String | The store page URL the payer is redirected to if the order payment succeeds |
| failRedirectUrl | No | String | The store page URL the payer is redirected to if the order payment fails |
Response parameters
| Parameter | Type | Comment |
|---|---|---|
| orderId | String | Order number |
| amount | Number | The vouchers' sale price, in RUB |
| commission | Number | The WATA commission, in RUB |
| orderPrice | Number | The vouchers' acquisition cost, in RUB |
| voucherId | Number | Voucher number |
| count | Number | Number of vouchers purchased |
| String | User's email | |
| paymentLink | String | The payment link URL |
| successRedirectUrl | String | The store page URL the payer is redirected to if the order payment succeeds |
| failRedirectUrl | String | The store page URL the payer is redirected to if the order payment fails |
Getting voucher codes
Get the order status and voucher codes by order number.
Voucher codes may take up to 10 minutes to appear in the response after the order is paid
→ GET /api/v3/vouchers/order/{id}
Request parameters
| Parameter | Required | Type | Comment |
|---|---|---|---|
| id | Yes | String | Order number |
Response parameters
| Parameter | Type | Comment |
|---|---|---|
| orderId | String | Order number |
| status | String | Order status. Possible values: Pending (awaiting payment) → Paid (order paid, being fulfilled) → Success (order fulfilled) / Fail (error) |
| vouchers | List | The list of voucher codes |
| amount | Number | The vouchers' sale price, in RUB |
| orderPrice | Number | The vouchers' acquisition cost, in RUB |
| voucherId | Number | Voucher number |
| count | Number | Number of vouchers purchased |
| String | User's email | |
| paymentLink | String | The payment link |
| successRedirectUrl | String | The store page URL the payer is redirected to if the order payment succeeds |
| failRedirectUrl | String | The store page URL the payer is redirected to if the order payment fails |