# cancelRefundIntent

> Required permission: RestaurantOrderRefund

Source: https://docs.gastrogate.io/docs/api/mutations/cancelRefundIntent

```graphql
cancelRefundIntent(
  restaurantId: ID!
  refundIntentId: ID!
): RefundIntent
```

## Arguments

| Name | Type | Description |
| --- | --- | --- |
| `restaurantId` | [`ID`](https://docs.gastrogate.io/docs/api/types/ID.md)! |  |
| `refundIntentId` | [`ID`](https://docs.gastrogate.io/docs/api/types/ID.md)! |  |

## Returns

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

## Example

```graphql
mutation CancelRefundIntent($restaurantId: ID!, $refundIntentId: ID!) {
  cancelRefundIntent(restaurantId: $restaurantId, refundIntentId: $refundIntentId) {
    id
    completedAt
    createdAt
    discountAmount
    paymentProvider
    tipAmount
  }
}
```

```bash
curl https://api.thelocoapp.com/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $LOCO_API_KEY" \
  -d '{"query": "mutation { cancelRefundIntent(...) { __typename } }"}'
```
