Due to service stability considerations, we implemented a logic that automatically suspends an account if there were 10 consecutive failed attempts to access it.
If an account got suspended, you will receive the following error message when trying to access it:
{ "summary": "Account suspended", "detail": "This account or its requisition was suspended due to numerous errors that occurred while accessing it." }
Also, if you try to request the account's metadata using GET https://bankaccountdata.gocardless.com/api/v2/accounts/{id}
endpoint, you will see that the account’s status is “SUSPENDED”:
{ "id": "ACCOUNT_ID", "created": "2022-06-27T14:43:39.584717Z", "last_accessed": "2022-08-09T11:49:04.715331Z", "iban": "ACCOUNT_IBAN", "institution_id": "ASPSP_ID", "status": "SUSPENDED" }
Once this happens, the only solution is to create a new requisition from scratch and reconnect the account - here is how to do that.
To prevent account suspension in the future, you could add the following logic to your code:
- If there are a few (~2-3) consecutive failed requests, send a request to
GET https://bankaccountdata.gocardless/api/v2/accounts/{id}
endpoint.
{
"id": "ACCOUNT_ID", "created": "2022-06-27T14:43:39.584717Z", "last_accessed": "2022-08-09T11:49:04.715331Z", "iban": "ACCOUNT_IBAN", "institution_id": "ASPSP_ID", "status": "ERROR" }
- If you receive
"status": "ERROR"
in the response, do not retry the request anymore to avoid the account suspension. Instead, you could raise an alert and retry the request after some time. - If after some time and a few tries the requests still don’t go through and the account’s status doesn’t change from “ERROR” to “READY”, it is best to stop API calls and contact our support team to avoid account suspension. More information about account endpoint errors and suspended accounts here.
Comments
0 comments
Please sign in to leave a comment.