src/Entities/Payments/Payment.php
public function jsonSerialize()
    {
        return [
            'id' => $this->getId(),
            'lastPaymentStatus' => $this->getLastPaymentStatus(),
            'gatewayTransactionId' => $this->getGatewayTransactionId(),
            'requestId' => $this->getRequestId(),
            'requestedByUser' => $this->getRequestedByUser(),
            'requestedByOrganisation' => $this->getRequestedByOrganisation(),
            'currencyCode' => $this->getCurrencyCode(),
            'amount' => $this->getAmount(),
            'paymentMethod' => $this->getPaymentMethod(),
            'gateway' => $this->getGateway(),
            'creationDate' => $this->getCreationDate(),
        ];
    }
public function jsonSerialize()
    {
        return [
            'id' => $this->getId(),
            'lastPaymentStatus' => $this->getLastPaymentStatus(),
            'gatewayTransactionId' => $this->getGatewayTransactionId(),
            'requestId' => $this->getRequestId(),
            'requestedByUser' => $this->getRequestedByUser(),
            'requestedByOrganisation' => $this->getRequestedByOrganisation(),
            'currencyCode' => $this->getCurrencyCode(),
            'amount' => $this->getAmount(),
            'paymentMethod' => $this->getPaymentMethod(),
            'gateway' => $this->getGateway(),
            'creationDate' => $this->getCreationDate(),
        ];
    }
Specify data which should be serialized to JSON