The AfterPay webservices expects that the sum of all orderlines is equal to the total order amount. If not, payment will fail.
For example:
- 1x product 1 – €5,00
- 2x product 2 – €3,99
- 1x product 3 – €2,99
- shipping – €4,95
The sum is €20,92. The webservice expects this exact amount in the totalorderamount field.
Now, sometimes, due to different tax calculations and settings, rounding errors can occur in the webshop of a merchant. While ideally, this can be corrected by the merchant on their side, this is not always an option or even possible.
To prevent failed payments in these situations, please add a correction line to the request automatically. With this added (positive or negative) correction, the sum always equals the total. A correction line can be sent as an orderline, just like any other. Please see the example request for more details.