public function pay(array $outputs, $changeAddress = null, $allowZeroConf = false, $randomizeChangeIdx = true, $feeStrategy = self::FEE_STRATEGY_OPTIMAL, $forceFee = null, $apiCheckFee = true) {
        if ($this->locked) {
            throw new \Exception("Wallet needs to be unlocked to pay");
        }

        if ($forceFee && $feeStrategy !== self::FEE_STRATEGY_FORCE_FEE) {
            throw new \InvalidArgumentException("feeStrategy should be set to force_fee to set a forced fee");
        }

        $outputs = (new OutputsNormalizer($this->getAddressReader()))->normalize($outputs);

        $txBuilder = new TransactionBuilder($this->addressReader);
        $txBuilder->randomizeChangeOutput($randomizeChangeIdx);
        $txBuilder->setFeeStrategy($feeStrategy);
        $txBuilder->setChangeAddress($changeAddress);

        foreach ($outputs as $output) {
            $txBuilder->addOutput($output);
        }

        $this->coinSelectionForTxBuilder($txBuilder, true, $allowZeroConf, $forceFee);

        if ($forceFee !== null) {
            $apiCheckFee = true;
        }

        return $this->sendTx($txBuilder, $apiCheckFee);
    }