code: public function generate(Payment $payment)
      {
          $paymentParams = $this->parentRequestGenerator->generate($payment);
          $data = $payment->getPaymentData();
  
          if (!($data instanceof PayPalUnifiedInstallmentPaymentData)) {
              return $paymentParams;
          }
  
          $paymentParams['properties'][] = [
              'typeId' => 22,
              'value' => json_encode([
                  'financingCosts' => $data->getFeeAmount(),
                  'totalCostsIncludeFinancing' => $data->getTotalCost(),
                  'monthlyPayment' => $data->getMonthlyPayment(),
                  'term' => $data->getTerm(),
              ]),
          ];
  
          return $paymentParams;
      }
docs: {@inheritdoc}