class PaymentController extends AbstractController implements PaymentApi {

    @Override
    public ResponseEntity<StartScaprocessResponse> startPaymentAuthorisation(PaymentService paymentService,
                                                                             PaymentProduct paymentProduct,
                                                                             String paymentId,
                                                                             Map<String, String> parameters,
                                                                             Map<String, String> headers,
                                                                             ObjectNode body) {
        RequestHeaders requestHeaders = RequestHeaders.fromMap(headers);
        RequestParams requestParams = RequestParams.fromMap(parameters);

        Response<StartScaprocessResponse> response = handleAuthorisationBody(body,
                (UpdatePsuAuthenticationHandler) updatePsuAuthentication ->
                    this.paymentService.startPaymentAuthorisation(paymentService,
                        paymentProduct,
                        paymentId,
                        requestHeaders,
                        requestParams,
                        updatePsuAuthentication),
            (StartAuthorisationHandler) emptyAuthorisationBody ->
                this.paymentService.startPaymentAuthorisation(paymentService,
                    paymentProduct,
                    paymentId,
                    requestHeaders,
                    requestParams)
        );

        return ResponseEntity
            .status(HttpStatus.CREATED)
            .headers(headersMapper.toHttpHeaders(response.getHeaders()))
            .body(response.getBody());
    }

    public  PaymentController(PaymentInitiationService paymentService,
                             HeadersMapper headersMapper,
                             ObjectMapper objectMapper);

}