Create a Sub-Account

Before you can setup a sub-accounts, you will need you will need info on the ledger for them to sit beneath, please see here.

POST /accounts/sub_accounts/create

Headers
Content-Type: application/json
Accept: application/json
Authorization: token {{token value from here}}

Parameters

Parameter Format Length Description
company_id int 1-11 API Company ID we issue to merchants.
Acceptable Characters: 0-9
mid_id int 1-11 API Merchant ID we issue to merchants.
Acceptable Characters: 0-9
account_name string 1-50 The name on the account which is displayed within the Hub to differentiate accounts.
Acceptable Characters: a-z A-Z 0-9 , . - _
merchant_customer_id string0-50 Unique ID you’ll use to identify each customer.
Acceptable Characters: a-z A-Z 0-9 , . - _
merchant_custom_1 string0-50 You can send additional data relating to the customer or another internal reference - with more data, your internal teams will be able to identify the customer’s transactions.
Acceptable Characters: a-z A-Z 0-9 , . - _
merchant_custom_2 string0-50 You can send additional data relating to the customer or another internal reference - with more data, your internal teams will be able to identify the customer’s transactions.
Acceptable Characters: a-z A-Z 0-9 , . - _
merchant_custom_3 string0-50 You can send additional data relating to the customer or another internal reference - with more data, your internal teams will be able to identify the customer’s transactions.
Acceptable Characters: a-z A-Z 0-9 , . - _
{
    "company_id": "113",
    "mid_id": "1056", 
    "account_name": "Reconciliation",
    "merchant_customer_id": "123456",
    "merchant_custom_1": "",
    "merchant_custom_2":  "",
    "merchant_custom_3": ""
}

Response

Parameter Format Length Description
company_id int 1-11 API Company ID we issue to merchants.
mid_id int 1-11 API Merchant ID we issue to merchants.
ledger_details object
ledger_id string 1-50 A unique reference assigned by our system to differentiate accounts.
name string 1-50 The name on the account which is displayed within the Hub to differentiate accounts.
balance int 1-11 The current balance on this ledger at the time of the request in the currency returned.
sort_code string 6 Returned for GBP accounts, value that you can share with your customers to recieve payments.
account_number string 8 Returned for GBP accounts, value that you can share with your customers to recieve payments.
iban string 16-34 Returned for EUR accounts, value that you can share with your customers to recieve payments.
bic_swift string 8-11 Returned for EUR accounts, value that you can share with your customers to recieve payments.
created string 24 The date and time at which the account was created
last_update string 24 The date and time at which the last activity against the customers account took place
{
    "company_id":"113",
    "mid_id":"1056",
    "ledger_details":{
        "ledger_id":"9010ef5b-8b1a-484d-b27c-e9002dcd93d2",
        "name":"Reconciliation",
        "balance":0,
        "sort_code":"040052",
        "account_number":"00459615",
        "iban":"GB22PAYR04005200459615",
        "bic_swift":"PAYRGB20XXX"
    },
    "created":"2020-04-24 08:34:35",
    "last_update":"2020-04-24 08:34:35"
}

Update Sub-Account Details

PUT /accounts/sub_accounts/update/{{ledger_id}}
Headers
Content-Type: application/json
Accept: application/json
Authorization: token {{token value from here}}

Parameters

Parameter Format Length Description
account_name string 1-50 The name on the account which is displayed within the Hub to differentiate accounts.
Acceptable Characters: a-z A-Z 0-9 , . - _
merchant_customer_id string0-50 Unique ID you’ll use to identify each customer.
Acceptable Characters: a-z A-Z 0-9 , . - _
merchant_custom_1 string0-50 You can send additional data relating to the customer or another internal reference - with more data, your internal teams will be able to identify the customer’s transactions.
Acceptable Characters: a-z A-Z 0-9 , . - _
merchant_custom_2 string0-50 You can send additional data relating to the customer or another internal reference - with more data, your internal teams will be able to identify the customer’s transactions.
Acceptable Characters: a-z A-Z 0-9 , . - _
merchant_custom_3 string0-50 You can send additional data relating to the customer or another internal reference - with more data, your internal teams will be able to identify the customer’s transactions.
Acceptable Characters: a-z A-Z 0-9 , . - _
{
    "account_name": "Joe Blogger",
    "merchant_customer_id": "123456",
    "merchant_custom_1" : "something",
    "merchant_custom_2" : "something",
    "merchant_custom_3" : "something"
}

