Class: GoCardlessPro::Services::BankDetailsLookupsService
- Inherits:
-
BaseService
- Object
- BaseService
- GoCardlessPro::Services::BankDetailsLookupsService
- Defined in:
- lib/gocardless_pro/services/bank_details_lookups_service.rb
Overview
Service for making requests to the BankDetailsLookup endpoints
Instance Method Summary collapse
-
#create(options = {}) ⇒ Object
Performs a bank details lookup.
Methods inherited from BaseService
#initialize, #make_request, #sub_url
Constructor Details
This class inherits a constructor from GoCardlessPro::Services::BaseService
Instance Method Details
#create(options = {}) ⇒ Object
Performs a bank details lookup. As part of the lookup, a modulus check and reachability check are performed.
For UK-based bank accounts, where an account holder name is provided (and an account number, a sort code or an iban are already present), we verify that the account holder name and bank account number match the details held by the relevant bank.
If your request returns an error
(https://developer.gocardless.com/api-reference/#api-usage-errors) 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 (https://developer.gocardless.com/api-reference/#appendix-local-bank-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. Example URL: /bank_details_lookups
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/gocardless_pro/services/bank_details_lookups_service.rb', line 46 def create( = {}) path = '/bank_details_lookups' params = .delete(:params) || {} [:params] = {} [:params][envelope_key] = params [:retry_failures] = true response = make_request(:post, path, ) return if response.body.nil? Resources::BankDetailsLookup.new(unenvelope_body(response.body), response) end |