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

StatusStatus on UIDescription
DraftedDraftedPayment has been drafted and requires further updates
SentSentPayment has been sent to the receiver/payee
PendingAuthClaimedPayment has been received by Veem and is pending authorization
AuthorizedClaimedPayment has been authorized and is ready for processing. The money will be withdrawn from the sender
InProgressIn ProgressPayment has been initiated and receiver will be receiving the money shortly
CompleteDepositedPayment is complete and the receiver should have received the money
CancelledClosedPayment has been cancelled by sender
ClosedClosedPayment 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


ParameterExplanationDatatype
typeNotification typeString
data.idPayment idLong
data.invoiceIdInvoice id (if applicable)Long
data.statusPayment statusString
data.debitTxnRefers to Veem internal payer transaction (if applicable)
data.debitTxn.idVeem internal transaction idLong
data.debitTxn.statusVeem internal transaction statusString
data.debitTxn.errorCodeIn the case of transaction reversal, this field will hold a valueString
data.debitTxn.errorMessageIn the case of transaction reversal, this field will hold a valueString
data.creditTxnRefers to Veem internal payer transaction (if applicable)
data.creditTxn.idVeem internal transaction idLong
data.creditTxn.statusVeem internal transaction statusString
data.creditTxn.errorCodeIn the case of transaction reversal, this field will hold a valueString
data.creditTxn.errorMessageIn the case of transaction reversal, this field will hold a valueString