Vouchers let you offer personalised discounts to your customers. Each voucher has a unique code, a discount amount, a maximum number of redemptions, and an optional expiry. Vouchers can be applied to an unpaid invoice before or during the hosted checkout.
Creating a Voucher
Navigate to Billing → Discount vouchers in your dashboard and click Create Voucher, or use the Vouchers API.
curl -X POST "https://api.live.paisr.tech/v2/vouchers" \
-H "Authorization: Bearer <token>" \
-H "User-Agent: MyApp/1.0" \
-H "Content-Type: application/json" \
-d '{
"description": "End of month promotion",
"code": "EOTM20",
"amount": 20,
"max_redeems": 100,
"expires": "In 30 days"
}'Applying a Voucher
Share the voucher code with your customer. During the hosted checkout they can enter it to apply the discount before completing payment.
Or apply a voucher programmatically to an unpaid invoice:
curl -X POST "https://api.live.paisr.tech/v2/vouchers/apply" \
-H "Authorization: Bearer <token>" \
-H "User-Agent: MyApp/1.0" \
-H "Content-Type: application/json" \
-d '{
"invoice_id": "inv_<id>",
"code": "EOTM20"
}'A voucher can only be applied while the invoice is in unpaid status. Once the invoice is paid or voided, the applied discount is recorded but the voucher cannot be changed.
Managing Vouchers
Update a voucher's description, amount, redemption limit, or expiry at any time:
curl -X PUT "https://api.live.paisr.tech/v2/vouchers/{voucher_id}" \
-H "Authorization: Bearer <token>" \
-H "User-Agent: MyApp/1.0" \
-H "Content-Type: application/json" \
-d '{
"description": "Extended promotion",
"max_redeems": 200,
"expires": "In 60 days"
}'Deleting a voucher prevents future redemptions but does not affect invoices that have already had the discount applied.
Redemption Tracking
Each voucher tracks how many times it has been redeemed against its maximum. Once redeems.count reaches redeems.max, the voucher is no longer accepted at checkout.
curl -X GET "https://api.live.paisr.tech/v2/vouchers/{voucher_id}" \
-H "Authorization: Bearer <token>" \
-H "User-Agent: MyApp/1.0"The response includes redeems.count and redeems.max so you can monitor usage and adjust the limit or expiry as needed.