3 items is $15
tax: $1.39
discounts: $-1
but the total payment is: $16.39
3 items is $15
tax: $1.39
discounts: $-1
but the total payment is: $16.39
Update:
I had a minute so I looked into this. It appears you are using the ecomm api to create an order and then immediately after creation you use the v3 api to add a discount to it. You then pay for the order later (v1/order/{orderId}/pay). Is that correct? I pinged the EComm team about this, but I am not certain it is a bug. The order/pay endpoint only calculates a total if a total has not already been set. And, in this case the total is set when the order is created. I would recommend creating the order in one shot using https://docs.clover.com/reference#ordercreateatomicorder and then using the v1/order/{orderId}/pay endpoint, which should work and result in a properly calculated order total. Let me know.
Original:
Please take a look at our guidelines - https://community.clover.com/page/community-guidelines. You are leaving out a lot of critical details here such as how is the order being created, how is it being paid for, are you setting the total or are you relying on us to? What environment are you working in, etc. etc.
Thanks for the reply.
In this case I used ecomm api (NODEJS) to create the order items like this
order.items = { items:[{ tax_rates = [{ "id": merchant.taxId, "name": merchant.taxLabel, "rate": merchant.taxRate }] quantity = item.quantity currency = 'usd' type = 'sku' description = 'item despcription' amount = item.unitPrice * 100 }] }
After the order is created, I can't find a way to apply my discounts with Ecomm api, so I used '/v3/merchants/${mid}/orders/${orderId}/discounts' to add discounts. Then I used '/v1/orders/${cloverOrder.cloverId}/pay' Ecomm api to pay.
Right, so follow the advice I gave you in my answer above and let me know how that works for you.
1 Person is following this question.