# Refunding a completed order

A completed order can be refunded to the original payment method if it is eligible. Refunding a completed order cancels the transaction lines on the booking
and releases any seats that were reserved for the order.

A fully refunded completed order can no longer be modified via [completed order actions](/digital-platform/completed-orders#actions).

## Full order refunds

OCAPI supports full order refunds, which refund the cost of all tickets, items, and item delivery fees in an order to the original payment method.

### Full order refund flow

```mermaid
flowchart TB
    A(Check full order refund availability) --> B
    B(Create full order refund)
```

### Check full order refund availability

Use the [GetCompletedOrder](/openapi/digital-platform/openapi/completed-orders/ocapicompletedorders_getcompletedorder/) endpoint
to check whether a completed order can be fully refunded.

A full refund can only be performed if `refundAvailability.isAvailable` equals `true` and `refundAvailability.availableMethods` includes `Full`.

The `refundAvailability.isBookingFeeRefundable` property indicates whether any [booking fees](/digital-platform/orders/standard-orders/booking-fees) paid will be refunded.

```json
{
  "order": {
    "id": "string",
    "type": "Standard",
    "status": "Completed",
    "refundAvailability": {
      "isAvailable": true,
      "unavailableReason": "NotApplicable",
      "availableMethods": ["Full"],
      "isBookingFeeRefundable": false
    }
  }
}
```

NOTE
Some properties have been omitted from the code snippet above for brevity.

### Create full order refund

Use the [CreateFullOrderRefund](/openapi/digital-platform/openapi/refunds/ocapirefunds_createfullorderrefund/) endpoint to fully refund a completed order.

The updated completed order will be returned, indicating that the refund has been performed.

```json
{
  "id": "945aec46974c40f49d217336b149e8ca",
  "type": "Standard",
  "status": "Completed",
  "totalPrice": {
    "valueIncludingTax": 2.0,
    "valueExcludingTax": 1.72,
    "tax": 0.28
  },
  "originalPrice": {
    "valueIncludingTax": 26.0,
    "valueExcludingTax": 22.46,
    "tax": 3.54
  },
  "booking": {
    "id": "WX4KZBW",
    "totalBookingFee": {
      "valueIncludingTax": 2.0,
      "valueExcludingTax": 1.72,
      "tax": 0.28
    },
    "originalBookingFee": {
      "valueIncludingTax": 2.0,
      "valueExcludingTax": 1.72,
      "tax": 0.28
    },
    "mode": "Paid"
  },
  "refundAvailability": {
    "isAvailable": false,
    "unavailableReason": "AlreadyRefunded",
    "availableMethods": [],
    "isBookingFeeRefundable": false
  },
  "totalRefunded": {
    "valueIncludingTax": 24.0,
    "valueExcludingTax": 20.74,
    "tax": 3.26
  }
}
```

NOTE
Some properties have been omitted from the code snippet above for brevity.

## Limitations

### Partial order refunds

OCAPI does not currently support partial order refunds. However, if booking fees are configured to be non-refundable,
a full refund will refund everything in the order except any booking fees.

### Linked order refunds

Linked [parent orders](/digital-platform/orders/standard-orders/linked-orders#parent-orders) and [child
orders](/digital-platform/orders/standard-orders/linked-orders#child-orders) must be refunded individually.

Parent orders cannot be refunded until all linked child orders have been fully refunded. This is to prevent the patron abusing
this feature to access time-related promotions or discounts they otherwise wouldn't have access to.

### Completed orders containing weight-based item lines

OCAPI does not currently support refunds of completed orders that contain weight-based item lines.