Skip to main content

Create order with customer token

Use this API call to create an order using a Customer Token.

curl -X POST \
-H 'authorization: Bearer v4.public.eyJpc3MiOiJs...' \
-H 'content-type: application/json' \
-d '{
"country": "SE",
"currency": "SEK",
"metadata": {},
"reference": "merchantref1",
"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
"storeId": null,
"shippingAddress": {
"companyName": "Herrmans gurkor AB",
"careOf": "Lars",
"city": "Stockholm",
"postalCode": "12345"
}
}'
https://api.sandbox.ledyer.com/v1/customer-tokens/:token/order

Path parameters

token

The token that was obtained when the customer token was created.

Request body

tbd