Currency Conversions

Convert Transaction Amount

POST
/currency-conversions

Request the conversion of a Sale or Refund Transaction amount to the equivalent amount in the currency of the Payer.

Authorization

bearerAuth
AuthorizationBearer <token>

Access token from POST /accesstoken, sent as Authorization: Bearer <token>.

In: header

Header Parameters

X-GP-Idempotency?string

Integrator generated value submitted in the request header that is checked to ensure the same value has not been seen in the last 24 hours. It is used to ensure idempotency is maintained with this action.

Length1 <= length <= 50
X-GP-Version*string

The version of the API to execute the request.

Length1 <= length <= 50
Default"2021-03-22"

Request Body

application/json

account_name*string

A meaningful label for the merchant account set by Global Payments.

Length1 <= length <= 50
transaction_type?string

Describes whether the transaction is a SALE, that moves funds from Payer to Merchant, or a REFUND where funds move from Merchant to Payer.

  • SALE - indicates the movement, or the attempt to move, funds from payer to a merchant.
  • REFUND - indicates the movement, or the attempt to move, funds from merchant to the payer.
Default"SALE"

Value in

  • "SALE"
  • "REFUND"
channel*string

Describes whether the transaction was processed in a face to face(CP) scenario or a Customer Not Present (CNP) scenario.

  • CP - A Customer Present transaction is when the payer and the merchant are in direct face to face contact when exchanging payment method information to fulfill a transaction. e.g. in a store and paying at the counter that is attended by a clerk.
  • CNP - A Customer NOT Present transaction is when the payer and the merchant are not together when exchanging payment method information to fulfill a transaction. e.g. a transaction executed from a merchant's website or over the phone

Value in

  • "CP"
  • "CNP"
country*string

The country in ISO-3166-1(alpha-2 code) format.

Length1 <= length <= 255
amount*string

The amount to transfer between Payer and Merchant for a SALE or a REFUND. It is always represented in the lowest denomiation of the related currency.

currency*string

The currency of the amount in ISO-4217(alpha-3)

Length3 <= length <= 3
reference*string

Merchant defined field to reference the transaction.

Length8 <= length <= 50
payment_method*

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/currency-conversions" \  -H "X-GP-Version: 2021-03-22" \  -H "Content-Type: application/json" \  -d '{    "account_name": "DCC",    "channel": "CNP",    "amount": "10000",    "currency": "USD",    "country": "US",    "reference": "becf9f3e-4d33-459c-8ed2-0c4affc9555e",    "payment_method": {      "name": "James Mason",      "entry_mode": "ECOM",      "card": {        "number": "4006097467207025",        "expiry_month": "05",        "expiry_year": "25"      }    }  }'
{  "id": "TRN_uzFr7t4VOqxdLDI44hHmXIjHtOOE8d",  "time_created": "2021-05-03T21:23:39.718Z",  "model": "FROM_TRANSACTION_CURRENCY",  "status": "AVAILABLE",  "country": "US",  "transaction_type": "SALE",  "channel": "CNP",  "amount": "11099",  "currency": "USD",  "minor_units": "2",  "formatted_amount": "105.55",  "exchange_rate": "1.8117",  "payer_amount": "223665",  "payer_currency": "AUD",  "margin_rate_percentage": "03.7500",  "exchange_rate_source": "REUTERS WHOLESALE INTERBANK",  "exchange_rate_time_created": "2018-08-20T11:18",  "commission_percentage": "00.0000",  "merchant_id": "MER_c4c0df11039c48a9b63701adeaa296c3",  "merchant_name": "Sandbox_merchant_2",  "account_id": "TRA_86920f927028745yt34d077d88beb29b",  "account_name": "transaction_processing",  "reference": "becf9f3e-4d33-459c-8ed2-0c4affc9555e",  "payment_method": {    "result": "00",    "message": "Successful",    "entry_mode": "ECOM",    "card": {      "masked_number_last4": "XXXXXXXXXXXX7025",      "brand": "VISA"    }  },  "action": {    "id": "ACT_uzFr7t4VOqxdLDI44hHmXIjHtOOE8d",    "type": "string",    "time_created": "2021-05-03T21:23:39.718Z",    "result_code": "SUCCESS",    "app_id": "U1lRHKomEn7DN907RCDPxVhyMfiMLcfy",    "app_name": "demo_app"  }}