Skip to main content
Version: next

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.

EventDescriptionImplementation
PaymentAuthenticationStartedThe authentication of the payment started (e.g. 3D Secure control step)🔗 Code
PaymentAuthorizedThe payment was authorized by the bank/payment provider, although it can be considered successful, it may not have been captured (collected) yet.🔗 Code
PaymentCancelledThe payment was cancelled by the user🔗 Code
PaymentReceivedThe payment was received but not approved yet by the payment provider or bank. At this stage, the payment is still pending.🔗 Code
PaymentCaptureStartedThe payment capture was asked and is in progress.🔗 Code
PaymentCapturedThe payment was captured by the payment provider, this is the last event expected on a succeeding order.🔗 Code
PaymentCaptureFailedThe payment was not captured by the payment provider, the payment will have to be recovered by the customer service team.🔗 Code
PaymentRefusedThe payment was rejected. The order must be cancelled.🔗 Code