question

aavci avatar image
aavci asked aavci commented

Set tax amount for payment in custom tender

Currently, a payment applied with a custom tender is able to specify the payment amount. How can the payment also set the tax amount?

Intent data = new Intent();
                data.putExtra(Intents.EXTRA_AMOUNT, amount);

// TODO Add tax amount here

                data.putExtra(Intents.EXTRA_CLIENT_ID, Utils.nextRandomId());
                data.putExtra(Intents.EXTRA_NOTE, "Transaction Id: " + Utils.nextRandomId());

                setResult(RESULT_OK, data);
                finish();



https://docs.clover.com/docs/creating-custom-tender-apps

Custom TendersTaxes
10 |2000

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

superdave avatar image
superdave answered aavci commented

amount is a tax-included amount.

you can use Order ID in the intent, to retrieve the tax amount of the order.

3 comments
10 |2000

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

aavci avatar image aavci commented ·

Not according to the payment records. When we retrieve the payments history, the tax amount for the payments is 0

0 Likes 0 ·
aavci avatar image aavci aavci commented ·

Here's an example

{
  "elements": [
    {
      "id": "<ID>",
      "order": {
        "id": "<order_id>"
      },
      "tender": {
        "href": "<tender_url>",
        "id": "<tender_id>"
      },
      "amount": 146,
      "tipAmount": 0,
      "taxAmount": 0,
      "employee": {
        "id": "<employee_id>"
      },
      "createdTime": 1653400146000,
      "clientCreatedTime": 1653400146000,
      "modifiedTime": 1653400145000,
      "result": "SUCCESS",
      "note": "<Note>"
    },
  ]
}
0 Likes 0 ·
aavci avatar image aavci commented ·

I'm looking for something along the lines of `EXTRA_TAX_AMOUNT` but I'm not able to find any such documentation.

0 Likes 0 ·
David Marginian avatar image
David Marginian Deactivated answered aavci commented

See EXTRA_TAX_AMOUNT under ACTION_MERCHANT_TENDER https://clover.github.io/clover-android-sdk/com/clover/sdk/v1/Intents.html


3 comments
10 |2000

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

aavci avatar image aavci commented ·

Thanks David. I tried this now. Although I'm setting the tax amount to 5, it's appearing as 18 for a payment of 100. What would be a reason for this?

resultIntent.putExtra(Intents.EXTRA_TAX_AMOUNT, 5L);
0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ aavci commented ·
What environment? Do you have an order id?
0 Likes 0 ·
aavci avatar image aavci David Marginian ♦♦ commented ·
I just sent a support email with ID
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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