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

HeaderValueRequired
AuthorizationBearer <Bearer_Token> generated during authenticate request in step 1.YES
Content-Typeapplication/jsonYES

Request Parameters

Parameter NameTypeDescription
serviceCodestringA unique code identifier for the merchant's service in use as provided on the checkout platform.
baseCurrencyCodestringThree letter code indicating the the base currency for the exchangeRate
exchangeCurrencyCodestringThree letter code indicating the the exchange currency for the exchangeRate

Example

{
	"baseCurrencyCode": "USD",
	"exchangeCurrencyCode": "KES",
	"serviceCode": "DANSBX1978"
}

Response Parameters

Parameter NameTypeDescription
statusCodeintegerRequest 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.
statusDescriptionstringA description of the status provided above.
exchangeRatedoubleThe 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
}