question

sam avatar image
sam Deactivated asked sam Deactivated edited

How to add tip on Developer Pay API (v3/../pay)

We are adding gratuity for restaurant orders, and I would like to know, how
would we charge gratuity using the Pay API
https://docs.clover.com/build/developer-pay-api/
Developer Pay API
10 |2000

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

1 Answer

sam avatar image
sam Deactivated answered
In devpay, you can just add it to the tip line.
tipAmount = 100 # $1
taxAmount = 30 # $.30
amount = 130 # ($1 + $.30)

The "Total Amount" should include tax but not the tip. amount = (subtotal + tax). Tip will be added to the total charge later.
10 |2000

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