Skip to main content

Implementation

Surcharge Rules​

The surchargeRules field allows you to provide multiple rules specifying what surcharges should be applied to a transaction. If a transaction matches multiple rules, then the most specific rule will be used; or the first in the list.

Each surcharge rule contains the following fields:

Field NameMandatory?Description
cardTypeYes

One or more 2-letter card type codes for which this rule applies (see)

The following two card type codes are also supported, in addition to the codes listed in the Card Identification section:

CC – matches any credit card.

DD – matches any debit card.

currencyNoZero or more 3-letter ISO-4217 currency codes.
surchargeYesSurcharge amount in minor (N) or major (N.N) units or a percentage (N%).

The surcharge rules should be passed in a sequential array of records, either as nested records or serialised records. The record field names are case sensitive.

Surcharge Amounts​

The Gateway doesn't usually validate that any amount and grossAmount fields are the same and that any netAmount, taxAmount and taxRate tally. However, in order to update them when a surcharge is applied, the amount and grossAmount must match and the correct taxRate must be provided or be able to be calculated from one or more of the other fields. Failure in this respect can cause the Gateway to return one of the following responseCode values; 66360 (INVALID_GROSSAMOUNT), 66361 (INVALID_NETAMOUNT), 66338 (INVALID_TAXAMOUNT), 66362 (INVALID_TAX_RATE).

If the request contains a surchargeAmount field, then the Gateway will assume that surcharging has already been performed externally and will not attempt to apply any further surcharges.