Payments
...
APIs
Exchange rate estimate
api reference returns an estimate of an exchange rate the estimate shows the current foreign exchange rate, including spread and the transaction fee unlike a quote, no beneficiary data is required and the estimate cannot be executed the estimate is not saved for this call, you must supply your cross river accountnumber, the desired currency of the received payment, and either amount in usd you plan to send (fromamount) or the amount in the foreign currency you want sent (toamount) important you must have a value for either a fromamount or a toamount , but not both { "name" "endpoint /international/v1/estimates", "method" "get", "url" "https //sandbox crbcos com/international/v1/estimates", "description" "", "tab" "examples", "examples" { "languages" \[ { "id" "mcc46omtn0d1ca60ygumz", "language" "curl", "code" "curl location 'https //sandbox crbcos com/international/v1/estimates?accountnumber=158560897007\¤cy=gbp\&fromamount=1000' \\\\\n data ''", "customlabel" "" }, { "id" "w zdkdqgbkzpuxzrvbkyk", "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' '/international/v1/estimates?accountnumber=158560897007\¤cy=gbp\&fromamount=1000',\n 'headers' {\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" "wnj0919w2tnl10ogoisff", "language" "python", "code" "import requests\n\nurl = \\"https //sandbox crbcos com/international/v1/estimates?accountnumber=158560897007\¤cy=gbp\&fromamount=1000\\"\n\npayload = \\"\\"\nheaders = {}\n\nresponse = requests request(\\"get\\", url, headers=headers, data=payload)\n\nprint(response text)\n", "customlabel" "" }, { "id" "ujv9q fpb 0jsti1x0eq2", "language" "ruby", "code" "require \\"uri\\"\nrequire \\"net/http\"\n\nurl = uri(\\"https //sandbox crbcos com/international/v1/estimates?accountnumber=158560897007\¤cy=gbp\&fromamount=1000\\")\n\nhttps = net http new(url host, url port)\nhttps use ssl = true\n\nrequest = net http get new(url)\n\nresponse = https request(request)\nputs response read body\n", "customlabel" "" }, { "id" "gzdpdhz3czhvhoqck90m3", "language" "go", "code" "package main\n\nimport (\n \\"fmt\\"\n \\"strings\\"\n \\"net/http\"\n \\"io\\"\n)\n\nfunc main() {\n\n url = \\"https //sandbox crbcos com/international/v1/estimates?accountnumber=158560897007\¤cy=gbp\&fromamount=1000\\"\n method = \\"get\\"\n\n payload = strings newreader(``)\n\n client = \&http client {\n }\n req, err = http newrequest(method, url, payload)\n\n if err != nil {\n fmt println(err)\n return\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}", "customlabel" "" } ], "selectedlanguageid" "mcc46omtn0d1ca60ygumz" }, "results" { "languages" \[ { "id" "y1qco8sdkmizimeehhiu4", "language" "200", "customlabel" "", "code" "{\n \\"accountnumber\\" \\"158560897007\\",\n \\"currency\\" \\"gbp\\",\n \\"fromamount\\" 1000,\n \\"toamount\\" 789,\n \\"exchangerate\\" \\"0 7889\\",\n \\"regulartransactionfeeamount\\" 129,\n \\"prioritytransactionfeeamount\\" 1400\n}" } ], "selectedlanguageid" "y1qco8sdkmizimeehhiu4" }, "request" { "pathparameters" \[], "queryparameters" \[ { "name" "accountnumber", "kind" "required", "type" "string", "description" "account number of the sending cross river account", "" "account number of the sending cross river account" }, { "name" "currency", "kind" "required", "type" "string", "description" "currency the customer is converting funds into 3 letter iso currency code ", "" "required" }, { "name" "fromamount", "kind" "optional", "type" "integer", "description" "the amount in usd to be transferred \nleave blank if you provide a toamount \nleave out the decimal point between the dollars and the cents ", "" "the amount in usd to be transferred \nleave blank if you provide a toamount \nleave out the decimal point between the dollars and the cents " }, { "name" "toamount", "kind" "optional", "type" "integer", "description" "the amount in the specified currency to be received \nleave blank if you provide a fromamount \nleave out the decimal point between the dollars and the cents ", "" "the amount in the specified currency to be received \nleave blank if you provide a fromamount \nleave out the decimal point between the dollars and the cents " }, { "name" "conversionfeebps", "kind" "optional", "type" "integer", "description" "requested fee for conversion of the funds using basis points (bps) added onto the foreign exchange rate and earned by the cos partner into their specified account the fee is added onto the foreign exchange rate when returned in the response a basis point is 1/100th of a percent of the funds to be transferred \n\npartners must be approved to use this attribute to earn conversion fees ", "children" \[] }, { "name" "regulartransactionfeeamount", "kind" "optional", "type" "integer", "description" "requested fee taken from the sending account for regular payment, earned by the cos partner into their specified account the regular transaction fee is added onto the platform fee to get the total transaction fee \n\npartners must be approved to use this attribute to earn transaction fees ", "children" \[] }, { "name" "prioritytransactionfeeamount", "kind" "optional", "type" "integer", "description" "requested fee taken from the sending account for priority (swift) payment, earned by the cos partner into their specified account the priority transaction fee is added onto platform fee to get the total transaction fee \n\npartners must be approved to use this attribute to earn transaction fees ", "children" \[] } ], "headerparameters" \[], "bodydataparameters" \[], "formdataparameters" \[] }, "currentnewparameter" { "label" "query parameter", "value" "queryparameters" }, "response" \[ { "name" "accountnumber", "kind" "optional", "type" "string", "description" "account number of the sending cross river account" }, { "name" "currency", "kind" "optional", "type" "string", "description" "currency the customer is converting funds into 3 letter iso currency code ", "children" \[] }, { "name" "fromamount", "kind" "optional", "type" "integer", "description" "the amount in usd to be transferred", "children" \[] }, { "name" "toamount", "kind" "optional", "type" "integer", "description" "the amount in the specified currency to be received\n", "children" \[] }, { "name" "exchangerate", "kind" "optional", "type" "string", "description" "the estimated conversion rate between the dollar amount and the foreign currency", "children" \[] }, { "name" "regulartransactionfeeamount", "kind" "optional", "type" "integer", "description" "requested fee taken from the sending account for regular payment, earned by the cos partner into their specified account the regular transaction fee is added onto the platform fee to get the total transaction fee \n\npartners must be approved to use this attribute to earn transaction fees ", "children" \[] }, { "name" "prioritytransactionfeeamount", "kind" "optional", "type" "integer", "description" "requested fee taken from the sending account for priority (swift) payment, earned by the cos partner into their specified account the priority transaction fee is added onto platform fee to get the total transaction fee \n\npartners must be approved to use this attribute to earn transaction fees ", "children" \[] } ], "hastryitout" false, "autogeneratedanchorslug" "endpoint internationalv1estimates", "legacyhash" "bafw zzexneqybyg7efc" } for additional information, refer to our docid\ mz2n7dqz5peg7vglhdowm tutorial