Skip to main content

Currency Conversion API

The Currency Conversion service allows merchants to dynamically convert transaction amounts from one currency to another using real-time exchange rates. This service enables you to display prices in your customer's local currency, improving the shopping experience and reducing cart abandonment due to currency confusion.

API Endpoints

https://sbpaymentservices.PayFort.com/FortAPI/paymentApi

Request Format

  • Method: POST
  • Content-Type: application/json
  • Submission: Server-to-server HTTPS POST

Currency conversion uses real-time exchange rates that are updated frequently throughout the day. Rates may vary between conversion requests based on market conditions.

Request Parameters

Parameter
service_command   String Max: 20 Required

Service command for currency conversion request.
Value: CURRENCY_CONVERSION
Example. CURRENCY_CONVERSION
access_code   String Max: 20 Required

Merchant access code obtained from Amazon Payment Services dashboard under Integration Settings.
Example. zx0IPmPy5jp1vAz
merchant_identifier   String Max: 20 Required

Unique merchant identifier assigned by Amazon Payment Services during account setup.
Example. CycHZxVj
amount   Integer Max: 10 Required

Amount to be converted in smallest currency unit (e.g., fils for AED, cents for USD). Must be positive integer.
Example. 10000
currency   String Max: 3 Required

Three-letter ISO 4217 currency code of the source amount.
Example. USD
converted_currency   String Max: 3 Required

Three-letter ISO 4217 currency code for the target conversion currency.
Example. AED
language   String Max: 2 Required

Response language for messages and descriptions. Supported values: en (English) or ar (Arabic).
Example. en
signature   String Max: 200 Required

SHA-256 hash signature for request authentication and integrity validation.
Example. 7cad05f0212ed933c9a5d5dffa31661acf2c827a

Multiply your transaction amount by the currency decimal code per ISO code 3 before sending the amount parameter. For currencies with three-decimal codes, round VISA transactions to zero in the final decimal place to avoid declined transactions. Example: For 100.00 USD (2 decimal places per ISO code 3), multiply by 100 to send 10000 in your request.

Check signature calculation section to learn how to calculate the signature.

Response Parameters

Parameter
service_command   String Max: 20

Service command from the request.
Value: CURRENCY_CONVERSION
Example. CURRENCY_CONVERSION
access_code   String Max: 20

Merchant access code used in the request.
Example. zx0IPmPy5jp1vAz
merchant_identifier   String Max: 20

Merchant identifier used in the request.
Example. CycHZxVj
amount   Integer Max: 10

Original amount from the request.
Example. 10000
currency   String Max: 3

Source currency code from the request.
Example. USD
converted_currency   String Max: 3

Target currency code from the request.
Example. AED
language   String Max: 2

Language used for the response.
Example. en
signature   String Max: 200

Response signature for verification.
Example. 7cad05f0212ed933c9a5d5dffa31661acf2c827a
converted_amount   String Max: 20

Converted amount in the target currency using current exchange rates.
Example. 36729.8
conversion_number   String Max: 20

Unique conversion reference generated by Amazon Payment Services for tracking purposes.
Example. 1443796866848
response_message   String Max: 150

Human-readable response description in requested language.
Example. Success
response_code   String Max: 5

Numeric response code indicating conversion result.
Example. 42000
status   String Max: 2

Two-digit status code indicating conversion state.
Example. 20

Response Codes

For a complete list of response codes and their descriptions, please refer to our Error Codes Documentation.

{
"service_command": "CURRENCY_CONVERSION",
"access_code": "DyGkTj68aMuexd2geu2j",
"merchant_identifier": "bYqNmale",
"amount": 10000,
"currency": "USD",
"language": "en",
"converted_currency": "AED",
"signature": "7cad05f0212ed933c9a5d5dffa31661acf2c827a"
}
{
"service_command": "CURRENCY_CONVERSION",
"access_code": "DyGkTj68aMuexd2geu2j",
"merchant_identifier": "bYqNmale",
"amount": 10000,
"currency": "USD",
"language": "en",
"signature": "c63a266e5929c6c8b82c2d9f2c8ae5c2b1b6f8a9d7e4f3c2a1b0c9d8e7f6a5b4",
"response_message": "Success",
"response_code": "42000",
"status": "20",
"converted_amount": "36729.8",
"converted_currency": "AED",
"conversion_number": "1443796866848"
}

Testing The Integration

Sandbox Testing

Use the sandbox environment for development and testing:

  • Sandbox URL: https://sbpaymentservices.PayFort.com/FortAPI/paymentApi

Go-Live Process

Follow our Go-Live checklist for complete production readiness guidelines.

Was this page helpful?

Thanks for your feedback!