SyntaxcreateVoucher( data )Creates a discount code.Access rightsFull access requiredArgumentsdata – an array with these elements:code – the voucher codeproduct_ids – “all” (default) or comma-separated list of product IDs for which this discount code appliesvalid_from (optional) – point in time (e.g. 2017-12-31 12:00:00) from when the code appliesexpires_at (optional) – point in time when the code becomes invalidfirst_rate (optional) – the discount percent on the first payment (for subscriptions/installment payments) or on the purchase amount for single paymentsother_rates (optional) – the discount percent on the follow-up payments (for subscription/installment payment)first_amount (optional) – the discount as a fixed amount on the first payment/single paymentother_amounts (optional) – the discount as a fixed amount on the follow-up paymentscurrency (optional) – currency of the above amountsis_count_limited – Boolean – for FALSE (default), the code can be used indefinitely For TRUE, use is limited.count_left – falls is_count_limited == TRUE: the number of remaining uses. Default is 1.upgrade_policydetermines how the code is used for upgrades:valid – voucher fully usableother_only – only discount on follow-up installmentsnot_valid – voucher not usableReturn dataArray(    [data] => Array    (        [discount code_id] => 12345        [code] => voucher    ))