HI
We have an overcharging issue with customers when an order is charged for using the e-commerce API if a discount is added to that order.
We use the endpoints to process orders:
OrderPlacing: https://api.clover.com/v3/merchants/{merchantId}/orders AddDiscount: https://api.clover.com/v3/merchants/{merchantId}/orders/{orderId}/discounts TokenizedCharge: https://scl.clover.com/v1/orders/{orderId}/pay
A sample request-response for the TokenizedCharge is as follows (sandbox, also happens on live):
Request (note that we are sending the correct value to be charged; refer bill below):
{"amount":515,"currency":"USD","source":"clv_1TSTSQRmMHET7Y1GcwDq7exo"}
Response:
{"id":"SBGP2SEECQ5JW","object":"order","amount":578,"tax_amount":28,"currency":"USD","charge":"RC4CGNHNR46YP","first6":"411111","created":1594282068000,"ref_num":"019100500860","auth_code":"OK5734","items":[{"parent":"1D8RRXCGXYM2J","amount":550,"description":"Chestnut Rose Cassis Tart"}],"source":{"address_line1_check":"unavailable","address_zip":"12345","address_zip_check":"pass","brand":"VISA","exp_month":"12","exp_year":"2020","last4":"1111"},"status":"paid","status_transitions":{"paid":1594282073817}}
Notice that the response amount is higher that the charge request amount.
Also note that the tax amount in the response is incorrect. Even though we don't specify it, when the discount is applied, it gives a wrong value (the tax showing up in clover orders is 25 cents but here it is 28 cents)
This incorrect tax/amount does NOT happen if there is no discounts in the order.
The overcharged scenario is clearly visible in the bill as well:
Please help us figure this issue out.