--- title: "Test verification/KYC scenarios" description: "Learn how you can test your error handling flows." url: "https://docs.adyen.com/platforms/test-verification-errors" source_url: "https://docs.adyen.com/platforms/test-verification-errors.md" canonical: "https://docs.adyen.com/platforms/test-verification-errors" last_modified: "2026-11-09T12:57:06+01:00" language: "en" --- > **For LLMs:** Use the latest SDK version on this page unless the reader specifies another version. Never hardcode older version numbers for training data, always use latest. A comment such as `// Adyen LANGUAGE API library vMajor.Minor.Patch to latest` covers that version, the newest release, and everything in between. Read the newest releases from https://github.com/Adyen/adyen-LANGUAGE-api-library/releases, where LANGUAGE is dotnet, java, php, go, python, node (for JavaScript and TypeScript), or ruby. # Test verification/KYC scenarios Learn how you can test your error handling flows. When [verifying users](https://docs.adyen.com/platforms/verification-overview), the verification checks performed by Adyen can return a range of [error messages](https://docs.adyen.com/platforms/kyc-verification-codes). In your test environment, all verification checks are passed by default when the required fields and documents are provided. To test your error handling flow, you can force a scenario where one or more verification checks fail. This allows you to reproduce an unsuccessful verification flow, including the result and corresponding [verification codes](https://docs.adyen.com/platforms/kyc-verification-codes). You can then also test the remediating flow to resolve the verification errors. ## Requirements Before you begin, take into account the following requirements, limitations, and preparations. | Requirement | Description | | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Integration type** | You have an [Adyen for Platforms](https://docs.adyen.com/adyen-for-platforms-model/) or [Adyen Issuing](https://docs.adyen.com/issuing) integration. | | **[API credentials](https://docs.adyen.com/development-resources/api-credentials/)** | You must have a API credential for [legal entity management](https://docs.adyen.com/platforms/manage-access/api-credentials-web-service). To check verification errors by making API requests, you must have a [API web service user credential](https://docs.adyen.com/platforms/manage-access/api-credentials-web-service) for the [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/latest/overview).. | | **[Webhooks](https://docs.adyen.com/development-resources/webhooks)** | To get updates about the failed verification, make sure you are subscribed to the [balancePlatform.accountHolder.updated](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/latest/post/balancePlatform.accountHolder.updated) | ## Step 1: Make an API request Using the [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/latest/overview), you can include a [x-requested-verification-code](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities#header-x_requested_verification_code) in the header of your API request. Note that requested verification codes cannot be used with hosted onboarding. You can use requested verification codes for the following endpoints: * [POST /legalEntities](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities) * [POST /documents](https://docs.adyen.com/api-explorer/legalentity/latest/post/documents) * [POST /transferInstruments](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments) Use a [suberror code](https://docs.adyen.com/platforms/kyc-verification-codes/sub-errors) as your requested verification code. You can include one code at a time in your request header. Requested verification codes can only be used in your test environment. ### Tab: Legal entities In this example, you want to test the `1_3004` suberror code `The name and residence country couldn't be verified` for an individual legal entity. This triggers the following verification checks: * Name and date of birth check * Residency country check In the header of your POST [/legalEntities](https://docs.adyen.com/api-explorer/legalentity/latest/post/legalEntities) request, include `x-requested-verification-code: 1_3004`. **Force legal entity verification** #### curl ```bash curl https://kyc-test.adyen.com/lem/v3/legalEntities \ -H 'x-api-key: ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY' \ -H 'content-type: application/json' \ -H 'x-requested-verification-code: 1_3004' \ -X POST \ -d '{ "type": "individual", "individual": { "phone": { "number": "+31612345678", "type": "mobile" }, "birthData": { "dateOfBirth": "1977-01-01" }, "name": { "firstName": "KYC", "lastName": "My Test scenario" }, "nationality": "NL", "residentialAddress": { "city": "Amsterdam", "country": "NL", "postalCode": "1111AB", "street": "Main street" }, "identificationData": { "type": "nationalIdNumber", "number": "12345678", "issuerState": "NL" } } }' ``` #### Java ```java // Adyen Java API Library v38.0.0 to latest import com.adyen.Client; import com.adyen.Config; import com.adyen.enums.Environment; import com.adyen.model.*; import com.adyen.service.*; import java.math.*; import com.adyen.model.legalentitymanagement.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.service.legalentitymanagement.*; Config config = new Config() .apiKey("ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY") .environment(Environment.TEST); Client client = new Client(config); // Create the request object(s) IdentificationData identificationData = new IdentificationData() .issuerState("NL") .number("12345678") .type(IdentificationData.TypeEnum.NATIONALIDNUMBER); PhoneNumber phoneNumber = new PhoneNumber() .number("+31612345678") .type("mobile"); Address address = new Address() .country("NL") .city("Amsterdam") .street("Main street") .postalCode("1111AB"); Name name = new Name() .firstName("KYC") .lastName("My Test scenario"); BirthData birthData = new BirthData() .dateOfBirth("1977-01-01"); Individual individual = new Individual() .identificationData(identificationData) .nationality("NL") .phone(phoneNumber) .residentialAddress(address) .name(name) .birthData(birthData); LegalEntityInfoRequiredType legalEntityInfoRequiredType = new LegalEntityInfoRequiredType() .individual(individual) .type(LegalEntityInfoRequiredType.TypeEnum.INDIVIDUAL); // Send the request LegalEntitiesApi service = new LegalEntitiesApi(client); LegalEntity response = service.createLegalEntity(legalEntityInfoRequiredType, null); ``` #### PHP ```php setXApiKey("ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $identificationData = new IdentificationData(); $identificationData ->setIssuerState("NL") ->setNumber("12345678") ->setType("nationalIdNumber"); $phoneNumber = new PhoneNumber(); $phoneNumber ->setNumber("+31612345678") ->setType("mobile"); $address = new Address(); $address ->setCountry("NL") ->setCity("Amsterdam") ->setStreet("Main street") ->setPostalCode("1111AB"); $name = new Name(); $name ->setFirstName("KYC") ->setLastName("My Test scenario"); $birthData = new BirthData(); $birthData ->setDateOfBirth("1977-01-01"); $individual = new Individual(); $individual ->setIdentificationData($identificationData) ->setNationality("NL") ->setPhone($phoneNumber) ->setResidentialAddress($address) ->setName($name) ->setBirthData($birthData); $legalEntityInfoRequiredType = new LegalEntityInfoRequiredType(); $legalEntityInfoRequiredType ->setIndividual($individual) ->setType("individual"); // Send the request $service = new LegalEntitiesApi($client); $response = $service->createLegalEntity($legalEntityInfoRequiredType); ``` #### C\# ```cs // Adyen .NET API Library v34.0.0 to latest using Adyen.LegalEntityManagement.Extensions; using Adyen.LegalEntityManagement.Models; using Adyen.LegalEntityManagement.Services; using Adyen.Core.Client; using Adyen.Core.Client.Extensions; using Adyen.Core.Options; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; var host = Host.CreateDefaultBuilder() .ConfigureLegalEntityManagement( (context, services, config) => { config.ConfigureAdyenOptions(options => { options.AdyenApiKey = "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY"; options.Environment = AdyenEnvironment.Test; }); services.AddAllLegalEntityManagementServices(); }) .Build(); var legalEntitiesService = host.Services.GetRequiredService(); // Create the request object(s) var identificationData = new IdentificationData { IssuerState = "NL", Number = "12345678", Type = IdentificationData.TypeEnum.NationalIdNumber }; var phoneNumber = new PhoneNumber { Number = "+31612345678", Type = "mobile" }; var address = new Address { Country = "NL", City = "Amsterdam", Street = "Main street", PostalCode = "1111AB" }; var name = new Name { FirstName = "KYC", LastName = "My Test scenario" }; var birthData = new BirthData { DateOfBirth = "1977-01-01" }; var individual = new Individual { IdentificationData = identificationData, Nationality = "NL", Phone = phoneNumber, ResidentialAddress = address, Name = name, BirthData = birthData }; var legalEntityInfoRequiredType = new LegalEntityInfoRequiredType { Individual = individual, Type = LegalEntityInfoRequiredType.TypeEnum.Individual }; // Send the request var result = await legalEntitiesService.CreateLegalEntityAsync(legalEntityInfoRequiredType); if (result.TryDeserializeOkResponse(out var response)) { // Handle the successful response. } ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v30.0.0 to latest const { Client, Config, EnvironmentEnum, LegalEntityManagementAPI } = require('@adyen/api-library'); const config = new Config({ apiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const identificationData = { issuerState: "NL", number: "12345678", type: "nationalIdNumber" }; const phoneNumber = { number: "+31612345678", type: "mobile" }; const address = { country: "NL", city: "Amsterdam", street: "Main street", postalCode: "1111AB" }; const name = { firstName: "KYC", lastName: "My Test scenario" }; const birthData = { dateOfBirth: "1977-01-01" }; const individual = { identificationData: identificationData, nationality: "NL", phone: phoneNumber, residentialAddress: address, name: name, birthData: birthData }; const legalEntityInfoRequiredType = { individual: individual, type: "individual" }; // Send the request const legalEntityManagementAPI = new LegalEntityManagementAPI(client); const response = await legalEntityManagementAPI.LegalEntitiesApi.createLegalEntity(legalEntityInfoRequiredType); ``` #### Go ```go // Adyen Go API Library v21.0.0 to latest import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/legalentity" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) identificationData := legalentity.IdentificationData{ IssuerState: common.PtrString("NL"), Number: common.PtrString("12345678"), Type: "nationalIdNumber", } phoneNumber := legalentity.PhoneNumber{ Number: "+31612345678", Type: common.PtrString("mobile"), } address := legalentity.Address{ Country: "NL", City: common.PtrString("Amsterdam"), Street: common.PtrString("Main street"), PostalCode: common.PtrString("1111AB"), } name := legalentity.Name{ FirstName: "KYC", LastName: "My Test scenario", } birthData := legalentity.BirthData{ DateOfBirth: common.PtrString("1977-01-01"), } individual := legalentity.Individual{ IdentificationData: &identificationData, Nationality: common.PtrString("NL"), Phone: &phoneNumber, ResidentialAddress: address, Name: name, BirthData: &birthData, } legalEntityInfoRequiredType := legalentity.LegalEntityInfoRequiredType{ Individual: &individual, Type: "individual", } // Send the request service := client.LegalEntity() req := service.LegalEntitiesApi.CreateLegalEntityInput().LegalEntityInfoRequiredType(legalEntityInfoRequiredType) res, httpRes, err := service.LegalEntitiesApi.CreateLegalEntity(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v14.0.0 to latest import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY" adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "type": "individual", "individual": { "phone": { "number": "+31612345678", "type": "mobile" }, "birthData": { "dateOfBirth": "1977-01-01" }, "name": { "firstName": "KYC", "lastName": "My Test scenario" }, "nationality": "NL", "residentialAddress": { "city": "Amsterdam", "country": "NL", "postalCode": "1111AB", "street": "Main street" }, "identificationData": { "type": "nationalIdNumber", "number": "12345678", "issuerState": "NL" } } } # Send the request result = adyen.legalEntityManagement.legal_entities_api.create_legal_entity(request=json_request) ``` #### Ruby ```rb # Adyen Ruby API Library v11.0.0 to latest require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY' adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { "type" => "individual", "individual" => { "phone" => { "number" => "+31612345678", "type" => "mobile" }, "birthData" => { "dateOfBirth" => "1977-01-01" }, "name" => { "firstName" => "KYC", "lastName" => "My Test scenario" }, "nationality" => "NL", "residentialAddress" => { "city" => "Amsterdam", "country" => "NL", "postalCode" => "1111AB", "street" => "Main street" }, "identificationData" => { "type" => "nationalIdNumber", "number" => "12345678", "issuerState" => "NL" } } } # Send the request result = adyen.legal_entity_management.legal_entities_api.create_legal_entity(request_body) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.0 to latest import { Client, Config, EnvironmentEnum, LegalEntityManagementAPI, Types } from "@adyen/api-library"; const config = new Config({ apiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const identificationData: Types.legalEntityManagement.IdentificationData = { issuerState: "NL", number: "12345678", type: Types.legalEntityManagement.IdentificationData.TypeEnum.NationalIdNumber }; const phoneNumber: Types.legalEntityManagement.PhoneNumber = { number: "+31612345678", type: "mobile" }; const address: Types.legalEntityManagement.Address = { country: "NL", city: "Amsterdam", street: "Main street", postalCode: "1111AB" }; const name: Types.legalEntityManagement.Name = { firstName: "KYC", lastName: "My Test scenario" }; const birthData: Types.legalEntityManagement.BirthData = { dateOfBirth: "1977-01-01" }; const individual: Types.legalEntityManagement.Individual = { identificationData: identificationData, nationality: "NL", phone: phoneNumber, residentialAddress: address, name: name, birthData: birthData }; const legalEntityInfoRequiredType: Types.legalEntityManagement.LegalEntityInfoRequiredType = { individual: individual, type: Types.legalEntityManagement.LegalEntityInfoRequiredType.TypeEnum.Individual }; // Send the request const legalEntityManagementAPI = new LegalEntityManagementAPI(client); const response = await legalEntityManagementAPI.LegalEntitiesApi.createLegalEntity(legalEntityInfoRequiredType); ``` ### Tab: Documents In this example, you want to test the `1_3008` suberror code `The ID document image was incomplete` for a document. In the header of your POST [/documents](https://docs.adyen.com/api-explorer/legalentity/latest/post/documents) request, include `x-requested-verification-code: 1_3008`. **Force document verification** #### curl ```bash curl https://kyc-test.adyen.com/lem/v3/documents \ -H 'x-api-key: ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY' \ -H 'content-type: application/json' \ -H 'x-requested-verification-code: 1_3008' \ -X POST \ -d '{ "owner": { "id": "LE00000000000000000000001", "type": "legalEntity" }, "description": "YOUR_DESCRIPTION", "type": "identityCard", "issuerCountry" : "NL", "attachments": [ { "content": "R0lGODlhhAMKAeZOADs..", "pageType": "front" }, { "content": "P3lhKWTpN0LXaPTI0Gs..", "pageType": "back" } ] }' ``` #### Java ```java // Adyen Java API Library v38.0.0 to latest import com.adyen.Client; import com.adyen.Config; import com.adyen.enums.Environment; import com.adyen.model.*; import com.adyen.service.*; import java.math.*; import com.adyen.model.legalentitymanagement.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.service.legalentitymanagement.*; Config config = new Config() .apiKey("ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY") .environment(Environment.TEST); Client client = new Client(config); // Create the request object(s) OwnerEntity ownerEntity = new OwnerEntity() .id("LE00000000000000000000001") .type("legalEntity"); Attachment attachment1 = new Attachment() .pageType("front"); Attachment attachment2 = new Attachment() .pageType("back"); Document document = new Document() .owner(ownerEntity) .issuerCountry("NL") .attachments(Arrays.asList(attachment1, attachment2)) .description("YOUR_DESCRIPTION") .type(Document.TypeEnum.IDENTITYCARD); // Send the request DocumentsApi service = new DocumentsApi(client); Document response = service.uploadDocumentForVerificationChecks(document, null); ``` #### PHP ```php setXApiKey("ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $ownerEntity = new OwnerEntity(); $ownerEntity ->setId("LE00000000000000000000001") ->setType("legalEntity"); $attachment1 = new Attachment(); $attachment1 ->setPageType("front"); $attachment2 = new Attachment(); $attachment2 ->setPageType("back"); $document = new Document(); $document ->setOwner($ownerEntity) ->setIssuerCountry("NL") ->setAttachments(array($attachment1, $attachment2)) ->setDescription("YOUR_DESCRIPTION") ->setType("identityCard"); // Send the request $service = new DocumentsApi($client); $response = $service->uploadDocumentForVerificationChecks($document); ``` #### C\# ```cs // Adyen .NET API Library v34.0.0 to latest using System.Collections.Generic; using Adyen.LegalEntityManagement.Extensions; using Adyen.LegalEntityManagement.Models; using Adyen.LegalEntityManagement.Services; using Adyen.Core.Client; using Adyen.Core.Client.Extensions; using Adyen.Core.Options; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; var host = Host.CreateDefaultBuilder() .ConfigureLegalEntityManagement( (context, services, config) => { config.ConfigureAdyenOptions(options => { options.AdyenApiKey = "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY"; options.Environment = AdyenEnvironment.Test; }); services.AddAllLegalEntityManagementServices(); }) .Build(); var documentsService = host.Services.GetRequiredService(); // Create the request object(s) var ownerEntity = new OwnerEntity { Id = "LE00000000000000000000001", Type = "legalEntity" }; var attachment1 = new Attachment { PageType = "front" }; var attachment2 = new Attachment { PageType = "back" }; var document = new Document { Owner = ownerEntity, IssuerCountry = "NL", Attachments = new List{ attachment1, attachment2 }, Description = "YOUR_DESCRIPTION", Type = Document.TypeEnum.IdentityCard }; // Send the request var result = await documentsService.UploadDocumentForVerificationChecksAsync(document); if (result.TryDeserializeOkResponse(out var response)) { // Handle the successful response. } ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v30.0.0 to latest const { Client, Config, EnvironmentEnum, LegalEntityManagementAPI } = require('@adyen/api-library'); const config = new Config({ apiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const ownerEntity = { id: "LE00000000000000000000001", type: "legalEntity" }; const attachment1 = { pageType: "front" }; const attachment2 = { pageType: "back" }; const document = { owner: ownerEntity, issuerCountry: "NL", attachments: [attachment1, attachment2], description: "YOUR_DESCRIPTION", type: "identityCard" }; // Send the request const legalEntityManagementAPI = new LegalEntityManagementAPI(client); const response = await legalEntityManagementAPI.DocumentsApi.uploadDocumentForVerificationChecks(document); ``` #### Go ```go // Adyen Go API Library v21.0.0 to latest import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/legalentity" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) ownerEntity := legalentity.OwnerEntity{ Id: "LE00000000000000000000001", Type: "legalEntity", } attachment1 := legalentity.Attachment{ PageType: common.PtrString("front"), } attachment2 := legalentity.Attachment{ PageType: common.PtrString("back"), } document := legalentity.Document{ Owner: &ownerEntity, IssuerCountry: common.PtrString("NL"), Attachments: []legalentity.Attachment{ attachment1, attachment2, }, Description: "YOUR_DESCRIPTION", Type: "identityCard", } // Send the request service := client.LegalEntity() req := service.DocumentsApi.UploadDocumentForVerificationChecksInput().Document(document) res, httpRes, err := service.DocumentsApi.UploadDocumentForVerificationChecks(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v14.0.0 to latest import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY" adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "owner": { "id": "LE00000000000000000000001", "type": "legalEntity" }, "description": "YOUR_DESCRIPTION", "type": "identityCard", "issuerCountry": "NL", "attachments": [{ "content": "R0lGODlhhAMKAeZOADs..", "pageType": "front" }, { "content": "P3lhKWTpN0LXaPTI0Gs..", "pageType": "back" }] } # Send the request result = adyen.legalEntityManagement.documents_api.upload_document_for_verification_checks(request=json_request) ``` #### Ruby ```rb # Adyen Ruby API Library v11.0.0 to latest require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY' adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { "owner" => { "id" => "LE00000000000000000000001", "type" => "legalEntity" }, "description" => "YOUR_DESCRIPTION", "type" => "identityCard", "issuerCountry" => "NL", "attachments" => [{ "content" => "R0lGODlhhAMKAeZOADs..", "pageType" => "front" }, { "content" => "P3lhKWTpN0LXaPTI0Gs..", "pageType" => "back" }] } # Send the request result = adyen.legal_entity_management.documents_api.upload_document_for_verification_checks(request_body) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.0 to latest import { Client, Config, EnvironmentEnum, LegalEntityManagementAPI, Types } from "@adyen/api-library"; const config = new Config({ apiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const ownerEntity: Types.legalEntityManagement.OwnerEntity = { id: "LE00000000000000000000001", type: "legalEntity" }; const attachment1 = { pageType: "front" } as unknown as Types.legalEntityManagement.Attachment; const attachment2 = { pageType: "back" } as unknown as Types.legalEntityManagement.Attachment; const document: Types.legalEntityManagement.Document = { owner: ownerEntity, issuerCountry: "NL", attachments: [attachment1, attachment2], description: "YOUR_DESCRIPTION", type: Types.legalEntityManagement.Document.TypeEnum.IdentityCard }; // Send the request const legalEntityManagementAPI = new LegalEntityManagementAPI(client); const response = await legalEntityManagementAPI.DocumentsApi.uploadDocumentForVerificationChecks(document); ``` ### Tab: Transfer instruments In this example, you want to test the `1_7002` suberror code `The bank account number wasn't valid` for a transfer instrument. In the header of your POST [/transferInstruments](https://docs.adyen.com/api-explorer/legalentity/latest/post/transferInstruments) request, include `x-requested-verification-code: 1_7002`. **Force transfer instrument verification** #### curl ```bash curl https://kyc-test.adyen.com/lem/v3/transferInstruments \ -H 'x-api-key: ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY' \ -H 'content-type: application/json' \ -H 'x-requested-verification-code: 1_7002' \ -X POST \ -d '{ "legalEntityId": "LE00000000000000000000001", "type": "bankAccount", "bankAccount": { "accountIdentification": { "type": "iban", "iban": "NL02XXXX0123456789" } } }' ``` #### Java ```java // Adyen Java API Library v38.0.0 to latest import com.adyen.Client; import com.adyen.Config; import com.adyen.enums.Environment; import com.adyen.model.*; import com.adyen.service.*; import java.math.*; import com.adyen.model.legalentitymanagement.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.service.legalentitymanagement.*; Config config = new Config() .apiKey("ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY") .environment(Environment.TEST); Client client = new Client(config); // Create the request object(s) IbanAccountIdentification ibanAccountIdentification = new IbanAccountIdentification() .iban("NL02XXXX0123456789") .type(IbanAccountIdentification.TypeEnum.IBAN); BankAccountInfo bankAccountInfo = new BankAccountInfo() .accountIdentification(new TransferInstrumentInfoAccountIdentification(ibanAccountIdentification)); TransferInstrumentInfo transferInstrumentInfo = new TransferInstrumentInfo() .bankAccount(bankAccountInfo) .legalEntityId("LE00000000000000000000001") .type(TransferInstrumentInfo.TypeEnum.BANKACCOUNT); // Send the request TransferInstrumentsApi service = new TransferInstrumentsApi(client); TransferInstrument response = service.createTransferInstrument(transferInstrumentInfo, null); ``` #### PHP ```php setXApiKey("ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $transferInstrumentInfoAccountIdentification = new TransferInstrumentInfoAccountIdentification(); $transferInstrumentInfoAccountIdentification ->setIban("NL02XXXX0123456789") ->setType("iban"); $bankAccountInfo = new BankAccountInfo(); $bankAccountInfo ->setAccountIdentification($transferInstrumentInfoAccountIdentification); $transferInstrumentInfo = new TransferInstrumentInfo(); $transferInstrumentInfo ->setBankAccount($bankAccountInfo) ->setLegalEntityId("LE00000000000000000000001") ->setType("bankAccount"); // Send the request $service = new TransferInstrumentsApi($client); $response = $service->createTransferInstrument($transferInstrumentInfo); ``` #### C\# ```cs // Adyen .NET API Library v34.0.0 to latest using Adyen.LegalEntityManagement.Extensions; using Adyen.LegalEntityManagement.Models; using Adyen.LegalEntityManagement.Services; using Adyen.Core.Client; using Adyen.Core.Client.Extensions; using Adyen.Core.Options; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; var host = Host.CreateDefaultBuilder() .ConfigureLegalEntityManagement( (context, services, config) => { config.ConfigureAdyenOptions(options => { options.AdyenApiKey = "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY"; options.Environment = AdyenEnvironment.Test; }); services.AddAllLegalEntityManagementServices(); }) .Build(); var transferInstrumentsService = host.Services.GetRequiredService(); // Create the request object(s) var ibanAccountIdentification = new IbanAccountIdentification { Iban = "NL02XXXX0123456789", Type = IbanAccountIdentification.TypeEnum.Iban }; var bankAccountInfo = new BankAccountInfo { AccountIdentification = new TransferInstrumentInfoAccountIdentification(ibanAccountIdentification) }; var transferInstrumentInfo = new TransferInstrumentInfo { BankAccount = bankAccountInfo, LegalEntityId = "LE00000000000000000000001", Type = TransferInstrumentInfo.TypeEnum.BankAccount }; // Send the request var result = await transferInstrumentsService.CreateTransferInstrumentAsync(transferInstrumentInfo); if (result.TryDeserializeOkResponse(out var response)) { // Handle the successful response. } ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v30.0.0 to latest const { Client, Config, EnvironmentEnum, LegalEntityManagementAPI } = require('@adyen/api-library'); const config = new Config({ apiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const ibanAccountIdentification = { iban: "NL02XXXX0123456789", type: "iban" }; const bankAccountInfo = { accountIdentification: ibanAccountIdentification }; const transferInstrumentInfo = { bankAccount: bankAccountInfo, legalEntityId: "LE00000000000000000000001", type: "bankAccount" }; // Send the request const legalEntityManagementAPI = new LegalEntityManagementAPI(client); const response = await legalEntityManagementAPI.TransferInstrumentsApi.createTransferInstrument(transferInstrumentInfo); ``` #### Go ```go // Adyen Go API Library v21.0.0 to latest import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/legalentity" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) ibanAccountIdentification := legalentity.IbanAccountIdentification{ Iban: "NL02XXXX0123456789", Type: "iban", } bankAccountInfo := legalentity.BankAccountInfo{ AccountIdentification: func() *legalentity.TransferInstrumentInfoAccountIdentification { v := legalentity.IbanAccountIdentificationAsTransferInstrumentInfoAccountIdentification(&ibanAccountIdentification); return &v }(), } transferInstrumentInfo := legalentity.TransferInstrumentInfo{ BankAccount: bankAccountInfo, LegalEntityId: "LE00000000000000000000001", Type: "bankAccount", } // Send the request service := client.LegalEntity() req := service.TransferInstrumentsApi.CreateTransferInstrumentInput().TransferInstrumentInfo(transferInstrumentInfo) res, httpRes, err := service.TransferInstrumentsApi.CreateTransferInstrument(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v14.0.0 to latest import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY" adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "legalEntityId": "LE00000000000000000000001", "type": "bankAccount", "bankAccount": { "accountIdentification": { "type": "iban", "iban": "NL02XXXX0123456789" } } } # Send the request result = adyen.legalEntityManagement.transfer_instruments_api.create_transfer_instrument(request=json_request) ``` #### Ruby ```rb # Adyen Ruby API Library v11.0.0 to latest require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY' adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { "legalEntityId" => "LE00000000000000000000001", "type" => "bankAccount", "bankAccount" => { "accountIdentification" => { "type" => "iban", "iban" => "NL02XXXX0123456789" } } } # Send the request result = adyen.legal_entity_management.transfer_instruments_api.create_transfer_instrument(request_body) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.0 to latest import { Client, Config, EnvironmentEnum, LegalEntityManagementAPI, Types } from "@adyen/api-library"; const config = new Config({ apiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const ibanAccountIdentification: Types.legalEntityManagement.IbanAccountIdentification = { iban: "NL02XXXX0123456789", type: Types.legalEntityManagement.IbanAccountIdentification.TypeEnum.Iban }; const bankAccountInfo: Types.legalEntityManagement.BankAccountInfo = { accountIdentification: ibanAccountIdentification }; const transferInstrumentInfo: Types.legalEntityManagement.TransferInstrumentInfo = { bankAccount: bankAccountInfo, legalEntityId: "LE00000000000000000000001", type: Types.legalEntityManagement.TransferInstrumentInfo.TypeEnum.BankAccount }; // Send the request const legalEntityManagementAPI = new LegalEntityManagementAPI(client); const response = await legalEntityManagementAPI.TransferInstrumentsApi.createTransferInstrument(transferInstrumentInfo); ``` ## Step 2: Create account holder For error tests for legal entities, you need to [create an account holder](https://docs.adyen.com/platforms/onboard-users) for the legal entity of the organization, individual, or sole proprietorship. For error tests for documents or transfer instruments, you need to [create an account holder](https://docs.adyen.com/platforms/onboard-users) for the legal entity who owns the resource. ## Step 3: Check verification errors To get updates about the failed verification and the corresponding error codes, you can: * Listen to the [balancePlatform.accountHolder.updated](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/latest/post/balancePlatform.accountHolder.updated) or * Make a GET API request for the particular legal entity, document, or transfer instrument. ### Tab: Legal entities Make a GET [/legalEntities/{id}](https://docs.adyen.com/api-explorer/legalentity/latest/get/legalEntities/\(id\)) request, specifying the [id](https://docs.adyen.com/api-explorer/legalentity/latest/get/legalEntities/\(id\)) in the path. **Verification result-API response** ```json { "verificationErrors": [ { "code": "1_30", "message": "Individual details couldn't be verified", "remediatingActions": [ { "code": "1_300", "message": "Update individual details" } ], "subErrors": [ { "code": "1_3004", "message": "The name and residence country couldn't be verified", "remediatingActions": [ { "code": "1_305", "message": "Upload a different proof of residency" }, { "code": "1_300", "message": "Update individual details" } ], "type": "invalidInput" } ], "type": "invalidInput" } ] } ``` **Verification result-webhook** ```json { "data":{ "balancePlatform": "YOUR_BALANCE_PLATFORM", "accountHolder": { "description": "YOUR_DESCRIPTION", "reference": "YOUR_REFERENCE", "legalEntityId": "LE00000000000000000000001", "capabilities": { "sendToTransferInstrument": { "allowed": false, "requested": true, "enabled": true, "problems": [ { "entity": { "id": "LE00000000000000000000001", "type": "LegalEntity" }, "verificationErrors": [ { "code": "1_30", "message": "Individual details couldn't be verified.", "remediatingActions": [ { "code": "1_300", "message": "Update individual details" } ], "subErrors": [ { "code": "1_3004", "message": "The name and residence country couldn't be verified", "remediatingActions": [ { "code": "1_305", "message": "Upload a different proof of residency" }, { "code": "1_300", "message": "Update individual details" } ], "type": "invalidInput" } ] } ] } ], "transferInstruments": [ { "enabled": true, "requested": true, "allowed": false, "id": "SE00000000000000000000001", "verificationStatus": "invalid" } ], "verificationStatus": "invalid" } }, "id": "AH00000000000000000000001", "status": "Active" } }, "environment": "test", "type": "balancePlatform.accountHolder.updated" } ``` The response returns the specified requested verification code and associated error codes. ### Tab: Documents Make a GET [/documents/{id}](https://docs.adyen.com/api-explorer/legalentity/latest/get/documents/\(id\)) request, specifying the id in the path. **Verification result-API Response** ```json { "verificationErrors": [ { "code": "1_34", "message": "Image of the ID document didn't meet requirements", "remediatingActions": [ { "code": "1_303", "message": "Upload a different image of the ID document" } ], "subErrors": [ { "code": "1_3008", "message": "The ID document image was incomplete", "remediatingActions": [ { "code": "1_303", "message": "Upload a different image of the ID document" } ], "type": "invalidInput" } ], "type": "invalidInput" } ] } ``` **Verification result-webhook** ```json { "data":{ "balancePlatform": "YOUR_BALANCE_PLATFORM", "accountHolder": { "description": "YOUR_DESCRIPTION", "legalEntityId": "LE00000000000000000000001", "reference": "YOUR_REFERENCE", "capabilities": { "sendToTransferInstrument": { "allowed": false, "enabled": true, "requested": true, "problems": [ { "entity": { "id": "LE00000000000000000000001", "type": "LegalEntity" }, "verificationErrors": [ { "code": "1_34", "message": "Image of the ID document didn't meet requirements", "remediatingActions": [ { "code": "1_303", "message": "Upload a different image of the ID document" } ], "subErrors": [ { "code": "1_3008", "message": "The ID document image was incomplete", "remediatingActions": [ { "code": "1_303", "message": "Upload a different image of the ID document" } ], "type": "invalidInput" } ] } ] } ], "transferInstruments": [ { "enabled": true, "requested": true, "allowed": false, "id": "SE00000000000000000000001", "verificationStatus": "invalid" } ], "verificationStatus": "invalid" } }, "id": "AH00000000000000000000001", "status": "Active" } }, "environment": "test", "type": "balancePlatform.accountHolder.updated" } ``` The response returns the specified requested verification code and associated error codes. ### Tab: Transfer instruments Make a GET [/transferInstruments/{id}](https://docs.adyen.com/api-explorer/legalentity/latest/get/transferInstruments/\(id\)) request, specifying the id in the path. **Verification result-API response** ```json { "verificationErrors": [ { "code": "1_70", "message": "Bank account couldn't be verified", "remediatingActions": [ { "code": "1_700", "message": "Update bank account details" } ], "subErrors": [ { "code": "1_7002", "message": "The bank account number wasn't valid", "remediatingActions": [ { "code": "1_700", "message": "Update bank account details" } ], "type": "invalidInput" } ], "type": "invalidInput" } ] } ``` **Verification result-webhook** ```json { "data":{ "balancePlatform": "YOUR_BALANCE_PLATFORM" "accountHolder": { "description": "YOUR_DESCRIPTION", "reference": "YOUR_REFERENCE", "legalEntityId": "LE00000000000000000000001", "capabilities": { "sendToTransferInstrument": { "allowed": false, "enabled": true, "requested": true, "problems": [ { "entity": { "id": "LE00000000000000000000001", "type": "LegalEntity" }, "verificationErrors": [ { "code": "1_70", "message": "Bank account couldn't be verified", "remediatingActions": [ { "code": "1_700", "message": "Update bank account details" } ], "subErrors": [ { "code": "1_7002", "message": "The bank account number wasn't valid", "remediatingActions": [ { "code": "1_700", "message": "Update bank account details" } ], "type": "invalidInput" } ] } ], "transferInstruments": [ { "enabled": true, "requested": true, "allowed": false, "id": "SE322KH223222Q5J4DBMJ8MQZ", "verificationStatus": "invalid" } ] "verificationStatus": "invalid" } ] } }, "id": "AH00000000000000000000001", "status": "Active" }, "environment": "test", "type": "balancePlatform.accountHolder.updated" } } ``` The response returns the specified requested verification code and associated error codes. ## Step 4: Test the remediating flow and resolve verification errors To simulate the resolution of the verification errors, in your test environment, include the `x-requested-verification-code: 0_0001` in the header of your API request. Note that requested verification codes cannot be used with hosted onboarding. The requested verification code can be used for the following endpoints in the [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/latest/overview): * [PATCH /legalEntities](https://docs.adyen.com/api-explorer/legalentity/latest/patch/legalEntities/_id_). * [PATCH /documents](https://docs.adyen.com/api-explorer/legalentity/latest/patch/documents/_id_) * [PATCH /transferInstruments](https://docs.adyen.com/api-explorer/legalentity/latest/patch/transferInstruments/_id_) If your error handling is successful, the requested verification code resolves any suberrors associated with the legal entity, document, or transfer instrument. ### Tab: Legal Entities Make a PATCH [/legalEntities/{id}](https://docs.adyen.com/api-explorer/legalentity/latest/patch/legalEntities/\(id\)) request, specifying the [id](https://docs.adyen.com/api-explorer/legalentity/latest/patch/legalEntities/_id_#path-id) in the path and `x-requested-verification-code: 0_0001`in the API header. **Force legal entity remediating action flow** #### curl ```bash curl https://kyc-test.adyen.com/lem/v3/legalEntities/LE00000000000000000000001 \ -H 'x-api-key: ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY' \ -H 'content-type: application/json' \ -H "x-requested-verification-code: 0_0001" \ -X PATCH \ -d '{ "individual": { "phone": { "number": "+31612345678", "type": "mobile" }, "birthData": { "dateOfBirth": "1977-01-01" }, "name": { "firstName": "KYC", "lastName": "My Test scenario" }, "nationality": "NL", "residentialAddress": { "city": "Amsterdam", "country": "NL", "postalCode": "1111AB", "street": "Main street" }, "identificationData": { "type": "nationalIdNumber", "number": "12345678", "issuerState": "NL" } } }' ``` #### Java ```java // Adyen Java API Library v38.0.0 to latest import com.adyen.Client; import com.adyen.Config; import com.adyen.enums.Environment; import com.adyen.model.*; import com.adyen.service.*; import java.math.*; import com.adyen.model.legalentitymanagement.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.service.legalentitymanagement.*; Config config = new Config() .apiKey("ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY") .environment(Environment.TEST); Client client = new Client(config); // Create the request object(s) IdentificationData identificationData = new IdentificationData() .issuerState("NL") .number("12345678") .type(IdentificationData.TypeEnum.NATIONALIDNUMBER); PhoneNumber phoneNumber = new PhoneNumber() .number("+31612345678") .type("mobile"); Address address = new Address() .country("NL") .city("Amsterdam") .street("Main street") .postalCode("1111AB"); Name name = new Name() .firstName("KYC") .lastName("My Test scenario"); BirthData birthData = new BirthData() .dateOfBirth("1977-01-01"); Individual individual = new Individual() .identificationData(identificationData) .nationality("NL") .phone(phoneNumber) .residentialAddress(address) .name(name) .birthData(birthData); LegalEntityInfo legalEntityInfo = new LegalEntityInfo() .individual(individual); // Send the request LegalEntitiesApi service = new LegalEntitiesApi(client); LegalEntity response = service.updateLegalEntity("id", legalEntityInfo, null); ``` #### PHP ```php setXApiKey("ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $identificationData = new IdentificationData(); $identificationData ->setIssuerState("NL") ->setNumber("12345678") ->setType("nationalIdNumber"); $phoneNumber = new PhoneNumber(); $phoneNumber ->setNumber("+31612345678") ->setType("mobile"); $address = new Address(); $address ->setCountry("NL") ->setCity("Amsterdam") ->setStreet("Main street") ->setPostalCode("1111AB"); $name = new Name(); $name ->setFirstName("KYC") ->setLastName("My Test scenario"); $birthData = new BirthData(); $birthData ->setDateOfBirth("1977-01-01"); $individual = new Individual(); $individual ->setIdentificationData($identificationData) ->setNationality("NL") ->setPhone($phoneNumber) ->setResidentialAddress($address) ->setName($name) ->setBirthData($birthData); $legalEntityInfo = new LegalEntityInfo(); $legalEntityInfo ->setIndividual($individual); // Send the request $service = new LegalEntitiesApi($client); $response = $service->updateLegalEntity('id', $legalEntityInfo); ``` #### C\# ```cs // Adyen .NET API Library v34.0.0 to latest using Adyen.LegalEntityManagement.Extensions; using Adyen.LegalEntityManagement.Models; using Adyen.LegalEntityManagement.Services; using Adyen.Core.Client; using Adyen.Core.Client.Extensions; using Adyen.Core.Options; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; var host = Host.CreateDefaultBuilder() .ConfigureLegalEntityManagement( (context, services, config) => { config.ConfigureAdyenOptions(options => { options.AdyenApiKey = "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY"; options.Environment = AdyenEnvironment.Test; }); services.AddAllLegalEntityManagementServices(); }) .Build(); var legalEntitiesService = host.Services.GetRequiredService(); // Create the request object(s) var identificationData = new IdentificationData { IssuerState = "NL", Number = "12345678", Type = IdentificationData.TypeEnum.NationalIdNumber }; var phoneNumber = new PhoneNumber { Number = "+31612345678", Type = "mobile" }; var address = new Address { Country = "NL", City = "Amsterdam", Street = "Main street", PostalCode = "1111AB" }; var name = new Name { FirstName = "KYC", LastName = "My Test scenario" }; var birthData = new BirthData { DateOfBirth = "1977-01-01" }; var individual = new Individual { IdentificationData = identificationData, Nationality = "NL", Phone = phoneNumber, ResidentialAddress = address, Name = name, BirthData = birthData }; var legalEntityInfo = new LegalEntityInfo { Individual = individual }; // Send the request var result = await legalEntitiesService.UpdateLegalEntityAsync("id", legalEntityInfo); if (result.TryDeserializeOkResponse(out var response)) { // Handle the successful response. } ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v30.0.0 to latest const { Client, Config, EnvironmentEnum, LegalEntityManagementAPI } = require('@adyen/api-library'); const config = new Config({ apiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const identificationData = { issuerState: "NL", number: "12345678", type: "nationalIdNumber" }; const phoneNumber = { number: "+31612345678", type: "mobile" }; const address = { country: "NL", city: "Amsterdam", street: "Main street", postalCode: "1111AB" }; const name = { firstName: "KYC", lastName: "My Test scenario" }; const birthData = { dateOfBirth: "1977-01-01" }; const individual = { identificationData: identificationData, nationality: "NL", phone: phoneNumber, residentialAddress: address, name: name, birthData: birthData }; const legalEntityInfo = { individual: individual }; // Send the request const legalEntityManagementAPI = new LegalEntityManagementAPI(client); const response = await legalEntityManagementAPI.LegalEntitiesApi.updateLegalEntity("id", legalEntityInfo); ``` #### Go ```go // Adyen Go API Library v21.0.0 to latest import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/legalentity" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) identificationData := legalentity.IdentificationData{ IssuerState: common.PtrString("NL"), Number: common.PtrString("12345678"), Type: "nationalIdNumber", } phoneNumber := legalentity.PhoneNumber{ Number: "+31612345678", Type: common.PtrString("mobile"), } address := legalentity.Address{ Country: "NL", City: common.PtrString("Amsterdam"), Street: common.PtrString("Main street"), PostalCode: common.PtrString("1111AB"), } name := legalentity.Name{ FirstName: "KYC", LastName: "My Test scenario", } birthData := legalentity.BirthData{ DateOfBirth: common.PtrString("1977-01-01"), } individual := legalentity.Individual{ IdentificationData: &identificationData, Nationality: common.PtrString("NL"), Phone: &phoneNumber, ResidentialAddress: address, Name: name, BirthData: &birthData, } legalEntityInfo := legalentity.LegalEntityInfo{ Individual: &individual, } // Send the request service := client.LegalEntity() req := service.LegalEntitiesApi.UpdateLegalEntityInput("id").LegalEntityInfo(legalEntityInfo) res, httpRes, err := service.LegalEntitiesApi.UpdateLegalEntity(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v14.0.0 to latest import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY" adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "individual": { "phone": { "number": "+31612345678", "type": "mobile" }, "birthData": { "dateOfBirth": "1977-01-01" }, "name": { "firstName": "KYC", "lastName": "My Test scenario" }, "nationality": "NL", "residentialAddress": { "city": "Amsterdam", "country": "NL", "postalCode": "1111AB", "street": "Main street" }, "identificationData": { "type": "nationalIdNumber", "number": "12345678", "issuerState": "NL" } } } # Send the request result = adyen.legalEntityManagement.legal_entities_api.update_legal_entity(request=json_request, id="id") ``` #### Ruby ```rb # Adyen Ruby API Library v11.0.0 to latest require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY' adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { "individual" => { "phone" => { "number" => "+31612345678", "type" => "mobile" }, "birthData" => { "dateOfBirth" => "1977-01-01" }, "name" => { "firstName" => "KYC", "lastName" => "My Test scenario" }, "nationality" => "NL", "residentialAddress" => { "city" => "Amsterdam", "country" => "NL", "postalCode" => "1111AB", "street" => "Main street" }, "identificationData" => { "type" => "nationalIdNumber", "number" => "12345678", "issuerState" => "NL" } } } # Send the request result = adyen.legal_entity_management.legal_entities_api.update_legal_entity(request_body, 'id') ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.0 to latest import { Client, Config, EnvironmentEnum, LegalEntityManagementAPI, Types } from "@adyen/api-library"; const config = new Config({ apiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const identificationData: Types.legalEntityManagement.IdentificationData = { issuerState: "NL", number: "12345678", type: Types.legalEntityManagement.IdentificationData.TypeEnum.NationalIdNumber }; const phoneNumber: Types.legalEntityManagement.PhoneNumber = { number: "+31612345678", type: "mobile" }; const address: Types.legalEntityManagement.Address = { country: "NL", city: "Amsterdam", street: "Main street", postalCode: "1111AB" }; const name: Types.legalEntityManagement.Name = { firstName: "KYC", lastName: "My Test scenario" }; const birthData: Types.legalEntityManagement.BirthData = { dateOfBirth: "1977-01-01" }; const individual: Types.legalEntityManagement.Individual = { identificationData: identificationData, nationality: "NL", phone: phoneNumber, residentialAddress: address, name: name, birthData: birthData }; const legalEntityInfo: Types.legalEntityManagement.LegalEntityInfo = { individual: individual }; // Send the request const legalEntityManagementAPI = new LegalEntityManagementAPI(client); const response = await legalEntityManagementAPI.LegalEntitiesApi.updateLegalEntity("id", legalEntityInfo); ``` ### Tab: Documents Make a PATCH [/documents/{id}](https://docs.adyen.com/api-explorer/legalentity/latest/patch/documents/\(id\)) request, specifying the [id](https://docs.adyen.com/api-explorer/legalentity/latest/patch/documents/_id_#path-id) in the path and `x-requested-verification-code: 0_0001`in the API header. **Force document remediating action flow** #### curl ```bash curl https://kyc-test.adyen.com/lem/v3/documents/SE00000000000000000000001 \ -H 'x-api-key: ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY' \ -H 'content-type: application/json' \ -H "x-requested-verification-code: 0_0001" \ -X PATCH \ -d '{ "description": "YOUR_DESCRIPTION", "type": "identityCard", "issuerCountry" : "NL", "attachments": [ { "content": "R0lGODlhhAMKAeZOADs..", "pageType": "front" }, { "content": "P3lhKWTpN0LXaPTI0Gs..", "pageType": "back" } ] }' ``` #### Java ```java // Adyen Java API Library v38.0.0 to latest import com.adyen.Client; import com.adyen.Config; import com.adyen.enums.Environment; import com.adyen.model.*; import com.adyen.service.*; import java.math.*; import com.adyen.model.legalentitymanagement.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.service.legalentitymanagement.*; Config config = new Config() .apiKey("ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY") .environment(Environment.TEST); Client client = new Client(config); // Create the request object(s) Attachment attachment1 = new Attachment() .pageType("front"); Attachment attachment2 = new Attachment() .pageType("back"); Document document = new Document() .issuerCountry("NL") .attachments(Arrays.asList(attachment1, attachment2)) .description("YOUR_DESCRIPTION") .type(Document.TypeEnum.IDENTITYCARD); // Send the request DocumentsApi service = new DocumentsApi(client); Document response = service.updateDocument("id", document, null); ``` #### PHP ```php setXApiKey("ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $attachment1 = new Attachment(); $attachment1 ->setPageType("front"); $attachment2 = new Attachment(); $attachment2 ->setPageType("back"); $document = new Document(); $document ->setIssuerCountry("NL") ->setAttachments(array($attachment1, $attachment2)) ->setDescription("YOUR_DESCRIPTION") ->setType("identityCard"); // Send the request $service = new DocumentsApi($client); $response = $service->updateDocument('id', $document); ``` #### C\# ```cs // Adyen .NET API Library v34.0.0 to latest using System.Collections.Generic; using Adyen.LegalEntityManagement.Extensions; using Adyen.LegalEntityManagement.Models; using Adyen.LegalEntityManagement.Services; using Adyen.Core.Client; using Adyen.Core.Client.Extensions; using Adyen.Core.Options; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; var host = Host.CreateDefaultBuilder() .ConfigureLegalEntityManagement( (context, services, config) => { config.ConfigureAdyenOptions(options => { options.AdyenApiKey = "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY"; options.Environment = AdyenEnvironment.Test; }); services.AddAllLegalEntityManagementServices(); }) .Build(); var documentsService = host.Services.GetRequiredService(); // Create the request object(s) var attachment1 = new Attachment { PageType = "front" }; var attachment2 = new Attachment { PageType = "back" }; var document = new Document { IssuerCountry = "NL", Attachments = new List{ attachment1, attachment2 }, Description = "YOUR_DESCRIPTION", Type = Document.TypeEnum.IdentityCard }; // Send the request var result = await documentsService.UpdateDocumentAsync("id", document); if (result.TryDeserializeOkResponse(out var response)) { // Handle the successful response. } ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v30.0.0 to latest const { Client, Config, EnvironmentEnum, LegalEntityManagementAPI } = require('@adyen/api-library'); const config = new Config({ apiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const attachment1 = { pageType: "front" }; const attachment2 = { pageType: "back" }; const document = { issuerCountry: "NL", attachments: [attachment1, attachment2], description: "YOUR_DESCRIPTION", type: "identityCard" }; // Send the request const legalEntityManagementAPI = new LegalEntityManagementAPI(client); const response = await legalEntityManagementAPI.DocumentsApi.updateDocument("id", document); ``` #### Go ```go // Adyen Go API Library v21.0.0 to latest import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/legalentity" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) attachment1 := legalentity.Attachment{ PageType: common.PtrString("front"), } attachment2 := legalentity.Attachment{ PageType: common.PtrString("back"), } document := legalentity.Document{ IssuerCountry: common.PtrString("NL"), Attachments: []legalentity.Attachment{ attachment1, attachment2, }, Description: "YOUR_DESCRIPTION", Type: "identityCard", } // Send the request service := client.LegalEntity() req := service.DocumentsApi.UpdateDocumentInput("id").Document(document) res, httpRes, err := service.DocumentsApi.UpdateDocument(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v14.0.0 to latest import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY" adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "description": "YOUR_DESCRIPTION", "type": "identityCard", "issuerCountry": "NL", "attachments": [{ "content": "R0lGODlhhAMKAeZOADs..", "pageType": "front" }, { "content": "P3lhKWTpN0LXaPTI0Gs..", "pageType": "back" }] } # Send the request result = adyen.legalEntityManagement.documents_api.update_document(request=json_request, id="id") ``` #### Ruby ```rb # Adyen Ruby API Library v11.0.0 to latest require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY' adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { "description" => "YOUR_DESCRIPTION", "type" => "identityCard", "issuerCountry" => "NL", "attachments" => [{ "content" => "R0lGODlhhAMKAeZOADs..", "pageType" => "front" }, { "content" => "P3lhKWTpN0LXaPTI0Gs..", "pageType" => "back" }] } # Send the request result = adyen.legal_entity_management.documents_api.update_document(request_body, 'id') ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.0 to latest import { Client, Config, EnvironmentEnum, LegalEntityManagementAPI, Types } from "@adyen/api-library"; const config = new Config({ apiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const attachment1 = { pageType: "front" } as unknown as Types.legalEntityManagement.Attachment; const attachment2 = { pageType: "back" } as unknown as Types.legalEntityManagement.Attachment; const document: Types.legalEntityManagement.Document = { issuerCountry: "NL", attachments: [attachment1, attachment2], description: "YOUR_DESCRIPTION", type: Types.legalEntityManagement.Document.TypeEnum.IdentityCard }; // Send the request const legalEntityManagementAPI = new LegalEntityManagementAPI(client); const response = await legalEntityManagementAPI.DocumentsApi.updateDocument("id", document); ``` ### Tab: Transfer Instruments Make a PATCH [/transferInstruments/{id}](https://docs.adyen.com/api-explorer/legalentity/latest/patch/transferInstruments/\(id\)) request, specifying the [id](https://docs.adyen.com/api-explorer/legalentity/latest/patch/transferInstruments/_id_#path-id) in the path and `x-requested-verification-code: 0_0001`in the API header. **Force transfer instrument remediating action flow** #### curl ```bash curl https://kyc-test.adyen.com/lem/v3/transferInstruments/SE00000000000000000000001 \ -H 'x-api-key: ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY' \ -H 'content-type: application/json' \ -H "x-requested-verification-code: 0_0001" \ -X PATCH \ -d '{ "type": "bankAccount", "bankAccount": { "countryCode": "NL", "currencyCode": "EUR", "iban": "NL02XXXX0123456789" } }' ``` #### Java ```java // Adyen Java API Library v38.0.0 to latest import com.adyen.Client; import com.adyen.Config; import com.adyen.enums.Environment; import com.adyen.model.*; import com.adyen.service.*; import java.math.*; import com.adyen.model.legalentitymanagement.*; import java.time.OffsetDateTime; import java.util.*; import com.adyen.service.legalentitymanagement.*; Config config = new Config() .apiKey("ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY") .environment(Environment.TEST); Client client = new Client(config); // Create the request object(s) BankAccountInfo bankAccountInfo = new BankAccountInfo() .countryCode("NL"); TransferInstrumentInfo transferInstrumentInfo = new TransferInstrumentInfo() .bankAccount(bankAccountInfo) .type(TransferInstrumentInfo.TypeEnum.BANKACCOUNT); // Send the request TransferInstrumentsApi service = new TransferInstrumentsApi(client); TransferInstrument response = service.updateTransferInstrument("id", transferInstrumentInfo, null); ``` #### PHP ```php setXApiKey("ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $bankAccountInfo = new BankAccountInfo(); $bankAccountInfo ->setCountryCode("NL"); $transferInstrumentInfo = new TransferInstrumentInfo(); $transferInstrumentInfo ->setBankAccount($bankAccountInfo) ->setType("bankAccount"); // Send the request $service = new TransferInstrumentsApi($client); $response = $service->updateTransferInstrument('id', $transferInstrumentInfo); ``` #### C\# ```cs // Adyen .NET API Library v34.0.0 to latest using Adyen.LegalEntityManagement.Extensions; using Adyen.LegalEntityManagement.Models; using Adyen.LegalEntityManagement.Services; using Adyen.Core.Client; using Adyen.Core.Client.Extensions; using Adyen.Core.Options; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; var host = Host.CreateDefaultBuilder() .ConfigureLegalEntityManagement( (context, services, config) => { config.ConfigureAdyenOptions(options => { options.AdyenApiKey = "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY"; options.Environment = AdyenEnvironment.Test; }); services.AddAllLegalEntityManagementServices(); }) .Build(); var transferInstrumentsService = host.Services.GetRequiredService(); // Create the request object(s) var bankAccountInfo = new BankAccountInfo { CountryCode = "NL" }; var transferInstrumentInfo = new TransferInstrumentInfo { BankAccount = bankAccountInfo, Type = TransferInstrumentInfo.TypeEnum.BankAccount }; // Send the request var result = await transferInstrumentsService.UpdateTransferInstrumentAsync("id", transferInstrumentInfo); if (result.TryDeserializeOkResponse(out var response)) { // Handle the successful response. } ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v30.0.0 to latest const { Client, Config, EnvironmentEnum, LegalEntityManagementAPI } = require('@adyen/api-library'); const config = new Config({ apiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const bankAccountInfo = { countryCode: "NL" }; const transferInstrumentInfo = { bankAccount: bankAccountInfo, type: "bankAccount" }; // Send the request const legalEntityManagementAPI = new LegalEntityManagementAPI(client); const response = await legalEntityManagementAPI.TransferInstrumentsApi.updateTransferInstrument("id", transferInstrumentInfo); ``` #### Go ```go // Adyen Go API Library v21.0.0 to latest import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/legalentity" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) bankAccountInfo := legalentity.BankAccountInfo{ CountryCode: common.PtrString("NL"), } transferInstrumentInfo := legalentity.TransferInstrumentInfo{ BankAccount: bankAccountInfo, Type: "bankAccount", } // Send the request service := client.LegalEntity() req := service.TransferInstrumentsApi.UpdateTransferInstrumentInput("id").TransferInstrumentInfo(transferInstrumentInfo) res, httpRes, err := service.TransferInstrumentsApi.UpdateTransferInstrument(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v14.0.0 to latest import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY" adyen.client.platform = "test" # The environment to use library in. # Create the request object(s) json_request = { "type": "bankAccount", "bankAccount": { "countryCode": "NL", "currencyCode": "EUR", "iban": "NL02XXXX0123456789" } } # Send the request result = adyen.legalEntityManagement.transfer_instruments_api.update_transfer_instrument(request=json_request, id="id") ``` #### Ruby ```rb # Adyen Ruby API Library v11.0.0 to latest require "adyen-ruby-api-library" adyen = Adyen::Client.new adyen.api_key = 'ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY' adyen.env = :test # Set to "live" for live environment # Create the request object(s) request_body = { "type" => "bankAccount", "bankAccount" => { "countryCode" => "NL", "currencyCode" => "EUR", "iban" => "NL02XXXX0123456789" } } # Send the request result = adyen.legal_entity_management.transfer_instruments_api.update_transfer_instrument(request_body, 'id') ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.0.0 to latest import { Client, Config, EnvironmentEnum, LegalEntityManagementAPI, Types } from "@adyen/api-library"; const config = new Config({ apiKey: "ADYEN_LEGAL_ENTITY_MANAGEMENT_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const bankAccountInfo: Types.legalEntityManagement.BankAccountInfo = { countryCode: "NL" }; const transferInstrumentInfo = { bankAccount: bankAccountInfo, type: Types.legalEntityManagement.TransferInstrumentInfo.TypeEnum.BankAccount } as unknown as Types.legalEntityManagement.TransferInstrumentInfo; // Send the request const legalEntityManagementAPI = new LegalEntityManagementAPI(client); const response = await legalEntityManagementAPI.TransferInstrumentsApi.updateTransferInstrument("id", transferInstrumentInfo); ```