# Refunds

Refunds can be performed against paid Orders.

# Complete refund

If you need to refund an order completely, invoke the refundCompletely method on its instance:

use App\Models\User;

$user = App\User::find(1);

$order = $user->orders->first();
$order->refundCompletely();

# Advanced refunds

For a finer grained control, build a refund manually:

use Laravel\Cashier\Refunds\RefundItem;

$shippingCosts = RefundItem::make([
    'owner' => $user,
    'description' => 'Shipping costs',
    'currency' => 'EUR',
    'quantity' => 1,
    'unit_price' => '6.67',
    'tax_percentage' => 21,
]);

$order->newRefund()
    ->addItem(RefundItem::MakeFromOrderItem($order->items->first()))
    ->addItem($shippingCosts)
    ->create();