sessionId string The session ID string that was obtained when the session was [created](/docs/payment-products/checkout/create-order-session).
Update a session that was created with Create order session. totalOrderAmount, totalOrderVatAmount and totalOrderAmountExclVat are the only required fields. If new order lines are provided then the corresponding new total amounts should also be provided, like in the example below. If new order lines are provided, all order lines in the already existing order session will be deleted and replaced.
curl -X POST
-H 'authorization: Bearer v4.public.eyJpc3MiOiJs...'
-H 'content-type: application/json'
-d '{
"orderLines": [
{
"description": "Coffee Machine X200",
"quantity": 10,
"reference": "111-222-333",
"totalAmount": 500000,
"totalVatAmount": 100000,
"type": "physical",
"unitDiscountAmount": 0,
"unitPrice": 50000,
"vat": 2500
},
{
"description": "Shipping fee",
"quantity": 1,
"reference": "444-555-666",
"totalAmount": 10000,
"totalVatAmount": 2000,
"type": "shippingFee",
"unitDiscountAmount": 0,
"unitPrice": 10000,
"vat": 2500
}
],
"totalOrderAmount": 510000,
"totalOrderAmountExclVat": 408000,
"totalOrderVatAmount": 102000
}'
https://api.sandbox.ledyer.com/v1/sessions/:sessionId sessionId string country string Optional currency string Optional locale string Optional metadata object Optional { "property1": "value1", "property2": "value2" }.orderLines array Optional description string quantity integer reference string Optional totalAmount integer totalVatAmount integer type string unitDiscountAmount integer Optional unitPrice integer vat integer reference string Optional settings object Optional security object Optional level integer Optional requireClientValidation boolean Optional validationSuccessOnTimeout boolean Optional settlementReference string Optional totalOrderAmount integer totalOrderAmountExclVat integer totalOrderVatAmount integer {
"checkoutUrl": "https://www.example.com",
"expiresAt": "2021-09-01T11:25:32.805672147Z",
"orderId": "or_1xDXf4gwlsnyERFywD9VYZT0Tpp",
"sessionId": "se_1xDXf4JI3PJsGeVAvLE3hHqYS09"
} The sessionId should be stored and re-used until the purchase has been completed or the expiresAt time has been reached. The orderId should only be used in Backend to Backend calls.