Find your keys on the Klasha Dashboard → Settings → Generate API Keys (here)
Integration steps
Generate a bearer token
POST{{env_url}}/auth/account/v2/login
Passing your credentials to obtain a token.
Request Body
Name
Type
Description
username*
username
password*
password
{"message": "success","error": null,"data": {"token":"This is your token" }}
{"message": "Invalid email or password.","error": "wrong login details","data": null}
Encryption algorithm
Since we are treating payment data, the whole communication from merchant to APIs has to be encrypted.
If you are using any other programming language in your applications, please reach out to us, we might be able to help.
The secret , also known as the encryption key, can be found in the Klasha Dashboard → Settings → Generate API Keys (here), under the caption New encryption key.
We are using a standard 3DES technology with Padding. Please find some code snippets here:
{"status":true,"message":"Banks retrieved","data": [ {"id":140.0,"name":"Absa Bank Limited, South Africa","slug":"absa-za","code":"632005","longcode":"632005","gateway":null,"pay_with_bank":false,"active":true,"country":"South Africa","currency":"ZAR","type":"basa","is_deleted":false,"createdAt":"2020-09-04T10:38:56.000Z","updatedAt":null }, {"id":140.0,"name":"Absa Bank Limited, South Africa","slug":"absa-za","code":"632005","longcode":"632005","gateway":null,"pay_with_bank":false,"active":true,"country":"South Africa","currency":"ZAR","type":"basa","is_deleted":false,"createdAt":"2020-09-04T10:38:56.000Z","updatedAt":null } ] }
You would need to pass, as a header the x-auth-token. This can be obtained from your merchant dashboard → Settings → Generate API keys → Merchant public key.
{"message": "A human readable error message","error": "Bad Request","data": null}
Query payout status
Make a GET call to the Fetch All API
POST{{env_url}}/wallet/wire/fetch/all
Make a GET call to the Fetch All API to retrieve all your previously initiated wire payments.
The URL can be found in the Postman link well as other APIs
You’d need to pass, as header the x-auth-token. This can be obtained from your merchant dashboard → Settings → Generate API keys → Merchant public key.