Verify Transfer

1. Verify by TransferId

You can make a GET request to the VerifyTransferAPI api/v1/transfers/verify/{transferId} endpoint using the transfer ID to check the status of your transfer.

VerbURL
GET{{baseUrl}}/api/v1/transfers/verify/{transferId}

Sample Request to verify transfer:

curl --request GET \
     --url https://api.sandbox.getanchor.co/api/v1/transfers/verify/169529343584418-anc_trsf \
     --header 'accept: application/json' \
     --header 'x-anchor-key: <API Key>'
{
  "data": {
    "id": "169529343584418-anc_trsf",
    "type": "NIP_TRANSFER",
    "attributes": {
      "createdAt": "2023-09-21T10:50:36",
      "reference": "trxnrtynhgs",
      "reason": "Test Transfer",
      "amount": 5000,
      "currency": "NGN",
      "status": "COMPLETED"
    },
    "relationships": {
      "counterParty": {
        "data": {
          "id": "16942577770351-anc_cp",
          "type": "CounterParty"
        }
      },
      "account": {
        "data": {
          "id": "16922123768364-anc_acc",
          "type": "DepositAccount"
        }
      },
      "customer": {
        "data": {
          "id": "16922123736510-anc_bus_cst",
          "type": "BusinessCustomer"
        }
      }
    }
  }
}

2. Verify by Reference

Get status of a transfer using your customerReference. This is especially useful after a network timeout or unclear response, to confirm whether the transfer was received by Anchor before retrying. This helps prevent duplicate transactions.

VerbURL
GET{{baseUr}/api/v1/transfers/by-reference/:customer-reference
curl --location 'https://api.getanchor.co/api/v1/transfers/by-reference/trxnrtynhgs' \ 
--header 'accept: application/json' \ 
--header 'x-anchor-key: <API Key>'  
{
  "data": {
    "id": "169529343584418-anc_trsf",
    "type": "NIP_TRANSFER",
    "attributes": {
      "createdAt": "2023-09-21T10:50:36",
      "reference": "trxnrtynhgs",
      "reason": "Test Transfer",
      "amount": 5000,
      "currency": "NGN",
      "status": "COMPLETED"
    },
    "relationships": {
      "counterParty": {
        "data": {
          "id": "16942577770351-anc_cp",
          "type": "CounterParty"
        }
      },
      "account": {
        "data": {
          "id": "16922123768364-anc_acc",
          "type": "DepositAccount"
        }
      },
      "customer": {
        "data": {
          "id": "16922123736510-anc_bus_cst",
          "type": "BusinessCustomer"
        }
      }
    }
  }
}

Transfer States

Transfers have the following states:

StateDescription
pendingPending represents the initial status of a transfer as soon as it is initiated. It serves as a temporary state that typically updates to "Successful" within seconds, or in certain instances, it may update to "Failed.”
completedCompleted indicates that a transfer has was successful without any issues. The majority of transfers achieve this status within seconds.
failedA transfer marked as "Failed" signifies that it has not been completed due to various factors. Possible reasons include issues with the recipient's account, recipient's bank account not reachable or errors during the transfer process.
reversedThis indicates the status of a transfer that was initially successful but had to be reversed and returned to the sending account balance. due to its inability to be processed in the recipient's bank account.

When a transfer is in pending state, you can call the verify transfer endpoint, if we have sent the request to the provider for processing, this endpoint will query the provider for the status and update the transfer with that status. If the transfer hasn't been sent, it will return as pending.

📘

When you initiate a transfer, it may take a few seconds or minutes to complete processing. For this reason, we strongly recommend listening to webhook events to receive real-time status updates.

Transfer related Webhook Events

Transfer Related Webhook Events:

Webhook EventDescription
nip.transfer.initiatedGenerated when Nip Transfer is initiated.
nip.transfer.successfulGenerated when Nip Transfer is successful.
nip.transfer.failedGenerated when Nip Transfer fails.
book.transfer.initiatedThis event is generated when a Book Transfer is initiated.
book.transfer.successfulGenerated when Book Transfer is successful.
book.transfer.failedThis is generated when a Book Transfer fails.