Rebate Codes¶
- Preparing a code rule configured to support rebate codes. In order to use the rule to generate rebate codes it is necessary to set discount type, possible values are:
‘v’ if the discount value should be the specified amount
‘p’ if the discount value should be the specified percentage
The value of the rebate is set using the field ‘discount_value’
generation of payment codes using the created code rule for rebate codes
When user is using a code the seller get the code details to determine it’s type using method ‘get_code’. If the code is for rebate it’s necessary to check the rebates type and value
After the amout of the rebate is deducted from the price it is necessary to set the code as used up using method ‘use_code’