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.
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.
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
Authorization
When the customer completes a purchase in the Ledyer payment application, we communicate this via our client integration, but we also start send notifications to the urls.notification
specified on the created session. Authorization related notifications you can receive are the following:
com.ledyer.authorization.create
An authorization has been created. Once this is received an order is now ready to be created based on the authorizationToken
found in the message content:
{
"authorizationToken": "at_2fdQnzPDBPWz6rgRjv0DgcMOJY]",
"sessionId": "ps_1xDXf4JI3PJsGeVAvLE3hHqYS09",
"eventType": "com.ledyer.authorization.create",
"merchantId" : "ac_1XRQHKwANxnbzMSjfy901PJEKP3",
"storeld" : "901499152"
}
com.ledyer.authorization.pending
An authorization is pending. This means a purchase has been made but a request has been sent out to a signatory to sign the purchase for the customer. Once the purchase is signed, Ledyer will start sending the com.ledyer.authorization.create
event above.
{
"authorizationToken": "",
"sessionId": "ps_1xDXf4JI3PJsGeVAvLE3hHqYS09",
"eventType": "com.ledyer.authorization.pending",
"merchantId" : "ac_1XRQHKwANxnbzMSjfy901PJEKP3",
"storeld" : "901499152"
}
Retry schedule
Ledyer Payments will notify the provided notification endpoint multiple times in case of a non 200 OK
response.
The delay for each step in the retry schedule for each event type is as follows:
com.ledyer.authorization.create
Immediately, 10 seconds, 30 seconds, 1 minute, 5 minutes, 10 minutes, 15 minutes, 20 minutes
com.ledyer.authorization.pending
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.