Bacs payment data
Direct Debit payment data
ClearBank allows you to retrieve Direct Debit payment information against your sort code, real and virtual accounts. This includes information about unpaid and collected payments.
Get all collected Direct Debit payments (real account)
get/v2/Accounts/{accountId}/Mandates/{mandateId}/Collections
Gets a collection of transactions for account mandate
This is a paged endpoint, if no parameters are supplied the first page is returned, you can add date filter by supplying in the URL.
Parameters
- accountId string, path, Required
The unique identifier for the account. This can be retrieved from GET /v1/Accounts
- mandateId string, path, Required
The unique identifier for Direct Debit Instruction.
- startDate string, query
Optional filter by start date. Date must be formatted as YYYY-mm-DD. For example ?startDate=1984-02-09
- endDate string, query
Optional filter by end date. Date must be formatted as YYYY-mm-DD. For example ?endDate=1990-10-04
- pageNumber integer, query
The page number to control returned results into manageable sets. Default if not supplied: 1
- pageSize integer, query
The page size to control returned results into manageable sets. Default if not supplied: 50
- Authorization string, header, Required
Your API Token, retrieved from the web portal
Response (application/json)
- 202 Success
- 400 Bad Request
- 404 Not Found
Success
{"mandateTransactions": [{"transactionId": "75906707-8c31-479c-b354-aa805c4cefbc","date": "2019-08-24T14:15:22Z","amount": {"instructedAmount": 0,"currency": "GBP"},"status": "string","reference": "string","debtorBban": "string","debtorAccountName": "string","debtorSortCode": "string","debtorAccountNumber": "string"}],"halLinks": [{"name": "string","href": "string","templated": true}]}
Bad Request
{"errors": {"property1": ["string"],"property2": ["string"]},"type": "string","title": "string","status": 0,"detail": "string","instance": "string"}
Get all collected Direct Debit payments (virtual account)
get/v2/Accounts/{accountId}/Virtual/{virtualAccountId}/Mandates/{mandateId}/Collections
Gets a collection of transactions for account mandate
This is a paged endpoint, if no parameters are supplied the first page is returned, you can add date filter by supplying in the URL.
Parameters
- accountId string, path, Required
The unique identifier for the account. This can be retrieved from GET /v1/Accounts
- virtualAccountId string, path, Required
The unique identifier for the virtual account. This can be retrieved from GET /v1/Accounts/{accountId}/Virtual
- mandateId string, path, Required
The unique identifier for Direct Debit Instruction.
- startDate string, query
Optional filter by start date. Date must be formatted as YYYY-mm-DD. For example ?startDate=1984-02-09
- endDate string, query
Optional filter by end date. Date must be formatted as YYYY-mm-DD. For example ?endDate=1990-10-04
- pageNumber integer, query
The page number to control returned results into manageable sets. Default if not supplied: 1
- pageSize integer, query
The page size to control returned results into manageable sets. Default if not supplied: 50
- Authorization string, header, Required
Your API Token, retrieved from the web portal
Response (application/json)
- 202 Success
- 400 Bad Request
- 404 Not Found
Success
{"mandateTransactions": [{"transactionId": "75906707-8c31-479c-b354-aa805c4cefbc","date": "2019-08-24T14:15:22Z","amount": {"instructedAmount": 0,"currency": "GBP"},"status": "string","reference": "string","debtorBban": "string","debtorAccountName": "string","debtorSortCode": "string","debtorAccountNumber": "string"}],"halLinks": [{"name": "string","href": "string","templated": true}]}
Bad Request
{"errors": {"property1": ["string"],"property2": ["string"]},"type": "string","title": "string","status": 0,"detail": "string","instance": "string"}
Get all unpaid Direct Debit payments (institution)
get/v1/Transactions/{sortCode}/DirectDebit/Unpaid
Returns a list of all unpaid Direct Debit Transactions for a given sort code
Parameters
- sortCode string, path, Required
Sort code which will be used to filter unpaid Direct Debit transactions
- reasonCode string, query
The reason code
- sun string, query
Service user number (SUN)
- paymentReference string, query
The payment reference
- processingDateFrom string, query
The starting Processing date to filter by
- processingDateTo string, query
The last Processing date to filter by
- amount number, query
The Transaction amount
- transactionCodes array, query
The Transaction codes
- pageNumber integer, query
The page number to control returned results into manageable sets. Default if not supplied: 1
- pageSize integer, query
The page size to control returned results into manageable sets. Default if not supplied: 50
- Authorization string, header, Required
Your API Token, retrieved from the web portal
Response (application/json)
- 200 Success
- 400 Bad Request
- 404 Not Found
Success
{"unpaidTransactions": [{"pendingTransactionId": "c2c776fb-20c2-496e-853d-e997a6d621a0","transactionType": "DirectCredit","transactionStatus": "Pending","creditorAccount": {"identification": {"iban": "string","other": {"identification": "string","schemeName": {"code": "BBAN","proprietary": "string"},"issuer": "string"}}},"debtorAccount": {"identification": {"iban": "string","other": {"identification": "string","schemeName": {"code": "BBAN","proprietary": "string"},"issuer": "string"}}},"amount": 0,"paymentReference": "string","processingDate": "2019-08-24T14:15:22Z","settlementDate": "2019-08-24T14:15:22Z","transferredDate": "2019-08-24T14:15:22Z","serviceUserNumber": "string","transactionCode": "string","isReturn": true,"hasReturn": true,"reasonCode": "string","collectionReference": "string","creditorAccountName": "string","debtorAccountName": "string"}],"halLinks": [{"name": "string","href": "string","templated": true}]}
Bad Request
{"errors": {"property1": ["string"],"property2": ["string"]},"type": "string","title": "string","status": 0,"detail": "string","instance": "string"}
Get all unpaid Direct Debit payments (real account)
get/v2/Accounts/{accountId}/Mandates/Unpaid
Returns a list of all unpaid transactions belonging to an account
Parameters
- accountId string, path, Required
The unique identifier for the account. This can be retrieved from GET /v1/Accounts
- startDate string, query
Transactions query start date. Date must be formatted as YYYY-mm-DD. For example ?startDate=1984-02-09
- endDate string, query
Transactions query end date. Date must be formatted as YYYY-mm-DD. For example ?startDate=1984-02-09
- sun string, query
Service user number (SUN)
- reference string, query
Transaction reference
- pageNumber integer, query
The page number to control returned results into manageable sets. Default if not supplied: 1
- pageSize integer, query
The page size to control returned results into manageable sets. Default if not supplied: 50
- Authorization string, header, Required
Your API Token, retrieved from the web portal
Response (application/json)
- 200 Success
- 400 Bad Request
- 404 Not Found
Success
{"unpaidTransactions": [{"pendingTransactionId": "c2c776fb-20c2-496e-853d-e997a6d621a0","transactionType": "DirectCredit","transactionStatus": "Pending","creditorAccount": {"identification": {"iban": "string","accountName": "string","sortCode": "string","accountNumber": "string","reference": "string","other": {"identification": "string","schemeName": {"code": "BBAN","proprietary": "string"},"issuer": "string"}}},"debtorAccount": {"identification": {"iban": "string","accountName": "string","sortCode": "string","accountNumber": "string","reference": "string","other": {"identification": "string","schemeName": {"code": "BBAN","proprietary": "string"},"issuer": "string"}}},"amount": 0,"paymentReference": "string","processingDate": "2019-08-24T14:15:22Z","settlementDate": "2019-08-24T14:15:22Z","transferredDate": "2019-08-24T14:15:22Z","serviceUserNumber": "string","transactionCode": "string","isReturn": true,"hasReturn": true,"reasonCode": "string","collectionReference": "string"}],"halLinks": [{"name": "string","href": "string","templated": true}]}
Bad Request
{"errors": {"property1": ["string"],"property2": ["string"]},"type": "string","title": "string","status": 0,"detail": "string","instance": "string"}
Get all unpaid Direct Debit payments (virtual account)
get/v2/Accounts/{accountId}/Virtual/{virtualAccountId}/Mandates/Unpaid
Returns a list of all unpaid transactions belonging to a virtual account
Parameters
- accountId string, path, Required
The unique identifier for the account. This can be retrieved from GET /v1/Accounts
- virtualAccountId string, path, Required
The unique identifier for the virtual account. This can be retrieved from GET /v1/Accounts/{accountId}/Virtual
- startDate string, query
Transactions query start date. Date must be formatted as YYYY-mm-DD. For example ?startDate=1984-02-09
- endDate string, query
Transactions query end date. Date must be formatted as YYYY-mm-DD. For example ?startDate=1984-02-09
- sun string, query
Service user number (SUN)
- reference string, query
Transaction reference
- pageNumber integer, query
The page number to control returned results into manageable sets. Default if not supplied: 1
- pageSize integer, query
The page size to control returned results into manageable sets. Default if not supplied: 50
- Authorization string, header, Required
Your API Token, retrieved from the web portal
Response (application/json)
- 200 Success
- 400 Bad Request
- 404 Not Found
Success
{"unpaidTransactions": [{"pendingTransactionId": "c2c776fb-20c2-496e-853d-e997a6d621a0","transactionType": "DirectCredit","transactionStatus": "Pending","creditorAccount": {"identification": {"iban": "string","accountName": "string","sortCode": "string","accountNumber": "string","reference": "string","other": {"identification": "string","schemeName": {"code": "BBAN","proprietary": "string"},"issuer": "string"}}},"debtorAccount": {"identification": {"iban": "string","accountName": "string","sortCode": "string","accountNumber": "string","reference": "string","other": {"identification": "string","schemeName": {"code": "BBAN","proprietary": "string"},"issuer": "string"}}},"amount": 0,"paymentReference": "string","processingDate": "2019-08-24T14:15:22Z","settlementDate": "2019-08-24T14:15:22Z","transferredDate": "2019-08-24T14:15:22Z","serviceUserNumber": "string","transactionCode": "string","isReturn": true,"hasReturn": true,"reasonCode": "string","collectionReference": "string"}],"halLinks": [{"name": "string","href": "string","templated": true}]}
Bad Request
{"errors": {"property1": ["string"],"property2": ["string"]},"type": "string","title": "string","status": 0,"detail": "string","instance": "string"}
Direct Credit payment data
You can get information about any unapplied Direct Credit payments for your institution.
Get all unapplied Direct Credit payments
get/v1/Transactions/{sortCode}/DirectCredit/Unapplied
Returns a list of all unapplied direct credit transactions for a given sort code
Parameters
- sortCode string, path, Required
Sort code which will be used to filter unapplied direct credit transactions
- reasonCode string, query
The reason code
- sun string, query
Service user number (SUN)
- paymentReference string, query
The payment reference
- processingDateFrom string, query
The starting Processing date to filter by
- processingDateTo string, query
The last Processing date to filter by
- amount number, query
The Transaction amount
- transactionCodes array, query
The Transaction codes
- pageNumber integer, query
The page number to control returned results into manageable sets. Default if not supplied: 1
- pageSize integer, query
The page size to control returned results into manageable sets. Default if not supplied: 50
- Authorization string, header, Required
Your API Token, retrieved from the web portal
Response (application/json)
- 200 Success
- 400 Bad Request
- 404 Not Found
Success
{"unappliedTransactions": [{"pendingTransactionId": "c2c776fb-20c2-496e-853d-e997a6d621a0","transactionType": "DirectCredit","transactionStatus": "Pending","creditorAccount": {"identification": {"iban": "string","other": {"identification": "string","schemeName": {"code": "BBAN","proprietary": "string"},"issuer": "string"}}},"debtorAccount": {"identification": {"iban": "string","other": {"identification": "string","schemeName": {"code": "BBAN","proprietary": "string"},"issuer": "string"}}},"amount": 0,"paymentReference": "string","processingDate": "2019-08-24T14:15:22Z","settlementDate": "2019-08-24T14:15:22Z","transferredDate": "2019-08-24T14:15:22Z","serviceUserNumber": "string","transactionCode": "string","isReturn": true,"hasReturn": true,"reasonCode": "string","collectionReference": "string","creditorAccountName": "string","debtorAccountName": "string"}],"halLinks": [{"name": "string","href": "string","templated": true}]}
Bad Request
{"errors": {"property1": ["string"],"property2": ["string"]},"type": "string","title": "string","status": 0,"detail": "string","instance": "string"}