question

shamal avatar image
shamal asked finacussolutions answered

Tax amount is not added to final total- Rest Pay API

I used the below API under REST pay to make a payment
URL:{ {baseUrl}}/v1/payments
body:

{

"amount": 2500, "taxAmount" : 500, "final": true,

}

1705365925159.png


I'm expecting the total would be 30. but the receipt shows 25. am I missing something here?





REST APITaxes
1705365925159.png (10.4 KiB)
10 |2000

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

berthablea avatar image
berthablea answered

The issue likely arises because the API may not automatically include the tax amount in the total payment unless explicitly specified in the logic. To resolve this, verify if the API requires you to add the tax amount to the amount manually before sending the request. You can consult the API documentation or involve a tax accountant to ensure the tax calculation aligns with compliance and business logic.


10 |2000

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

finacussolutions avatar image
finacussolutions answered

The tax amount is not being added to the final total because the API may not correctly handle the tax inclusion in the total calculation. Double-check if the amount and taxAmount are being summed up in the backend logic before displaying the total. Ensure that both the amount and taxAmount are passed correctly, and the final total is calculated as amount + taxAmount. Also, confirm if the API accepts tax values as part of the total or requires special handling for tax calculation.



10 |2000

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

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