code: @RequestMapping(value = "/create-payment", method = RequestMethod.POST)
      public @ResponseBody Map<String, String> createPayment(@RequestParam("performCheckout") Boolean performCheckout) throws PaymentException {
          Map<String, String> response = new HashMap<>();
          Payment createdPayment = paymentService.createPayPalPaymentForCurrentOrder(performCheckout);
          response.put("id", createdPayment.getId());
          return response;
      }
docs: ***********************************************