Skip to main content

Vouchers + Acquiring

Getting the list of services and vouchers

Get the list of services and vouchers within services

GET /api/v3/vouchers/all

Response parameters

ParameterTypeComment
categoryIdNumberService number
categoryNameStringService name
typeStringDigital goods category ("VoucherCode")
fieldsListThe list of required parameters for placing an order
vouchersListThe list of vouchers within the service
idNumberVoucher number
nameStringVoucher name
priceNumberThe voucher's acquisition cost, in RUB
minPriceNumberThe minimum sale price, in RUB (acquisition cost plus the minimum WATA commission)
isAvailabletrue/falseVoucher availability
stockNumberNumber 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

POST /api/v3/vouchers

Request parameters

ParameterRequiredTypeComment
voucherIdYesNumberVoucher number. To get voucher numbers, use the "Getting the list of services and vouchers" method
amountYesNumberThe vouchers' sale price in rubles (the payment link is created for this amount). Value constraints: minPrice*count <= amount <= minPrice*count*1.5
countYesNumberNumber of vouchers to purchase
orderIdYesStringOrder number
emailYesStringUser's email
descriptionYesStringComments on the order
successRedirectUrlNoStringThe store page URL the payer is redirected to if the order payment succeeds
failRedirectUrlNoStringThe store page URL the payer is redirected to if the order payment fails

Response parameters

ParameterTypeComment
orderIdStringOrder number
amountNumberThe vouchers' sale price, in RUB
commissionNumberThe WATA commission, in RUB
orderPriceNumberThe vouchers' acquisition cost, in RUB
voucherIdNumberVoucher number
countNumberNumber of vouchers purchased
emailStringUser's email
paymentLinkStringThe payment link URL
successRedirectUrlStringThe store page URL the payer is redirected to if the order payment succeeds
failRedirectUrlStringThe 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

ParameterRequiredTypeComment
idYesStringOrder number

Response parameters

ParameterTypeComment
orderIdStringOrder number
statusStringOrder status. Possible values: Pending (awaiting payment) → Paid (order paid, being fulfilled) → Success (order fulfilled) / Fail (error)
vouchersListThe list of voucher codes
amountNumberThe vouchers' sale price, in RUB
orderPriceNumberThe vouchers' acquisition cost, in RUB
voucherIdNumberVoucher number
countNumberNumber of vouchers purchased
emailStringUser's email
paymentLinkStringThe payment link
successRedirectUrlStringThe store page URL the payer is redirected to if the order payment succeeds
failRedirectUrlStringThe store page URL the payer is redirected to if the order payment fails