One of the types of auto-payment via the exchanger sсript is payment with the creation of a coupon.
In this case, a valid coupon is created for the exchange amount and this coupon is sent to the user making the exchange by email.
In order for the coupon value to be recorded in the administrative panel or on the user's exchange page, there is this plugin.
The task of the plugin is to record (record/save) coupon codes in the application when making an auto-payment by coupon.