Update an external account
Correct a payee that failed setup, retry its setup, or add details a route needs, without saving a duplicate.
This page shows how to correct a payee that failed setup, and how to add details that a route needs. You cannot save a setup_failed payee again, because the duplicate check still counts it. Correct it in place with PATCH /v1/external-accounts/{external_account_id}. The payee goes back to pending, setup runs again, and you keep the same id.
Example. A SWIFT payee for a 7,500.00 USD supplier payment fails setup with error_message these account details could not be accepted. The supplier confirms the account number ends in 8, not 9. You send a PATCH with the new account_number. The payee returns to pending, then active, and you send the payment.
Read why it failed
error_message is one of:
| error_message | What it means |
|---|---|
these account details could not be accepted (sometimes … for the <rail> rail) | The bank refused the details. Check each field with the payee |
account setup did not complete (attempt N of 10) | Setup kept failing to complete. Check the fields, or retry unchanged |
recipient setup failed | Setup failed for another reason. Check the fields, or retry unchanged |
Correct the payee
Send only the fields to change. Gravv keeps a field you leave out, null clears it, and a value sets it. The call needs no Idempotency-Key. The API always returns HTTP 202:
Then wait for external_account.active (or external_account.setup_failed again). The PATCH itself sends no event.
To retry setup with nothing changed, for example after attempt 10 of 10, send an empty body {}.
Add details a route needs
The same call adds details to an active local payee when a route asks for them, such as a PIX key and CPF for Brazil, or national_id and address:
The response shows national_id_type and a masked national_id_masked. Gravv never returns the full id or the PIX key.
What you can and cannot change
setup_failed payee, or on a pending payee whose setup has not started. In any other state, the API returns 409.currency, payee_type, phone_number, customer_id or internal_account_id. The API ignores them. To change them, save a new payee.What can go wrong
| Response | Why | Fix |
|---|---|---|
409 payee <id> is not correctable in its current state (active): invalid state transition | The payee is active (or its setup has started) | Save a new payee |
409 the address of payee <id> cannot be changed: it is already registered for payouts; create a new payee with the new address | The address is locked | Save a new payee |
409 payee <id> was changed by another request while this update was applied; reload it and retry: invalid input | Two updates arrived at the same time | Read the payee, then send the PATCH again |
| 409, duplicate | The corrected details match another payee | Use that payee |
400 account name cannot be cleared: invalid input | You sent "account_name": null | Send a value |
400 routing number <number> cannot receive wires; … (ERROR_CODE_INVALID_WIRE_ROUTING_NUMBER) or … cannot receive instant payments; … (ERROR_CODE_INVALID_RTP_ROUTING_NUMBER) | The new routing_number or payment_rail fails the routing check | Check the routing number for its rail first |
404 payee <id>: resource not found | The id is unknown. A GET returns 400 for the same case | Check the id |
500 We couldn't update this payee. Please try again later. | A server error | Retry |
Testing in sandbox
In sandbox, Gravv simulates payee setup, and setup finishes in seconds. You cannot produce a setup_failed payee there, and a PATCH sent a second after saving already returns 409 (pending). The field and state checks work the same as in live.
Related recipe: Fix a payee that failed setup.