Verify an account
Before you verify your user's bank account details, make sure you have an access_token
.
To verify a user's bank account, make a request to verification/v1/verify
including the user's full name. The Verification API will compare it with the account holder name(s) returned by the bank, as authorised by the user during the authentication and consent flow.
The request body includes the following:
Field | Type | Description |
---|---|---|
name | string | Name that needs to be verified with an account |
export ACCESS_TOKEN="users-access-token"
export name="Will Johnson"
curl --location --request POST 'https://api.truelayer.com/verification/v1/verify' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $ACCESS_TOKEN' \
--data-raw '{"name": "'"$name"'"}'
The response contains the following parameters:
Parameter | Type | Description |
---|---|---|
verifiable | bool | A boolean that describes if a user’s account is verifiable or not. If true, then the account is a verifiable CURRENT or SAVINGS account. We can only verify accounts that either have an IBAN or have an account number and a sort code. |
verified | bool | Indicates whether there is a successful match. |
match_score | integer | Score from 0 to 100 indicating confidence that provided and retrieved names refer to the same entity. |
currency | string | The currency of the account. |
account_holder_name | array | The name of the account holder returned by the bank. One account may have multiple account holders. For example, a joint bank account. |
provider_id | string | The name of the bank. |
iban | string | The account's IBAN. |
swift_bic | string | Swift code of the account. |
account_number | string | The account number. |
sort_code | string | Sort code of account. |
failure_description | string | Describes the reason for failure. |
failure_code | string | Machine-readable code. |
account_type | string | Type of the account returned by the bank. |
display_name | string | Name of the account returned by the bank. |
{
"verified": true,
"account_holder_name": "William Johnson",
"match_score": 89,
"report": [
{
"verifiable": true,
"currency": "GBP",
"provider_id": "ob-monzo",
"account_type": "CURRENT",
"account_holders": [
{
"name": "William Johnson",
"verified": true,
"match_score": 89
}
],
"display_name": "1st Account",
"iban": "GB70MONZ03952941110044",
"swift_bic": "MONZGB26",
"account_number": "53920022",
"sort_code": "04-11-34"
},
{
"verifiable": false,
"failure_description": "Credit cards cannot be verified by this service.",
"failure_code": "CREDIT_CARD",
"provider_id": "ob-monzo",
"account_type": "CREDIT_CARD",
"display_name": "Gold card"
}
]
}
Previously, the Verification API was hosted on
https://verification.truelayer.com/v1/verification
. This is still supported for now but will be removed soon.
Joint accounts
When the end user provides a name, we can match it with the names associated with a joint account. However, banks can differ in how they return account holder names. There are two possible scenarios for joint accounts:
The bank may return two account holder names (for example, John Doe
and Mary Poppins
). We match the name that you supply with both of the account holder names separately and return a response with both name matches.
The bank may return both names as one name (for example, John Doe Mary Poppins
).
In this case, we match the supplied name with the provided account holder name, which is the full two names combined.
Because this can change the match score, we recommend that you do one of the following:
- Add a warning to say joint accounts are not supported
- Change the match score threshold depending on the provider that the user verifies an account with
- Use Signup+ to block joint accounts
Updated about 1 month ago