5.1.6.1. Edcc Exchange Rate Request

Knowledge Base

Get help for payment solutions. Search our articles or browse by category below.

5.1.6.1 eDCC Exchange Rate Request

The following is an example of a Conversion Rate request for the Terminal ID and BIN:

<?xml version="1.0" encoding="UTF-8"?>
<GETCARDCURRENCYRATE>
	<TERMINALID>1001</TERMINALID>
	<CARDBIN>411111</CARDBIN>
	<DATETIME>27-06-2007:16:50:02:123</DATETIME>
	<HASH>15f6c0f0b51faff9cbb77220ab8ddfce</HASH>
</GETCARDCURRENCYRATE>


Fields description:

Filter:
Field Name Required Description
TERMINALID Y A Terminal ID provided by Worldnet. NB - Please contact Worldnet to be issued with a test terminal ID.
CARDBIN Y BIN. The first 6 digits from the Card Number.
BASEAMOUNT N Transaction amount in the base currency. If sent Worldnet will return the correctly formatted and calculated FOREIGNAMOUNT.
DATETIME Y Request Date and Time. Format: DD-MM-YYYY:HH:MM:SS:SSS.
HASH Y An MD5 HASH. See note 1 below.


Notes:

1. The MD5 HASH is generated using the following as an input string:

TERMINALID+CARDBIN+DATETIME+secret


A response for this request would be

<CARDCURRENCYRATERESPONSE>
	<TERMINALCURRENCY>EUR</TERMINALCURRENCY>
	<CARDCURRENCY>GBP</CARDCURRENCY>
	<CONVERSIONRATE>0.667157</CONVERSIONRATE>
	<DATETIME>27-06-2007:16:50:02:999</DATETIME>
	<EXCHANGERATESOURCENAME>Imaginary Bank</EXCHANGERATESOURCENAME>
	<MARGINPERCENTAGE>1.50</MARGINPERCENTAGE>
	<COMMISSIONPERCENTAGE>1.00</COMMISSIONPERCENTAGE>
	<FOREIGNAMOUNT>15.98</FOREIGNAMOUNT>
	<HASH>a12a10322f5af4a8a419f7dc1c6dd39f</HASH>
</CARDCURRENCYRATERESPONSE>


The following fields will be returned in the response:

Filter:

Field Name Description
TERMINALCURRENCY Terminal's currency code. ISO 4217 Currency Code.
CARDCURRENCY Card's currency code. ISO 4217 Currency Code.
CONVERSIONRATE Conversion rate. See note 2 below.
DATETIME Format: DD-MM-YYYY:HH:MM:SS:SSS.
EXCHANGERATESOURCENAME Source of rates. Display on decision page.
MARGINPERCENTAGE Margin percentage applied.
COMMISSIONPERCENTAGE Commission percentage applied.
FOREIGNAMOUNT Converted amount.
HASH An MD5 HASH. See note 1 below.


Notes:

1. The MD5 HASH is generated using the following as an input string:

 TERMINALCURRENCY+CARDCURRENCY+CONVERSIONRATE+DATETIME+secret

2. In this string CONVERSIONRATE must be a decimal value with 6 decimal places separated by dot character (‘.’), example: ‘0.123000’. The secret should be set by merchant in the Selfcare System section.

Errors handling

If there is an error processing the request, the error string is returned in an XML message with the simple tags:

<ERROR><ERRORSTRING></ERRORSTRING></ERROR>


There is list of error codes and their brief descriptions:

Filter:

Error Code Description
101 Terminal not found.
102 BIN not found.
103 Currencies are not the same.
104 eDCC is not allowed for the terminal.
105 Invalid card currency/Unknown currency.
106 Conversion rate not found.
107 Invalid Request format.
108 Invalid hash in the request.
109 Other error.
110 Internal error.
111 Unsupported card currency.


Notes:

1. Some errors can have more informative message. For example error with code 107 may have detailed information on wrong or expected tag(s) in the XML

Copyright © 2017 Worldnet Knowledge Base | Powered by DokuWiki
developer/integrator_guide/5._xml_integration/5.1._request_types/5.1.6._edcc_xml_request/5.1.6.1._edcc_exchange_rate_request.txt · Last modified: 2016/07/26 12:04 (external edit)