Response

Parameter Format Length Description
status int 1-2 The outcome of the request.
message string 0-100 Handy text describing the status for debugging.
{
    "status": 1,
    "message": "Success"
}

Transaction List

Want to know exactly what has come in / out of your ledger and who it came from / went to? Use this request to get a list of your transactions on each of your ledgers filtered by date range.

GET /accounts/sub_accounts/{{ledger_id}}
Headers
Content-Type: application/json
Accept: application/json
Authorization: token {{token value from here}}

Query Params

Parameter Format Length Description
from_date datetime 0-19 The date you want your search results to start, in the format: YYYY-MM-DD HH:MM:SS
Acceptable Characters: 0-9 - :
to_date datetime 0-19 The date you want your search results to end, in the format: YYYY-MM-DD HH:MM:SS. Please note we can only return a maximum of 31 days of transactional data.
Acceptable Characters: 0-9 - :
type string 14-18 The type of transaction taking place, we will typically respond with internal_transfer or faster_payment
Acceptable Values: "faster_payment" or "internal_transfer"
in_out string 2-3 The direction in which funds are being moved
Acceptable Values: "in" or "out"
If you leave the query params blank, we'll return all of todays transactions by default.
https://qaapp2.acquired.com/accounts/sub_accounts/5e864c5e-908c-4600-97b4-d92abc9df267?start_date=2020-04-02&to_date=2020-04-02&in_out=out

Response

Parameter Format Length Description
status int 1-2 The outcome of the request.
message string 0-100 Handy text describing the status for debugging.
data object
total int 1-11 The count of the transactions being listed.
list array
transaction_id string 0-36 A unique reference for a transaction.
date_time string 36 The time at which a transaction took place.
name string 1-100 The account holders name.
account_number string 8 The account number associated with the account.
sort_code string 6 Returned for GBP accounts.
iban string 16-34 Returned for EUR accounts.
bic string 8-11 Returned for EUR accounts.
reference string 1-18 A description of the payment that will appear on the senders and recievers bank statements.
amount string 1-11 The total value of the transaction.
currency string 3 Ledger currency, an ISO 4217 3-digit code.
in_out string 2-3 The direction in which funds are being moved.
type string 14-18 The type of transaction taking place, we will typically respond with internal_transfer or faster_payment.
response_code int 1-3 Code describing the transaction results.
response_message string 1-100 Message describing the transaction results.
{
"status": 1, 
"message": "Success",
"data": {
    "total": 2,
    "list": [
    {
        "transaction_id": "9010ef5b-8b1a-484d-b27c-e9002dcd93d2",
        "date_time": "2020-01-05 12:12:54",
        "name": "Steve Ryan",
        "account_number": "12345678",
        "sort_code": "400052",
        "reference": "testing",
        "amount": "200.00",
        "currency": "gbp",
        "in_out": "in",
        "type": "faster_payment",
        "response_code":"1",
        "response_message":"Transaction Success"
    },
    {
        "transaction_id": "068805e9-8973-474a-8f2a-5e138ce6693a",
        "date_time": "2020/01/05 12:12:59",
        "name": "Joe Bloggs",
        "account_number": "59151845",
        "sort_code": "040230",
        "reference": "Invoice 203920",
        "amount": "100.00",
        "currency": "gbp",
        "in_out": "out",
        "type": "internal_transfer",
        "response_code":"1",
        "response_message":"Transaction Success"
    }
    ]
}
}

Close Sub-Account

PUT /accounts/sub_accounts/close/{{ledger_id}}
Headers
Content-Type: application/json
Accept: application/json
Authorization: token {{token value from here}}

Request

Parameter Format Length Description
ledger_id
Required
string 36 The unique sub-accountledger_id you are trying to close.
Acceptable Characters: a-z A-Z , . – _

Response

Parameter Format Length Description
status int 1-2 The outcome of the request.
message string 0-100 Handy text describing the status for debugging.
ledger_id string 36 The unique sub-accountledger_id you are trying to close.
{
    "status": 1,
    "message": "success",
    "data":{
        "ledger_id": "5e3596cb-83f3-49a9-a7c4-21d4fee37565"
    }
}