# Confirm Transfer

<mark style="color:blue;">**`POST`**</mark> `https://api.sfox.com/v1/enterprise/transfer/confirm`

This endpoint allows Partners to confirm a `Payment` transfer.  Your end users will receive an email with payment details and an OTP code.  The Partner application will have to handle accepting the OTP code from the end user.  Once confirmed, the transfer will be automatically processed.

### Body Parameters

<table><thead><tr><th width="245">Name</th><th width="77">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>transfer_id</code> <mark style="color:red;">required</mark></td><td>string</td><td>Partner generated transfer and idempotency ID</td></tr><tr><td><code>otp</code> <mark style="color:red;">required</mark></td><td>string</td><td>Transfer confirmation code</td></tr></tbody></table>

### Responses

<details>

<summary><mark style="color:green;"><strong>201 Created</strong></mark></summary>

```json
{
    "data": {
        "transfer_id": "7735757c-863e-4e07-9b84-af186424ebae",
        "transfer_status_code": "COMPLETE",
        "type": "PAYMENT",
        "quantity": 0.1,
        "currency": "eth",
        "user_id": "ClientAccount1",
        "rate": 2000,
        "purpose": "GOOD",
        "description": "Gift card payment",
        "atx_id_charged": 1728524,
        "atx_id_credited": 1728525,
        "atx_status_charged": 1127,
        "atx_status_credited": 1127
    }
}
```

</details>

<details>

<summary><mark style="color:red;"><strong>422 Unprocessable Content</strong></mark></summary>

```json
{
    "error": "Code expired. Request a new code for this transfer."
}
```

```json
{
    "error": "Funds transfer is not pending verification."
}
```

</details>

## Response Body

<table><thead><tr><th width="347">Key</th><th>Description</th></tr></thead><tbody><tr><td><code>transfer_id</code></td><td>Partner generated transfer and idempotency ID</td></tr><tr><td><code>transfer_status_code</code></td><td>Status of the transfer</td></tr><tr><td><code>type</code></td><td>Transfer type</td></tr><tr><td><code>quantity</code></td><td>Transfer quantity</td></tr><tr><td><code>currency</code></td><td>Transfer currency</td></tr><tr><td><code>user_id</code></td><td>The Connect user ID this transfer will apply to</td></tr><tr><td><code>rate</code></td><td>USD FX Rate of the transfer</td></tr><tr><td><code>purpose</code></td><td>Transfer purpose</td></tr><tr><td><code>description</code></td><td>Partner declared description text</td></tr><tr><td><code>atx_id_charged</code></td><td>ID of the charge account transaction</td></tr><tr><td><code>atx_id_credited</code></td><td>ID of the credit account transaction</td></tr><tr><td><code>atx_status_charged</code></td><td>Status of the charge account transaction</td></tr><tr><td><code>atx_status_credited</code></td><td>Status of the credit account transaction</td></tr><tr><td><code>transfer_date</code></td><td>Transfer Date</td></tr></tbody></table>

### Example Requests

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

<pre class="language-bash"><code class="lang-bash">curl -X POST \
  -H 'Content-type: application/json' \
<strong>  -H "Authorization: Bearer ${ENTERPRISE_API_KEY}" \
</strong>  --data '{ "transfer_id": "7735757c-863e-4e07-9b84-af186424ebae",
          "otp": "123456" }'  \
  'https://api.sfox.com/v1/enterprise/transfer/confirm'
</code></pre>

{% endtab %}

{% tab title="NodeJS" %}

```javascript
const axios = require('axios');

const config = {
  method: 'post',
  url: 'https://api.sfox.com/v1/enterprise/transfer/confirm',
  headers: {
    "Content-Type": "application/json",
    'Authorization': `Bearer ${process.env.ENTERPRISE_API_KEY}`
  },
  data: {
    transfer_id: '7735757c-863e-4e07-9b84-af186424ebaeE',
    otp: '123456'
  }
}

axios(config)
  .then((response) => {
    console.log(response.status);
    console.log(response.data);
  })
  .catch((error) => {
    console.error(error.response.status);
    console.error(error.response.data);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os

data = requests.post(
  "https://api.sfox.com/v1/enterprise/transfer/confirm",
  headers={
    "Authorization": f"Bearer {os.environ['ENTERPRISE_API_KEY']}"
  },
  json={
    "transfer_id": "7735757c-863e-4e07-9b84-af186424ebae",
    "otp": "123456"
  }
)
print(data.status_code)
print(data.json())
```

{% 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://docs.sfox.com/connect/rest-api/transfers/confirm-transfer.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.
