# Refund deposits

#### Refund deposit by ID

{% tabs %}
{% tab title="JavaScript" %}

```javascript
const bodyJSON = {
  variables: {
    id: "6053d4e0e3bc655e0598a742",
    input: {
      amount: 10,
      reason: "sent by mistake",
    },
  }, 
  query: `
mutation ($id: ID!, $input: RefundDepositInput!) {
  refundDeposit(id: $id, input: $input) {
    success code message
  }
}`,
};
```

{% endtab %}

{% tab title="GraphQL Query" %}

```graphql
mutation($id: ID!, $input: RefundDepositInput!) {
  refundDeposit(id: $id, input: $input) {
    success
    code
    message
  }
}
```

{% endtab %}

{% tab title="Variables" %}

```javascript
{ 
  "id": "6053d4e0e3bc655e0598a742",
  "input": { 
    "amount": 10, 
    "reason": "sent by mistake"
  }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
  "data": {
    "refundDeposit": {
      "success": true,
      "code": "REFUND_SENT",
      "message": "Refund initiated successfully"
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.flash-payments.com/moving-funds/deposits/refund-deposits.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
