Perform a bank details lookup#
/bank_details_lookupsPerforms a bank details lookup. As part of the lookup, a modulus check and reachability check are performed.
For UK (Bacs) and Eurozone (SEPA) bank accounts, where an account holder name is provided (and an account number, a sort code or an IBAN are already present), we run Payer Name Verification to check that the account holder name matches the bank account details held by the relevant bank. If there is no match, the endpoint will return a 422 - validation error on account_holder_name: "Account holder name does not match bank account details provided".
Otherwise, the result is returned in payer_name_verification_result:
full: the name matches the name held by the bank.close: the name is a close but not exact match. Whether a name counts as close is decided by the payer's bank, so it can vary from bank to bank.cannot_perform_verification: the check was attempted but could not be completed, for example because the bank does not support it or did not respond in time.null: no check was performed, because the scheme does not support Payer Name Verification or no account holder name was provided.
Sandbox: Payer Name Verification is simulated in sandbox rather than run against the bank. To trigger each result, use the test bank details from the testing instructions and set account_holder_name to full match, close match, no match or cannot perform verification (not case sensitive). With any other name, no check is performed.
If your request returns an error or the available_debit_schemes
attribute is an empty array, you will not be able to collect payments from the
specified bank account. GoCardless may be able to collect payments from an account
even if no bic is returned.
Bank account details may be supplied using local details or an IBAN.
ACH scheme For compliance reasons, an extra validation step is done using a third-party provider to make sure the customer's bank account can accept Direct Debit. If a bank account is discovered to be closed or invalid, the customer is requested to adjust the account number/routing number and succeed in this check to continue with the flow.
Note: Usage of this endpoint is monitored. If your organisation relies on GoCardless for modulus or reachability checking but not for payment collection, please get in touch.
Request Body
bank_details_lookupsobject6 properties
ibanstring | null
International Bank Account Number. Alternatively you can provide local details.
account_numberstring | null
Bank account number - see local details for more information. Alternatively you can provide an iban.
bank_codestring | null
Bank code - see local details for more information. Alternatively you can provide an iban.
branch_codestring | null
Branch code - see local details for more information. Alternatively you can provide an iban.
country_codestring | null
ISO 3166-1 alpha-2 code. Must be provided if specifying local details.
account_holder_namestring | null
The account holder name associated with the account number (if available). If provided for a UK or Eurozone bank account, Payer Name Verification is performed.
Response 201
Resource created successfully
bank_details_lookupsobject4 properties
bank_namestring | nullrequired
The name of the bank with which the account is held (if available).
bicstring | nullrequired
ISO 9362 SWIFT BIC of the bank with which the account is held.
available_debit_schemesarrayrequired
Array of schemes supported for this bank account. This will be an empty array if the bank account is not reachable by any schemes.
payer_name_verification_resultenum | nullrequired
The result of the payer name verification check performed during the lookup. null if no check was performed.
full: The name provided matches the name held by the bank.close: The name provided is a close but not exact match to the name held by the bank.cannot_perform_verification: A verification was attempted but could not be completed. This can happen for a number of reasons, including the account holder's bank not participating in the verification scheme, the account not being eligible for verification (e.g. the account holder has opted out), or the bank details not being resolvable, among others.null: No check was performed, because the scheme does not support Payer Name Verification or no account holder name was provided.
fullclosecannot_perform_verificationErrors 400401404422500
Bad Request
Unauthorised
Not found
Validation Error
Internal Error
Error Body
errorobjectrequiredGeneric error
6 properties
codeintegerdocumentation_urlstringerrorsarrayrequired
6 properties
reasonstringfieldstringrequest_pointerstringmessagestringrequiredmetadataobjectlinksobjectmessagestringrequiredrequest_idstringrequiredtypestring