Invoice the billable entity outside of regular billing cycle.

@return bool|StripeInvoice
162490
public function invoice()
    {
        if ($this->stripe_id) {
            try {
                return StripeInvoice::create(['customer' => $this->stripe_id], $this->getStripeKey())->pay();
            } catch (InvalidRequest $e) {
                return false;
            }
        }

        return true;
    }
643560
public Invoice markUncollectible() throws StripeException {
    return markUncollectible((Map<String, Object>) null, (RequestOptions) null);
  }
1246858
public function getSelUserPayment()
    {
        if ($this->_oUserPayment == null) {
            $this->_oUserPayment = false;
            $sPaymentId = $this->getPaymentId();
            if ($sPaymentId != "-1" && isset($sPaymentId)) {
                $this->_oUserPayment = oxNew(\OxidEsales\Eshop\Application\Model\UserPayment::class);
                $this->_oUserPayment->load($sPaymentId);
                $sTemplate = $this->_oUserPayment->oxuserpayments__oxvalue->value;

                // generate selected paymenttype
                $oPaymentTypes = $this->getPaymentTypes();
                foreach ($oPaymentTypes as $oPayment) {
                    if ($oPayment->oxpayments__oxid->value == $this->_oUserPayment->oxuserpayments__oxpaymentsid->value) {
                        $oPayment->selected = 1;
                        // if there are no values assigned we set default from paymenttype
                        if (!$sTemplate) {
                            $sTemplate = $oPayment->oxpayments__oxvaldesc->value;
                        }
                        break;
                    }
                }
                $this->_oUserPayment->setDynValues(\OxidEsales\Eshop\Core\Registry::getUtils()->assignValuesFromText($sTemplate));
            }
        }

        return $this->_oUserPayment;
    }
1155051
public function transformFromOrder(OrderInterface $order, InvoiceInterface $invoice)
    {
        $event = new OrderTransformEvent($order);
        $this->eventDispatcher->dispatch(TransformerEvents::PRE_ORDER_TO_INVOICE_TRANSFORM, $event);

        $invoice->setName($order->getBillingName());
        $invoice->setAddress1($order->getBillingAddress1());
        $invoice->setAddress2($order->getBillingAddress2());
        $invoice->setAddress3($order->getBillingAddress3());
        $invoice->setCity($order->getBillingCity());
        $invoice->setCountry($order->getBillingCountryCode());
        $invoice->setPostcode($order->getBillingPostcode());

        $invoice->setEmail($order->getBillingEmail());
        $invoice->setFax($order->getBillingFax());
        $invoice->setMobile($order->getBillingMobile());
        $invoice->setPhone($order->getBillingPhone());
        $invoice->setReference($order->getReference());

        $invoice->setCurrency($order->getCurrency());
        $invoice->setCustomer($order->getCustomer());
        $invoice->setTotalExcl($order->getTotalExcl());
        $invoice->setTotalInc($order->getTotalInc());

        $invoice->setPaymentMethod($order->getPaymentMethod());

        $invoice->setLocale($order->getLocale());

        foreach ($order->getOrderElements() as $orderElement) {
            $invoiceElement = $this->createInvoiceElementFromOrderElement($orderElement);
            $invoiceElement->setInvoice($invoice);
            $invoice->addInvoiceElement($invoiceElement);
        }

        if ($order->getDeliveryCost() > 0) {
            $this->addDelivery($invoice, $order);
        }

        $invoice->setStatus(InvoiceInterface::STATUS_OPEN);

        $event = new InvoiceTransformEvent($invoice);
        $this->eventDispatcher->dispatch(TransformerEvents::POST_ORDER_TO_INVOICE_TRANSFORM, $event);
    }
634237
public function isActiveDefaultPayment()
    {
        return $this->scopeConfig->isSetFlag(
            self::XML_PAYMENT_DEFAULT_ACTIVE_DEFAULT_PAYMENT,
            \Magento\Store\Model\ScopeInterface::SCOPE_STORE
        );
    }
892014
public function cancel()
    {
        $subscription = $this->asBraintreeSubscription();

        if ($this->onTrial()) {
            BraintreeSubscription::cancel($subscription->id);

            $this->markAsCancelled();
        } else {
            BraintreeSubscription::update($subscription->id, [
                'numberOfBillingCycles' => $subscription->currentBillingCycle,
            ]);

            $this->ends_at = $subscription->billingPeriodEndDate;

            $this->save();
        }

        return $this;
    }
872763
protected function userPayment()
	{
		$this->refIf = Input::get('id_get');
		$trackingCode = Input::get('trans_id');

		if (is_numeric($trackingCode) && $trackingCode > 0) {
			$this->trackingCode = $trackingCode;
			return true;
		}

		$this->transactionFailed();
		$this->newLog(-4, PaylineReceiveException::$errors[-4]);
		throw new PaylineReceiveException(-4);
	}
