OfferCriteria | DCC


The foreignexchange API sends the following request:

<?xml version="1.0" encoding="UTF-8"?>
<!— for new card, send PAN -->
<!-- additionally added for stored card This should come instead of card number-->

<!—For new card, send card-number and for send stored card card-id received in the initialize response -->

	<card-type-id>7</card-type-id> <!—card type id from initialize response -->
<!—This is applicable only for PCC flow. A list of currencies in which conversion can be done is shown in the exchange-currencies node. Send the list sent in the settlement-currencies node of the initialize response.-->
	<client-info language="en" version="1.43" platform="html5">
		<mobile operator-id="60300" country-id="640">12345678</mobile>
		<email>[email id]</email>

The description of the request parameters is as follows:

versionIntegerYesThe version of the API or app that sends the request.
order-numberIntegerYesA unique identification number of an order.

Note: For travel merchants, it can be the PNR number.
partial-card-numberIntegerYesThe first 12 digits of a card number.
card-type-idIntegerYesAn identification number to know the type of card used for a transaction. For example, 7 indicates Mastercard.
country-idIntegerYesThe CPD-specific country code from which a customer searches for a product or service.
sale-amountObjectYesThe amount and currency against which you want to offer exchange price.
transaction-idStringYesCPD transaction ID for which status is being requested
client-idIntegerYesA unique ID configured for a merchant on the Velocity POP.

client-info parameters

languageStringYesThe language that Velocity uses as default when translating the payment pages.

Velocity uses a default language set by a merchant if this parameter is omitted.

Note: Velocity language codes are based upon the ISO- 639-1 standard.

Refer to for details.
versionStringYesThe version of the API or app that sends the request.
platformStringYesThe platform from which the request is sent. For example, web, iOS, Android, HTML, B2B, and B2C.
mobile operator-idIntegerNoThe ID of a customer’s mobile network operator. CPD recommends including this parameter in a request to ensure that Velocity interacts with the operator accurately.
country-idIntegerYesThe CPD-specific country code provided to merchants on request.
client-idIntegerYesA unique ID configured for a merchant on the Velocity POP.
device-idStringNoThe device ID of a customer’s device.

Note: Device ID is optional for a web channel.
customer-referenceIntegerYesA unique reference number used for customer identification.
exchange-currenciesStringNoAn object that provides a list of currencies in which conversion can be done. The list is the same as that sent in the settlement-currencies node of the initialize response.


The FX provider returns the following response only if the DCC value is true. The currency amount with which a payment is initialized is shown in the country-id. When customers enter their card details, the foreignexchange API shows all the offers (or exchange rates) available for that card. For example, a customer is making a transaction in USD, the API can show the price of a product or service in the BHD. The response contains an additional node of foreignexchangeinfo.

<?xml version="1.0" encoding="UTF-8"?>
        <default_opt_in >false</default_opt_in >

<!—The fields highlighted in yellow are applicable only for DCC-->


The description of the response parameters is as follows:

foreign-exchange-offer-idIntegerYesA unique CPD-specific identification number for an offer.
default_opt_inBooleanNoA Boolean value to show if DCC services is provided to a customer.
payment-currency-offersArrayYesA list of exchange offers for a currency.
payment-currency-offerObjectYesAn object of payment currency offer.
exchange-amountObjectYesThe exchange amount offered against a currency.
priceIntegerYesThe price offered against a currency in which a customer makes payment.
currencyStringYesThe currency for which a price is offered.
exchange-currencyStringYesThe currency offered against the card currency.
iso-alpha-codeStringYesThe three-letter alphabetic code for a currency.
iso-numeric-codeIntegerYesThe two-letter numeric code for a country.
exponentIntegerYesThe number of decimals points shown for a currency.
offered-exchange-rateFloatYesThe rate at which a currency is offered for a price.
validation-hmacAlpha numeric stringYesThe Message Authentication Code is calculated by creating a SHA512 hash comprising the following input fields in the listed order:

• clientid
• account
• orderid
• callback-url
• amount
• auth-url
• customer-ref
• auth-token
• email
• mobile
• [SALT]

Using MAC calculation secures the information sent by the merchant to Velocity by applying the SHA-512 encryption algorithm on key parts of the information sent to protect against tampering. The [SALT] is the merchant's shared secret used to ensure that the provided MAC is unique.


Note: If you use foreignexchange API, you must use HMAC and amount for the Pay API from the response.