Deleting

During the Create flow, a voucher that has been started but not validated can be deleted simply by abandoning the create flow. Once the Voucher has been validated and submitted to the server, additional steps must be taken.

To delete a validated Voucher, use the deleteVoucher method available in our GiftManager interface. An example can be seen below.

//voucher being the Voucher we wish to delete
long voucherId = voucher.getId();
VoucherSDK.giftManager().deleteVoucher(voucherId);
//voucher being the Voucher we wish to delete
val voucherId = voucher.getId()
VoucherSDK.giftManager().deleteVoucher(voucherId)