Payment events
The payment mechanism relies on Payment events to broadcast payment status changes and make it possible to maintain a consistent state in a remote system with an event listener. For instance, an eCommerce integration can implement an event listeners responsible for updating the order status depending on the payment status.
Note: each event is based on a PurchaseIdentifier
allowing Front-Commerce to
retrieve the related order based on either an orderId or the cartId that was
used before the order creation.
The paymentData attribute
Most events allow you to provide custom, optional and arbitrary paymentData
values. These values may contain data specific to the payment platform. We
recommend that event listeners push this information to remote systems as they
usually can be helpful for further processing (e.g: synchronizing a headless
eCommerce platform with an ERP)
Example: Front-Commerce Magento's integration, will append this paymentData
as
a JSON payload to the order history comment message.
Event | Description | Implementation |
---|---|---|
PaymentAuthenticationStarted | The authentication of the payment started (e.g. 3D Secure control step) | 🔗 Code |
PaymentAuthorized | The payment was authorized by the bank/payment provider, although it can be considered successful, it may not have been captured (collected) yet. | 🔗 Code |
PaymentCancelled | The payment was cancelled by the user | 🔗 Code |
PaymentReceived | The payment was received but not approved yet by the payment provider or bank. At this stage, the payment is still pending. | 🔗 Code |
PaymentCaptureStarted | The payment capture was asked and is in progress. | 🔗 Code |
PaymentCaptured | The payment was captured by the payment provider, this is the last event expected on a succeeding order. | 🔗 Code |
PaymentCaptureFailed | The payment was not captured by the payment provider, the payment will have to be recovered by the customer service team. | 🔗 Code |
PaymentRefused | The payment was rejected. The order must be cancelled. | 🔗 Code |