Transactions
The transactions endpoint allows you to retrieve transactions for a single currency account held with Alpha along with the associated transaction metadata.
Transactions are records of monetary events on a currency account. They encompass both deposits (inflows of funds) and withdrawals (outflows of funds), as well as other activities such as transfers between accounts, payments made to third parties, fees or interest.
See the Transactions API reference section for technical implementation.
Return all transactions
As transactions are only returned for a single currency account, there has to be an AccountId
included in the query. However, if no further parameters are defined, all transactions for the currency account will be returned.
See the policy page on how far back in time you can retrieve transactions.
Return filtered transactions
Including query parameters in your request will constrain your search, but will be useful if you are looking to return a single or group of transactions based on certain criteria, e.g. specifying From and To to return a date range of transactions.
You may use any number of query parameters. Please note that using multiple parameters will make them all applicable. Querying parameters acts as an AND function, not OR.
Request parameters
Name | Type | Use case |
---|---|---|
AccountId required | string | Specify the ID of the currency account that you want to return transactions for |
From | date-time | Choose a date that all transactions must have happened on or after in UTC ISO 8601 date in YYYY-MM-DD format |
To | date-time | Choose a date that all transactions must have happened on or before in UTC ISO 8601 date in YYYY-MM-DD format |
CreditOrDebit | date-time | Filter results by only selecting credits or debits on the currency account. Enums: ["Credit", "Debit"] |
Iban | string | Specify the IBAN to only return transactions for currency accounts using that particular IBAN |
PageNumber | integer | Specifies the page to be returned, useful when there are multiple pages of results, see the pagination section for more information |
Response
The response will include an array of transactions
Name | Type | Description |
---|---|---|
Id | string | The ID for the transaction |
AccountId | string | The currency account ID associated with the transaction |
Currency | string | The currency of the transaction in the ISO 4217 format |
Status | string | The current status of the payment. Enums: ["Pending", "Completed"] |
ValueDate | string | The date that the payment has or will come to value in YYYY-MM-DD format |
CreditOrDebit | string | Whether the transaction is a credit or a debit ["Credit", "Debit"] |
Type | string | The type of transaction. Enums: ["BankRejected", "FX", "Payment", "Receipt", "Transfer"] |
Amount | double | The total amount of money made in the transaction |
Balance | object | Includes the currency account balance at the time of transaction, see full object below. |
CreditorAccount | object | This is the account information of the creditor (who received the payment) |
DebtorAccount | object | This is the account information of the debtor (who sent the payment) |
CurrencyExchange | object | For transactions that are related to FX, the following strings will be included: BuyCurrency , SellCurrency , ExchangeRate . |
Reference | string | A payment reference is a message to the payee so that they can easily identify the payer or purpose of the transaction. |
TradeReference | string | If the payment is related to a trade this field will have a unique trade reference. |
SupplementaryDetails | string | Further information about the payment, what its for and other processing information. |
IsLastPage | boolean | Identifies if the current page is the last page of results. Enums [True, False] |
Balance Object
Name | Type | Description |
---|---|---|
Amount | string | The balance amount on the currency account |
CreditOrDebit | string | Indicates whether the balance is in credit or debit ["Credit", "Debit"] |
Type | string | The type of the balance ["Available", "Cleared"] |
Creditor & Debtor Account Objects
Creditor and debtor account information is returned as an object within the transaction.
Name | Type | Description |
---|---|---|
Id | string | A unique ID for this account |
Name | string | Name of the person or company |
AddressLine | string | Address of the creditor/debtor |
Iban | string | IBAN of the creditor/debtor |
AccountNumber | string | Bank account number of the creditor/debtor |
Swift | string | SWIFT BIC of the creditor/debtor |
AccountReference | string | User friendly reference to the account |
NationalBankCode | string | Local bank identifier code |
Integration Examples
Check your transactions for a given time range
Find transactions on a currency account for a specified time period. Call the transactions endpoint, passing the desired dates in the From and To parameters. Remember to include the AccountId as it is a required field for transactions queries.
curl -X 'GET' \
'https://sandbox.api.alphagroup.com/api/v1/transactions?AccountId=75d98ac5-22c9-48a1-ae09-72275540d468&From=2024-03-04&To=2024-03-08' \
-H 'accept: text/plain' \
-H 'authorization: Bearer **BearerTokenGoesHere**'
The following response shows all of the transactions for the specified account over the defined time period.
{
"Transactions": [
{
"Id": "01d0c86d-8060-4934-a80e-8b4a3911a092",
"AccountId": "75d98ac5-22c9-48a1-ae09-72275540d468",
"Currency": "EUR",
"Status": "Completed",
"CreatedDateTime": "2024-03-05T09:02:35.000",
"ValueDate": "2024-03-05",
"CreditOrDebit": "Debit",
"Type": "Payment",
"Amount": 100.91,
"Balance": {
"Amount": 0.1,
"CreditOrDebit": "Credit",
"Type": "Available"
},
"CreditorAccount": {
"Name": "Test Organisation"
},
"DebtorAccount": {
"Id": "75d98ac5-22c9-48a1-ae09-72275540d468",
"Name": "EUR Account",
"Iban": "GB24BARC20000069290622",
"AccountNumber": "69290622",
"Swift": "BARCGB22",
"AccountReference": "A0020154",
"NationalBankCode": "200000"
},
"Reference": "Transfer to A0020154"
},
{
"Id": "9785ceee-0a40-41aa-a543-5e4427364f71",
"AccountId": "75d98ac5-22c9-48a1-ae09-72275540d468",
"Currency": "EUR",
"Status": "Completed",
"CreatedDateTime": "2024-03-05T09:02:15.000",
"ValueDate": "2024-03-05",
"CreditOrDebit": "Credit",
"Type": "Receipt",
"Amount": 101.01,
"Balance": {
"Amount": 101.01,
"CreditOrDebit": "Credit",
"Type": "Available"
},
"CreditorAccount": {
"Id": "75d98ac5-22c9-48a1-ae09-72275540d468",
"Name": "EUR Account",
"Iban": "GB24BARC20000069290622",
"AccountNumber": "69290622",
"Swift": "BARCGB22",
"AccountReference": "A0020154",
"NationalBankCode": "200000"
},
"DebtorAccount": {
"Name": "Test Organisation"
},
"Reference": "Transfer from Test Organisation"
}
],
"IsLastPage": true
}
Updated about 2 months ago