Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx
### Added

- Added support for `wechat_pay` payment method type. See [related changelog](https://developer.paddle.com/changelog/2025/wechat-pay-payment-method?utm_source=dx&utm_medium=paddle-python-sdk)
- Added `grand_total_tax` to transaction totals and adjusted totals. See [related changelog](https://developer.paddle.com/changelog/2026/grand-total-tax-field?utm_source=dx&utm_medium=paddle-python-sdk)

## 1.12.0 - 2025-11-12

Expand Down
2 changes: 2 additions & 0 deletions paddle_billing/Entities/Shared/TransactionPayoutTotals.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class TransactionPayoutTotals:
credit_to_balance: str
exchange_rate: str
fee_rate: str
grand_total_tax: str

@staticmethod
def from_dict(data: dict[str, Any]) -> TransactionPayoutTotals:
Expand All @@ -37,4 +38,5 @@ def from_dict(data: dict[str, Any]) -> TransactionPayoutTotals:
credit_to_balance=data["credit_to_balance"],
exchange_rate=data["exchange_rate"],
fee_rate=data["fee_rate"],
grand_total_tax=data["grand_total_tax"],
)
2 changes: 2 additions & 0 deletions paddle_billing/Entities/Shared/TransactionTotals.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class TransactionTotals:
earnings: str | None
currency_code: CurrencyCode
credit_to_balance: str
grand_total_tax: str

@staticmethod
def from_dict(data: dict[str, Any]) -> TransactionTotals:
Expand All @@ -33,4 +34,5 @@ def from_dict(data: dict[str, Any]) -> TransactionTotals:
earnings=data.get("earnings"),
currency_code=CurrencyCode(data["currency_code"]),
credit_to_balance=data["credit_to_balance"],
grand_total_tax=data["grand_total_tax"],
)
2 changes: 2 additions & 0 deletions paddle_billing/Entities/Shared/TransactionTotalsAdjusted.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class TransactionTotalsAdjusted:
earnings: str | None
currency_code: CurrencyCode
retained_fee: str
grand_total_tax: str

@staticmethod
def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted:
Expand All @@ -27,4 +28,5 @@ def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted:
earnings=data.get("earnings"),
currency_code=CurrencyCode(data["currency_code"]),
retained_fee=data["retained_fee"],
grand_total_tax=data["grand_total_tax"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class TransactionPayoutTotals:
credit_to_balance: str
exchange_rate: str | None
fee_rate: str | None
grand_total_tax: str | None

@staticmethod
def from_dict(data: dict[str, Any]) -> TransactionPayoutTotals:
Expand All @@ -37,4 +38,5 @@ def from_dict(data: dict[str, Any]) -> TransactionPayoutTotals:
credit_to_balance=data["credit_to_balance"],
exchange_rate=data.get("exchange_rate"),
fee_rate=data.get("fee_rate"),
grand_total_tax=data.get("grand_total_tax"),
)
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class TransactionTotals:
earnings: str | None
currency_code: CurrencyCode
credit_to_balance: str
grand_total_tax: str | None

@staticmethod
def from_dict(data: dict[str, Any]) -> TransactionTotals:
Expand All @@ -33,4 +34,5 @@ def from_dict(data: dict[str, Any]) -> TransactionTotals:
earnings=data.get("earnings"),
currency_code=CurrencyCode(data["currency_code"]),
credit_to_balance=data["credit_to_balance"],
grand_total_tax=data.get("grand_total_tax"),
)
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class TransactionTotalsAdjusted:
earnings: str | None
currency_code: CurrencyCode
retained_fee: str | None
grand_total_tax: str | None

