post
https://desslyhub.com/api/v1/service/voucher/buy
Purchasing a voucher
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
To successfully purchase a voucher, you must specify in the body of the request
| Parameter | Required | Description |
|---|---|---|
| root_id | yes | id of a specific voucher obtained in Get Vouchers or Get Voucher By ID |
| variant_id | yes | id of a specific variants obtained in Get Vouchers or Get Voucher By ID |
| reference | no | your ID , if necessary |
If you follow the above rules, you will receive a response like this:
{
"transaction_uuid": "97945ca7-312c-4cc9-97fb-f27d07b81bff",
"status": "success",
"vouchers": [
{
"serialNumber": "123456",
"pin": "zauvutfeq2wq237dm",
"expiration": "2006-01-02 15:04:05"
}
]
}{
"status": "success",
"error_code": -1
}"status" - transaction status. You can read more about statuses Statuses
"serialNumber" - Voucher serial number (can be used for accounting or activation, may be blank)
"pin" - The PIN code of the voucher, which must be entered during activation
"expiration" - Voucher expiration date and time (may be blank)
“error_code” - error code; for a list of error codes, please refer to the page Error Codes
If you receive a message such as:
{
"error_code": -1
}Review the list of errors Error Codes
200