Webhook
Our webhooks deliver real-time notifications whenever specific events occur on your account. These events can encompass a range of activities, from successful transactions to failed transactions.
Validating Webhooks
Merchants can easily validate webhooks received from the Kyshi platform using the following steps:
Signature Inclusion: Every webhook sent includes a signature in the headers. This signature is the encrypted webhook data using the merchant's webhook secret key.
Validation on Merchant's End: Merchants can perform the same encryption process on their end using their secret key. They can then compare the resulting signature with the one received. If the signatures match, the merchant can proceed with processing the webhook. However, if the signatures do not match, the merchant must discard the webhook and refrain from processing it.
Webhook events
Here are the events we currently raise. We would add more to this list as we hook into more actions in the future
Event | Description |
---|---|
successful | A successful charge was made |
Webhook Parameters And Description
Here are the webhook parameters and their corresponding descriptions:
Data | Description |
---|---|
event | The webhook event type that was triggered |
data | Object containing all transaction details |
data.reference | This is the unique reference generated for the collection |
data.amount | The total amount charged for the payout, including transaction fees |
data.customer | This is a object that contains customer(s) details |
data.customer.id | A unique identifier of the customer we just charged the funds |
data.customer.firstName | The first name of the customer we just charged the funds |
data.customer.lastName | The last name of the customer we just charged the funds |
data.customer.email | The email address of the customer we just charged the funds |
data.customer.phone | The phone number of the customer we just charged the funds |
data.authorization | The authorization object contains respective card details or details of what was charged to complete a transaction |
data.authorization.authorizationCode | A unique identifier of the said payment mode. this can be reuse |
data.authorization.cardType | The type of card that was charged |
data.authorization.brand | the card brand |
data.authorization.last4 | Cards last four digit |
data.authorization.bin | BIN (Bank Identification Number) |
data.authorization.expMonth | Card expiry month |
data.authorization.expYear | Card expiry year |
data.log | Respective Logs of the API activity |
data.meta | |
data.meta.localCurrency | |
data.meta.localAmount | |
data.meta.feeBreakdown | |
data.meta.feeBreakdown.vat | |
data.meta.feeBreakdown.fee |
Updated 3 months ago