- Retrieves calculations for an invoice
GET {{baseURL}}/pay-int-api/invoices/{{invoiceId}}/calculations
This endpoint retrieves the calculated totals for the specified invoice.
It returns the breakdown behind the invoice's final amount, not just the total itself. This includes the subtotal, shipping, tax, fees, discounts, and any surcharge applied. It's useful for previewing exactly how an invoice's total was derived before showing it to a customer.
The following is an example request.
GET {{baseURL}}/pay-int-api/invoices/{{invoiceId}}/calculations HTTP/1.1
Authorization: Bearer {{merchantApiToken}}
x-api-version: 1.0See Also:
To retrieve an invoice by ID, see GET /pay-int-api/invoices/{invoiceId}.
To list invoices, see GET /pay-int-api/invoices.
To update an invoice, see PUT /pay-int-api/invoices/{invoiceId}.
- Mock serverhttps://developer.flute.com/_mock/api-reference/pay-int-api/invoices/{invoiceId}/calculations
- Sandbox environmenthttps://sandbox.api.flute.com/pay-int-api/invoices/{invoiceId}/calculations
- Production environmenthttps://api.flute.com/pay-int-api/invoices/{invoiceId}/calculations
curl -i -X GET \
https://developer.flute.com/_mock/api-reference/pay-int-api/invoices/9be2f3a4-5b6c-4d7e-8f9a-0b1c2d3e4f70/calculations \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'x-api-version: 1.0'OK
Indicates the invoice identifier.
Example: 9be2f3a4-5b6c-4d7e-8f9a-0b1c2d3e4f70
Indicates the transaction's subtotal amount.
This includes the base amount, tips, taxes, and discounts.
Example: 3219.45
Indicates the discount percentage.
Example: 1.5 (as 1.5%)
Indicates the amount (in USD) when a surcharge is applicable.
This is a surcharge on the base amount. This surcharge was calculated using the preset percentage from surchargePercentage.
Example: 6.45 (as $6.45)
Indicates the surcharge percentage.
This is a surcharge on the base amount. This value is surcharge percentage rate. This surcharge percentage calculates the surcharge amount for surchargeAmount.
Example: 1.5 (as 1.5%)
{ "id": "9be2f3a4-5b6c-4d7e-8f9a-0b1c2d3e4f70", "subTotalAmount": 3219.45, "shippingAmount": 129.99, "taxPercentage": 8.5, "taxAmount": 273.65, "feesPercentage": 10.25, "feesAmount": 35, "discountPercentage": 1.5, "discountAmount": 48.29, "surchargeAmount": 6.45, "surchargePercentage": 1.5, "totalAmount": 3219.45 }