If you wish to run concurrent Secure Trading API clients on the same server, you will need to specify a different port in your stapi.ini file for one of them. Both Secure Trading API clients will use the same certificate files.
Firstly, ensure there is a new line at the end of the XML request when it is being sent to us as Secure Trading API will only read complete lines. Also ensure all your XML tags are well formed (e.g. opened and closed appropriately) and nested tags are fully enclosed within other tags. This error could also be returned if the XML used contains uppercase letters (even in the XML tags), or if you are passing spaces somewhere in the XML.
This may indicate there is a problem with the certificates. Ensure that the certificates you have received from Secure Trading have not been corrupted in any way (for example, accidentally editing characters in the file). Try following the import phase again (section 3.3 Certificate Import of User Guide). You may need to restart the Secure Trading API Client to pick up any changes made.
We use base values in currency i.e. no decimal places. To clarify, along with the relevant currency codes, you should send the values in the format of the examples below.
£100.00 would be 10000 and £100.50 would be 10050
$100.00 would be 100000 and $125.25 would be 12525
For those currencies that have only single units, such as Japanese Yen (JPY), then for ¥1, you would send 1. ¥4050 needs to be sent as 4050 – if you pass it as 405000, then you will process ¥405000.
We recommend allowing your customers to correct any invalid data they enter if you receive this error. This means the transaction will be processed with valid data instead of storing invalid data which isn’t of use to anyone. However, if you do not wish to validate an optional field then it may be omitted in the request to Secure Trading (either by not including the XML tags or leaving the value blank).