getOrder('ord_8wmqcHMN4U'); $lineId1 = $order->lines()[0]->id; $lineId2 = $order->lines()[1]->id; $shipment = $order->createShipment( [ 'lines' => [ [ 'id' => $lineId1, // assume all is shipped if no quantity is specified ], [ 'id' => $lineId2, 'quantity' => 1, // you can set the quantity if not all is shipped at once ], ], ] ); echo 'A shipment with ID ' . $shipment->id. ' has been created for your order with ID ' . $order->id . '.'; foreach ($shipment->lines as $line) { echo $line->name . '- status: ' . $line->status . '.'; } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); }