UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 9.26 kB
{"openapi":"3.0.0","info":{"description":"This API provides a range of functions to get back currency conversion rates and amounts based on current Mastercard currency conversion values.","title":"API for the Settlement Currency Rate converter","version":"1.0.0","x-artifactId":"currency-conversion","x-origin":[{"format":"swagger","url":"https://developer.mastercard.com/devzone/api/portal/swagger/currency-conversion-calculator","version":"2.0"}],"x-providerName":"mastercard.com","x-serviceName":"CurrencyConversionCalculator","x-test-on-environment":{"environment":"SANDBOX_MTF"}},"tags":[{"description":"Conversion Rate","name":"Conversion Rate"},{"description":"Rate Issued","name":"Rate Issued"},{"description":"Currencies","name":"Currencies"}],"paths":{"/conversion-rate":{"get":{"description":"Get the currency conversion rate details.","operationId":"getConversionDetailUsingGET","parameters":[{"description":"Date of the requested FX rates.","in":"query","name":"fxDate","required":true,"schema":{"type":"string"}},{"description":"Currency of the transaction.","in":"query","name":"transCurr","required":true,"schema":{"type":"string"}},{"description":"Cardholder billing currency.","in":"query","name":"crdhldBillCurr","required":true,"schema":{"type":"string"}},{"description":"Additional fees imposed by the bank.","in":"query","name":"bankFee","required":false,"schema":{"type":"number","format":"double"}},{"description":"Amount in the transaction currency.","in":"query","name":"transAmt","required":true,"schema":{"type":"number","format":"double"}}],"responses":{"200":{"description":"OK","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/ConversionRateRequest"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get the currency conversion rate details.","tags":["Conversion Rate"],"x-samples":[{"name":"documentation_conversion_rate_request","populateDefaults":{"application/json":"{\n \"fxDate\":\"true\",\n \"transCurr\":\"true\",\n \"crdhldBillCurr\":\"true\",\n \"bankFee\":\"true\",\n \"transAmt\":\"true\"\n} "},"request":{"application/json":"{\n \"fxDate\":\"2019-09-30\",\n \"transCurr\":\"ALL\",\n \"crdhldBillCurr\":\"DZD\",\n \"bankFee\":\"5\",\n \"transAmt\":\"23\"\n} "},"type":"documentation"},{"ignoreAsserts":["date","data.conversionRate","data.crdhldBillAmt"],"name":"example_conversion_rate_request","request":{"application/json":"{\n \"fxDate\":\"2019-09-30\",\n \"transCurr\":\"ALL\",\n \"crdhldBillCurr\":\"DZD\",\n \"bankFee\":\"5\",\n \"transAmt\":\"23\"\n} "},"response":{"application/json":"{\n \"name\":\"settlement-conversion-rate\",\n \"description\":\"Settlement conversion rate and billing amount\",\n \"date\":\"2017-11-03 03:59:50\",\n \"data\":{\n \"conversionRate\":0.57,\n \"crdhldBillAmt\":13.11,\n \"fxDate\":\"2019-09-30\",\n \"transCurr\":\"ALL\",\n \"crdhldBillCurr\":\"DZD\",\n \"transAmt\":23,\n \"bankFee\":5\n }\n}"}},{"name":"example_unavailable_rate_request","request":{"application/json":"{\n \"fxDate\":\"2019-08-08\",\n \"transCurr\":\"INR\",\n \"crdhldBillCurr\":\"USD\",\n \"bankFee\":\"5\",\n \"transAmt\":\"345\"\n}"},"response":{"application/json":"{ \n \"name\":\"settlement-conversion-rate\",\n \"description\":\"An error occurred during the request\",\n \"date\":\"2019-08-08 16:34:34\",\n \"type\":\"error\",\n \"data\":{ \n \"errorCode\":\"104\",\n \"errorMessage\":\"Not Found , The calculated cross rates for the selected date is not available.\"\n }\n}"},"type":"sample"}]}},"/conversion-rate-issued":{"get":{"description":"Determine if the settlement rate has been issued.","operationId":"isRateIssuedUsingGET","parameters":[{"description":"The date by which the rate would have been issued.","in":"query","name":"date","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/SettlementRateIssuedRequest"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Determine if the settlement rate has been issued.","tags":["Rate Issued"],"x-samples":[{"name":"documentation_rate_issued_request","populateDefaults":{"application/json":"{\n \"date\":\"true\"\n} "},"request":{"application/json":"{\n \"date\":\"2019-08-08\"\n} "},"type":"documentation"},{"ignoreAsserts":["date"],"name":"example_rate_issued_request","request":{"application/json":"{\n \"date\":\"2019-08-08\"\n} "},"response":{"application/json":"{\n \"name\":\"settlement-conversion-rate-issued\",\n \"description\":\"Is settlement conversion rate issued\",\n \"date\":\"2017-11-03 04:07:18\",\n \"data\":{\n \"rateIssued\":\"Yes\"\n }\n}"}}]}},"/settlement-currencies":{"get":{"description":"List of supported currencies.","operationId":"getCurrencyRateDataUsingGET","responses":{"200":{"description":"OK","content":{"application/json;charset=UTF-8":{"schema":{"$ref":"#/components/schemas/SettlementCurrencyRequest"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"getCurrencyRateData","tags":["Currencies"],"x-samples":[{"ignoreAsserts":["date"],"name":"example_settlement_currencies_request","request":{"application/json":"{\n \n} "},"response":{"application/json":"{\n \"name\": \"settlement-currency\", \n \"description\": \"A list of settlement active currencies\", \n \"date\": \"11-2017-03 03:54:47\", \n \"data\": {\n \"currencies\": [\n {\n \"alphaCd\": \"AFN\", \n \"currNam\": \"AFGHANISTAN AFGHANI\"\n }, \n {\n \"alphaCd\": \"ALL\", \n \"currNam\": \"ALBANIAN LEK\"\n }\n ]\n }\n}"}}]}}},"servers":[{"url":"//api.mastercard.com/mcapi/settlement/currencyrate"}],"components":{"schemas":{"Conversion":{"properties":{"bankFee":{"description":"Additional fees imposed by the bank.","example":5,"format":"double","type":"number"},"conversionRate":{"description":"Rate applied to the transaction to convert from Transaction Currency to Cardholder Billing Currency.","example":0.943078,"format":"double","type":"number"},"crdhldBillAmt":{"description":"Amount in the cardholder billing currency.","example":21.690798,"format":"double","type":"number"},"crdhldBillCurr":{"description":"Cardholder billing currency.","example":"DZD","type":"string"},"errorCode":{"description":"The error code associated with the error being returned.","example":104,"type":"string"},"errorMessage":{"description":"The reason for the error.","example":"Not Found , The calculated cross rates for the selected date is not available.","type":"string"},"fxDate":{"description":"Date of the requested FX rates.","example":"2025-06-15T13:47:48.451Z","type":"string"},"transAmt":{"description":"Amount in the transaction currency.","example":23,"format":"double","type":"number"},"transCurr":{"description":"Currency of the transaction.","example":"ALL","type":"string"}}},"ConversionRateRequest":{"properties":{"data":{"$ref":"#/components/schemas/Conversion"},"date":{"description":"The date and time the API is being called in GMT.","example":"2025-06-15T13:47:48.452Z","type":"string"},"description":{"description":"The description of the API being called.","example":"Settlement conversion rate and billing amount","type":"string"},"name":{"description":"The name of the service being requested.","example":"settlement-conversion-rate","type":"string"},"type":{"description":"The type of response being returned by the API.","example":"error","type":"string"}}},"Currency":{"properties":{"alphaCd":{"description":"The Alpha code for the currency.","example":"AOA","type":"string"},"currNam":{"description":"The full name of the currency.","example":"ANGOLAN KWANZA","type":"string"}}},"SettlementCurrency":{"properties":{"currencies":{"items":{"$ref":"#/components/schemas/Currency"},"type":"array"}}},"SettlementCurrencyRequest":{"properties":{"data":{"$ref":"#/components/schemas/SettlementCurrency"},"date":{"description":"The date and time the API is being called in GMT.","example":"2025-06-15T13:47:48.452Z","type":"string"},"description":{"description":"The description of the API being called.","example":"A list of settlement active currencies","type":"string"},"name":{"description":"The name of the service being requested.","example":"settlement-currency","type":"string"}}},"SettlementRateIssued":{"properties":{"rateIssued":{"description":"The requested foreign exchange rate.","example":"NO","type":"string"}}},"SettlementRateIssuedRequest":{"properties":{"data":{"$ref":"#/components/schemas/SettlementRateIssued"},"date":{"description":"The date and time the API is being called in GMT.","example":"2025-06-15T13:47:48.452Z","type":"string"},"description":{"description":"The description of the API being called.","example":"Is settlement conversion rate issued","type":"string"},"name":{"description":"The name of the service being requested.","example":"settlement-conversion-rate-issued","type":"string"}}}}}}