---
title: Foreign exchange rate
slug: apis/payments/cos-card-payments/fx-rates/fxrates
description: The endpoint provides foreign exchange rates for card payments, enabling USD-to-currency conversion with required codes and clear, network-specific rate details.
icon: {"apiMethod":"GET"}
docTags: 
createdAt: 2025-12-15T13:53:15.707Z
---

## API reference

Retrieves the foreign exchange rate for the desired currency from USD or to USD, determined by use of `fromAmount `or `toAmount`.&#x20;

:::ApiMethodV2
```json
{
  "name": "Endpoint: /cardpayments/v1/fxrates",
  "method": "GET",
  "url": "https://sandbox.crbcos.com/cardpayments/v1/fxrates",
  "description": "",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "4sVGn5OB7GNe1gkv1YLAM",
        "language": "curl",
        "code": "curl --location 'https://sandbox.crbcos.com/cardpayments/v1/fxrates?currency=EUR&fromAmount=100' \\\n--header 'Accept: application/json' \\\n--header 'Authorization: Bearer token'"
      },
      {
        "id": "wD2OSVM9eXz6GDBBMbvON",
        "language": "nodejs",
        "code": "var https = require('follow-redirects').https;\nvar fs = require('fs');\n\nvar options = {\n  'method': 'GET',\n  'hostname': 'sandbox.crbcos.com',\n  'path': '/cardpayments/v1/fxrates?currency=EUR&fromAmount=100',\n  'headers': {\n    'Accept': 'application/json',\n    'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkJSSVlRbmpPXzZac3JSR1dqb2JBNmR2XzNpVSIsIng1dCI6IkJSSVlRbmpPXzZac3JSR1dqb2JBNmR2XzNpVSIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2lkcHRlc3QuY3JiY29zLmNvbSIsIm5iZiI6MTc3NjA4MDE3MywiaWF0IjoxNzc2MDgwMTczLCJleHAiOjE3NzYwODE5NzMsImF1ZCI6WyJodHRwczovL2FwaS5jcmJjb3MuY29tLyIsImh0dHBzOi8vaWRwdGVzdC5jcmJjb3MuY29tL3Jlc291cmNlcyJdLCJzY29wZSI6WyJvcGVuaWQiLCJodHRwczovL2FwaS5jcmJjb3MuY29tLyJdLCJhbXIiOlsiZXh0ZXJuYWwiXSwiY2xpZW50X2lkIjoiY29zZXhwbG9yZXJ1aSIsInN1YiI6ImNjY2E0OTUwLTY3MmEtNDhmZS1iNzUyLTZjNjNmZDFiNjk2ZSIsImF1dGhfdGltZSI6MTc3NjA3NjQxNywiaWRwIjoiQ1JCRW50cmFBY2NvdW50IiwibmFtZSI6InJub3JtaWxlIiwiZ2l2ZW5fbmFtZSI6IlJldXZlbiIsInJvbGUiOlsiVlBOIEFjY2VzcyIsInNlY0RldnNBbGwiLCJkZXZTZWMuRXh0LkRldiIsInNlY0NhcmRBY2Nlc3MiLCIhRGV2ZWxvcGVycyIsInNlY1JvbGVDT1NTYngiLCJzZWNBcmdvQ0RWaWV3ZXJzIiwic2VjUm9sZUNPU0RldiIsInNlY0FXU19SRFAiLCJTZWNBV1NfV1NQIiwic2VjQ2xhdWRlQ29kZURldmVsb3BlcnMiLCJkZXZTZWMuSW50LkRldiJdLCJzaWQiOiJBMEVDNDYzRjhGMzE0RjM0MzdGMUQ2OEY5NjgyMjNDQiIsImp0aSI6IkNFRjMyMDFFQjQ4MTM1OUU3RDBGNzc5MUVFNkM1MDgzIn0.uUHO9OGfTnbMVj-yOzt9FoAG2UBT_DZ68EPS7JpsRPivSkW5V5BvZgZATde24_908X0jaR0u27kmnbeRos57IXpVFv-Xpt9dDnjbrJ8GFi-oxbbJapx5I46i_dIOfEBsThDEUjtuNQvT2NFBrtr44r_YRJoWKYW7ud57T35hAxAs7iSXLX-eJZ4ZbL5iL_HfpWlVROEv49C6xJm6iXZF_pF3dgUUYOurtxDJVm4o7yq7wIzjQY-4EGN96SoHoLuVFFcb_15hHByM8WoVZwnBqBuoDQHbWtFtecJxUJpWZ2tzwOn1ghbZ-XEzSrJ3ojmkW1avmOjD3HKZS89ihapv9g'\n  },\n  'maxRedirects': 20\n};\n\nvar req = https.request(options, function (res) {\n  var chunks = [];\n\n  res.on(\"data\", function (chunk) {\n    chunks.push(chunk);\n  });\n\n  res.on(\"end\", function (chunk) {\n    var body = Buffer.concat(chunks);\n    console.log(body.toString());\n  });\n\n  res.on(\"error\", function (error) {\n    console.error(error);\n  });\n});\n\nreq.end();",
        "customLabel": ""
      },
      {
        "id": "fH2swKTw6D9BwyTERjJYa",
        "language": "python",
        "code": "import requests\n\nurl = \"https://sandbox.crbcos.com/cardpayments/v1/fxrates?currency=EUR&fromAmount=100\"\n\npayload = {}\nheaders = {\n  'Accept': 'application/json',\n  'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkJSSVlRbmpPXzZac3JSR1dqb2JBNmR2XzNpVSIsIng1dCI6IkJSSVlRbmpPXzZac3JSR1dqb2JBNmR2XzNpVSIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2lkcHRlc3QuY3JiY29zLmNvbSIsIm5iZiI6MTc3NjA4MDE3MywiaWF0IjoxNzc2MDgwMTczLCJleHAiOjE3NzYwODE5NzMsImF1ZCI6WyJodHRwczovL2FwaS5jcmJjb3MuY29tLyIsImh0dHBzOi8vaWRwdGVzdC5jcmJjb3MuY29tL3Jlc291cmNlcyJdLCJzY29wZSI6WyJvcGVuaWQiLCJodHRwczovL2FwaS5jcmJjb3MuY29tLyJdLCJhbXIiOlsiZXh0ZXJuYWwiXSwiY2xpZW50X2lkIjoiY29zZXhwbG9yZXJ1aSIsInN1YiI6ImNjY2E0OTUwLTY3MmEtNDhmZS1iNzUyLTZjNjNmZDFiNjk2ZSIsImF1dGhfdGltZSI6MTc3NjA3NjQxNywiaWRwIjoiQ1JCRW50cmFBY2NvdW50IiwibmFtZSI6InJub3JtaWxlIiwiZ2l2ZW5fbmFtZSI6IlJldXZlbiIsInJvbGUiOlsiVlBOIEFjY2VzcyIsInNlY0RldnNBbGwiLCJkZXZTZWMuRXh0LkRldiIsInNlY0NhcmRBY2Nlc3MiLCIhRGV2ZWxvcGVycyIsInNlY1JvbGVDT1NTYngiLCJzZWNBcmdvQ0RWaWV3ZXJzIiwic2VjUm9sZUNPU0RldiIsInNlY0FXU19SRFAiLCJTZWNBV1NfV1NQIiwic2VjQ2xhdWRlQ29kZURldmVsb3BlcnMiLCJkZXZTZWMuSW50LkRldiJdLCJzaWQiOiJBMEVDNDYzRjhGMzE0RjM0MzdGMUQ2OEY5NjgyMjNDQiIsImp0aSI6IkNFRjMyMDFFQjQ4MTM1OUU3RDBGNzc5MUVFNkM1MDgzIn0.uUHO9OGfTnbMVj-yOzt9FoAG2UBT_DZ68EPS7JpsRPivSkW5V5BvZgZATde24_908X0jaR0u27kmnbeRos57IXpVFv-Xpt9dDnjbrJ8GFi-oxbbJapx5I46i_dIOfEBsThDEUjtuNQvT2NFBrtr44r_YRJoWKYW7ud57T35hAxAs7iSXLX-eJZ4ZbL5iL_HfpWlVROEv49C6xJm6iXZF_pF3dgUUYOurtxDJVm4o7yq7wIzjQY-4EGN96SoHoLuVFFcb_15hHByM8WoVZwnBqBuoDQHbWtFtecJxUJpWZ2tzwOn1ghbZ-XEzSrJ3ojmkW1avmOjD3HKZS89ihapv9g'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
      },
      {
        "id": "kW8cgeLOYWrdYOweKInPt",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://sandbox.crbcos.com/cardpayments/v1/fxrates?currency=EUR&fromAmount=100\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Accept\"] = \"application/json\"\nrequest[\"Authorization\"] = \"Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkJSSVlRbmpPXzZac3JSR1dqb2JBNmR2XzNpVSIsIng1dCI6IkJSSVlRbmpPXzZac3JSR1dqb2JBNmR2XzNpVSIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2lkcHRlc3QuY3JiY29zLmNvbSIsIm5iZiI6MTc3NjA4MDE3MywiaWF0IjoxNzc2MDgwMTczLCJle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qBuoDQHbWtFtecJxUJpWZ2tzwOn1ghbZ-XEzSrJ3ojmkW1avmOjD3HKZS89ihapv9g\"\n\nresponse = https.request(request)\nputs response.read_body\n"
      },
      {
        "id": "WyVnroJwv-H8Xo1Co0uij",
        "language": "go",
        "code": "package main\n\nimport (\n  \"fmt\"\n  \"net/http\"\n  \"io\"\n)\n\nfunc main() {\n\n  url := \"https://sandbox.crbcos.com/cardpayments/v1/fxrates?currency=EUR&fromAmount=100\"\n  method := \"GET\"\n\n  client := &http.Client {\n  }\n  req, err := http.NewRequest(method, url, nil)\n\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  req.Header.Add(\"Accept\", \"application/json\")\n  req.Header.Add(\"Authorization\", \"Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkJSSVlRbmpPXzZac3JSR1dqb2JBNmR2XzNpVSIsIng1dCI6IkJSSVlRbmpPXzZac3JSR1dqb2JBNmR2XzNpVSIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2lkcHRlc3QuY3JiY29zLmNvbSIsIm5iZiI6MTc3NjA4MDE3MywiaWF0IjoxNzc2MDgwMTczLCJleHAiOjE3NzYwODE5NzMsImF1ZCI6WyJodHRwczovL2FwaS5jcmJjb3MuY29tLyIsImh0dHBzOi8vaWRwdGVzdC5jcmJjb3MuY29tL3Jlc291cmNlcyJdLCJzY29wZSI6WyJvcGVuaWQiLCJodHRwczovL2FwaS5jcmJjb3MuY29tLyJdLCJhbXIiOlsiZXh0ZXJuYWwiXSwiY2xpZW50X2lkIjoiY29zZXhwbG9yZXJ1aSIsInN1YiI6ImNjY2E0OTUwLTY3MmEtNDhmZS1iNzUyLTZjNjNmZDFiNjk2ZSIsImF1dGhfdGltZSI6MTc3NjA3NjQxNywiaWRwIjoiQ1JCRW50cmFBY2NvdW50IiwibmFtZSI6InJub3JtaWxlIiwiZ2l2ZW5fbmFtZSI6IlJldXZlbiIsInJvbGUiOlsiVlBOIEFjY2VzcyIsInNlY0RldnNBbGwiLCJkZXZTZWMuRXh0LkRldiIsInNlY0NhcmRBY2Nlc3MiLCIhRGV2ZWxvcGVycyIsInNlY1JvbGVDT1NTYngiLCJzZWNBcmdvQ0RWaWV3ZXJzIiwic2VjUm9sZUNPU0RldiIsInNlY0FXU19SRFAiLCJTZWNBV1NfV1NQIiwic2VjQ2xhdWRlQ29kZURldmVsb3BlcnMiLCJkZXZTZWMuSW50LkRldiJdLCJzaWQiOiJBMEVDNDYzRjhGMzE0RjM0MzdGMUQ2OEY5NjgyMjNDQiIsImp0aSI6IkNFRjMyMDFFQjQ4MTM1OUU3RDBGNzc5MUVFNkM1MDgzIn0.uUHO9OGfTnbMVj-yOzt9FoAG2UBT_DZ68EPS7JpsRPivSkW5V5BvZgZATde24_908X0jaR0u27kmnbeRos57IXpVFv-Xpt9dDnjbrJ8GFi-oxbbJapx5I46i_dIOfEBsThDEUjtuNQvT2NFBrtr44r_YRJoWKYW7ud57T35hAxAs7iSXLX-eJZ4ZbL5iL_HfpWlVROEv49C6xJm6iXZF_pF3dgUUYOurtxDJVm4o7yq7wIzjQY-4EGN96SoHoLuVFFcb_15hHByM8WoVZwnBqBuoDQHbWtFtecJxUJpWZ2tzwOn1ghbZ-XEzSrJ3ojmkW1avmOjD3HKZS89ihapv9g\")\n\n  res, err := client.Do(req)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  defer res.Body.Close()\n\n  body, err := io.ReadAll(res.Body)\n  if err != nil {\n    fmt.Println(err)\n    return\n  }\n  fmt.Println(string(body))\n}"
      }
    ],
    "selectedLanguageId": "WyVnroJwv-H8Xo1Co0uij"
  },
  "results": {
    "languages": [
      {
        "id": "zSKeGucw0Ij9uNyBPihiv",
        "language": "200",
        "code": "{\n  \"fxRatesNetworkResponses\": [\n    {\n      \"network\": \"Mastercard\",\n      \"currency\": \"eur\",\n      \"fromAmount\": 100,\n      \"toAmount\": 85,\n      \"exchangeRate\": \"0.853243\"\n    },\n    {\n      \"network\": \"Visa\",\n      \"currency\": \"eur\",\n      \"fromAmount\": 100,\n      \"toAmount\": 91,\n      \"exchangeRate\": \"0.913242\"\n    }\n  ]\n}",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "zSKeGucw0Ij9uNyBPihiv"
  },
  "request": {
    "pathParameters": [],
    "queryParameters": [
      {
        "name": "currency",
        "kind": "required",
        "type": "string",
        "description": "3 char currency code for the currency converted from (when using the fromAmount field) or converted to (using the toAmount) field",
        "": "string"
      },
      {
        "name": "fromAmount",
        "kind": "optional",
        "type": "integer",
        "description": "Either the fromAmount or the toAmount must be specificed and the other left blank. When the fromAmount is specificed then the amount will be converted FROM USD to the currency specified in the currency parameter. Amount is in positive integral units. For example, $1.00 appears as 100.",
        "": "Either the fromAmount or the toAmount must be specificed and the other left blank. When the fromAmount is specificed then the amount will be converted FROM USD to the currency specified in the currency parameter. Amount is in positive integral units. For example, $1.00 appears as 100."
      },
      {
        "name": "toAmount",
        "kind": "optional",
        "type": "integer",
        "description": "Either the fromAmount or the toAmount must be specificed and the other left blank. When the toAmount is specificed then the amount will be converted TO USD from the currency specified in the currency parameter. Amount is in positive integral units. For example, $1.00 appears as 100.",
        "": "Either the fromAmount or the toAmount must be specificed and the other left blank. When the toAmount is specificed then the amount will be converted TO USD from the currency specified in the currency parameter. Amount is in positive integral units. For example, $1.00 appears as 100."
      }
    ],
    "headerParameters": [],
    "formDataParameters": [],
    "bodyDataParameters": []
  },
  "currentNewParameter": {
    "label": "Query Parameter",
    "value": "queryParameters"
  },
  "hasTryItOut": false,
  "response": [
    {
      "name": "fxRatesNetworkResponses",
      "kind": "optional",
      "type": "object",
      "description": "A list of conversion rates per each relevant card network",
      "children": [
        {
          "name": "network",
          "kind": "optional",
          "type": "string",
          "description": "The card payments network, either Visa or MasterCard."
        },
        {
          "name": "currency",
          "kind": "optional",
          "type": "string",
          "description": ""
        },
        {
          "name": "fromAmount",
          "kind": "optional",
          "type": "integer",
          "description": "The from amount for conversion"
        },
        {
          "name": "toAmount",
          "kind": "optional",
          "type": "integer",
          "description": "The to amount for conversion"
        },
        {
          "name": "exchangeRate",
          "kind": "optional",
          "type": "string",
          "description": "The currency conversion rate, for example, 1.25342. Note that this value does not include markup."
        }
      ]
    }
  ],
  "autoGeneratedAnchorSlug": "endpoint-cardpaymentsv1fxrates",
  "legacyHash": "_sAKLYuYLlN7et9xD8IoQ"
}
```
:::

