An overview of the notification types supported by the payment module.
Accounting as a Service supports the concept of notifications, allowing the merchant to be informed upon certain events happening inside the system. The concept is based around the idea of having different notification types, for which the merchant can provide a URL to be called back whenever an event of such type occurs.
This page is supposed to provide an overview of the notification types of the payment module. In case you need more general information about notifications in Accounting as a Service, please refer to the related section of the common API elements.
In the scope of the payment module, the notification handling has been build on top of the transaction (and its state model) as the core element that needs to be processed by the payment processing engine. Therefore, the list of notification types supported by the module is strongly linked to the list of different states as supported by the transaction state machine. In addition, there are also notification types related to the registration and its states.
When working with notifications of the payment module, the following notification types are available.
To keep track of changes on a transaction, the following list of notification types is supported by the payment module.
In case you want to register a callback for a type, make a POST /administration/{version}/notification-callbacks
request using the type (e.g. payments/transactionAuthorized
) as value in the list of notificationTypes
.
In summary, an event is triggered whenever a transaction changes its status to one of the following states from the transaction state machine:
State | Notification type | Description |
---|---|---|
Authorized | payments/transactionAuthorized | Triggered whenever a transaction changes into the status Authorized . |
AuthorizationFailed | payments/transactionAuthorizationFailed | Triggered whenever a transaction changes into the status AuthorizationFailed . |
Canceled | payments/transactionCanceled | Triggered whenever a transaction changes into the status Canceled . |
CancelationFailed | payments/transcationCancelationFailed | Triggered whenever a transaction changes into the status CancelationFailed . |
Captured | payments/transactionCaptured | Triggered whenever a transaction changes into the status Captured . |
CaptureFailed | payments/transactionCaptureFailed | Triggered whenever a transaction changes into the status CaptureFailed . |
Refunded | payments/transactionRefunded | Triggered whenever a transaction changes into the status Refunded . |
RefundFailed | payments/transactionRefundFailed | Triggered whenever a transaction changes into the status RefundFailed . |
{
"id": "40ffceca-642a-4158-85fc-3efa0e970db5",
"timestamp": "2021-04-23T18:25:43.5110000+00:00",
"parameters": {
"paymentTransactionToken": "280047292",
"statusChange": {
"from": "Captured",
"to": "Refunded"
}
},
"type": "payments/transactionAuthorized"
}
To keep track of changes on a registration, the following list of notification types is supported by the payment module. In case you need more information about payment registrations, please refer to the use case Payment registration.
In case you want to register a callback for a type, make a POST /administration/{version}/notification-callbacks
request using the type (e.g. payments/registrationActivated
) as value in the list of notificationTypes
.
To summarize, an event is triggered whenever a registration changes its status to one of the following states:
State | Notification type | Description |
---|---|---|
RegistrationActivated | payments/registrationActivated | Triggered whenever a registration changes into the status RegistrationActivated . |
RegistrationCanceled | payments/registrationCanceled | Triggered whenever a registration changes into the status RegistrationCanceled . |
RegistrationFailed | payments/registrationFailed | Triggered whenever a registration changes into the status RegistrationFailed . |
{
"id": "40ffceca-642a-4158-85fc-3efa0e970db5",
"timestamp": "2021-04-23T18:25:43.5110000+00:00",
"parameters": {
"paymentRegistrationId": "12212",
"statusChange": {
"from": "Registering",
"to": "RegistrationActivated"
}
},
"type": "payments/registrationActivated"
}