Query account information

📘

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

Query user accounts

You can view a list of accounts a user has previously deposited 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_iduuidunique 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 user limits

View a hash-map of limits applicable to a given user. Currently, the only limit object available is
for the Instant Guarantee feature.

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

You'll get a response with the instant_guarantee_eur object, which includes the following:

FieldTypeDescription
pending_amount_in_minorintegerTotal amount currently guaranteed and pending settlement, for the given user.
available_amount_in_minorintegerTotal amount currently available for instant guarantee, for the given user.
{
  "result": {
    "instant_guarantee_eur": {
      "pending_amount_in_minor": 30000,
      "available_amount_in_minor": 170000
    }
  }
}

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, the field can be enabled or disabled.
current_balance_in_minorintegerThe current balance of the account in the smallest denomination including 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 topups and payouts.

You can make a request to query transactions, and include:

FieldMandatoryTypeDescription
fromMandatorytimestampTimestamp as a string for the start of the range you are querying
toMandatorytimestampTimestamp as a string for the end of the range you are querying
typeOptionalstringFilter transactions by type, the available types are topup and payout. If omitted, both payouts and topups will be returned.
currencyOptionalISO 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 the following:

{
  "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"
    }
  ]
}

Did this page help you?