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 @@ -10,6 +10,7 @@ Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx

### Added

- Support `retained_fee` field on totals objects to show the fees retained by Paddle for the adjustment.
- Added support for new payment methods `blik`, `mb_way`, `pix` and `upi`. See [related changelog](https://developer.paddle.com/changelog/2025/blik-mbway-payment-methods?utm_source=dx&utm_medium=paddle-python-sdk).

## 1.10.0 - 2025-08-15
Expand Down
2 changes: 2 additions & 0 deletions paddle_billing/Entities/Shared/AdjustmentTotals.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class AdjustmentTotals:
fee: str
earnings: str
currency_code: CurrencyCode
retained_fee: str

@staticmethod
def from_dict(data: dict[str, Any]) -> AdjustmentTotals:
Expand All @@ -23,4 +24,5 @@ def from_dict(data: dict[str, Any]) -> AdjustmentTotals:
fee=data["fee"],
earnings=data["earnings"],
currency_code=CurrencyCode(data["currency_code"]),
retained_fee=data["retained_fee"],
)
2 changes: 2 additions & 0 deletions paddle_billing/Entities/Shared/PayoutTotalsAdjustment.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class PayoutTotalsAdjustment:
chargeback_fee: ChargebackFee | None
earnings: str
currency_code: CurrencyCodePayouts
retained_fee: str

@staticmethod
def from_dict(data: dict[str, Any]) -> PayoutTotalsAdjustment:
Expand All @@ -26,4 +27,5 @@ def from_dict(data: dict[str, Any]) -> PayoutTotalsAdjustment:
chargeback_fee=ChargebackFee.from_dict(data["chargeback_fee"]) if data.get("chargeback_fee") else None,
earnings=data["earnings"],
currency_code=CurrencyCodePayouts(data["currency_code"]),
retained_fee=data["retained_fee"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class TransactionPayoutTotalsAdjusted:
earnings: str
currency_code: CurrencyCodePayouts
exchange_rate: str
retained_fee: str

@staticmethod
def from_dict(data: dict[str, Any]) -> TransactionPayoutTotalsAdjusted:
Expand All @@ -28,4 +29,5 @@ def from_dict(data: dict[str, Any]) -> TransactionPayoutTotalsAdjusted:
earnings=data["earnings"],
currency_code=CurrencyCodePayouts(data["currency_code"]),
exchange_rate=data["exchange_rate"],
retained_fee=data["retained_fee"],
)
2 changes: 2 additions & 0 deletions paddle_billing/Entities/Shared/TransactionTotalsAdjusted.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class TransactionTotalsAdjusted:
fee: str | None
earnings: str | None
currency_code: CurrencyCode
retained_fee: str

@staticmethod
def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted:
Expand All @@ -25,4 +26,5 @@ def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted:
fee=data.get("fee"),
earnings=data.get("earnings"),
currency_code=CurrencyCode(data["currency_code"]),
retained_fee=data["retained_fee"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class AdjustmentTotals:
fee: str
earnings: str
currency_code: CurrencyCode
retained_fee: str | None

@staticmethod
def from_dict(data: dict[str, Any]) -> AdjustmentTotals:
Expand All @@ -23,4 +24,5 @@ def from_dict(data: dict[str, Any]) -> AdjustmentTotals:
fee=data["fee"],
earnings=data["earnings"],
currency_code=CurrencyCode(data["currency_code"]),
retained_fee=data.get("retained_fee"),
)
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class PayoutTotalsAdjustment:
chargeback_fee: ChargebackFee | None
earnings: str
currency_code: CurrencyCodePayouts
retained_fee: str | None

@staticmethod
def from_dict(data: dict[str, Any]) -> PayoutTotalsAdjustment:
Expand All @@ -26,4 +27,5 @@ def from_dict(data: dict[str, Any]) -> PayoutTotalsAdjustment:
chargeback_fee=ChargebackFee.from_dict(data["chargeback_fee"]) if data.get("chargeback_fee") else None,
earnings=data["earnings"],
currency_code=CurrencyCodePayouts(data["currency_code"]),
retained_fee=data.get("retained_fee"),
)
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class TransactionPayoutTotalsAdjusted:
earnings: str
currency_code: CurrencyCodePayouts
exchange_rate: str | None
retained_fee: str | None

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

