Webhook Notification
Use webhooks to be notified about payment events for a payment transaction
To understand the notification states, here is a mapping of the webhook notifications to what is shown in the customer UI.
Note: Regardless of visual changes to the UI representation of these states, states received via webhooks will not change to ensure backwards compatibility. The table will show the status' as they are shown in the UI
Status | Status on UI | Description |
---|---|---|
Drafted | Drafted | Payment has been drafted and requires further updates |
Sent | Sent | Payment has been sent to the receiver/payee |
PendingAuth | Claimed | Payment has been received by Veem and is pending authorization |
Authorized | Claimed | Payment has been authorized and is ready for processing. The money will be withdrawn from the sender |
InProgress | In Progress | Payment has been initiated and receiver will be receiving the money shortly |
Complete | Deposited | Payment is complete and the receiver should have received the money |
Cancelled | Closed | Payment has been cancelled by sender |
Closed | Closed | Payment has been closed by Veem at the request of the sender or receiver, due to an error with the payment |
Notification Payload
Once the webhook URL is configured, Veem will send a notification for payment status updates to that end-point with a payload using the following format:
{
"type" : "PAYMENT_STATUS_UPDATED",
"data" : {
"id" : 1,
"invoiceId": 1,
"status": "Authorized",
"debitTxn": {
"id": 1,
"status": "Pending"
"errorCode": “01345”,
"errorMessage": "In case of reversal"
},
"creditTxn": {
"id": 2,
"status": "Pending"
"errorCode": “01345”,
"errorMessage": "In case of reversal"
}
}
}
Notification Parameters
The following table contains detailed information on the payload's parameters, such as the parameter name, whether it is mandatory or not, formatting (if applicable), and size of the parameter. This table is here for clarification on specific parameters you can expect to see in the notification
Parameter | Explanation | Datatype |
---|---|---|
type | Notification type | String |
data.id | Payment id | Long |
data.invoiceId | Invoice id (if applicable) | Long |
data.status | Payment status | String |
data.debitTxn | Refers to Veem internal payer transaction (if applicable) | |
data.debitTxn.id | Veem internal transaction id | Long |
data.debitTxn.status | Veem internal transaction status | String |
data.debitTxn.errorCode | In the case of transaction reversal, this field will hold a value | String |
data.debitTxn.errorMessage | In the case of transaction reversal, this field will hold a value | String |
data.creditTxn | Refers to Veem internal payer transaction (if applicable) | |
data.creditTxn.id | Veem internal transaction id | Long |
data.creditTxn.status | Veem internal transaction status | String |
data.creditTxn.errorCode | In the case of transaction reversal, this field will hold a value | String |
data.creditTxn.errorMessage | In the case of transaction reversal, this field will hold a value | String |
Updated 4 months ago