# RefundIntent

> The `RefundIntent` object.

Source: https://docs.gastrogate.io/docs/api/types/RefundIntent

**Kind:** Objects

## Fields

### `id`

[`ID`](https://docs.gastrogate.io/docs/api/types/ID.md)!

### `completedAt`

[`DateTime`](https://docs.gastrogate.io/docs/api/types/DateTime.md)

### `context`

[`RefundContext`](https://docs.gastrogate.io/docs/api/types/RefundContext.md)

### `createdAt`

[`DateTime`](https://docs.gastrogate.io/docs/api/types/DateTime.md)

### `deliveryLocation`

[`DeliveryLocation`](https://docs.gastrogate.io/docs/api/types/DeliveryLocation.md)

### `discountAmount`

[`Int53`](https://docs.gastrogate.io/docs/api/types/Int53.md)

### `items`

\[[`OrderItem`](https://docs.gastrogate.io/docs/api/types/OrderItem.md)!\]

### `paymentProvider`

[`PaymentProvider`](https://docs.gastrogate.io/docs/api/types/PaymentProvider.md)

### `posTerminal`

[`PosTerminal`](https://docs.gastrogate.io/docs/api/types/PosTerminal.md)

### `receiptPrinter`

[`PrinterQueue`](https://docs.gastrogate.io/docs/api/types/PrinterQueue.md)

### `requestedByUser`

[`User`](https://docs.gastrogate.io/docs/api/types/User.md)

### `tipAmount`

[`Int53`](https://docs.gastrogate.io/docs/api/types/Int53.md)

### `totalAmountRefunded`

[`Int53`](https://docs.gastrogate.io/docs/api/types/Int53.md)

### `totalAmountRefundable`

[`Int53`](https://docs.gastrogate.io/docs/api/types/Int53.md)

### `updatedAt`

[`DateTime`](https://docs.gastrogate.io/docs/api/types/DateTime.md)

### `action`

[`RefundIntentAction`](https://docs.gastrogate.io/docs/api/types/RefundIntentAction.md)

For state "RequiresAction" this is the action that the user needs to perform.

### `order`

[`Order`](https://docs.gastrogate.io/docs/api/types/Order.md)

If refunding an order, this is that order.
If refunding an order intent, this is null.

### `orderIntent`

[`OrderIntent`](https://docs.gastrogate.io/docs/api/types/OrderIntent.md)

If refunding an order, this is the order intent that led to that order.
If refunding an order intent, this is that order intent.

### `state`

[`RefundIntentState`](https://docs.gastrogate.io/docs/api/types/RefundIntentState.md)!

The state which this Refund Intent is currently in.

- 'RequiresAction' - An action is required to be performed by the user before this refund intent can progress, see the 'action' field for more info.
- 'Done' - This refund intent has successfully resulted in an Refund.
- 'Failed' - The refund intent has failed and will never result in an Refund.

## How to get it

This type is returned by:

- [`cancelOrderIntent`](https://docs.gastrogate.io/docs/api/mutations/cancelOrderIntent.md) (mutation)
- [`cancelRefundIntent`](https://docs.gastrogate.io/docs/api/mutations/cancelRefundIntent.md) (mutation)
- [`createRefundIntent`](https://docs.gastrogate.io/docs/api/mutations/createRefundIntent.md) (mutation)
- [`finalizeRefundIntent2`](https://docs.gastrogate.io/docs/api/mutations/finalizeRefundIntent2.md) (mutation)
- [`Restaurant.refundIntent`](https://docs.gastrogate.io/docs/api/types/Restaurant.md#refundintent) (field on [`Restaurant`](https://docs.gastrogate.io/docs/api/types/Restaurant.md))
- [`Order.refundIntents`](https://docs.gastrogate.io/docs/api/types/Order.md#refundintents) (field on [`Order`](https://docs.gastrogate.io/docs/api/types/Order.md))
- [`OrderIntent.refundIntent`](https://docs.gastrogate.io/docs/api/types/OrderIntent.md#refundintent) (field on [`OrderIntent`](https://docs.gastrogate.io/docs/api/types/OrderIntent.md))
