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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/).

## [17.4.0] - TBD
### Added
* Add support for `scheme_id` field in merchant account transaction responses for Payout and Refund transactions
* The `scheme_id` field provides information about the payment scheme used (e.g., "faster_payments_service", "sepa_credit_transfer", "internal_transfer")

## [17.3.0] - 2025-04-16
### Added
* Add sub_merchants support to Payments module

## [17.2.0] - 2025-04-16
### Added
* Add support for `deprecated_at` property to GET payment API response
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Main properties
group=com.truelayer
archivesBaseName=truelayer-java
version=17.3.1
version=17.4.0

# Artifacts properties
project_name=TrueLayer Java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import com.fasterxml.jackson.annotation.JsonValue;
import com.truelayer.java.entities.CurrencyCode;
import com.truelayer.java.entities.beneficiary.Beneficiary;
import com.truelayer.java.payouts.entities.SchemeId;
import java.time.ZonedDateTime;
import java.util.Map;
import java.util.Optional;
Expand Down Expand Up @@ -47,6 +48,8 @@ public class Payout extends Transaction {

String payoutId;

SchemeId schemeId;

Map<String, String> metadata;

@JsonGetter
Expand All @@ -59,6 +62,11 @@ public Optional<ZonedDateTime> getExecutedAt() {
return Optional.ofNullable(executedAt);
}

@JsonGetter
public Optional<SchemeId> getSchemeId() {
return Optional.ofNullable(schemeId);
}

@RequiredArgsConstructor
@Getter
public enum ContextCode {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.fasterxml.jackson.annotation.JsonGetter;
import com.truelayer.java.entities.CurrencyCode;
import com.truelayer.java.entities.beneficiary.PaymentSource;
import com.truelayer.java.payouts.entities.SchemeId;
import java.time.ZonedDateTime;
import java.util.Map;
import java.util.Optional;
Expand Down Expand Up @@ -37,6 +38,8 @@ public class Refund extends Transaction {

String paymentId;

SchemeId schemeId;

Map<String, String> metadata;

@JsonGetter
Expand All @@ -48,4 +51,9 @@ public Optional<Map<String, String>> getMetadata() {
public Optional<ZonedDateTime> getExecutedAt() {
return Optional.ofNullable(executedAt);
}

@JsonGetter
public Optional<SchemeId> getSchemeId() {
return Optional.ofNullable(schemeId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public void shouldYieldTrueIfPayout() {
null,
Payout.ContextCode.INTERNAL,
UUID.randomUUID().toString(),
null,
null);

assertTrue(sut.isPayout());
Expand All @@ -121,6 +122,7 @@ public void shouldConvertToPayout() {
null,
Payout.ContextCode.INTERNAL,
UUID.randomUUID().toString(),
null,
null);

assertDoesNotThrow(sut::asPayout);
Expand Down Expand Up @@ -157,6 +159,7 @@ public void shouldYieldTrueIfRefund() {
Payout.ContextCode.INTERNAL,
UUID.randomUUID().toString(),
UUID.randomUUID().toString(),
null,
null);

assertTrue(sut.isRefund());
Expand All @@ -176,6 +179,7 @@ public void shouldConvertToRefund() {
Payout.ContextCode.INTERNAL,
UUID.randomUUID().toString(),
UUID.randomUUID().toString(),
null,
null);

assertDoesNotThrow(sut::asRefund);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@
]
},
"context_code":"withdrawal",
"payout_id":"string"
"payout_id":"string",
"scheme_id":"faster_payments_service"
},
{
"type":"payout",
Expand Down Expand Up @@ -104,7 +105,8 @@
"payout_id": "an-id"
},
"context_code":"withdrawal",
"payout_id":"string"
"payout_id":"string",
"scheme_id":"sepa_credit_transfer"
},
{
"type":"payout",
Expand All @@ -131,7 +133,8 @@
]
},
"context_code":"withdrawal",
"payout_id":"string"
"payout_id":"string",
"scheme_id":"internal_transfer"
},
{
"type":"refund",
Expand Down Expand Up @@ -162,7 +165,8 @@
},
"context_code":"withdrawal",
"refund_id":"an-id",
"payment_id":"another-id"
"payment_id":"another-id",
"scheme_id":"faster_payments_service"
}
],
"pagination": {
Expand Down