Docs

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.

Product area

  • Transactions

Tooling

  • API

Released

June 5, 2023

Status

Released

API version

Version 1

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.

totals object

Breakdown of the total for a transaction.

grand_total string
Example: 16500

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

Example transaction totals object
{
"totals": {
"subtotal": "15500",
"discount": "500",
"tax": "1500",
"total": "16500",
"credit": "1000",
"balance": "0",
"grand_total": "15500",
"fee": "825",
"earnings": "15675",
"currency_code": "USD"
}
}

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.

Summary of changes

Entity Field Change Type
Transaction grand_total + Added Field
Amount due after tax, discounts, and credits, before payments. Under details.totals.

Was this page helpful?