payments->get('tr_WDqYK6vllg'); $captures = $payment->captures(); foreach ($captures as $capture) { $amount = $capture->amount->currency . ' ' . $capture->amount->value; echo 'Captured ' . $amount . ' for payment ' . $payment->id; } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . htmlspecialchars($e->getMessage()); }