POST
/
vouchers
curl --request POST \
  --url https://api.live.paisr.tech/{version}/vouchers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "<string>",
  "type": "percentage",
  "code": "<string>",
  "amount": 2,
  "max_redeems": 500000.5,
  "expires": "<string>"
}'
{
  "success": true,
  "data": {
    "id": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
The details required to create a voucher.
description
string
required

Short description about the voucher.

type
enum<string>
required
Available options:
percentage,
fixed
Example:

"percentage"

code
string
required

Unique code that will be shared with customers.

amount
number
required

Discount amount.

Required range: x >= 1
max_redeems
number
required

Max number of redeems.

Required range: 1 <= x <= 1000000
expires
string
required

Expiration date in relative time. (e.g. 'In 3 days')

Response

200
application/json
Successfully created voucher.
success
boolean
default:true

Indicates if the request was successful.

data
object