> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fincode.technology/llms.txt
> Use this file to discover all available pages before exploring further.

# Transfer Status

> Checks the settlement status of a fund transfer transaction.

Allows customers to check the current status of a fund transfer transaction, including whether it has been completed, is still processing, or has failed.

<RequestExample>
  ```bash cURL GET theme={null}
  [https://finlend.fincode.software/api/v1/services/user/check-transfer-status/{transactionReference}](https://finlend.fincode.software/api/v1/services/user/check-transfer-status/{transactionReference})
  ```
</RequestExample>

## Request Headers

<ParamField header="X-Auth-Token" type="string" required>
  The **JWT Access Token** obtained from the `/login` or `/refresh-token` endpoint.
</ParamField>

<ParamField header="x-fapi-auth-date" type="string" required>
  The date and time at which the request was initiated (ISO 8601 format).
</ParamField>

<ParamField header="x-fapi-customer-ip-address" type="string" required>
  The IP address of the customer making the request.
</ParamField>

<ParamField header="x-fapi-interaction-id" type="string" required>
  Unique identifier for the interaction/session.
</ParamField>

## Path Parameters

<ParamField path="transactionReference" type="string" required>
  The transaction reference number of the transfer to check.
</ParamField>

## Response

Returns the current status of the transfer transaction.

<ResponseField name="status" type="string" default="SUCCESS">
  Overall status of the API request.
</ResponseField>

<ResponseField name="data" type="object">
  Transfer status details.

  <Expandable title="data object">
    <ResponseField name="transactionReference" type="string">
      Transaction reference number.
    </ResponseField>

    <ResponseField name="transferStatus" type="string">
      Current status of the transfer (e.g., `PENDING`, `PROCESSING`, `COMPLETED`, `FAILED`, `CANCELLED`).
    </ResponseField>

    <ResponseField name="amount" type="number">
      Amount of the transfer.
    </ResponseField>

    <ResponseField name="initiatedDate" type="string">
      Date and time when the transfer was initiated.
    </ResponseField>

    <ResponseField name="completedDate" type="string">
      Date and time when the transfer was completed (if completed).
    </ResponseField>

    <ResponseField name="failureReason" type="string">
      Reason for failure (if status is `FAILED`).
    </ResponseField>

    <ResponseField name="settlementDetails" type="object">
      Details about the settlement process.
    </ResponseField>
  </Expandable>
</ResponseField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl --location 'https://finlend.fincode.software/api/v1/services/user/check-transfer-status/TXN-20240115-001234' \
  --header 'X-Auth-Token: YOUR_JWT_ACCESS_TOKEN' \
  --header 'x-fapi-auth-date: 2024-01-15T10:30:00Z' \
  --header 'x-fapi-customer-ip-address: 192.168.1.1' \
  --header 'x-fapi-interaction-id: interaction-12345'
  ```

  ```javascript Node.js theme={null}
  const axios = require('axios');

  const BASE_URL = 'https://finlend.fincode.software/api/v1/services/user';

  async function checkTransferStatus(accessToken, transactionReference) {
    try {
      const response = await axios.get(
        `${BASE_URL}/check-transfer-status/${transactionReference}`,
        {
          headers: {
            'X-Auth-Token': accessToken,
            'x-fapi-auth-date': new Date().toISOString(),
            'x-fapi-customer-ip-address': '192.168.1.1',
            'x-fapi-interaction-id': `interaction-${Date.now()}`,
          },
        }
      );

      if (status.completedDate) {
        console.log(`Completed: ${status.completedDate}`);
      }
      if (status.failureReason) {
        console.log(`Failure Reason: ${status.failureReason}`);
      }
      return status;
    } catch (error) {
      console.error(
        'Failed to check transfer status:',
        error.response?.data || error.message
      );
      throw error;
    }
  }

  // Usage Example
  const accessToken = 'YOUR_JWT_ACCESS_TOKEN';
  checkTransferStatus(accessToken, 'TXN-20240115-001234');
  ```
</CodeGroup>
