Skip to content

Voucher Generation

Generate a Voucher

Generates a single prepaid voucher code that an end user can redeem in the Academia app.

Endpoint: POST /vouchers/generate

Request

bash
curl -X POST https://api.academia.ly/api/v1/reseller/vouchers/generate \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "denomination_id": 3
  }'
FieldTypeRequiredDescription
denomination_idintegerYesID of the denomination (from the Denominations endpoint)

Response

Success (201):

json
{
  "data": {
    "code": "001110016812345",
    "serial_number": "98712345678",
    "denomination_value": 100,
    "activation_date": "2026-04-09",
    "expiry_date": "2027-04-09"
  }
}
FieldTypeDescription
data.codestringThe voucher code. This is what the end user enters to redeem the voucher.
data.serial_numberstringUnique serial number for the voucher
data.denomination_valuenumberValue in LYD
data.activation_datestringVoucher is valid from this date
data.expiry_datestringVoucher expires after this date

Important

The code and serial_number are sensitive --- treat them like cash. Once generated, the voucher is active and can be redeemed by anyone who has the code.

Errors

StatusResponseMeaning
401{"message": "Invalid credentials."}Invalid or expired token
403{"message": "Access denied."}IP not whitelisted
422{"message": "Validation failed.", "errors": {...}}Invalid denomination_id
422See belowDaily limit exceeded

Daily limit exceeded (422):

json
{
  "message": "Daily limit exceeded.",
  "daily_max_amount": 5000,
  "used_today": 4950,
  "remaining": 50,
  "requested": 100
}
FieldDescription
daily_max_amountYour total daily limit in LYD
used_todayAmount already used today (vouchers + deposits)
remainingHow much you can still use today
requestedThe denomination value you tried to generate

Academia API Integration Documentation