Docs

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.

Product area

  • Transactions

Tooling

  • API

Released

June 23, 2023

Status

Released

API version

Version 1

What's new?

We added a new adjustments_totals object that you can include when working with transactions.

adjustments_totals object

Breakdown of all the adjustments made against a transaction in the transaction currency

It's available when you use the include parameter with the value adjustments_totals when working with transaction entities to return it.

GET /transactions?include=adjustments_totals
include string

Include related entities in the response.

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

GET /transactions/{transaction_id}?include=adjustments_totals
200 OK
{
"data": {
"id": "txn_01h3h8qvbbgsvvakck3w432t7p",
"status": "completed",
"customer_id": "ctm_01h3h38xn5c2701bb5eecy9m6a",
"address_id": "add_01h3h38xqmv1xy0tjsnj0g1ke5",
"business_id": null,
"custom_data": null,
"origin": "subscription_recurring",
"collection_mode": "automatic",
"subscription_id": "sub_01h3h3a9sfpr5syq38tq0sd4sp",
"invoice_id": "inv_01h3h8r15a22r1pjyv834d0dat",
"invoice_number": "325-10051",
"billing_details": null,
"billing_period": {
"starts_at": "2023-08-22T08:25:12.565118Z",
"ends_at": "2023-09-22T08:25:12.565118Z"
},
"currency_code": "USD",
"discount_id": null,
"created_at": "2023-06-22T10:00:01.785157Z",
"updated_at": "2023-06-22T10:00:09.653782Z",
"billed_at": "2023-06-22T10:00:01.131262Z",
"items": [
{
"price": {
"id": "pri_01gsz8x8sawmvhz1pv30nge1ke",
"description": "Monthly (per seat)",
"product_id": "pro_01gsz4t5hdjse780zja8vvr7jg",
"billing_cycle": {
"interval": "month",
"frequency": 1
},
"trial_period": null,
"tax_mode": "account_setting",
"unit_price": {
"amount": "3000",
"currency_code": "USD"
},
"unit_price_overrides": [],
"quantity": {
"minimum": 10,
"maximum": 999
},
"status": "active"
},
"quantity": 10
},
{
"price": {
"id": "pri_01h1vjfevh5etwq3rb416a23h2",
"description": "Monthly (recurring addon)",
"product_id": "pro_01h1vjes1y163xfj1rh1tkfb65",
"billing_cycle": {
"interval": "month",
"frequency": 1
},
"trial_period": null,
"tax_mode": "account_setting",
"unit_price": {
"amount": "10000",
"currency_code": "USD"
},
"unit_price_overrides": [],
"quantity": {
"minimum": 1,
"maximum": 100
},
"status": "active"
},
"quantity": 1
}
],
"details": {
"tax_rates_used": [
{
"tax_rate": "0.08875",
"totals": {
"subtotal": "40000",
"discount": "0",
"tax": "3549",
"total": "43549"
}
}
],
"totals": {
"subtotal": "40000",
"tax": "3549",
"discount": "0",
"total": "43549",
"grand_total": "12567",
"fee": "2227",
"credit": "30982",
"balance": "0",
"earnings": "37773",
"currency_code": "USD"
},
"adjusted_totals": {
"subtotal": "10005",
"tax": "887",
"total": "10892",
"grand_total": "10892",
"fee": "557",
"earnings": "9448",
"currency_code": "USD"
},
"payout_totals": {
"subtotal": "40000",
"tax": "3549",
"total": "43549",
"fee": "2227",
"earnings": "37773",
"currency_code": "USD"
},
"adjusted_payout_totals": {
"subtotal": "10005",
"tax": "887",
"total": "10892",
"fee": "557",
"chargeback_fee": {
"amount": "0",
"original": null
},
"earnings": "9448",
"currency_code": "USD"
},
"line_items": [
{
"id": "txnitm_01h3h8qvs7cmyyb9fs92hqbzdh",
"price_id": "pri_01gsz8x8sawmvhz1pv30nge1ke",
"quantity": 10,
"totals": {
"subtotal": "30000",
"tax": "2662",
"discount": "0",
"total": "32662"
},
"product": {
"id": "pro_01gsz4t5hdjse780zja8vvr7jg",
"name": "ChatApp Pro",
"description": "Everything in basic, plus access to a suite of powerful tools and features designed to take your team's productivity to the next level.",
"tax_category": "standard",
"image_url": "https://paddle-sandbox.s3.amazonaws.com/user/10889/2nmP8MQSret0aWeDemRw_icon1.png",
"status": "active"
},
"tax_rate": "0.08875",
"unit_totals": {
"subtotal": "3000",
"tax": "266",
"discount": "0",
"total": "3266"
}
},
{
"id": "txnitm_01h3h8qvs7cmyyb9fs95jkr9sk",
"price_id": "pri_01h1vjfevh5etwq3rb416a23h2",
"quantity": 1,
"totals": {
"subtotal": "10000",
"tax": "887",
"discount": "0",
"total": "10887"
},
"product": {
"id": "pro_01h1vjes1y163xfj1rh1tkfb65",
"name": "Voice rooms addon",
"description": "Create voice rooms in your chats to work in real time alongside your colleagues. Includes unlimited voice rooms and recording backup for compliance.",
"tax_category": "standard",
"image_url": "https://paddle-sandbox.s3.amazonaws.com/user/10889/GcZzBjXRfiraensppgtQ_icon2.png",
"status": "active"
},
"tax_rate": "0.08875",
"unit_totals": {
"subtotal": "10000",
"tax": "887",
"discount": "0",
"total": "10887"
}
}
]
},
"payments": [
{
"payment_attempt_id": "6d81dac9-1074-48e5-bc60-5c0ff50dfe1c",
"stored_payment_method_id": "badbd3d8-df98-4aa4-b7ba-5e9ad85b4488",
"amount": "12567",
"status": "captured",
"error_code": null,
"method_details": {
"type": "card",
"card": {
"type": "visa",
"last4": "4242",
"expiry_month": 1,
"expiry_year": 2026
}
},
"created_at": "2023-06-22T10:00:02.58261Z",
"captured_at": "2023-06-22T10:00:05.387088Z"
}
],
"checkout": {
"url": "https://aeroedit.com/pay?_ptxn=txn_01h3h8qvbbgsvvakck3w432t7p"
},
"adjustments_totals": {
"subtotal": "29995",
"tax": "2662",
"total": "32657",
"fee": "1670",
"earnings": "28325",
"breakdown": {
"credit": "32657",
"refund": "0",
"chargeback": "0"
},
"currency_code": "USD"
}
},
"meta": {
"request_id": "4dc83732-b11c-44c7-88fa-f76de266d53e"
}
}

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.

Summary of changes

Entity Field Change Type
Transaction adjustments_totals + Added Field
Include value; totals for all adjustments.

Was this page helpful?