388280
private function _saveSubscriptionInvoice(array $stripeInvoice, Subscription $subscription): Invoice
    {
        $invoiceService = StripePlugin::getInstance()->getInvoices();
        $invoice = $invoiceService->getInvoiceByReference($stripeInvoice['id']) ?: new Invoice();
        $invoice->subscriptionId = $subscription->id;
        $invoice->reference = $stripeInvoice['id'];
        $invoice->invoiceData = $stripeInvoice;
        $invoiceService->saveInvoice($invoice);

        return $invoice;
    }
103514
public function getVoidAction()
    {
        $order = $this->getOrder();
        $data = oxNew(\OxidEsales\PayPalModule\Model\Action\Data\OrderVoidActionData::class, $this->getRequest(), $order);
        $handler = oxNew(\OxidEsales\PayPalModule\Model\Action\Handler\OrderVoidActionHandler::class, $data);

        $action = oxNew(\OxidEsales\PayPalModule\Model\Action\OrderVoidAction::class, $handler, $order->getPayPalOrder());

        return $action;
    }
1243583
public function isSuccessful()
    {
        return $this->data->getStatus() === InvoiceInterface::STATUS_CONFIRMED || $this->data->getStatus() === InvoiceInterface::STATUS_COMPLETE;
    }
741970
public function discount()
    {
        return $this->formatAmount($this->invoice->subtotal + $this->invoice->tax - $this->invoice->total);
    }
630050
protected function userPayment()
	{
		$this->refId = Input::get('RefId');
		$this->trackingCode = Input::get('SaleReferenceId');
		$this->cardNumber = Input::get('CardHolderPan');
		$payRequestResCode = Input::get('ResCode');

		if ($payRequestResCode == '0') {
			return true;
		}

		$this->transactionFailed();
		$this->newLog($payRequestResCode, @MellatException::$errors[$payRequestResCode]);
		throw new MellatException($payRequestResCode);
	}
1253837
public function confirmBillingAgreement ()
    {
        $confirmBillingAgreementRequest = new OffAmazonPaymentsService_Model_ConfirmBillingAgreementRequest();
        $confirmBillingAgreementRequest->setAmazonBillingAgreementId(
                $this->_amazonBillingAgreementId);
        $confirmBillingAgreementRequest->setSellerId($this->_sellerId);
        
        return $this->_service->confirmBillingAgreement($confirmBillingAgreementRequest);
    }
1205638
public function getPayment()
    {
        if (!$this->isPayPal()) {
            // removing PayPal payment type from session
            $this->getSession()->deleteVariable('oepaypal');
            $this->getSession()->deleteVariable('oepaypal-basketAmount');

            return parent::getPayment();
        }

        if ($this->payment === null) {
            // payment is set ?
            $payment = oxNew(\OxidEsales\Eshop\Application\Model\Payment::class);
            if ($payment->load('oxidpaypal')) {
                $this->payment = $payment;
            }
        }

        return $this->payment;
    }
593891
public function billing()
    {
        $form = $this->BillingForm();
        
        // If we are using simple checkout, skip
        if (Checkout::config()->simple_checkout) {
            return $this->redirect($this->Link('finish'));
        }
            
        // Check permissions for guest checkout
        if (!Member::currentUserID() && !Checkout::config()->guest_checkout) {
            return $this->redirect($this->Link('index'));
        }

        // Pre populate form with member info
        if (Member::currentUserID()) {
            $form->loadDataFrom(Member::currentUser());
        }

        $this->customise(array(
            'Title'     => _t('Checkout.BillingDetails', "Billing Details"),
            'Form'      => $form
        ));

        $this->extend("onBeforeBilling");

        return $this->renderWith(array(
            'Checkout_billing',
            'Checkout',
            'Page'
        ));
    }
288576
public function cancelOrderReference()
    {
        $cancelOrderReferenceRequest 
            = new OffAmazonPaymentsService_Model_CancelOrderReferenceRequest();
        $cancelOrderReferenceRequest->setSellerId($this->_sellerId);
        $cancelOrderReferenceRequest
            ->setAmazonOrderReferenceId($this->_amazonOrderReferenceId);
        
        return $this->_service->cancelOrderReference($cancelOrderReferenceRequest);
    }
679071
public function charge()
    {
        return !is_null($this->transactionRef) ?
            $this->getTransactionResource()->chargeAuthorization($this->_requestPayload()) :
            new PaystackInvalidTransactionException(
                json_decode(
                    json_encode(
                        [
                            'message' => 'Transaction Reference Not Generated.',
                        ]
                    ),
                    false
                )
            );
    }