clients = new HashMap<>();
+
+ protected final Client getClient() {
+ return getClient(API_KEY_PROPERTY);
+ }
+
+ protected final Client getLegalEntityManagementClient() {
+ return getClient(LEM_API_KEY_PROPERTY);
+ }
+
+ protected final Client getBalancePlatformClient() {
+ return getClient(BCL_API_KEY_PROPERTY);
+ }
+
+ private Client getClient(String apiKeyProperty) {
+ return clients.computeIfAbsent(
+ apiKeyProperty,
+ property ->
+ new Client(new Config().apiKey(getProperty(property)).environment(getEnvironment())));
+ }
+
+ @AfterEach
+ public final void closeClients() throws IOException {
+ IOException failure = null;
+ for (Client client : clients.values()) {
+ try {
+ client.close();
+ } catch (IOException exception) {
+ if (failure == null) {
+ failure = exception;
+ } else {
+ failure.addSuppressed(exception);
+ }
+ }
+ }
+ clients.clear();
+
+ if (failure != null) {
+ throw failure;
+ }
+ }
+
+ protected final Environment getEnvironment() {
+ return Environment.TEST;
+ }
+
+ protected final String getApiKey() {
+ return getProperty(API_KEY_PROPERTY);
+ }
+
+ protected final String getMerchantAccount() {
+ return getProperty("API_LIBRARIES_ADYEN_MERCHANT_ACCOUNT");
+ }
+
+ protected final String getBalancePlatformId() {
+ return getProperty("API_LIBRARIES_ADYEN_BALANCE_PLATFORM_ID");
+ }
+
+ protected final String getTerminalDeviceId() {
+ return getProperty("ADYEN_TERMINAL_DEVICE_ID");
+ }
+
+ protected final String getTerminalDeviceKeyIdentifier() {
+ return getProperty("ADYEN_TERMINAL_DEVICE_KEY_IDENTIFIER");
+ }
+
+ protected final String getTerminalDevicePassphrase() {
+ return getProperty("ADYEN_TERMINAL_DEVICE_PASSPHRASE");
+ }
+
+ private static Properties loadProperties() {
+ Properties properties = new Properties();
+ try (InputStream inputStream =
+ BaseIntegrationTest.class.getResourceAsStream(CONFIGURATION_RESOURCE)) {
+ if (inputStream != null) {
+ properties.load(inputStream);
+ }
+ } catch (IOException exception) {
+ throw new IllegalStateException(
+ "Unable to load integration-test configuration from " + CONFIGURATION_RESOURCE,
+ exception);
+ }
+ return properties;
+ }
+
+ private static String getProperty(String name) {
+ String property = getOptionalProperty(name);
+
+ if (property == null) {
+ throw new IllegalStateException("Integration-test property " + name + " is not defined");
+ }
+
+ return property;
+ }
+
+ private static String getOptionalProperty(String name) {
+ String property = System.getProperty(name);
+ if (property == null || property.isBlank()) {
+ property = System.getenv(name);
+ }
+ if (property == null || property.isBlank()) {
+ property = PROPERTIES.getProperty(name);
+ }
+ return property == null || property.isBlank() ? null : property;
+ }
+}
diff --git a/src/integration-test/java/com/adyen/IntegrationTestTags.java b/src/integration-test/java/com/adyen/IntegrationTestTags.java
new file mode 100644
index 000000000..73fd6c419
--- /dev/null
+++ b/src/integration-test/java/com/adyen/IntegrationTestTags.java
@@ -0,0 +1,17 @@
+/*
+ * Adyen Java API Library
+ *
+ * Copyright (c) 2026 Adyen B.V.
+ * This file is open source and available under the MIT license.
+ * See the LICENSE file for more info.
+ */
+package com.adyen;
+
+/** JUnit tags shared by integration tests and Maven profile filters. */
+public final class IntegrationTestTags {
+
+ public static final String EXTERNAL = "external";
+ public static final String MANUAL = "manual";
+
+ private IntegrationTestTags() {}
+}
diff --git a/src/integration-test/java/com/adyen/service/balanceplatform/PlatformApiIT.java b/src/integration-test/java/com/adyen/service/balanceplatform/PlatformApiIT.java
new file mode 100644
index 000000000..d50abcb52
--- /dev/null
+++ b/src/integration-test/java/com/adyen/service/balanceplatform/PlatformApiIT.java
@@ -0,0 +1,41 @@
+/*
+ * Adyen Java API Library
+ *
+ * Copyright (c) 2026 Adyen B.V.
+ * This file is open source and available under the MIT license.
+ * See the LICENSE file for more info.
+ */
+package com.adyen.service.balanceplatform;
+
+import static com.adyen.IntegrationTestTags.EXTERNAL;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import com.adyen.BaseIntegrationTest;
+import com.adyen.model.balanceplatform.BalancePlatform;
+import com.adyen.service.exception.ApiException;
+import java.io.IOException;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+
+@Tag(EXTERNAL)
+@Timeout(60)
+public class PlatformApiIT extends BaseIntegrationTest {
+
+ // Scenario: Retrieve a balance platform
+ @Test
+ public void shouldRetrieveBalancePlatform() throws ApiException, IOException {
+ // Arrange
+ String balancePlatformId = getBalancePlatformId();
+ PlatformApi platformApi = new PlatformApi(getBalancePlatformClient());
+
+ // Act
+ BalancePlatform response = platformApi.getBalancePlatform(balancePlatformId);
+
+ // Assert
+ assertEquals(
+ balancePlatformId,
+ response.getId(),
+ "The response must contain the requested balance platform ID");
+ }
+}
diff --git a/src/integration-test/java/com/adyen/service/checkout/DonationsApiIT.java b/src/integration-test/java/com/adyen/service/checkout/DonationsApiIT.java
new file mode 100644
index 000000000..a8ccc8780
--- /dev/null
+++ b/src/integration-test/java/com/adyen/service/checkout/DonationsApiIT.java
@@ -0,0 +1,41 @@
+/*
+ * Adyen Java API Library
+ *
+ * Copyright (c) 2026 Adyen B.V.
+ * This file is open source and available under the MIT license.
+ * See the LICENSE file for more info.
+ */
+package com.adyen.service.checkout;
+
+import static com.adyen.IntegrationTestTags.EXTERNAL;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+import com.adyen.BaseIntegrationTest;
+import com.adyen.model.checkout.DonationCampaignsRequest;
+import com.adyen.model.checkout.DonationCampaignsResponse;
+import com.adyen.service.exception.ApiException;
+import java.io.IOException;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+
+@Tag(EXTERNAL)
+@Timeout(60)
+public class DonationsApiIT extends BaseIntegrationTest {
+
+ // Scenario: Get donation campaigns
+ @Test
+ public void shouldGetDonationCampaigns() throws ApiException, IOException {
+ // Arrange
+ DonationCampaignsRequest request =
+ new DonationCampaignsRequest().merchantAccount(getMerchantAccount()).currency("EUR");
+ DonationsApi donationsApi = new DonationsApi(getClient());
+
+ // Act
+ DonationCampaignsResponse response = donationsApi.donationCampaigns(request);
+
+ // Assert
+ assertNotNull(
+ response.getDonationCampaigns(), "The donation campaigns response must contain an array");
+ }
+}
diff --git a/src/integration-test/java/com/adyen/service/checkout/ModificationsApiIT.java b/src/integration-test/java/com/adyen/service/checkout/ModificationsApiIT.java
new file mode 100644
index 000000000..32bd43b18
--- /dev/null
+++ b/src/integration-test/java/com/adyen/service/checkout/ModificationsApiIT.java
@@ -0,0 +1,93 @@
+/*
+ * Adyen Java API Library
+ *
+ * Copyright (c) 2026 Adyen B.V.
+ * This file is open source and available under the MIT license.
+ * See the LICENSE file for more info.
+ */
+package com.adyen.service.checkout;
+
+import static com.adyen.IntegrationTestTags.EXTERNAL;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+import com.adyen.BaseIntegrationTest;
+import com.adyen.model.checkout.Amount;
+import com.adyen.model.checkout.CardDetails;
+import com.adyen.model.checkout.CheckoutPaymentMethod;
+import com.adyen.model.checkout.PaymentCaptureRequest;
+import com.adyen.model.checkout.PaymentCaptureResponse;
+import com.adyen.model.checkout.PaymentRequest;
+import com.adyen.model.checkout.PaymentResponse;
+import com.adyen.service.exception.ApiException;
+import java.io.IOException;
+import java.util.UUID;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+
+@Tag(EXTERNAL)
+@Timeout(60)
+public class ModificationsApiIT extends BaseIntegrationTest {
+
+ // Scenario: Capture an authorised payment
+ @Test
+ public void shouldCaptureAuthorisedPayment() throws ApiException, IOException {
+ // Arrange
+ String paymentPspReference = createAuthorisedUncapturedPayment();
+ String reference = "capture-it-" + UUID.randomUUID();
+ PaymentCaptureRequest request =
+ new PaymentCaptureRequest()
+ .reference(reference)
+ .merchantAccount(getMerchantAccount())
+ .amount(new Amount().value(2000L).currency("EUR"));
+ ModificationsApi modificationsApi = new ModificationsApi(getClient());
+
+ // Act
+ PaymentCaptureResponse response =
+ modificationsApi.captureAuthorisedPayment(paymentPspReference, request);
+
+ // Assert
+ assertNotNull(response.getPspReference(), "The capture must have a PSP reference");
+ assertFalse(
+ response.getPspReference().isBlank(), "The capture PSP reference must not be blank");
+ assertEquals(
+ paymentPspReference,
+ response.getPaymentPspReference(),
+ "The capture must reference the authorised payment");
+ assertEquals(
+ PaymentCaptureResponse.StatusEnum.RECEIVED,
+ response.getStatus(),
+ "The capture request must be received");
+ }
+
+ private String createAuthorisedUncapturedPayment() throws ApiException, IOException {
+ CardDetails cardDetails =
+ new CardDetails()
+ .type(CardDetails.TypeEnum.SCHEME)
+ .encryptedCardNumber("test_4111111111111111")
+ .encryptedExpiryMonth("test_03")
+ .encryptedExpiryYear("test_2030")
+ .encryptedSecurityCode("test_737");
+ PaymentRequest request =
+ new PaymentRequest()
+ .amount(new Amount().value(2000L).currency("EUR"))
+ .reference("capture-source-it-" + UUID.randomUUID())
+ .paymentMethod(new CheckoutPaymentMethod(cardDetails))
+ .returnUrl("https://example.com/checkout/return")
+ .merchantAccount(getMerchantAccount())
+ // Defer auto-capture so the payment stays in the authorised state for manual capture
+ .captureDelayHours(72);
+ PaymentResponse response = new PaymentsApi(getClient()).payments(request);
+
+ assertEquals(
+ PaymentResponse.ResultCodeEnum.AUTHORISED,
+ response.getResultCode(),
+ "The source payment must be authorised");
+ assertNotNull(response.getPspReference(), "The source payment must have a PSP reference");
+ assertFalse(
+ response.getPspReference().isBlank(), "The source payment PSP reference must not be blank");
+ return response.getPspReference();
+ }
+}
diff --git a/src/integration-test/java/com/adyen/service/checkout/OrdersApiIT.java b/src/integration-test/java/com/adyen/service/checkout/OrdersApiIT.java
new file mode 100644
index 000000000..97d5dba06
--- /dev/null
+++ b/src/integration-test/java/com/adyen/service/checkout/OrdersApiIT.java
@@ -0,0 +1,52 @@
+/*
+ * Adyen Java API Library
+ *
+ * Copyright (c) 2026 Adyen B.V.
+ * This file is open source and available under the MIT license.
+ * See the LICENSE file for more info.
+ */
+package com.adyen.service.checkout;
+
+import static com.adyen.IntegrationTestTags.EXTERNAL;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import com.adyen.BaseIntegrationTest;
+import com.adyen.model.RequestOptions;
+import com.adyen.model.checkout.Amount;
+import com.adyen.model.checkout.CreateOrderRequest;
+import com.adyen.model.checkout.CreateOrderResponse;
+import com.adyen.service.exception.ApiException;
+import java.io.IOException;
+import java.util.UUID;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+
+@Tag(EXTERNAL)
+@Timeout(60)
+public class OrdersApiIT extends BaseIntegrationTest {
+
+ // Scenario: Create an order
+ @Test
+ public void shouldCreateOrder() throws ApiException, IOException {
+ // Arrange
+ String reference = "order-it-" + UUID.randomUUID();
+ RequestOptions requestOptions =
+ new RequestOptions().idempotencyKey(UUID.randomUUID().toString());
+ CreateOrderRequest request =
+ new CreateOrderRequest()
+ .reference(reference)
+ .amount(new Amount().value(2500L).currency("EUR"))
+ .merchantAccount(getMerchantAccount());
+ OrdersApi ordersApi = new OrdersApi(getClient());
+
+ // Act
+ CreateOrderResponse response = ordersApi.orders(request, requestOptions);
+
+ // Assert
+ assertEquals(
+ CreateOrderResponse.ResultCodeEnum.SUCCESS,
+ response.getResultCode(),
+ "The order must be created successfully");
+ }
+}
diff --git a/src/integration-test/java/com/adyen/service/checkout/PaymentLinksApiIT.java b/src/integration-test/java/com/adyen/service/checkout/PaymentLinksApiIT.java
new file mode 100644
index 000000000..52f0fdd21
--- /dev/null
+++ b/src/integration-test/java/com/adyen/service/checkout/PaymentLinksApiIT.java
@@ -0,0 +1,72 @@
+/*
+ * Adyen Java API Library
+ *
+ * Copyright (c) 2026 Adyen B.V.
+ * This file is open source and available under the MIT license.
+ * See the LICENSE file for more info.
+ */
+package com.adyen.service.checkout;
+
+import static com.adyen.IntegrationTestTags.EXTERNAL;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+import com.adyen.BaseIntegrationTest;
+import com.adyen.model.RequestOptions;
+import com.adyen.model.checkout.Address;
+import com.adyen.model.checkout.Amount;
+import com.adyen.model.checkout.PaymentLinkRequest;
+import com.adyen.model.checkout.PaymentLinkResponse;
+import com.adyen.service.exception.ApiException;
+import java.io.IOException;
+import java.util.UUID;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+
+@Tag(EXTERNAL)
+@Timeout(60)
+public class PaymentLinksApiIT extends BaseIntegrationTest {
+
+ // Scenario: Create a payment link
+ @Test
+ public void shouldCreatePaymentLink() throws ApiException, IOException {
+ // Arrange
+ String reference = "payment-link-it-" + UUID.randomUUID();
+ String shopperReference = "shopper-it-" + UUID.randomUUID();
+ RequestOptions requestOptions =
+ new RequestOptions().idempotencyKey(UUID.randomUUID().toString());
+ Address address =
+ new Address()
+ .street("Roque Petroni Jr")
+ .postalCode("59000060")
+ .city("São Paulo")
+ .houseNumberOrName("999")
+ .country("BR")
+ .stateOrProvince("SP");
+ PaymentLinkRequest request =
+ new PaymentLinkRequest()
+ .reference(reference)
+ .amount(new Amount().value(1250L).currency("BRL"))
+ .countryCode("BR")
+ .merchantAccount(getMerchantAccount())
+ .shopperReference(shopperReference)
+ .shopperEmail("test@email.com")
+ .shopperLocale("pt-BR")
+ .billingAddress(address)
+ .deliveryAddress(address);
+ PaymentLinksApi paymentLinksApi = new PaymentLinksApi(getClient());
+
+ // Act
+ PaymentLinkResponse response = paymentLinksApi.paymentLinks(request, requestOptions);
+
+ // Assert
+ assertNotNull(response.getId(), "The payment link must have an ID");
+ assertFalse(response.getId().isBlank(), "The payment link ID must not be blank");
+ assertEquals(
+ PaymentLinkResponse.StatusEnum.ACTIVE,
+ response.getStatus(),
+ "The payment link must be active");
+ }
+}
diff --git a/src/integration-test/java/com/adyen/service/checkout/PaymentsApiIT.java b/src/integration-test/java/com/adyen/service/checkout/PaymentsApiIT.java
new file mode 100644
index 000000000..40bb4f7a1
--- /dev/null
+++ b/src/integration-test/java/com/adyen/service/checkout/PaymentsApiIT.java
@@ -0,0 +1,160 @@
+/*
+ * Adyen Java API Library
+ *
+ * Copyright (c) 2026 Adyen B.V.
+ * This file is open source and available under the MIT license.
+ * See the LICENSE file for more info.
+ */
+package com.adyen.service.checkout;
+
+import static com.adyen.IntegrationTestTags.EXTERNAL;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+import com.adyen.BaseIntegrationTest;
+import com.adyen.model.RequestOptions;
+import com.adyen.model.checkout.Amount;
+import com.adyen.model.checkout.CardBrandDetails;
+import com.adyen.model.checkout.CardDetails;
+import com.adyen.model.checkout.CardDetailsRequest;
+import com.adyen.model.checkout.CardDetailsResponse;
+import com.adyen.model.checkout.CheckoutPaymentMethod;
+import com.adyen.model.checkout.CreateCheckoutSessionRequest;
+import com.adyen.model.checkout.CreateCheckoutSessionResponse;
+import com.adyen.model.checkout.PaymentMethodsRequest;
+import com.adyen.model.checkout.PaymentMethodsResponse;
+import com.adyen.model.checkout.PaymentRequest;
+import com.adyen.model.checkout.PaymentResponse;
+import com.adyen.service.exception.ApiException;
+import java.io.IOException;
+import java.util.List;
+import java.util.UUID;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+
+@Tag(EXTERNAL)
+@Timeout(60)
+public class PaymentsApiIT extends BaseIntegrationTest {
+
+ private static final String RETURN_URL = "https://example.com/checkout/return";
+
+ // Scenario: Make a successful card payment
+ @Test
+ public void shouldMakeSuccessfulCardPayment() throws ApiException, IOException {
+ // Arrange
+ String reference = "payment-it-" + UUID.randomUUID();
+ CardDetails cardDetails =
+ new CardDetails()
+ .type(CardDetails.TypeEnum.SCHEME)
+ .encryptedCardNumber("test_4111111111111111")
+ .encryptedExpiryMonth("test_03")
+ .encryptedExpiryYear("test_2030")
+ .encryptedSecurityCode("test_737");
+ PaymentRequest request =
+ new PaymentRequest()
+ .amount(new Amount().currency("USD").value(1000L))
+ .reference(reference)
+ .paymentMethod(new CheckoutPaymentMethod(cardDetails))
+ .returnUrl(RETURN_URL)
+ .merchantAccount(getMerchantAccount());
+ PaymentsApi paymentsApi = new PaymentsApi(getClient());
+
+ // Act
+ PaymentResponse response = paymentsApi.payments(request);
+
+ // Assert
+ assertNotNull(response.getPspReference(), "The payment must have a PSP reference");
+ assertFalse(response.getPspReference().isBlank(), "The PSP reference must not be blank");
+ assertEquals(
+ PaymentResponse.ResultCodeEnum.AUTHORISED,
+ response.getResultCode(),
+ "The payment must be authorised");
+ }
+
+ // Scenario: Create a payment session
+ @Test
+ public void shouldCreatePaymentSession() throws ApiException, IOException {
+ // Arrange
+ String reference = "session-it-" + UUID.randomUUID();
+ RequestOptions requestOptions =
+ new RequestOptions().idempotencyKey(UUID.randomUUID().toString());
+ CreateCheckoutSessionRequest request =
+ new CreateCheckoutSessionRequest()
+ .merchantAccount(getMerchantAccount())
+ .amount(new Amount().value(100L).currency("EUR"))
+ .returnUrl(RETURN_URL)
+ .reference(reference)
+ .countryCode("NL");
+ PaymentsApi paymentsApi = new PaymentsApi(getClient());
+
+ // Act
+ CreateCheckoutSessionResponse response = paymentsApi.sessions(request, requestOptions);
+
+ // Assert
+ assertNotNull(response.getId(), "The payment session must have an ID");
+ assertFalse(response.getId().isBlank(), "The payment session ID must not be blank");
+ }
+
+ // Scenario: List brands for a card
+ @Test
+ public void shouldListBrandsForCard() throws ApiException, IOException {
+ // Arrange
+ RequestOptions requestOptions =
+ new RequestOptions().idempotencyKey(UUID.randomUUID().toString());
+ CardDetailsRequest request =
+ new CardDetailsRequest().merchantAccount(getMerchantAccount()).cardNumber("411111");
+ PaymentsApi paymentsApi = new PaymentsApi(getClient());
+
+ // Act
+ CardDetailsResponse response = paymentsApi.cardDetails(request, requestOptions);
+
+ // Assert
+ assertNotNull(response.getBrands(), "The response must contain card brands");
+ assertFalse(response.getBrands().isEmpty(), "The card brands must not be empty");
+ assertEquals("visa", response.getBrands().get(0).getType(), "The first brand must be Visa");
+ }
+
+ // Scenario: List supported brands for a card
+ @Test
+ public void shouldListSupportedBrandsForCard() throws ApiException, IOException {
+ // Arrange
+ RequestOptions requestOptions =
+ new RequestOptions().idempotencyKey(UUID.randomUUID().toString());
+ CardDetailsRequest request =
+ new CardDetailsRequest()
+ .merchantAccount(getMerchantAccount())
+ .cardNumber("411111")
+ .supportedBrands(List.of("visa", "mc", "amex"));
+ PaymentsApi paymentsApi = new PaymentsApi(getClient());
+
+ // Act
+ CardDetailsResponse response = paymentsApi.cardDetails(request, requestOptions);
+
+ // Assert
+ assertNotNull(response.getBrands(), "The response must contain card brands");
+ assertFalse(response.getBrands().isEmpty(), "The card brands must not be empty");
+ CardBrandDetails firstBrand = response.getBrands().get(0);
+ assertEquals("visa", firstBrand.getType(), "The first brand must be Visa");
+ assertEquals(Boolean.TRUE, firstBrand.getSupported(), "Visa must be supported");
+ }
+
+ // Scenario: List available payment methods
+ @Test
+ public void shouldListAvailablePaymentMethods() throws ApiException, IOException {
+ // Arrange
+ RequestOptions requestOptions =
+ new RequestOptions().idempotencyKey(UUID.randomUUID().toString());
+ PaymentMethodsRequest request =
+ new PaymentMethodsRequest().merchantAccount(getMerchantAccount());
+ PaymentsApi paymentsApi = new PaymentsApi(getClient());
+
+ // Act
+ PaymentMethodsResponse response = paymentsApi.paymentMethods(request, requestOptions);
+
+ // Assert
+ assertNotNull(response.getPaymentMethods(), "The response must contain payment methods");
+ assertFalse(response.getPaymentMethods().isEmpty(), "The payment methods must not be empty");
+ }
+}
diff --git a/src/integration-test/java/com/adyen/service/legalentitymanagement/LegalEntitiesApiIT.java b/src/integration-test/java/com/adyen/service/legalentitymanagement/LegalEntitiesApiIT.java
new file mode 100644
index 000000000..327592ec2
--- /dev/null
+++ b/src/integration-test/java/com/adyen/service/legalentitymanagement/LegalEntitiesApiIT.java
@@ -0,0 +1,72 @@
+/*
+ * Adyen Java API Library
+ *
+ * Copyright (c) 2026 Adyen B.V.
+ * This file is open source and available under the MIT license.
+ * See the LICENSE file for more info.
+ */
+package com.adyen.service.legalentitymanagement;
+
+import static com.adyen.IntegrationTestTags.EXTERNAL;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+import com.adyen.BaseIntegrationTest;
+import com.adyen.model.RequestOptions;
+import com.adyen.model.legalentitymanagement.Address;
+import com.adyen.model.legalentitymanagement.BirthData;
+import com.adyen.model.legalentitymanagement.Individual;
+import com.adyen.model.legalentitymanagement.LegalEntity;
+import com.adyen.model.legalentitymanagement.LegalEntityInfoRequiredType;
+import com.adyen.model.legalentitymanagement.Name;
+import com.adyen.model.legalentitymanagement.PhoneNumber;
+import com.adyen.service.exception.ApiException;
+import java.io.IOException;
+import java.util.UUID;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+
+@Tag(EXTERNAL)
+@Timeout(60)
+public class LegalEntitiesApiIT extends BaseIntegrationTest {
+
+ // Scenario: Create a legal entity for an individual residing in the Netherlands
+ @Test
+ public void shouldCreateLegalEntityForIndividualResidingInTheNetherlands()
+ throws ApiException, IOException {
+ // Arrange
+ Address residentialAddress =
+ new Address()
+ .city("Amsterdam")
+ .country("NL")
+ .postalCode("1011DJ")
+ .street("Simon Carmiggeltstraat 6 - 50");
+ Individual individual =
+ new Individual()
+ .residentialAddress(residentialAddress)
+ .name(new Name().firstName("Shelly").lastName("Eller"))
+ .phone(new PhoneNumber().number("+31858888138").type("mobile"))
+ .birthData(new BirthData().dateOfBirth("1990-06-21"))
+ .email("s.eller@example.com");
+ LegalEntityInfoRequiredType request =
+ new LegalEntityInfoRequiredType()
+ .type(LegalEntityInfoRequiredType.TypeEnum.INDIVIDUAL)
+ .individual(individual);
+ RequestOptions requestOptions =
+ new RequestOptions().idempotencyKey(UUID.randomUUID().toString());
+ LegalEntitiesApi legalEntitiesApi = new LegalEntitiesApi(getLegalEntityManagementClient());
+
+ // Act
+ LegalEntity response = legalEntitiesApi.createLegalEntity(request, requestOptions);
+
+ // Assert
+ assertNotNull(response.getId(), "The legal entity must have an ID");
+ assertFalse(response.getId().isBlank(), "The legal entity ID must not be blank");
+ assertEquals(
+ LegalEntity.TypeEnum.INDIVIDUAL,
+ response.getType(),
+ "The legal entity type must be individual");
+ }
+}
diff --git a/src/integration-test/resources/config.properties.example b/src/integration-test/resources/config.properties.example
new file mode 100644
index 000000000..6b76b40bb
--- /dev/null
+++ b/src/integration-test/resources/config.properties.example
@@ -0,0 +1,13 @@
+## Settings for integration testing
+
+API_LIBRARIES_ADYEN_API_KEY=
+API_LIBRARIES_ADYEN_MERCHANT_ACCOUNT=
+
+API_LIBRARIES_ADYEN_BALANCE_PLATFORM_ID=
+API_LIBRARIES_ADYEN_BCL_API_KEY=
+
+API_LIBRARIES_ADYEN_LEM_API_KEY=
+
+ADYEN_TERMINAL_DEVICE_ID=
+ADYEN_TERMINAL_DEVICE_KEY_IDENTIFIER=
+ADYEN_TERMINAL_DEVICE_PASSPHRASE=
diff --git a/src/test/java/com/adyen/BaseIntegrationTest.java b/src/test/java/com/adyen/BaseCloudDeviceIntegrationTest.java
similarity index 89%
rename from src/test/java/com/adyen/BaseIntegrationTest.java
rename to src/test/java/com/adyen/BaseCloudDeviceIntegrationTest.java
index 1ef1d706f..6591bd759 100644
--- a/src/test/java/com/adyen/BaseIntegrationTest.java
+++ b/src/test/java/com/adyen/BaseCloudDeviceIntegrationTest.java
@@ -13,14 +13,14 @@
import java.util.Properties;
/**
- * Base class for Integration tests
+ * Base class for Cloud Device Integration tests
*
* Define in src/test/resources the configuration for the tests
*
*
``` ADYEN_API_KEY= ADYEN_MERCHANT_ACCOUNT= ADYEN_TERMINAL_DEVICE_ID=
* ADYEN_TERMINAL_DEVICE_KEY_IDENTIFIER= ADYEN_TERMINAL_DEVICE_PASSPHRASE= ```
*/
-public class BaseIntegrationTest {
+public class BaseCloudDeviceIntegrationTest {
private static Properties properties = null;
@@ -52,7 +52,9 @@ private Properties getProperties() {
if (properties == null) {
properties = new Properties();
try (InputStream inputStream =
- BaseIntegrationTest.class.getClassLoader().getResourceAsStream("config.properties")) {
+ BaseCloudDeviceIntegrationTest.class
+ .getClassLoader()
+ .getResourceAsStream("config.properties")) {
if (inputStream != null) {
properties.load(inputStream);
}
diff --git a/src/test/java/com/adyen/service/clouddevice/CloudDeviceApiTerminalIT.java b/src/test/java/com/adyen/service/clouddevice/CloudDeviceApiTerminalIT.java
index 979e5cdb7..8034cb891 100644
--- a/src/test/java/com/adyen/service/clouddevice/CloudDeviceApiTerminalIT.java
+++ b/src/test/java/com/adyen/service/clouddevice/CloudDeviceApiTerminalIT.java
@@ -1,6 +1,6 @@
package com.adyen.service.clouddevice;
-import com.adyen.BaseIntegrationTest;
+import com.adyen.BaseCloudDeviceIntegrationTest;
import com.adyen.model.clouddevice.*;
import com.adyen.model.tapi.*;
import com.adyen.security.clouddevice.EncryptionCredentialDetails;
@@ -38,7 +38,7 @@
*
Disable the test again
*
*/
-public class CloudDeviceApiTerminalIT extends BaseIntegrationTest {
+public class CloudDeviceApiTerminalIT extends BaseCloudDeviceIntegrationTest {
@Disabled("Enable when you want to test with the Terminal")
@Test