@staticmethod
def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted:
Expand All @@ -27,4 +28,5 @@ def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted:
earnings=data.get("earnings"),
currency_code=CurrencyCode(data["currency_code"]),
retained_fee=data.get("retained_fee"),
grand_total_tax=data.get("grand_total_tax"),
)
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@
"subtotal": "55000",
"grand_total": "66000",
"currency_code": "GBP",
"credit_to_balance": "0"
"credit_to_balance": "0",
"grand_total_tax": "11000"
},
"line_items": [
{
Expand Down Expand Up @@ -517,7 +518,8 @@
"earnings": "0",
"subtotal": "55000",
"grand_total": "66000",
"currency_code": "GBP"
"currency_code": "GBP",
"grand_total_tax": "11000"
}
},
"payments": [
Expand Down Expand Up @@ -745,7 +747,8 @@
"subtotal": "55000",
"grand_total": "66000",
"currency_code": "GBP",
"credit_to_balance": "0"
"credit_to_balance": "0",
"grand_total_tax": "11000"
},
"line_items": [
{
Expand Down Expand Up @@ -849,7 +852,8 @@
"earnings": "0",
"subtotal": "55000",
"grand_total": "66000",
"currency_code": "GBP"
"currency_code": "GBP",
"grand_total_tax": "11000"
}
},
"payments": [
Expand Down Expand Up @@ -1077,7 +1081,8 @@
"subtotal": "55000",
"grand_total": "66000",
"currency_code": "GBP",
"credit_to_balance": "0"
"credit_to_balance": "0",
"grand_total_tax": "11000"
},
"line_items": [
{
Expand Down Expand Up @@ -1181,7 +1186,8 @@
"earnings": "0",
"subtotal": "55000",
"grand_total": "66000",
"currency_code": "GBP"
"currency_code": "GBP",
"grand_total_tax": "11000"
}
},
"payments": [
Expand Down Expand Up @@ -1409,7 +1415,8 @@
"subtotal": "55000",
"grand_total": "66000",
"currency_code": "GBP",
"credit_to_balance": "0"
"credit_to_balance": "0",
"grand_total_tax": "11000"
},
"line_items": [
{
Expand Down Expand Up @@ -1513,7 +1520,8 @@
"earnings": "0",
"subtotal": "55000",
"grand_total": "66000",
"currency_code": "GBP"
"currency_code": "GBP",
"grand_total_tax": "11000"
}
},
"payments": [],
Expand Down Expand Up @@ -1720,7 +1728,8 @@
"subtotal": "55000",
"grand_total": "66000",
"currency_code": "GBP",
"credit_to_balance": "0"
"credit_to_balance": "0",
"grand_total_tax": "11000"
},
"line_items": [
{
Expand Down Expand Up @@ -1824,7 +1833,8 @@
"earnings": "0",
"subtotal": "55000",
"grand_total": "66000",
"currency_code": "GBP"
"currency_code": "GBP",
"grand_total_tax": "11000"
}
},
"payments": [],
Expand Down Expand Up @@ -2077,7 +2087,8 @@
"subtotal": "59900",
"grand_total": "63494",
"currency_code": "USD",
"credit_to_balance": "0"
"credit_to_balance": "0",
"grand_total_tax": "3594"
},
"line_items": [
{
Expand Down Expand Up @@ -2197,7 +2208,8 @@
"earnings": "0",
"subtotal": "59900",
"grand_total": "63494",
"currency_code": "USD"
"currency_code": "USD",
"grand_total_tax": "3594"
}
},
"payments": [],
Expand Down Expand Up @@ -2404,7 +2416,8 @@
"subtotal": "55000",
"grand_total": "66000",
"currency_code": "GBP",
"credit_to_balance": "0"
"credit_to_balance": "0",
"grand_total_tax": "11000"
},
"line_items": [
{
Expand Down Expand Up @@ -2502,7 +2515,8 @@
"grand_total": "81066",
"currency_code": "USD",
"exchange_rate": "1.2282731999999998",
"credit_to_balance": "0"
"credit_to_balance": "0",
"grand_total_tax": "13511"
},
"tax_rates_used": [
{
Expand All @@ -2522,7 +2536,8 @@
"earnings": "51660",
"subtotal": "55000",
"grand_total": "66000",
"currency_code": "GBP"
"currency_code": "GBP",
"grand_total_tax": "11000"
}
},
"payments": [
Expand Down Expand Up @@ -2770,7 +2785,8 @@
"subtotal": "55000",
"grand_total": "66000",
"currency_code": "GBP",
"credit_to_balance": "0"
"credit_to_balance": "0",
"grand_total_tax": "11000"
},
"line_items": [
{
Expand Down Expand Up @@ -2868,7 +2884,8 @@
"grand_total": "81066",
"currency_code": "USD",
"exchange_rate": "1.2282731999999998",
"credit_to_balance": "0"
"credit_to_balance": "0",
"grand_total_tax": "13511"
},
"tax_rates_used": [
{
Expand All @@ -2888,7 +2905,8 @@
"earnings": "51660",
"subtotal": "55000",
"grand_total": "66000",
"currency_code": "GBP"
"currency_code": "GBP",
"grand_total_tax": "11000"
}
},
"payments": [
Expand Down
Loading