class PaymentController implements PaymentApi {

    @Override
    public ResponseEntity<PaymentInitationRequestResponse201> initiatePayment(Object body, UUID xRequestID,
                                                                              String psUIPAddress, String paymentService,
                                                                              String paymentProduct, String digest,
                                                                              String signature, byte[] tpPSignatureCertificate,
                                                                              String psuId, String psUIDType, String psUCorporateID,
                                                                              String psUCorporateIDType, String consentID,
                                                                              Boolean tpPRedirectPreferred, String tpPRedirectURI,
                                                                              String tpPNokRedirectURI, Boolean tpPExplicitAuthorisationPreferred,
                                                                              Boolean tpPRejectionNoFundsPreferred, String tppBrandLoggingInformation,
                                                                              String tpPNotificationURI, String tpPNotificationContentPreferred,
                                                                              String psUIPPort, String psUAccept, String psUAcceptCharset,
                                                                              String psUAcceptEncoding, String psUAcceptLanguage,
                                                                              String psUUserAgent, String psUHttpMethod,
                                                                              UUID psUDeviceID, String psUGeoLocation) {
        PsuIdData psuData = new PsuIdData(psuId, psUIDType, psUCorporateID, psUCorporateIDType, psUIPAddress, new AdditionalPsuIdData(psUIPPort, psUUserAgent, psUGeoLocation, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUHttpMethod, psUDeviceID));
        TppNotificationData tppNotificationData = notificationSupportedModeService.getTppNotificationData(tpPNotificationContentPreferred, tpPNotificationURI);

        PaymentInitiationParameters paymentInitiationParameters = paymentModelMapperPsd2.mapToPaymentRequestParameters(paymentProduct, paymentService, tpPSignatureCertificate,
                                                                                                                       tpPRedirectURI, tpPNokRedirectURI, BooleanUtils.isTrue(tpPExplicitAuthorisationPreferred),
                                                                                                                       psuData, tppNotificationData, tppBrandLoggingInformation,
                                                                                                                       requestProviderService.getInstanceId());
        ResponseObject<PaymentInitiationResponse> serviceResponse =
            xs2aPaymentService.createPayment(paymentModelMapperXs2a.mapToXs2aPayment(), paymentInitiationParameters);

        if (serviceResponse.hasError()) {
            return responseErrorMapper.generateErrorResponse(serviceResponse.getError());
        }

        PaymentInitiationResponse serviceResponseBody = serviceResponse.getBody();
        ResponseHeaders responseHeaders = buildPaymentInitiationResponseHeaders(serviceResponseBody);

        return responseMapper.created(ResponseObject
                                          .builder()
                                          .body(paymentModelMapperPsd2.mapToPaymentInitiationResponse(serviceResponseBody))
                                          .build(), responseHeaders);
    }

}