Getting account details

This page will show you how to get account details and statements

In an earlier page we explained how to create an account. This page will explain how to get account details and has the following sections:

Getting account details

This is how you get your bank accounts details:

curl {baseURL}/yordexpay  
-H "Authorization:your-api-key"  
-X GET

This response will look like this

{
  "status": "ACTIVATED",
  "accounts": [
    {
      "id": "yordex-pay-account-id",
      "provider": "RAILSBANK",
      "name": "London Office",
      "balanceInCents": 500000,
      "currency": "GBP",
      "status": "ACTIVATED",
      "bankAccount": {
        "accountHolderName": "Yordex",
        "accountNumber": "12345678",
        "sortCode": "000000",
        "iban": "GB16PAYR00000000",
        "bic": "PAYRGB2LXXX"
      }
      ... // other fields
    }
  ]
}

accounts is an array as you can have multiple bank accounts.

The id is required to create cards. The provider is our banking partner. We offer two providers today: Railsbank and Stripe. The name is a name you can give to make it easier to distinguish accounts if you have more than one.

The balanceInCents is the balance left on this account and the bankAccount are the account details for this account. Other fields are returned but they are not important yet at this point.

Getting payments for an account

Getting a list of all payments for an account is done as follows:

curl {baseURL}/reports/yordexpay?accountId=:account-id
-H "Authorization:your-api-key"  
-X GET

The response is the same as for getting payments for a card. You can also use the same filters:

  • accountId=account-id: will only return transactions for a specific account. This filter is mandatory
  • startDate, endDate: to specify the date range; for example, '&startDate=2021-10-01&endDate=2021-10-31' will return a statement for October
  • includeAccountTopUps=true: will include (true) or exclude (false) bank transfers into and out of the account
  • includeCardTransactions=true: will include (true) or exclude (false) card payments
  • includeTopUps=true: will include (true) or exclude (false) card top ups
  • Pagination filters: as described [here](cardId=card-id: will only return transactions for a specific card. This id is returned when getting cards)