Syntax

validateCouponCode( code )

Checks a voucher code.

Access rights

Read access required.

Arguments

code – the voucher code or the voucher IDs

Return data

Array
(
    [data] => Array
    (
        [status] => success
        [status_msg] => Der Gutschein-Code ist gültig. Sie können noch 100 € von 100 € für diesen Kauf einlösen.
        [currency] => EUR
        [coupon_id] => 69
        [amount_left] => 100
        [amount_total] => 100
        [is_test_payment] => N
    );
)

If is_test_payment == Y, then the voucher can only be used for test payments. For N, it is only for real payments.

Amounts can be returned even if the status is == ‘error’. In this case, the voucher_id that is coded in the voucher code was correct, but the code was wrong.