Invoice not being generated for a recurring order

Hello guys I’m trying to generate a invoice for a recurring order but the problem is I’m not able to generate a invoice. Can somebody tell me what is it that is going wrong

      $data =  $this->infusionsoftService->invoices()->addRecurringOrder($contactID, false,
            $subscription['id'], 1, $subscription['PlanPrice'], false, 3, $creditCardID, 0, 0);
        return $this->infusionsoftService->invoices()->createInvoiceForRecurring($subscription['id']);

found the issue the $data id is the subscription id that we need to send to this function createInvoiceForRecurring

1 Like