Transaction Charge
The Transactions API allows you create and manage collections.
Bank Transfer
Bank Transfer (BT) is a feature that allow merchants to create temporary bank accounts that customers can use to pay for goods or services. The account number is generated and tied to the current customer’s transaction. The account number becomes invalid after the customer’s transaction or when it exceeds it’s expiry time. For Transactions like this where merchant expects us to settle in a foreign currency Kyshi use's the best rate to process the said transaction
Request Payload
Field | Data type | Required | Description |
---|---|---|---|
amount | integer | Yes | The amount merchant offers their service. |
string | Yes | Customer email address | |
reference | string | No | Unique transaction reference as generated by the merchant |
localCurrency | string | Yes | The currency in which the customer should be charged. The ISO 4217 currency code For this specific service we have only NGN available |
chargeType | enum | Yes | For now only BANK_TRANSFER is available |
expiresAt | string | No | Validity time for account expiration in minutes, the default value is 4320 minutes. Maximum value that can be passed is 4320. |
After collecting the necessary payment details for the transaction. Make a POST request to our charge endpoint.
Note : Before making a post request, the secret key should be specified in the header.
-H "x-api-key: your_secret_key".
{{host}}/v1/transactions/charge
If the API call is successful, Kyshi returns the following response:
{
"email": "[email protected]",
"amount": 2,
"localCurrency": "NGN",
"reference": "KYSHI-DEMO-019283821381",
"chargeType": "BANK_TRANSFER"
}
{
"data": {
"accountNumber": "4700041487",
"accountName": "KYSHI CHECKOUT",
"bankName": "VFD Microfinance Bank",
"amount": 3100,
"rate": 1550,
"fee": 15.5,
"vat": 0,
"processorFee": 0,
"allInclusiveKyshiFee": 15.5,
"totalFees": 15.5
},
"status": true,
"message": "Success",
"code": 201
}
Receive and validate webhook notification
Listen for webhook events. We will send a notification to your webhook URL that indicates the status of the collection. Read our guide on securing and validating the webhook notification on your end.
Note: We will only send you a webhook when the transaction is successful
{
"event": "successful",
"data": {
"reference": "6df5910e1bdde31abf",
"amount": 500.00,
"customer": {
"id": "",
"firstName": "John",
"email": "[email protected]",
"phone": null
},
"authorization": {
"authorizationCode": "my_reference",
"cardType": "",
"brand": "Visa",
"last4": "",
"bin": "",
"expMonth": "",
"expYear": ""
},
"log": {},
"meta": {
"localCurrency": "NGN",
"localAmount": 500.00,
"feeBreakdown": {
"vat": 0,
"fee": 10.0,
}
}
}
}
Updated about 2 months ago