Skip to main content

Introduction

Notifications are Ledyer's way of telling the merchant's ERP-system/e-commerce platform that something has has happened to an order. That can include order-creation, a status updated or a change to the order's order lines.

A notification in itself will never contain any sensitive data, just the name of the notification and the id of the the order. Ledyer expects every merchant to have an open endpoint to which it can post notifications. Once a notification has been received, Ledyer expects the merchant to make an authorized request to get order API to get the latest information about the order.

tip

If you only need to update the order status in your ERP system, consider using the payment status API instead of the get order API.

An image from the static

Events

Ledyer will post notifications for the following events.

important

For security reasons, a notification will not contain any details about the order itself. To handle eventually out of order notifications you should react to a notification by fetching the current order state using the get order API.

Cancel

com.ledyer.order.cancel

The order has been cancelled.


Create

com.ledyer.order.create

An order has been created by the end customer. The order is authorized by Ledyer. Once this is received an order should already exists in merchant's system. If not a fallback must exist to create one.

Please note that you must also Acknowledge an order, a final confirmation to Ledyer that the order has been created in your system.


Full capture

com.ledyer.order.full_capture

The order has been fully captured.


Full refund

com.ledyer.order.full_refund

The order has been fully refunded.


Partial capture

com.ledyer.order.part_capture

The order has been partially captured.


Partial refund

com.ledyer.order.part_refund

The order has been partially refunded.


Ready for capture

com.ledyer.order.ready_for_capture

The order has been processed by Ledyer and can be captured. Could be used to update the status of the order in the ERP-system.


Notification dashboard

The notification dashboard can be used to add endpoints, configure which events you want to subscribe to, debug delivery, as well as inspect and replay past notifications.

The dashboard can be accessed through the Settings page -> Notifications in Ledyer Merchant

Notification payload

A notification will always hold the same payload.

{
"eventType": "com.ledyer.order.{EVENT_NAME}",
"merchantId": "ac_1xWqkk1aaIbxCJsoseRhSd0OJyD",
"orderId": "or_29kCutBzwAXQ9JRW1tMhcUeImyg",
"reference": "or_29kNetBzwAXQ9XYW1tMhcUeImyg",
"storeId": "9702420072"
}

Retry schedule

Ledyer Checkout will notify the provided notification endpoint multiple times in case of a non 200 OK response. Each notification message is attempted based on this schedule (delay for each step):

Immediately, 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours, 10 hours

It is also possible to manually retry each message at any time from the notification dashboard.