Comment on page
Klasha Wire API
Give merchants the ability to send out funds from their collection balance via API using our internal Klasha rates.
You can transfer money in four easy steps:
- 1.Generate a bearer token
- 2.Create a beneficiary
- 3.Generate a quote
- 4.Initiate a payment
- 5.Update a payment
Generate a bearer token
Using the Token endpoint on the Postman collection, the token can be obtained from the headers under the header name: token
Create a beneficiary
Make a POST call to the Create Merchant Beneficiary API to create your beneficiary
Generate a quote
Make a POST call to the Create Quote API to generate your quote
Initiate a payment
Make a POST call to the Initiate Payment API
Fetch all your payments
Make a GET call to the Fetch All API
Fetch a single payment by reference
Fetch by reference API to retrieve all your previously initiated wire payments.
Get all currency pair rates
Make a GET call to the following URL to retrieve the rates:
Klasha Wire Statuses
When you generate a quote and initiate a payment, one of the field in the response body is
klashaWireStatus, here you can find all the possible cases and explanation:
- PENDING: this is the status when a payment just get initialised through the API. This is not a final status.
- PROCESSING: this is when Klasha is actually processing the payment itself. This is not a final status.
- SUCCESSFUL: the klasha wire payment was executed successfully. Final status.
- CANCELLED: The payment has been cancelled from the Klasha finance/operation team, in result of previous communication with the merchant. Final status.
- FAILED: the initiated wire payments failed to be executed. Final status.
Quote expiry logic
After you proceeded generating your quote, you can now convert that quote into an initiated payment.
The initiation would be successful if the quote is NOT expired.
A quote does not expire because of time but just if the rate in our system changed.
If you generate a quote on 1st Oct at 11am and at 3pm the rate changes, you can convert your quote into a initiated payment until 2:59:59pm. Right after, then the rate get updated at 3pm, you won’t be able to initiate a payment with that quote and you’d have to generate a new quote.
In case you try to initiate a payment with an expired quote, you’d have a Bad Request response with the the following body:
"message": "Quote has expired or does not exist!",