Bank Account

Bank Account records hold the bank details of a customer.

These records may be linked to a customer account record and may also be linked to several Direct Debit Mandates. SmarterPay will notify you via a webhook whenever the state of a bank account record changes

Method Purpose
POST Create a Bank Account
PUT Enable or Disable a Bank Account
DELETE Disable a Bank Account
GET (Singular) Retrieve Bank Account details
GET (List) Retrieve Bank Account details in a list

POST

Action: Create a Bank Account.
Method: POST
URL: https://api.smarterpaycloud.com/service.svc/bankaccount

Request Parameters

Property Mandatory Description
account_number True Must be 8 numbers with leading zeros, no spaces or hyphens
sort_code True Must be 6 numbers with leading zeros, no spaces or hyphens
account_name True Name of the account holder as known by the bank. This usually matches the name of the linked customer.
customer_account False Must be a valid customer account id or left blank.
custom_reference False Custom reference set on record
metadata False String for Custom metadata. Maximum 1000 characters.
credits_allowed False Override modulus check for Credits. “true” to enable, “false” to disable.
debits_allowed False Override modulus check for Debits. “true” to enable, “false” to disable.

Notes:

  • The “credits_allowed” and “debits_allowed” overrides can only be used to disable a payment type that modulus check reports is allowed on the Bank Account.
  • When Credit Anti-Fraud is Enabled the “credits_allowed” override will be automatically set to “false”.

Request Sample

{
 "bank_account":
  {
   "account_number":"12345678",
   "sort_code":"123456",
   "account_name":"Test Name",
   "customer_account":"CUST00002352",
   "custom_reference":"XYZ",
   "metadata":"",
   "credits_allowed": true,
   "debits_allowed": true
  }
}

Response Parameters

Property Description
id Unique identifier beginning with assigned prefix followed by an autonumber
created_at Datetime formatted as ISO8601
account_number Bank account account number
sort_code Bank account sort code
account_name Bank account customer name
bank_name Name of the bank
customer_account Linked customer account
enabled True if an active account
custom_reference Custom reference set on record
metadata Returns optional custom metadata, if set
credits_allowed “True” if Credits allowed, or “False” if not allowed, from the Bank Account
debits_allowed “True” if Debits allowed, or “False” if not allowed, from the Bank Account

Response Sample

{
 "bank_account":
  {
   "id":"BANK00003454",
   "created_at":"2018-08-23T12:43:17.000Z",
   "account_number":"12345678",
   "sort_code":"123456",
   "account_name":"Test Name",
   "bank_name":"BARCLAYS BANK PLC",
   "customer_account":"CUST00002352",
   "enabled":true,
   "custom_reference":"XYZ",
   "metadata":"",
   "credits_allowed": true,
   "debits_allowed": true
  }
}

Action: Update a Bank Account.
Method: PUT
URL: https://api.smarterpaycloud.com/service.svc/bankaccount/{ID}

{ID} denotes ID of record.

Request Parameters

Property Mandatory Description
enabled False “true” to enable, “false” to disable the Bank Account
metadata False String for Custom metadata. Maximum 1000 characters.
credits_allowed False Override modulus check for Credits. “true” to enable, “false” to disable.
debits_allowed False Override modulus check for Debits. “true” to enable, “false” to disable.

Notes:

  • The “credits_allowed” and “debits_allowed” overrides can only be used to disable a payment type that modulus check reports is allowed on the Bank Account.
  • Using the “credits_allowed” and “debits_allowed” overrides on an existing record may update/cancel associated records.

Request Sample

{
 "bank_account":
  {
   "enabled":false
  }
}

Response Parameters

Property Description
id Unique identifier beginning with assigned prefix followed by an autonumber
created_at Datetime formatted as ISO8601
account_number Bank account account number
sort_code Bank account sort code
account_name Bank account customer name
bank_name Name of the bank
customer_account Linked customer account
enabled True if an active account
custom_reference Custom reference set on record
metadata Returns optional custom metadata, if set
credits_allowed “True” if Credits allowed, or “False” if not allowed, from the Bank Account
debits_allowed “True” if Debits allowed, or “False” if not allowed, from the Bank Account

Response Sample

{
 "bank_account":
  {
   "id":"BANK00003454",
   "created_at":"2018-08-23T12:43:17.000Z",
   "account_number":"12345678",
   "sort_code":"123456",
   "account_name":"Test Name",
   "bank_name":"BARCLAYS BANK PLC",
   "customer_account":"CUST00002352",
   "enabled":true,
   "custom_reference":"XYZ",
   "metadata":"",
   "credits_allowed": true,
   "debits_allowed": true
  }
}

Action: Disable a Bank Account.
Method: DELETE
URL: https://api.smarterpaycloud.com/service.svc/bankaccount/{ID}

{ID} denotes ID of record.

Response Parameters

Property Description
id Unique identifier beginning with assigned prefix followed by an autonumber
created_at Datetime formatted as ISO8601
account_number Bank account account number
sort_code Bank account sort code
enabled True if an active account
bank_name Name of the bank
customer_account Linked customer account
custom_reference Custom reference set on record
metadata Returns optional, custom, metadata, if set

