Re: Exchange rate using BTC

Solved! Go to solution
Clay
Regular Visitor

Exchange rate using BTC

I'm trying to do a test exchange rate between USD and BTC but the API requires currencies to be in ISO 4217 numeric form.  So I use 840 for USD but the only code I found online for BTC was just 8.  So I tried using 8 but I received an error from the api call.  Here is the entire call:

payload

{

  • "rateProductCode": "B",
  • "destinationCurrencyCode": "8",
  • "sourceAmount": "100.55",
  • "sourceCurrencyCode": "840"

}

 

response

{

  • "errorResponse": {
    • "status": 400,
    • "reason": "3001",
    • "message": "Missing or Invalid Request Parameters",
    • "details": [
      • {
        • "location": "destinationCurrencyCode",
        • "message": "destinationCurrencyCode missing/invalid"
        }
      ]
    }

}

 

 

 

3 REPLIES 3
SLi
Visa Developer Support Specialist
Visa Developer Support Specialist

Re: Exchange rate using BTC

Hi @Clay,

 

Please retry with below payload and let us know if there are any issues.

{

  • "rateProductCode": "B",
  • "destinationCurrencyCode": "008",
  • "sourceAmount": "100.55",
  • "sourceCurrencyCode": "840"

}

 

 


Best,
Stacey

Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.
Clay
Regular Visitor

Re: Exchange rate using BTC

I don't know how 008 can be bitcoin though because the conversion rate it responds with is 115.4300

SLi
Visa Developer Support Specialist
Visa Developer Support Specialist

Re: Exchange rate using BTC

Hi @Clay,

 

008 is the ISO 4217 currency code for Albanian lek (ALL). There isn't one for bitcoin yet.

 

 

 


Best,
Stacey

Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.