@property
    @memoized
    def invoice(self):
        try:
            invoice_id = self.request.POST['invoice_id']
        except __HOLE__:
            raise PaymentRequestError("invoice_id is required")
        try:
            return Invoice.objects.get(pk=invoice_id)
        except Invoice.DoesNotExist:
            raise PaymentRequestError(
                "Could not find a matching invoice for invoice_id '%s'"
                % invoice_id
            )
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/domain/views.py/InvoiceStripePaymentView.invoice