Redeeming a voucher is very simple. Just pass the voucher code, a unique transaction_id that identifies the transaction in your system and the total transaction cost. Vouchery will validate the code as well as all the campaign limitations attached to the voucher and then return with detailed information if redemption was successful.
In this example, we will focus on successful redemption. For information on handling errors please refer to API Reference.
Single-step redemption is suitable for systems where discount verification is not integrated directly into the checkout, like not internet-enabled POS systems or even cash payments. We strongly encourage our customers to use the two-step voucher redemption process, which is covered next.
You can also see below how to pass product items within the voucher redemption.