1. we create an order with the following line item initially against the ecommerce api using the below object to create a "shell order" for line items to be
added later.
items[
{
amount = 100,
currency = "usd",
description = "<line item text>",
quantity = 1
}
]
post object
items = items,
currency = "usd",
customer = custid,
email = email
"/v1/orders", Method.POST
This is successful and creates a shell ecommerce order with a total of 1 dollar.
2. Line items are added by a user on the Clover endpoint. We do not add any further line items.
3. Before we use the ecommerce order/pay endpoint we want to void the the same line item using the following endpoint
/v3/merchants/" + _merchantId + "/orders/" + order_id + "/line_items/"+ item_id, Method.DELETE
The problem is that the total of the ecommerce order is not subtracted 1 dollar so the user is always charged 1 dollar than the order should have a total for.
What's the correct way to accomplish removing the line item and subtracting the dollar before paying out the order?