I wanted to share with the community how to use curl for testing VISA API
You will need your private key from when you created your project, the certificate, username, and password. Plugin the values where appropriate before executing the curl command. The example illustrated below tests the exchange rates API
curl -E cert.pem --key myProject.pem -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Basic $(echo -n username:password | base64 -w 0)" -d '{"destinationCurrencyCode": "840","sourceAmount": "1","sourceCurrencyCode": "643"}' -X POST https://sandbox.api.visa.com/forexrates/v1/foreignexchangerates
Best regards
Solved! Go to Solution
Hey @jbills,
Thanks for sharing this with the Visa Developer community. We look forward to seeing more helpful posts from you.
Thanks for sharing @jbills!