Callback Events
Every callback payload has a parameter named event and its purpose is to communicate the reason for the callback. The section below describes the various values the parameter can take.
Depending on the workflow (collection, invoice generation/payment, disbursement, service payment etc) being used, the gateway will send appropriate events to the appropriate callback URLs. For every workflow type, the applicable events are described below;
Collections
request.failed
FAILED
Request failed and could not be processed by the gateway. Failure reason is part of the callback payload
transaction.charges
PENDING
Communicates success of the first collection leg (initialization) and the charges to be levied. The collection confirmation request should be sent after this event is received
transaction.processing
PROCESSING
Notifies the merchant that transaction processing is ongoing. Returns mobile money instructions (when payment method is MOBILE_MONEY) or the card payment URL (when payment method is CARD)
transaction.failed
FAILED
The gateway tried to process the transaction but failed e.g. insufficient balance on the account. Failure reason is part of the callback payload
transaction.completed
COMPLETED
The gateway processed the collection successfully.
Invoices (Generation and Payment)
request.failed
Request failed and could not be processed by the gateway. Failure reason is part of the callback payload
invoice.generated
Event sent at successful generation of the invoice. Details of the invoice would be shared as part of the payload
invoice.paid
Event sent when the invoice is paid for. Part of the payload is the reference for the collection that fulfilled the invoice
Payouts/Disbursements
request.failed
FAILED
Request failed and could not be processed by the gateway. Failure reason is part of the callback payload
transaction.failed
FAILED
The gateway tried to process the transaction but failed. Failure reason is part of the callback payload
transaction.completed
COMPLETED
The gateway processed the payout successfully.
Service Payments
payment.failed
FAILED
The gateway tried to process the service payment but failed. Failure reason is part of the callback payload
payment.completed
COMPLETED
The gateway processed the service payment successfully.
Last updated