Gravv
/Docs
Search docs or ask a question⌘K
DocsAgent
ChangelogTry sandbox
Recipes Bank payouts Fix a payee that failed setup

Fix a payee that failed setup

Read why a payee came back setup_failed, correct it in place with PATCH, and pay it without saving a duplicate.

4 min read

Read why a payee came back setup_failed, correct it in place with PATCH, and pay it without saving a duplicate. A payee is an external account, a bank account outside Gravv that a customer pays. See the Glossary.

Who it is for. Any business whose SEPA, Faster Payments, SWIFT or US payee came back setup_failed.

Status. Available.

Money example

1.
A SWIFT payee for a 7,500.00 USD supplier payment fails setup with error_message these account details could not be accepted.
2.
The supplier confirms that the account number ends in 8, not 9.
3.
You correct the payee. It goes back to pending, then active, and you send the 7,500.00 USD.

Before you start

You need the payee id. You cannot save the same payee again. A failed payee still counts as a duplicate, so a new create request returns the failed payee's id.

Find out what is required

Read the payee and its error_message:

cURLNodePython
curl --request GET \
--url https://api.gravv.xyz/v1/external-accounts/f47ac10b-58cc-4372-a567-0e02b2c3d479 \
--header 'Api-Key: <API_KEY>'
Response
{
"data": {
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"payee_type": "swift",
"account_number": "1012345679",
"account_name": "ADEBAYO TEXTILES LTD",
"bic": "ZEIBNGLA",
"customer_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"currency": "USD",
"account_owner_type": "business",
"status": "setup_failed",
"date_created": "2026-10-13T10:00:00.000Z",
"error_message": "these account details could not be accepted"
},
"error": null
}
error_messageWhat to do
these account details could not be accepted (sometimes … for the <rail> rail)A detail is wrong. 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 with no changes
recipient setup failedCheck the fields, or retry with no changes

Steps

1. Correct the payee

Send only the fields that change. Gravv keeps a field you leave out, clears a field you send as null, and sets a field you send with a value. Never send "" to clear a field. PATCH needs no Idempotency-Key.

cURLNodePython
curl --request PATCH \
--url https://api.gravv.xyz/v1/external-accounts/f47ac10b-58cc-4372-a567-0e02b2c3d479 \
--header 'Api-Key: <API_KEY>' \
--header 'Content-Type: application/json' \
--data '
{
"account_number": "1012345678"
}
'
Response (HTTP 202)
{
"data": {
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"payee_type": "swift",
"account_number": "1012345678",
"account_name": "ADEBAYO TEXTILES LTD",
"bic": "ZEIBNGLA",
"customer_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"currency": "USD",
"account_owner_type": "business",
"status": "pending",
"date_created": "2026-10-13T10:00:00.000Z"
},
"error": null
}

To retry setup with no changes, for example after attempt 10 of 10, send {}.

2. Wait for the new setup

The PATCH itself sends no event. Wait for external_account.active, or for external_account.setup_failed again. Then pay the payee as its recipe describes.

What can go wrong

ResponseWhyFix
409 payee <id> is not correctable in its current state (active): invalid state transitionYou can change banking details only on a setup_failed payee, or on a pending payee whose setup has not startedSave a new payee
409 the same message with (pending)Setup has already startedWait for active or setup_failed
409, duplicateThe corrected details match another payeeUse that payee
409 the address of payee <id> cannot be changed: it is already registered for payouts; create a new payee with the new addressGravv locked the address when it registered the payee for payoutsSave a new payee
409 payee <id> was changed by another request while this update was applied; reload it and retry: invalid inputTwo updates ran at the same timeRead the payee, then PATCH again
400 account name cannot be cleared: invalid inputYou sent "account_name": nullSend a value
404 payee <id>: resource not foundThe id is unknownCheck the id
currency, payee_type, phone_number, customer_id or internal_account_id did not changeYou cannot change these fields, and Gravv ignores themSave a new payee
500 We couldn't update this payee. Please try again later.The server had an errorRetry

Webhooks you will receive

Gravv sends no event for the PATCH. After it, Gravv sends external_account.active or external_account.setup_failed.

Testing in sandbox

The PATCH checks and state rules work as in live. Sandbox simulates payee setup, which finishes in a few seconds. So you cannot produce a setup_failed payee in sandbox, and a PATCH sent one second after saving already returns 409 (pending).

Reference

Was this page helpful? Yes No