Idempotency-Key string A unique key for safely retrying a request without duplicating work.
curl -X POST
-H 'authorization: Bearer v4.public.eyJpc3MiOiJs...'
-H 'content-type: application/json'
-H 'Idempotency-Key: da7ca8f9-915b-472b-b5f0-81945bff9e4a'
-d '{
"reference": "This is an updated merchant order reference"
}'
https://api.sandbox.ledyer.com/v1/orders/:orderId/reference Idempotency-Key string orderId string reference string {
"captured": [],
"capturedAmount": {
"amount": "0.00",
"currency": "SEK",
"formatted": "0.00",
"formattedWithCurrency": "SEK 0.00"
},
"createdAt": "2022-02-14T13:27:15.894811Z",
"customer": { ... },
"events": [
{
"amount": {
"amount": "0.00",
"currency": "SEK",
"formatted": "0.00",
"formattedWithCurrency": "SEK 0.00",
"minorUnits": 0
},
"createdAt": "2022-02-14T13:37:15.894811Z",
"id": "oe_256Qp2shuTctFUp1aDRa1f2jp5W",
"ledgerId": "in_256Qp7McaZtN8coxjAQW6tETyac",
"orderId": "or_1xE2fDBg9rRwh6nENMA3ly3B3Qg",
"type": "setReference"
},
{
"amount": {
"amount": "0.00",
"currency": "SEK",
"formatted": "0.00",
"formattedWithCurrency": "SEK 0.00",
"minorUnits": 0
},
"createdAt": "2022-02-14T13:27:15.894811Z",
"id": "oe_256Qp2shuTctFUp1aDRa1f2jp5W",
"ledgerId": "in_256Qp7McaZtN8coxjAQW6tETyac",
"orderId": "or_1xE2fDBg9rRwh6nENMA3ly3B3Qg",
"type": "readyForCapture"
},
{
"amount": {
"amount": "5100.00",
"currency": "SEK",
"formatted": "5,100.00",
"formattedWithCurrency": "SEK 5,100.00",
"minorUnits": 510000
},
"createdAt": "2022-02-14T13:27:14.894811Z",
"id": "oe_123Wp2shuTctFUp1aDRa1f2ab6X",
"ledgerId": "in_256Qp7McaZtN8coxjAQW6tETyac",
"orderId": "or_1xE2fDBg9rRwh6nENMA3ly3B3Qg",
"type": "create"
}
],
"expiresAt": "2022-02-28T13:27:15.894811Z",
"id": "or_1xE2fDBg9rRwh6nENMA3ly3B3Qg",
"merchantId": "ac_1xWqkkS5aIbxCJsoseRhSd0OJyD",
"merchantReference": "This is an updated merchant order reference",
"orderAmount": {
"amount": "5100.00",
"currency": "SEK",
"formatted": "5,100.00",
"formattedWithCurrency": "SEK 5,100.00",
"minorUnits": 510000
},
"orderReference": "XP72XUYB",
"paymentMethod": {
"provider": "ledyer",
"type": "invoice"
},
"refunded": [],
"refundedAmount": {
"amount": "0.00",
"currency": "SEK",
"formatted": "0.00",
"formattedWithCurrency": "SEK 0.00",
"minorUnits": 0
},
"riskProfile": {
"tags": []
},
"storeId": "970245072",
"status": [
"uncaptured"
],
"uncaptured": { ... },
"uncapturedAmount": {
"amount": "5100.00",
"currency": "SEK",
"formatted": "5,100.00",
"formattedWithCurrency": "SEK 5,100.00",
"minorUnits": 510000
},
"updatedAt": "2022-02-14T13:37:15.894811Z"
} events array A list of order event snapshots. Each event includes an amount object with amount, currency, formatted, formattedWithCurrency, and minorUnits, plus createdAt, orderId, ledgerId, and type.
Supported type values:
acknowledge: Order has been acknowledged.authorize: Order has been authorized.cancel: Order has been cancelled.create: Order has been created.edit: Order lines and related order details have been edited since
first authorization.editCustomer: Customer details have been edited.editPaymentMethod: Payment method has been changed.extendExpiry: Order expiry has been extended at least once.fullCapture: All order lines have been captured.fullRefund: All order lines have been added to a credit invoice.paid: Order has been paid.partialCapture: Some order lines have been captured.partialRefund: Some order lines have been added to a credit invoice.readyForCapture: Order has been made ready for capture.setReference: Merchant order reference has been updated.merchantReference string updatedAt string