Query account information [PayDirect]

Get account information associated with a specific user id.

📘

Note

This feature is in private beta and is currently available to a limited number of clients. To join our private beta, contact Client Ops.

Query user accounts

View a list of accounts a user has previously paid from.

curl -H "Authorization: Bearer ${access_token}" \
https://paydirect.truelayer-sandbox.com/v1/users/${userId}/accounts

You'll get a response with the following:

FieldTypeDescription
account_iduuidThe unique ID of the account.
namestringThe name of the account holder.
ibanstringThe IBAN of the account.
{
  "results": [
    {
      "account_id": "5156e5af-7bf2-49a4-96b3-7fde5ec8ddfe",
      "name": "JONAS DOE",
      "iban": "GB53CLRB04066200002723"
    },
    {
      "account_id": "77156e5af-7bf2-49a4-96b3-7fde5ec8ddfe",
      "name": "JONAS DOE",
      "iban": "GB99CLRB04066200002723"
    }
  ]
}

Query account balance

curl -H "Authorization: Bearer ${access_token}" \
https://paydirect.truelayer-sandbox.com/v1/balances

You'll get a response with the following:

FieldTypeDescription
currencyISO 4217 Currency Code StringThe currency of the account. Accounts can only hold one currency each.
ibanstringThe IBAN of the account that can be used to send funds to the account.
statusstringDenotes whether the account is active or not. This field can be enabled or disabled.
current_balance_in_minorintegerThe current balance of the account in the smallest denomination. Includes transactions that are pending or in transit.
available_balance_in_minorintegerThe balance available to spend, in the smallest denomination.
account_ownerstringThe name of the account owner.
{
  "results": [
    {
      "currency": "GBP",
      "iban": "GB33BUKB20201555555555",
      "status": "enabled",
      "current_balance_in_minor": 50000000,
      "available_balance_in_minor": 49998000,
      "account_owner": "Owner Name"
    },
    {
      "currency": "EUR",
      "iban": "FR1420041010050500013M02606",
      "status": "disabled",
      "current_balance_in_minor": 20000000,
      "available_balance_in_minor": 20000000,
      "account_owner": "Owner Name"
    }
  ]
}

Query Transactions

The type field can be used to distinguish between top-ups and payouts.

You can make a request to view all the transactions made within a certain time. Include:

FieldRequired?TypeDescription
fromYestimestampTimestamp as a string for the start of the range you are querying.
toYestimestampTimestamp as a string for the end of the range you are querying.
typeNostringFilter transactions by type. Available types are topup and payout. If not present, both payouts and topups will be returned.
currencyNoISO 4217 Currency Code StringFilter transactions by currency.
curl -H "Authorization: Bearer ${access_token}" \
https://paydirect.truelayer-sandbox.com/v1/transactions?from="2019-10-01T17:00:00.0000000Z"&to="2019-10-02T17:00:00.0000000Z"&type="payout"&currency="GBP"

You'll get a response like this:

{
  "results": [
    {
      "transaction_id": "cc328607-e02e-49e2-81c9-5bd044c8f7d7",
      "type": "payout",
      "authorised_at": "2019-10-01T17:00:00.0000000Z",
      "submitted_at": "2019-10-01T17:00:00.0000000Z",
      "settled_at": "2019-10-01T17:00:00.0000000Z",
      "beneficiary_name": "John Smith",
      "beneficiary_iban": "GB33BUKB20201555555555",
      "beneficiary_reference": "Withdrawal 204",
      "amount_in_minor": 10000,
      "currency": "GBP",
      "context_code": "withdrawal",
      "status": "settled"
    },
    {
      "transaction_id": "gg328607-e02e-49e2-81c9-5bd044c8f7d8",
      "type": "payout",
      "authorised_at": "2019-10-01T15:00:00.0000000Z",
      "submitted_at": "2019-10-01T15:00:00.0000000Z",
      "settled_at": "2019-10-01T15:00:00.0000000Z",
      "beneficiary_name": "Jane Doe",
      "beneficiary_iban": "GB43BUKB20201555555555",
      "beneficiary_reference": "Withdrawal 205",
      "amount_in_minor": 20000,
      "currency": "GBP",
      "context_code": "withdrawal",
      "status": "settled"
    }
  ]
}