use MazimezGigapayInvoice; $invoice = Invoice::findById('f3ee8cb8-fc95-4ea2-9b2e-18875b0d759a');//getting invoice by it's ID return $invoice->getJson();