Skip to content

Commit c2f4f4c

Browse files
feat: Add support for payout reconciliation reports, remittance_reference and location value for price.tax_mode (#144)
1 parent 5ea4e0c commit c2f4f4c

File tree

8 files changed

+27
-2
lines changed

8 files changed

+27
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
Check our main [developer changelog](https://developer.paddle.com/?utm_source=dx&utm_medium=paddle-php-sdk) for information about changes to the Paddle Billing platform, the Paddle API, and other developer tools.
88

9+
## [Unreleased]
10+
11+
### Added
12+
13+
- Support for payout reconciliation reports and `remittance_reference`, see [changelog](https://developer.paddle.com/changelog/2025/payout-reconciliation-report?utm_source=dx&utm_medium=paddle-php-sdk)
14+
- Added `location` value for `price.tax_mode`, see [changelog](https://developer.paddle.com/changelog/2025/default-automatic-tax-setting?utm_source=dx&utm_medium=paddle-php-sdk)
15+
916
## [1.13.1] - 2025-11-03
1017

1118
_No functional change — aligns versioning metadata with release_

src/Entities/Report/ReportFilterName.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
* @method static ReportFilterName ProductStatus()
2525
* @method static ReportFilterName ProductType()
2626
* @method static ReportFilterName ProductUpdatedAt()
27+
* @method static ReportFilterName RemittanceReference()
2728
* @method static ReportFilterName Status()
29+
* @method static ReportFilterName TransactionUpdatedAt()
2830
* @method static ReportFilterName Type()
2931
* @method static ReportFilterName UpdatedAt()
3032
*/
@@ -40,7 +42,9 @@ final class ReportFilterName extends PaddleEnum
4042
private const ProductStatus = 'product_status';
4143
private const ProductType = 'product_type';
4244
private const ProductUpdatedAt = 'product_updated_at';
45+
private const RemittanceReference = 'remittance_reference';
4346
private const Status = 'status';
47+
private const TransactionUpdatedAt = 'transaction_updated_at';
4448
private const Type = 'type';
4549
private const UpdatedAt = 'updated_at';
4650
}

src/Entities/Shared/TaxMode.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717
* @method static TaxMode AccountSetting()
1818
* @method static TaxMode External()
1919
* @method static TaxMode Internal()
20+
* @method static TaxMode Location()
2021
*/
2122
final class TaxMode extends PaddleEnum
2223
{
2324
private const AccountSetting = 'account_setting';
2425
private const External = 'external';
2526
private const Internal = 'internal';
27+
private const Location = 'location';
2628
}

src/Notifications/Entities/Payout.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ private function __construct(
1414
public PayoutStatus $status,
1515
public string $amount,
1616
public CurrencyCodePayouts $currencyCode,
17+
public string|null $remittanceReference,
1718
) {
1819
}
1920

@@ -24,6 +25,7 @@ public static function from(array $data): self
2425
PayoutStatus::from($data['status']),
2526
$data['amount'],
2627
CurrencyCodePayouts::from($data['currency_code']),
28+
$data['remittance_reference'] ?? null,
2729
);
2830
}
2931
}

src/Notifications/Entities/Report/ReportFilterName.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
* @method static ReportFilterName ProductStatus()
2525
* @method static ReportFilterName ProductType()
2626
* @method static ReportFilterName ProductUpdatedAt()
27+
* @method static ReportFilterName RemittanceReference()
2728
* @method static ReportFilterName Status()
29+
* @method static ReportFilterName TransactionUpdatedAt()
2830
* @method static ReportFilterName Type()
2931
* @method static ReportFilterName UpdatedAt()
3032
*/
@@ -40,7 +42,9 @@ final class ReportFilterName extends PaddleEnum
4042
private const ProductStatus = 'product_status';
4143
private const ProductType = 'product_type';
4244
private const ProductUpdatedAt = 'product_updated_at';
45+
private const RemittanceReference = 'remittance_reference';
4346
private const Status = 'status';
47+
private const TransactionUpdatedAt = 'transaction_updated_at';
4448
private const Type = 'type';
4549
private const UpdatedAt = 'updated_at';
4650
}

src/Notifications/Entities/Shared/TaxMode.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@
1717
* @method static TaxMode AccountSetting()
1818
* @method static TaxMode External()
1919
* @method static TaxMode Internal()
20+
* @method static TaxMode Location()
2021
*/
2122
final class TaxMode extends PaddleEnum
2223
{
2324
private const AccountSetting = 'account_setting';
2425
private const External = 'external';
2526
private const Internal = 'internal';
27+
private const Location = 'location';
2628
}

src/Notifications/Entities/Simulation/Payout.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public function __construct(
2020
public readonly PayoutStatus|Undefined $status = new Undefined(),
2121
public readonly string|Undefined $amount = new Undefined(),
2222
public readonly CurrencyCodePayouts|Undefined $currencyCode = new Undefined(),
23+
public string|Undefined $remittanceReference = new Undefined(),
2324
) {
2425
}
2526

@@ -30,6 +31,7 @@ public static function from(array $data): self
3031
status: self::optional($data, 'status', fn ($value) => PayoutStatus::from($value)),
3132
amount: self::optional($data, 'amount'),
3233
currencyCode: self::optional($data, 'currency_code', fn ($value) => CurrencyCodePayouts::from($value)),
34+
remittanceReference: self::optional($data, 'remittance_reference'),
3335
);
3436
}
3537

@@ -40,6 +42,7 @@ public function jsonSerialize(): mixed
4042
'status' => $this->status,
4143
'amount' => $this->amount,
4244
'currency_code' => $this->currencyCode,
45+
'remittance_reference' => $this->remittanceReference,
4346
]);
4447
}
4548
}

tests/Unit/Entities/_fixtures/notification/entity/payout.paid.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"id": "pay_01gsz4vmqbjk3x4vvtafffd540",
33
"status": "paid",
44
"amount": "10000",
5-
"currency_code": "USD"
6-
}
5+
"currency_code": "USD",
6+
"remittance_reference": "some-reference"
7+
}

0 commit comments

Comments
 (0)