Skip to content

Transactions πŸ’Ά

Once we have an account we can start making transactions. πŸ’ΈπŸ’ΈπŸ’Έ

Creating a transaction

Use POST /accounts/:account_id/transactions operation to create a transaction. πŸ’³
The path parameter :account_id specifies the account you want to make a transaction on.

So in the request body we just say how much, counterparty iban, name and a note:

{
    "amount": 65,
    "note": "Food",
    "counterparty_iban": "GB78LXCT41632963612706",
    "counterparty_name": "Susan White"
}

So, we get a debit transaction of 65 EUR from our account to Susan White's account: πŸ‘

{
    "id": 69,
    "account_id": 178,
    "currency": "EUR",
    "direction": "DEBIT",
    "created_at": "2023-05-23T15:09:26.300724+00:00",
    "amount": 65.0,
    "note": "Food",
    "counterparty_iban": "GB78LXCT41632963612706",
    "counterparty_name": "Susan White"
}

Listing transactions 🧾

You can list all your transactions with a GET /accounts/:account_id/transactions request.

Check the query parameters to filter the transactions, such as /accounts/:account_id/transactions?limit=10&offset=0&date_from=2022-03-10&date_to=2023-12-31.

In the response you get a JSON array of your transactions:

[
    {
        "id": 70,
        "amount": 570.0,
        "direction": "DEBIT",
        "currency": "EUR",
        "note": "Flat rent",
        "counterparty_iban": "GB56AX632963612302",
        "counterparty_name": "Joe Blake",
        "created_at": "2023-05-23T15:13:32.923349+00:00",
        "account_id": 178
    },
    {
        "id": 69,
        "amount": 65.0,
        "direction": "DEBIT",
        "currency": "EUR",
        "note": "Food",
        "counterparty_iban": "GB78LXCT41632963612706",
        "counterparty_name": "Susan White",
        "created_at": "2023-05-23T15:09:26.300724+00:00",
        "account_id": 178
    }
]

Cool, right? 🀩

Congratulations! You went through the REST API. βœ…

Now, you can check the REST API definition or go ahead with GraphQL API.