Response Sample

{
 "bank_account":
  {
   "id":"BANK00003454",
   "account_name":"Test Name",
   "account_number":"12345678",
   "bank_name":"BARCLAYS BANK PLC",
   "created_at":"2018-08-23T12:43:17.000Z",
   "customer_account":"CUST00002352",
   "enabled":false,
   "sort_code":"123456",
   "custom_reference":"XYZ",
   "metadata":""
  }
}

Action: Retrieve Bank Account details.
Method: GET
URL: https://api.smarterpaycloud.com/service.svc/bankaccount/{ID}

{ID} denotes ID of record.

Response Parameters

Property Description
id Unique identifier beginning with assigned prefix followed by an autonumber
created_at Datetime formatted as ISO8601
account_number Bank account account number
sort_code Bank account sort code
account_name Bank account customer name
bank_name Name of the bank
customer_account Linked customer account
enabled True if an active account
custom_reference Custom reference set on record
metadata Returns optional custom metadata, if set
credits_allowed “True” if Credits allowed, or “False” if not allowed, from the Bank Account
debits_allowed “True” if Debits allowed, or “False” if not allowed, from the Bank Account

Response Sample

{
 "bank_account":
  {
   "id":"BANK00003454",
   "created_at":"2018-08-23T12:43:17.000Z",
   "account_number":"12345678",
   "sort_code":"123456",
   "account_name":"Test Name",
   "bank_name":"BARCLAYS BANK PLC",
   "customer_account":"CUST00002352",
   "enabled":true,
   "custom_reference":"XYZ",
   "metadata":"",
   "credits_allowed": true,
   "debits_allowed": true
  }
}

Action: Retrieve Bank Account details in a list.
Method: GET
URL: https://api.smarterpaycloud.com/service.svc/bankaccounts

Optional Parameters and filters are available, please see below.

Response Parameters

Property Description
id Unique identifier beginning with assigned prefix followed by an autonumber
created_at Datetime formatted as ISO8601
account_number Bank account account number
sort_code Bank account sort code
account_name Bank account customer name
bank_name Name of the bank
customer_account Linked customer account
enabled True if an active account
custom_reference Custom reference set on record
metadata Returns optional custom metadata, if set
credits_allowed “True” if Credits allowed, or “False” if not allowed, from the Bank Account
debits_allowed “True” if Debits allowed, or “False” if not allowed, from the Bank Account

Response Sample

{
    "bank_accounts": [
        {
            "Id": "FTBACC02888560",
            "account_name": "Chris Bell",
            "account_number": "31510604",
            "bank_name": "BANK OF ENGLAND",
            "created_at": "2022-05-12T11:19:49Z",
            "custom_reference": "API POST Test",
            "customer_account": "",
            "enabled": true,
            "sort_code": "100000",
            "metadata":"",
            "credits_allowed": true,
            "debits_allowed": true
        },
        {
            "Id": "FTBACC02888561",
            "account_name": "Chris Brooke",
            "account_number": "29823529",
            "bank_name": "BANK OF IRELAND (UK) PLC",
            "created_at": "2022-05-12T11:19:50Z",
            "custom_reference": "API POST Test",
            "customer_account": "",
            "enabled": true,
            "sort_code": "902127",
            "metadata":"",
            "credits_allowed": true,
            "debits_allowed": true
        }
    ]
}


Optional Parameters and filters
Optional parameters can be added to the GET URL by using a “?” in front of the first parameter and “&” in front of subsequent parameters, for example https://api.smarterpaycloud.com/Service.svc/BankAccounts?limit=2&page_no=1

Parameter Description
limit Limits the number of records returned by the request. Default=40 when not specified. Minimum=1. Maximum=500.
page_no Specifies which page of records are returned by the request. Default=1 when not specified.
sort_field specifies which field to sort on. Options are: “custom_reference”,“sort_code”,“account_number”,“id”,“account_name”,“created_at” (Default when not specified),“customer_id”
sort_order Specifies which order to sort on. Options are asc (ascending. Default when not specified) or desc (descending).
Filter Description
account_name Filter the list using the account_name. Matches will contain the provided value.
account_number Filter the list using the account_number. Matches will contain the provided value.
created_from Filter the list with records created after the datetime supplied. Format is YYYY-MM-DD HH:MM:SS (2022-05-13 10:15:00).
created_to Filter the list with records created before the datetime supplied. Format is YYYY-MM-DD HH:MM:SS (2022-05-13 10:15:00).
customer_id Filter the list using the customer_id. Matches will exactly match the provided value.
custom_reference Filter the list using the custom_reference. Matches will contain the provided value.
id Filter the list using the id. Matches will exactly match the provided value.
sort_code Filter the list using the custom_reference. Matches will contain the provided value.
enabled Filter the list using the status of the record. Can be a comma seperated list of required values. Options are “true”,“false”.
  • Last modified: 2024/11/05 10:31