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.
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
error_message these account details could not be accepted.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:
| error_message | What 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 failed | Check 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.
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
| Response | Why | Fix |
|---|---|---|
409 payee <id> is not correctable in its current state (active): invalid state transition | You can change banking details only on a setup_failed payee, or on a pending payee whose setup has not started | Save a new payee |
409 the same message with (pending) | Setup has already started | Wait for active or setup_failed |
| 409, duplicate | The corrected details match another payee | Use that payee |
409 the address of payee <id> cannot be changed: it is already registered for payouts; create a new payee with the new address | Gravv locked the address when it registered the payee for payouts | 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 ran at the same time | Read the payee, then PATCH again |
400 account name cannot be cleared: invalid input | You sent "account_name": null | Send a value |
404 payee <id>: resource not found | The id is unknown | Check the id |
currency, payee_type, phone_number, customer_id or internal_account_id did not change | You cannot change these fields, and Gravv ignores them | Save a new payee |
500 We couldn't update this payee. Please try again later. | The server had an error | Retry |
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).