Include the total for all adjustments for a transaction
Include an object with the total for all the adjustments against a transaction, including a breakdown by adjustment action.
What's new?
We added a new adjustments_totals
object that you can include when working with transactions.
Breakdown of all the adjustments made against a transaction in the transaction currency.
Total before tax.
Total tax on the subtotal.
Total after tax.
Total fee taken by Paddle.
Total earnings. This is the subtotal minus the Paddle fee. For tax adjustments, this value is negative, which means a positive effect in the transaction earnings. This is because the fee is originally calculated from the transaction total, so if a tax adjustment is made, then the fee portion of it is returned. As a result, the earnings from all the adjustments performed could be either negative, positive or zero.
Breakdown of the total adjustments by adjustment action.
Three-letter ISO 4217 currency code used for adjustments for this transaction.
You can use the include
parameter with the value adjustments_totals
when working with transaction entities to return it.
Include related entities in the response. Use a comma-separated list to specify multiple entities.
How it works
You can return adjustments for a transaction when working with the Paddle API by using the include
parameter with the value adjustments
. However, this doesn't return the total for all adjustments.
To calculate totals for adjustments, you'd need to sum transaction.adjustments[].totals
yourself.
The new adjustments_totals
object returns totals for you. You don't need to include adjustments
to get adjustments_totals
. It includes a breakdown of the totals for each adjustment action: credit, refund, and chargeback.
Examples
12345678910111213141516171819201{
2 "data": {
3 "id": "txn_01h3h8qvbbgsvvakck3w432t7p",
4 "status": "completed",
5 "customer_id": "ctm_01h3h38xn5c2701bb5eecy9m6a",
6 "address_id": "add_01h3h38xqmv1xy0tjsnj0g1ke5",
7 "business_id": null,
8 "custom_data": null,
9 "origin": "subscription_recurring",
10 "collection_mode": "automatic",
11 "subscription_id": "sub_01h3h3a9sfpr5syq38tq0sd4sp",
12 "invoice_id": "inv_01h3h8r15a22r1pjyv834d0dat",
13 "invoice_number": "325-10051",
14 "billing_details": null,
15 "billing_period": {
16 "starts_at": "2023-08-22T08:25:12.565118Z",
17 "ends_at": "2023-09-22T08:25:12.565118Z"
18 },
19 "currency_code": "USD",
20 "discount_id": null,
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 work with the new adjustments_totals
object. Use the include
parameter with the value adjustments_totals
when working with transaction entities to return it.