Idempotency-Key string A unique key for safely retrying a request without duplicating work.
In order to make sure Ledyer and your order management are in sync we provide the acknowledge API. When receiving a notification call you should get the order, and confirm to Ledyer by making a POST request.
If the payment method of the order is advanceInvoice the order can not be captured before an acknowledgement has been made, in all other cases the order can be updated or captured even before acknowledgement.
curl -X POST
-H 'authorization: Basic dGhpcy1pcy10aGUtY2xpZW50LWlkOnRoaXMtaXMtdGhlLXNlY3JldA=='
-H 'content-type: application/json'
-H 'Idempotency-Key: da7ca8f9-9155-4721-b5f0-81945bff9e4a'
https://api.sandbox.ledyer.com/v1/orders/:orderId/acknowledge Idempotency-Key string {
"captured": [],
"capturedAmount": {
"amount": "0.00",
"currency": "SEK",
"formatted": "0.00",
"formattedWithCurrency": "SEK 0.00",
"minorUnits": 0
},
"createdAt": "2023-04-08T12:02:54.409206Z",
"customer": {
"billingAddress": {
"attentionName": "",
"careOf": "",
"city": "Stockholm",
"companyName": "Kalles kulor AB",
"country": "SE",
"postalCode": "11359",
"streetAddress": "Sveavägen 49"
},
"companyId": "559311-7314",
"companyName": "Kalles kulor AB",
"email": "kalle@kulor.com",
"firstName": "Kalle",
"invoiceChannel": {
"configurations": null,
"details": "",
"state": "",
"type": "email"
},
"lastName": "Kulor",
"paymentMethod": {
"provider": "ledyer",
"type": "invoice"
},
"phone": "0700000000",
"reference1": "",
"reference2": "",
"shippingAddress": {
"attentionName": "",
"careOf": "",
"city": "Stockholm",
"companyName": "Kalles kulor AB",
"country": "SE",
"postalCode": "11359",
"streetAddress": "Sveavägen 49"
},
"vatId": "SE559311731401"
},
"events": [
{
"amount": {
"amount": "0.00",
"currency": "SEK",
"formatted": "0.00",
"formattedWithCurrency": "SEK 0.00",
"minorUnits": 0
},
"createdAt": "2023-04-08T12:02:54.409206Z",
"id": "oe_2O8wApdATWz5YcAPCD5wyDUhtoW",
"ledgerId": "in_2O8wAgBfajKRiAhTpBom3eAf7Lo",
"orderId": "or_2O8wA2vp4XI3XZeJaSMYVM09rve",
"type": "readyForCapture"
}
],
"expiresAt": "2023-04-22T12:02:54.409206Z",
"id": "or_2O8wA2vp4XI3XZeJaSMYVM09rve",
"merchantId": "ac_1xWqkkS5aIbxCJsoseRhSd0OJyD",
"merchantReference": "",
"status": ["uncaptured", "unacknowledged"],
"storeId": "343096764",
"updatedAt": "2023-04-08T12:02:54.409206Z"
}