EFL
Low-level clients

CustomerApiClient

Low-level client for /Customer endpoints used to send customer data, statements and verification results.

CustomerApiClient provides raw access to /Customer endpoints. Methods return HttpResponse and mostly require a Bearer token, except for ITN which uses multipart form-data without authentication.

Class definition

  • Namespace: Imoli\EflLeasingSdk\Api
  • Constructor: accepts EflHttpClient $http.

The higher-level EflClient uses this client internally for customer-related operations.

Methods

postCustomerDataForLon

Low-level wrapper over POST /lon/api/v1/Customer/PostCustomerDataForLon.

public function postCustomerDataForLon(
    CustomerData $data,
    string $bearerToken
): HttpResponse

Auth: Bearer token.

Parameters

NameTypeRequiredDescription
dataCustomerDataYesComplete customer data payload, including transaction identifier.
bearerTokenstringYesBearer token for authentication.

The transactionId is taken from CustomerData::toRequestPayload() and sent as a query parameter.
The request body is the full JSON payload from CustomerData::toRequestPayload().

Return value

  • Type: HttpResponse – response without a dedicated model; success is indicated by HTTP status.

postCustomerStatements

Low-level wrapper over POST /lon/api/v1/Customer/PostCustomerStatements.

public function postCustomerStatements(
    string $transactionId,
    array $statements,
    string $bearerToken
): HttpResponse

Auth: Bearer token.

Parameters

NameTypeRequiredDescription
transactionIdstringYesIdentifier of the transaction.
statementsCustomerDataStatement[] (CustomerDataStatement)YesList of customer statements/consents to be submitted.
bearerTokenstringYesBearer token.

The request body is an array of JSON objects from CustomerDataStatement::toRequestPayload().

Return value

  • Type: HttpResponse – raw response used to confirm that statements were accepted.

initializeIdentityVerification

Low-level wrapper over POST /lon/api/v1/Customer/InitializeIdentityVerification.

public function initializeIdentityVerification(
    string $transactionId,
    VerificationInitializationParams $params,
    string $bearerToken
): HttpResponse

Auth: Bearer token.

Parameters

NameTypeRequiredDescription
transactionIdstringYesIdentifier of the transaction.
paramsVerificationInitializationParamsYesParameters describing the verification to be initialised.
bearerTokenstringYesBearer token.

The request body is built from VerificationInitializationParams::toRequestPayload().

Return value


getIdentityVerificationStatus

Low-level wrapper over GET /lon/api/v1/Customer/GetIdentityVerificationStatus.

public function getIdentityVerificationStatus(
    string $transactionId,
    string $bearerToken
): HttpResponse

Auth: Bearer token.

Parameters

NameTypeRequiredDescription
transactionIdstringYesIdentifier of the transaction.
bearerTokenstringYesBearer token.

Return value


leadVerificationResult

Low-level wrapper over POST /lon/api/v1/Customer/LeadVerificationResult.

public function leadVerificationResult(
    string $transactionId,
    VerificationResult $result,
    string $bearerToken
): HttpResponse

Auth: Bearer token.

Parameters

NameTypeRequiredDescription
transactionIdstringYesIdentifier of the transaction.
resultVerificationResultYesVerification result data to be submitted.
bearerTokenstringYesBearer token.

The request body is built from VerificationResult::toRequestPayload().

Return value

  • Type: HttpResponse – raw response confirming that the lead verification result was accepted.

postInitiatePayByLinkPayment

Low-level wrapper over POST /lon/api/v1/Customer/PostInitiatePayByLinkPayment.

public function postInitiatePayByLinkPayment(
    string $transactionId,
    string $bearerToken
): HttpResponse

Auth: Bearer token.

Parameters

NameTypeRequiredDescription
transactionIdstringYesIdentifier of the transaction.
bearerTokenstringYesBearer token.

Return value

  • Type: HttpResponse – body contains raw information about the initiated pay-by-link payment.

postItn

Low-level wrapper over POST /lon/api/v1/Customer/ITN using multipart form-data.

public function postItn(string $transactions): HttpResponse

Auth: none (no Bearer token).

Parameters

NameTypeRequiredDescription
transactionsstringYesRaw transactions payload, typically XML, sent as form field value.

The client builds a multipart/form-data request with a single field named transactions.

Return value

  • Type: HttpResponse – raw response confirming how the ITN payload was processed.

*** End of File