@staticmethod
def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted:
Expand All @@ -25,4 +26,5 @@ def from_dict(data: dict[str, Any]) -> TransactionTotalsAdjusted:
fee=data.get("fee"),
earnings=data.get("earnings"),
currency_code=CurrencyCode(data["currency_code"]),
retained_fee=data.get("retained_fee"),
)
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@
"total": "100",
"fee": "5",
"earnings": "87",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"payout_totals": {
"subtotal": "92",
"tax": "163",
"total": "2049",
"fee": "20",
"earnings": "2029",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"created_at": "2023-08-21T13:57:15.489634Z",
"updated_at": "0001-01-01T00:00:00Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@
"total": "100",
"fee": "5",
"earnings": "87",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"payout_totals": {
"subtotal": "92",
"tax": "8",
"total": "100",
"fee": "5",
"earnings": "87",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"created_at": "2023-08-21T13:57:15.489634Z",
"updated_at": "2023-08-21T13:57:15.489634Z",
Expand Down Expand Up @@ -90,15 +92,17 @@
"total": "163297",
"fee": "8215",
"earnings": "141771",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"payout_totals": {
"subtotal": "149986",
"tax": "13311",
"total": "163297",
"fee": "8215",
"earnings": "141771",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"created_at": "2023-08-21T11:25:13.138521Z",
"updated_at": "2023-08-21T11:25:13.138521Z",
Expand Down Expand Up @@ -150,15 +154,17 @@
"total": "71984",
"fee": "3631",
"earnings": "56356",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"payout_totals": {
"subtotal": "59987",
"tax": "11997",
"total": "71984",
"fee": "3631",
"earnings": "56356",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"created_at": "2023-08-11T14:46:04.811464Z",
"updated_at": "2023-08-11T14:46:05.13404Z",
Expand Down Expand Up @@ -210,15 +216,17 @@
"total": "35986",
"fee": "1837",
"earnings": "28151",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"payout_totals": {
"subtotal": "29988",
"tax": "5998",
"total": "35986",
"fee": "1837",
"earnings": "28151",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"created_at": "2023-08-11T14:15:01.225381Z",
"updated_at": "2023-08-11T14:15:03.54843Z",
Expand Down Expand Up @@ -288,15 +296,17 @@
"total": "76990",
"fee": "3897",
"earnings": "66094",
"currency_code": "AUD"
"currency_code": "AUD",
"retained_fee": "0"
},
"payout_totals": {
"subtotal": "45120",
"tax": "4513",
"total": "49633",
"fee": "2512",
"earnings": "42608",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"created_at": "2023-06-30T13:46:24.240375Z",
"updated_at": "2023-06-30T13:46:24.240376Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@
"total": "100",
"fee": "5",
"earnings": "87",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"payout_totals": {
"subtotal": "92",
"tax": "8",
"total": "100",
"fee": "5",
"earnings": "87",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"created_at": "2023-08-21T13:57:15.489634Z",
"updated_at": "0001-01-01T00:00:00Z",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"total": "100",
"earnings": "87",
"subtotal": "92",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"created_at": "2024-04-15T08:48:20.239695Z",
"updated_at": "2024-04-15T08:48:20.239695Z",
Expand All @@ -39,7 +40,8 @@
"total": "100",
"earnings": "87",
"subtotal": "92",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"transaction_id": "txn_01hvcc93znj3mpqt1tenkjb04y",
"subscription_id": "sub_01hvccbx32q2gb40sqx7n42430",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"total": "100",
"earnings": "87",
"subtotal": "92",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"created_at": "2024-04-15T08:48:20.239695Z",
"updated_at": "2024-04-15T08:54:10.646377Z",
Expand All @@ -39,7 +40,8 @@
"total": "100",
"earnings": "87",
"subtotal": "92",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"transaction_id": "txn_01hvcc93znj3mpqt1tenkjb04y",
"subscription_id": "sub_01hvccbx32q2gb40sqx7n42430",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@
"earnings": "0",
"subtotal": "2537910",
"grand_total": "2763149",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"adjusted_payout_totals": null
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@
"earnings": "0",
"subtotal": "2537910",
"grand_total": "2763149",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"adjusted_payout_totals": null
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@
"earnings": "56589",
"subtotal": "59900",
"grand_total": "65215",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"adjusted_payout_totals": null
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@
"earnings": "0",
"subtotal": "47924",
"grand_total": "57509",
"currency_code": "GBP"
"currency_code": "GBP",
"retained_fee": "0"
},
"adjusted_payout_totals": null
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@
"earnings": "0",
"subtotal": "59900",
"grand_total": "65215",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"adjusted_payout_totals": null
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,8 @@
"earnings": "0",
"subtotal": "40000",
"grand_total": "43549",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"adjusted_payout_totals": null
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@
"earnings": "0",
"subtotal": "59900",
"grand_total": "65215",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"adjusted_payout_totals": null
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@
"earnings": "0",
"subtotal": "59900",
"grand_total": "65215",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"adjusted_payout_totals": null
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@
"earnings": "0",
"subtotal": "59900",
"grand_total": "65215",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"adjusted_payout_totals": null
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@
"earnings": "0",
"subtotal": "2537910",
"grand_total": "2763149",
"currency_code": "USD"
"currency_code": "USD",
"retained_fee": "0"
},
"adjusted_payout_totals": null
},
Expand Down
Loading