orderId string The order ID obtained when the order session was [created](/docs/payment-products/checkout/create-order-session).
An order session must first be in state authorized before an order is created. The first order event is create. New events are added to subsequent responses for the same order ID, for example readyForCapture and authorize.
The initial order status is uncaptured. Captures, cancellations, refunds, and edits are performed through dedicated endpoints documented separately.
Currencies in API responses use en_US formatting. Checkout formatting can differ based on locale.
curl -X GET
-H 'authorization: Bearer v4.public.eyJpc3MiOiJs...'
https://api.sandbox.ledyer.com/v1/orders/:orderId orderId string {
"captured": [],
"capturedAmount": {
"amount": "0.00",
"currency": "SEK",
"formatted": "0.00",
"formattedWithCurrency": "SEK 0.00",
"minorUnits": 0
},
"createdAt": "2023-02-14T13:27:15.894811Z",
"customer": {
"billingAddress": {
"attentionName": "Åke anställd",
"careOf": "",
"city": "Solna",
"companyName": "Rocket 4",
"country": "SE",
"postalCode": "999 33",
"streetAddress": "Gatan 99"
},
"companyId": "559311-3714",
"companyName": "Rocket 4",
"email": "jan@example.com",
"firstName": "Jan",
"invoiceChannel": {
"type": "email",
"details": ""
},
"lastName": "Persson",
"paymentMethod": {
"provider": "ledyer",
"type": "invoice"
},
"phone": "+46761010101",
"reference1": "ref1",
"reference2": "ref2",
"shippingAddress": {
"attentionName": "Gunnar Larsson",
"careOf": "",
"city": "Luleå",
"companyName": "Pelles Tak",
"contact": {
"email": "micke.mottagare@email.com",
"firstName": "Micke",
"lastName": "Mottagare",
"phone": "123456789"
},
"country": "Sweden",
"postalCode": "333 33",
"streetAddress": "Sommargatan 33"
},
"vatId": "SE559311371401"
},
"events": [
{
"amount": {
"amount": "0.00",
"currency": "SEK",
"formatted": "0.00",
"formattedWithCurrency": "SEK 0.00",
"minorUnits": 0
},
"createdAt": "2023-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": "2023-02-14T13:27:14.894811Z",
"id": "oe_123Wp2shuTctFUp1aDRa1f2ab6X",
"ledgerId": "in_256Qp7McaZtN8coxjAQW6tETyac",
"orderId": "or_1xE2fDBg9rRwh6nENMA3ly3B3Qg",
"type": "create"
}
],
"expiresAt": "2023-02-28T13:27:15.894811Z",
"id": "or_1xE2fDBg9rRwh6nENMA3ly3B3Qg",
"merchantId": "ac_1xWqkkS5aIbxCJsoseRhSd0OJyD",
"merchantReference": "or_1xE2fDBg9rRwh6nENMA3ly3B3Qg",
"metadata": {
"property1": "value1",
"property2": "value2"
},
"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": {
"availableActions": [
{
"type": "cancel"
},
{
"type": "capture"
},
{
"type": "partialCapture"
},
{
"type": "editCustomer"
},
{
"type": "editOrder"
},
{
"type": "extendOrderExpiry"
}
],
"createdAt": "2023-02-14T13:27:15.894811629Z",
"ledgerId": "in_256Qp7McaZtN8coxjAQW6tETyac",
"note": "",
"orderLines": [
{
"description": "Coffee Machine X200",
"id": "ol_256QpDt8q8yTUAoBytXsi5GbBgT",
"quantity": 10,
"reference": "111-222-333",
"totalAmount": 500000,
"totalVatAmount": 100000,
"type": "physical",
"unitPrice": 50000,
"vat": 2500
},
{
"description": "Shipping fee",
"id": "ol_256QpG5w2NjHIekT3JkcRPt5DJf",
"quantity": 1,
"reference": "444-555-666",
"totalAmount": 10000,
"totalVatAmount": 2000,
"type": "shippingFee",
"unitPrice": 10000,
"vat": 2500
}
],
"status": [],
"totalOrderAmount": {
"amount": "5100.00",
"currency": "SEK",
"formatted": "5,100.00",
"formattedWithCurrency": "SEK 5,100.00",
"minorUnits": 510000
},
"totalOrderAmountExclVat": {
"amount": "4080.00",
"currency": "SEK",
"formatted": "4,080.00",
"formattedWithCurrency": "SEK 4,080.00",
"minorUnits": 408000
},
"totalOrderVatAmount": {
"amount": "1020.00",
"currency": "SEK",
"formatted": "1,020.00",
"formattedWithCurrency": "SEK 1,020.00",
"minorUnits": 102000
}
},
"uncapturedAmount": {
"amount": "5100.00",
"currency": "SEK",
"formatted": "5,100.00",
"formattedWithCurrency": "SEK 5,100.00",
"minorUnits": 510000
},
"updatedAt": "2023-02-14T13:27: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.metadata object Optional { "property1": "value1", "property2": "value2" }.orderReference string status array of strings cancelled: Order has been cancelled.expired: The expiry date of the order is passed.fullyCaptured: All order lines have been captured.fullyPaid: The order has been paid fully.fullyRefunded: All order lines have been added to a credit invoice.partiallyCaptured: Some of the order lines have been captured.partiallyPaid: The order has been paid partially.partiallyRefunded: Some of the order lines have been added to a credit
invoice.unacknowledged: The order has not yet been acknowledged.uncaptured: The order has not yet been captured.uncaptured object availableActions array type property that describes an available action. The following types can be listed: - cancel: The order can be cancelled. - capture: The order can be fully
captured. - editCustomer: The customer details of the order can be
edited. - editOrder: The order lines can be edited. - editPaymentMethod: The payment method of the order can be edited. - extendExpiry: The
expiry date of the order can be extended. - partialCapture: The order can
be partially captured. - partialRefund: The order can be partially
refunded. - refund: The order can be fully refunded.createdAt string ledgerId string documentReference string Optional documentUrl string Optional note string Optional orderLines array description string quantity integer reference string Optional totalAmount integer totalVatAmount integer type string unitDiscountAmount integer Optional unitPrice integer vat integer status array totalOrderAmount integer totalOrderAmountExclVat integer totalOrderVatAmount integer riskProfile object uncapturedAmount null