question

NextSeat avatar image
NextSeat asked ·

How to add taxes and tip to Clover orders & Pay

Hello,

We are able to post payment to Clover, but taxes and tips are not reflected in the order details on the merchant side. Attached the json for our order and pay.

Few things that are not clear from Clover docs are:
1. where to add tips in v3 dev pay API?
2. Do we need to same tip in orders ?
3. how to add tax in orders?
4. what is the significance of tax removed and how to use it?


Order json {"clientCreatedTime":1549673692803,"modifiedTime":1549673692803,"total":3759.9998,"isVat":false,"manualTransaction":false,"testMode":false,"createdTime":1549673692803,"currency":"USD","taxRemoved":false,"state":"open","title":"From Harsh Sanghvi"}

Payment json {"zip":"94041","expMonth":4,"last4":"4242","cardEncrypted":"YwJ24vmyzyACJrPDRnSnzh5CNz\/2jCotkz7HbaNuhcircBUggnwzZF30\/ZVOSTiF66WmnW8FJ7U3LmJl6qWKHc+6GiqvH5VnfDkvncd0RCjpRyHPHC\/I7drbyz1b1NkcKCflfeqVmjPqUl0ertj\/S1qa\/M1EK8OqpblcVKMWK7rsUk40paL\/kw6mf5C\/\/+G73JvwJqhrMikhmQFEnXOf7Q3ZZuW3SVViFPUJOigjZGZKls1ikT9KHqedVQxidi5GJ4ObvmQw2+XJQC4KxdKE83Y0O6IyG\/6IKvRxWONZWCno\/uZmC\/1KjaqdvyDXYXGNDHu2+6bfSBDMB8mztJTy1Q==","amount":3270,"cvv":"234","orderId":"Q7XPKFXA6QXXM","tipAmount":491,"expYear":2023,"currency":"usd","taxAmount":270,"first6":"424242"}

responseJSON =={"result":"APPROVED","authCode":"405164","paymentId":"YGC7EM2C9XP1W","token":"HP986FXJ1ZHJE"}

OrdersPaymentsTaxes
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Chanel avatar image
Chanel answered ·
1. Tips are are added to the Payment object used to POST to the /pay endpoint. Shown in Python here.
2. Tips are never considered part of the Order. A way to remember this is that the Order is what the Merchant has decided what is owed. A Payment is what the Customer decides to pay (including payment type, payment amount and even the tip!).
3. If you are creating/modifying the order yourself, you'll need to keep track and update the relevant totals yourself. Otherwise, orders created through Clover Apps will automatically calculate tax based on the Merchant's settings and the Item's Tax attribute.
4. If taxRemoved is true on an Order, then the Order should not have taxes applied to it.
Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community