I am trying to accept payments for orders using the ecommerce pay api and I use the url below with the tokenized card. For some reason, the credit card is being charged twice the price. there is only one item but the api doubles the price somewhere.
post Url "https://scl-sandbox.dev.clover.com/v1/orders/TVR2FGCN8B0M8/pay"
post data {"currency":"usd","source":"clv_1TSTSyWzS8LCb2JkqB5w94cv","tip_amount":0,"email":"shahzib111@hotmail.com"}
The response of the payment is below. Note that the actual price was suppose to be $2.01.
{ "id" : "TVR2FGCN8B0M8", "object" : "order", "amount" : 402, "tax_amount" : 22, "amount_paid" : 402, "tax_amount_paid" : 22, "currency" : "USD", "charge" : "3CQQVJAK5JAA6", "created" : 1661503434000, "email" : "shahzib111@hotmail.com", "ref_num" : "223800501820", "auth_code" : "OK6299", "items" : [ { "parent" : "X3DAEESVN8AFJ", "inventory_id" : "X3DAEESVN8AFJ", "amount" : 189, "description" : "COLD CAN SODA", "tax_rates" : [ { "name" : "TAX", "rate" : 600000 }, { "name" : "Tax", "rate" : 600000 } ] } ], "source" : { "brand" : "DISCOVER", "cvc_check" : "pass", "exp_month" : "10", "exp_year" : "2022", "first6" : "601136", "last4" : "6668" }, "status" : "paid", "status_transitions" : { "paid" : 1661503513483 } }
A picture of the receipt is shown below. Note that there is only one item but the receipt seems to duplicate it.