reference string Optional The desired order reference to be set or edited. Max 50 characters.
As a merchant, you have the option to validate an order before it is created, this feature can be useful for cases such as order stock validation or order comparison. This is how it works:
When an order is created with a create order session request you need to pass a validation URL in the request body under settings.urls.validate.
Ledyer will make a POST request to the submitted URL and await a response before the order is created. The payload will look as follows:
{
"merchantId": "ac_1xWqkk1aaIbxCJsoseRhSd0OJyD",
"orderId": "or_29kCutBzwAXQ9JRW1tMhcUeImyg",
"reference": "or_29kNetBzwAXQ9XYW1tMhcUeImyg",
"storeId": "9702420072"
} Possible response status codes:
200: Ledyer will proceed with creating the order.303: Ledyer will redirect the user to a URL in the location header, query parameters can be used to pass information to the URL, such as ?orderid={order.id} or ?sessionid={session.id}.400: Order will not be created and an error message will be shown in the checkout.422: Order will not be created and a custom error message will be shown in the checkout.Depending on the outcome of the validation in the order system you can respond with either HTTP status code 200, 400 or 422.
reference string Optional title string Optional body string Optional