Track transfer status
Follow a transfer to a terminal state with status, status_detail, failure, webhooks, and the list and export endpoints.
Every transfer carries status, one of seven words, and status_detail, why it is there. Branch on status and failure.code; show status_detail and failure.message to people.
Retrieve a transfer
curl https://api.sandbox.roots.finance/api/v1/transfers/xfer_3e7a1d9c5b2f4e8a9c6d0b1f2e3a4d5c \
-H "Authorization: Bearer $ROOTS_API_TOKEN"The response is a TransferDetail. The fields to track:
| Field | Meaning |
|---|---|
status | pending, submitted, settled, failed, returned, reversed, or cancelled. See the table below. |
status_detail | Why the transfer is in its status, or null. Informational; do not branch on it. |
failure | {code, message, return_code, return_description}, set when status is failed, returned, or reversed; null when it is cancelled. code is a stable slug to branch on; message is a sentence for a person to read, and its wording can change. return_code and return_description are set only on a returned transfer: the bank's own return code and reason. |
rail_refs | References the bank returned, once it reports them: ACH trace_number; wire imad, omad, uetr, end_to_end_id; internal transfer bank_transfer_id. |
cancel_requested_at | When we asked the bank to cancel; null until then. status stays submitted until the bank confirms. |
cancelable | Whether POST /transfers/{transfer_id}/cancel is worth trying now. A hint, not a promise. |
submitted_at, settled_at, failed_at, cancelled_at, returned_at, reversed_at | When the transfer reached each status. Each is set once and never cleared: a transfer settled and then returned or reversed keeps settled_at. |
Status reference
status | Deposit | Withdrawal | Internal transfer | Terminal | Meaning |
|---|---|---|---|---|---|
pending | Yes | Yes | Yes | No | Not with the bank yet. |
submitted | No | Yes | Yes | No | The bank has it and is processing it. |
settled | Yes | Yes | Yes | Yes, but a settled withdrawal can later be returned or reversed, and a settled deposit can later be returned | Done. A settled deposit is spendable. |
failed | Yes | Yes | Yes | Yes | Ended without moving money. failure says why. |
returned | Yes | Yes | No | Yes | Sent back by the bank. settled_at is also set if it had settled first. |
reversed | No | Yes | No | Yes | The bank pulled back an ACH withdrawal that had already settled. settled_at and reversed_at are both set. |
cancelled | No | Yes | No | Yes | Withdrawn before it settled, by you with POST /transfers/{transfer_id}/cancel. No money moved and failure is null. The held funds go back to available_minor; a fee already charged is not refunded. |
status_detail | With status | Meaning |
|---|---|---|
awaiting_release | pending | A deposit held until it is released. |
funds_held | pending | The balance is held for the withdrawal; it has not been sent. The funds are held from the moment Roots' checks pass the withdrawal, so they already show in pending_minor whatever the status_detail. |
bank_processing | submitted | The bank is processing it. |
cancelled_before_submission | cancelled | Cancelled before it reached the bank. |
cancel_requested | submitted | You cancelled it after it was submitted and we asked the bank. The transfer stays submitted until the bank confirms, then becomes cancelled. If the bank had already processed it, the cancel answers 409 transfer_not_cancelable and the transfer is unchanged. |
cancelled_at_bank | cancelled | You cancelled it after it was submitted, and the bank confirmed. |
Transitions by direction:
direction | Path |
|---|---|
internal | pending → submitted → settled, or failed. |
withdrawal | pending → submitted → settled, or failed, or cancelled. A settled withdrawal can later be returned, or, on ACH, reversed. |
deposit | pending → settled, or failed. A settled deposit can later be returned. |
A status never goes backwards, but it can skip intermediate steps. Do not depend on seeing every step.
A terminal transfer never changes again, except that a settled withdrawal can become returned or reversed, and a settled deposit can become returned. There is no retry endpoint: to try again, create a new transfer with a new Idempotency-Key.
Cancel a transfer
POST /api/v1/transfers/{transfer_id}/cancel withdraws a withdrawal you no longer want. It needs the transfers:create scope and an Idempotency-Key, and only the identity that created the transfer can cancel it; anyone else gets 403 permission_denied.
curl -X POST https://api.sandbox.roots.finance/api/v1/transfers/xfer_3e7a1d9c5b2f4e8a9c6d0b1f2e3a4d5c/cancel \
-H "Authorization: Bearer $ROOTS_API_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"If the bank never had the transfer, the response is the TransferDetail with status cancelled, status_detail cancelled_before_submission and failure null.
If the transfer was already submitted, the cancel is a request. The response keeps status submitted, with status_detail cancel_requested and cancel_requested_at set. status changes only when the bank confirms: the transfer then becomes cancelled with status_detail cancelled_at_bank, and a transfer.status.changed webhook is sent. Repeating the request is safe.
Read cancelable on the transfer before offering a cancel. It is true for a pending withdrawal, once created, whose status_detail is not funds_held, on any rail, and for a submitted ACH or same-day ACH with no cancel requested. It is false for everything else: a withdrawal still being created, one that is pending with status_detail funds_held (being sent to the bank; it flips to true or false within seconds), a sent fedwire transfer, one that has settled, failed, returned or been cancelled, one with a cancel in flight, and deposits and internal transfers. It is a hint, not a promise: an ACH can stop being cancellable at the bank without any change on the transfer.
A cancel that cannot go ahead answers 409 with one of two codes:
code | Meaning | What to do |
|---|---|---|
transfer_not_cancelable | This transfer cannot be cancelled: a wire already sent, one the bank refused to cancel or that has settled, a deposit, or an internal transfer. The transfer is unchanged. | Do not retry. Read the transfer. To take money back after settlement, create a new transfer. |
transfer_cancel_unavailable | Not yet: the transfer is still being created or is being sent to the bank. | Retry in a few seconds, or wait until cancelable is true. |
A fee charged when the transfer was submitted is not refunded: fee_charged_minor keeps it.
Failure codes
failure.code | What to do |
|---|---|
insufficient_funds | Fund the source account, then create a new transfer. Withdrawals you already created count against the balance even if they have not reached the bank, so two that together exceed available_minor cannot both be accepted. |
rail_rejected | Check the counterparty's bank details and rails, then create a new transfer. It is also the code when the bank has no record of the transfer after repeated attempts. Either way the held funds go back to available_minor. |
invalid_bank_details | Correct the counterparty's routing and account number. |
recipient_not_registered | Check the counterparty, then create a new transfer. |
returned_ach | The bank returned a settled ACH transfer. Check the counterparty, then pay again. |
reversed_by_bank | The bank reversed a settled ACH withdrawal and the amount is back in the account. Check with the counterparty or support before paying again. |
debit_not_authorized | The account holder told their bank an ACH transfer was not authorized. Confirm the authorization with the counterparty before paying again. |
account_not_active | Restore the account to active, then create a new transfer. |
account_not_provisioned | Wait until the account is active. |
rail_unavailable | Use another rail. |
duplicate_payment | Check the earlier transfer before sending again. |
temporarily_unavailable | Create a new transfer after a short wait. |
payment_failed | Any other cause. Give the transfer id to support. |
A returned transfer's failure.code names the bank's reason when Roots recognises it. Any other ACH return carries returned_ach.
| ACH return codes | failure.code |
|---|---|
R01, R09 | insufficient_funds |
R02, R14, R15, R16, R20 | account_not_active |
R03, R04, R12, R13, R28, R41–R45 | invalid_bank_details |
R05, R07, R10, R11, R29, R37–R39, R51–R53 | debit_not_authorized |
R24, R67 | duplicate_payment |
| Any other | returned_ach |
failure.message ends with the bank's return code, for example R01. failure.return_code carries the same code and failure.return_description the bank's reason. A code in neither list below keeps return_code and has no return_description.
A return can arrive long after the transfer settled. The ACH return window is 2 banking days for most codes, 5 for R61, R62 and R67–R70, and 60 banking days for R05, R07, R10, R11, R33, R37, R38, R51, R52 and R53. R06 and R31 have no window. A settled transfer keeps syncing until it is returned or reversed.
Reversal
A reversal is ACH only: the bank pulls back an ACH withdrawal that had already reached the receiver, and the transfer becomes reversed with failure.code reversed_by_bank. It carries no return code. A wire has no reversal; a wire the bank takes back arrives as a return. A reversal can arrive minutes to days after the withdrawal settled. Roots is told by the bank and you cannot start one through the API.
Fees on a return or reversal
A returned or reversed withdrawal keeps the fee charged when it was submitted. The withdrawn amount returns to the source account.
A return or reversal can also cost you a fee of its own (a transfer.returned or transfer.reversed fee rule). That fee is paid from your billing balance, not by the customer, so it is not in the transfer's fee_charged_minor, which only sums what the customer paid. Find it with GET /fees?transfer_id={transfer_id}: its event_type is transfer.returned or transfer.reversed and its payer is client. The same fee arrives as a fee.charged webhook.
ACH return codes
Dishonored returns R71–R77 dispute an earlier return. They are recorded and do not change a transfer.
| Code | Reason | Return window |
|---|---|---|
R01 | Insufficient Funds | 2 Banking Days |
R02 | Account Closed | 2 Banking Days |
R03 | No Account/Unable to Locate Account | 2 Banking Days |
R04 | Invalid Account Number Structure | 2 Banking Days |
R05 | Unauthorized Debit to Consumer Account Using Corporate SEC Code | 60 Banking Days |
R06 | Returned per ODFI's Request | None |
R07 | Authorization Revoked By Customer | 60 Banking Days |
R08 | Payment Stopped | 2 Banking Days |
R09 | Uncollected Funds | 2 Banking Days |
R10 | Customer Advises Originator is Not Know to Receiver and/or Originator is Not Authorized by Receiver to Debit Receiver's Account | 60 Banking Days |
R11 | Customer Advises Entry Not in Accordance with the Terms of Authorization | 60 Banking Days |
R12 | Account Sold to Another DFI | 2 Banking Days |
R14 | Representative Payee Deceased or Unable to Continue in That Capacity | 2 Banking Days |
R15 | Beneficiary or Account Holder (other that Representative Payee) Deceased | 2 Banking Days |
R16 | Account Frozen/ Entry Returned Per OFAC Instruction | 2 Banking Days |
R17 | File Record Edit Criteria/ Entry With Invalid Account Number Initiated Under Questionable Circumstances/Return of Improperly Initiated Reversal | 2 Banking Days |
R20 | Non Transaction Account | 2 Banking Days |
R21 | Invalid Company Identification | 2 Banking Days |
R22 | Invalid Individual ID Number | 2 Banking Days |
R23 | Credit Entry Refused by Receiver | 2 Banking Days |
R24 | Duplicate Entry | 2 Banking Days |
R29 | Corporate Customer Advises Not Authorized | 2 Banking Days |
R31 | Permissible Return Entry (CCD and CTX only) | None |
R33 | Return of XCK Entry | 60 Banking Days |
R37 | Source Document Presented for Payment | 60 Banking Days |
R38 | Stop Payment of Source Document | 60 Banking Days |
R39 | Improper Source Document/Source Document Presented for Payment | 2 Banking Days |
R50 | State Law Affecting RCK | 2 Banking Days |
R51 | Item Related to RCK Entry is Ineligible or RCK Entry is Improper | 60 Banking Days |
R52 | Stop Payment on Item Related to RCK Entry | 60 Banking Days |
R53 | Item and RCK Entry Presented for Payment | 60 Banking Days |
R61 | Misrouted Return | 5 Banking Days |
R62 | Return of erroneous or Reversing Debit | 5 Banking Days |
R67 | Duplicate Return | 5 Banking Days |
R68 | Untimely Return | 5 Banking Days |
R69 | Field Error(s) | 5 Banking Days |
R70 | Permissible Return Entry Not Accepted/Return Not Requested by ODFI | 5 Banking Days |
R71 | Misrouted Dishonored Return | 2 Banking Days from the settlement date of dishonored entry |
R72 | Untimely Dishonored Return | 2 Banking Days from the settlement date of dishonored entry |
R73 | Timely Original Entry | 2 Banking Days from the settlement date of dishonored entry |
R74 | Corrected Return | 2 Banking Days from the settlement date of dishonored entry |
R75 | Return Not a Duplicate | 2 Banking Days from the settlement date of dishonored entry |
R76 | No Errors Found | 2 Banking Days from the settlement date of dishonored entry |
R77 | Non-Acceptance of R62 Dishonored Return | 2 Banking Days from the settlement date of dishonored entry |
Wire return codes
| Code | Reason |
|---|---|
AC01 | Incorrect Account Number |
AC03 | Invalid Creditor Account Number |
AC04 | Closed Account |
AC06 | Blocked Account |
AC14 | Invalid Agent |
DUPL | Duplicate Payment |
AM06 | Too Low Amount |
AM09 | Wrong Amount |
BE05 | Unrecognized Initiating Party |
BE06 | Unknown End Customer |
CUST | Requested By Customer |
FOCR | Following Refund Request |
FR01 | Fraudulent Payment |
MS02 | Not Specified Reason Customer |
MS03 | Not Specified Reason Agent |
NARR | Narrative |
RR01 | Missing Debtor Account or Identification |
RR02 | Missing Debtor Name or Address |
RR03 | Missing Creditor Name or Address |
RR04 | Regulatory Reason |
RUTA | Return Upon Unable To Apply |
UPAY | Undue Payment |
Get notified
Subscribe a webhook endpoint to these events. See Webhooks and events.
| Event | data | Sent when |
|---|---|---|
transfer.created | TransferDetail | A transfer is created, including a recorded deposit. |
transfer.status.changed | TransferDetail | The transfer moves to a new status, cancelled included. |
A return and a reversal do not have an event type of their own: both arrive as transfer.status.changed, with data.status set to returned or reversed. Subscribe to transfer.status.changed and branch on data.status; data.failure.return_code carries the bank's code on a return, and data.returned_at or data.reversed_at says when. The fee a return or reversal costs you arrives as its own fee.charged event (see Fees on a return or reversal).
Treat a webhook as a prompt to read the transfer, and read it before you post a final outcome.
List and export
GET /api/v1/transfers lists TransferSummary rows, newest first. Each row carries source and destination, status, status_detail, failure (set when failed, returned or reversed), your external_id, and settled_at.
| Parameter | Values |
|---|---|
direction | internal, withdrawal, deposit |
status | pending, submitted, settled, failed, returned, reversed, or cancelled. |
account_id | Matches either leg, so an account sees transfers it received as well as sent. |
search | Transfer id or either leg's name. |
order_by | source, destination, rail, amount, currency, status, created_at (default). |
order | asc or desc (default). |
created_from, created_to | Transfers created on or after, and on or before, this day (UTC, both inclusive). |
page, page_size | From 1; 1–100, default 20. |
curl "https://api.sandbox.roots.finance/api/v1/transfers?account_id=acct_4d9e2b7c1a6f5e3d8b0c9a2f1e7d6c5b&status=submitted&page=1&page_size=50" \
-H "Authorization: Bearer $ROOTS_API_TOKEN"{"data": [], "page": 1, "page_size": 50, "total": 0}GET /api/v1/transfers/export returns every matching transfer as roots_transfers_{date}.csv or .pdf. It takes the same filters plus format, columns, and created_from/created_to (at most one year), and no paging. Without columns it has id, created_at, source_name, source_label, destination_name, destination_label, direction, rail, amount_minor and status; ask for account_id, destination_account_id or counterparty_id with columns. Cells are display text (Same-day ACH, Internal transfer, Pending) and the amount column, headed Amount, is in dollars (1000.00). Read GET /api/v1/transfers for API values.
Simulate an outcome in sandbox
In sandbox, POST /api/v1/sandbox/transfers/{transfer_id}/settle or .../fail has the bank answer a withdrawal or internal transfer that was already submitted, the way it would in production. An internal transfer can only settle. It needs the transfers:create scope and is not available in production.
curl https://api.sandbox.roots.finance/api/v1/sandbox/transfers/xfer_3e7a1d9c5b2f4e8a9c6d0b1f2e3a4d5c/fail \
--request POST \
-H "Authorization: Bearer $ROOTS_API_TOKEN"{"transfer_id": "xfer_3e7a1d9c5b2f4e8a9c6d0b1f2e3a4d5c", "outcome": "failed"}A 202 means the answer was accepted, not that the transfer has moved. Read GET /api/v1/transfers/{transfer_id} for the new status, or wait for transfer.status.changed. A deposit cannot be answered this way (409); fund a test account with POST /api/v1/sandbox/deposits instead. See Test scenarios.
Next steps
Updated 5 days ago