Get All Line Items Checkout Event I'm looking to fetch all line items and send it as a POST request to an endpoint. I've had a look through the class references but can't seem to find a way to get all the line items that are currently active.
Event::on(
  Payments::class,
  Payments::EVENT_BEFORE_CAPTURE_TRANSACTION,
  function(TransactionEvent $event) {

        $transaction = $event-&gt;transaction;
        // @var LineItem $lineItem
        $lineItem = $event-&gt;lineItem;

        $client = new \Guzzle\Http\Client([
            // You can set any number of default request options.
            'Authorization'  =&gt; 'qdaiciDiyMaTjxMt, 74026b3dc2c6db6a30a73e71cdb138b1e1b5eb7a97ced46689e2d28db1050875',
        ]);


        // Add Cart Data to an Array
        $order_data = array(
            'product_id' =&gt; $lineItem-&gt;id,
            'quantity' =&gt; $lineItem-&gt;quantity
        );
...
Your error is in this bit:
        // @var LineItem $lineItem
        $lineItem = $event-&gt;lineItem;

Looking at the event in question:
https://craftcms.com/docs/commerce/3.x/events.html#beforecapturetransaction
...this shows that you get a Transaction model supplied in this event:
https://docs.craftcms.com/commerce/api/v3/craft-commerce-models-transaction.html#public-properties
...note that model gives you direct access to the related order element:
https://docs.craftcms.com/commerce/api/v3/craft-commerce-elements-order.html
...from which you can then retrieve all the line items (and products etc associated with them), by looping over order.lineItems