See the amount before payments for a transaction
Get the amount that a customer has to pay more easily using the new grand total field against totals for a transaction. It's especially useful for completed transactions.
What's new?
We added a new grand_total
field to transaction.details.totals
to make it clearer what the total amount to pay against a transaction is.
Breakdown of the total for a transaction.
Amount due for a transaction after tax, discount, and credits.
How it works
The totals.balance
field against transaction.details.totals
shows you how much is due after discount, tax, and any credits. However, it also includes any payments, which means that it's 0
after a transaction is completed.
This made it difficult to work out what a customer had paid after a transaction is completed. You'd need to sum transaction.payments[].amount
, or calculate transaction.details.totals.total
minus transaction.details.totals.credit
.
The new grand_total
field gives you the total for a transaction after discount, tax, and any credits but before any payments.
Examples
123456789101112131{
2 "totals": {
3 "subtotal": "15500",
4 "discount": "500",
5 "tax": "1500",
6 "total": "16500",
7 "credit": "1000",
8 "balance": "0",
9 "fee": "825",
10 "earnings": "15675",
11 "currency_code": "USD"
12 }
13}
12345678910111213141{
2 "totals": {
3 "subtotal": "15500",
4 "discount": "500",
5 "tax": "1500",
6 "total": "16500",
7 "credit": "1000",
8 "balance": "0",
9 "grand_total": "15500",
10 "fee": "825",
11 "earnings": "15675",
12 "currency_code": "USD"
13 }
14}
Next steps
This change is available in version 1
of the Paddle API.
It's a non-breaking change, meaning it doesn't impact existing integrations.
You can list transactions or get a transaction using the API to see the new grand_total
field. When listing filter to see completed transactions using the status
parameter with the value completed
.