Skip to main content
Version: 2.x

Payment events

The payment mechanism relies on Payment events to broadcast payment status changes and make 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 allows 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 these 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.

PaymentAuthenticationStarted

The authentication of the payment started (e.g. 3D Secure control step)

PaymentAuthorized

The payment was authorized by the bank/payment provider, although it can be considered successful, it may not have been captured (collected) yet.

PaymentCancelled

The payment was cancelled by the user

PaymentReceived

The payment was received but not approved yet by the payment provider or bank. At this stage, the payment is still pending.

PaymentCaptureStarted

The payment capture was asked and is in progress.

PaymentCaptured

The payment was captured by the payment provider, this is the last event expected on a succeeding order.

PaymentCaptureFailed

The payment was not captured by the payment provider, the payment will have to be recovered by the customer service team.

PaymentRefused

The payment was rejected. The order must be cancelled.