Fetch Conversion Rate
Allows a merchant to query the foreign exchange rate that is available in the system at the point of collection and acknowledgement.
POST https://developer.tingg.africa/checkout/v2/custom/requests/acknowledgement-rate
Header Parameters
Header | Value | Required |
---|---|---|
Authorization | Bearer <Bearer_Token> generated during authenticate request in step 1. | YES |
Content-Type | application/json | YES |
Request Parameters
Parameter Name | Type | Description |
---|---|---|
serviceCode | string | A unique code identifier for the merchant's service in use as provided on the checkout platform. |
baseCurrencyCode | string | Three letter code indicating the the base currency for the exchangeRate |
exchangeCurrencyCode | string | Three letter code indicating the the exchange currency for the exchangeRate |
Example
{
"baseCurrencyCode": "USD",
"exchangeCurrencyCode": "KES",
"serviceCode": "DANSBX1978"
}
Response Parameters
Parameter Name | Type | Description |
---|---|---|
statusCode | integer | Request status code. See full status codes details below. 200 - Conversion rate fetched successfully from checkout platform 500 - Generic failure occurred. Could be as a result of a system failure on the checkout platform. 1003 - The serviceCode sent in the request did not match any valid service.1013 - The checkout request posted was not valid JSON. 1064 - Invalid baseCurrencyCode .1065 - Invalid exchangeCurrencyCode .1066 - Exchange rate not available. |
statusDescription | string | A description of the status provided above. |
exchangeRate | double | The current exchange rate at the point of acknowledging the request. This can be up to 6 decimal places. |
Example
Successful Response
{
"status": {
"statusCode": 200,
"statusDescription": "Exchange rate fetched successfully"
},
"results": {
"baseCurrencyCode": "USD",
"exchangeCurrencyCode": "KES",
"exchangeRate": 103.000000
}
}
Failure Response
{
"status": {
"statusCode": 1066,
"statusDescription": "Exchange rate not available from USD to KES"
},
"results": null
}
Authentication Failure Response
{
"message": "Unauthenticated.",
"status_code": 500
}
Updated about 1 year ago