Skip to main content

Internal Bank Accounts

The Internal accounts are accounts created by Attrus inside our environment to be used to accumulate the payments you receive locally, for conversions and settlements. There is usually one of them for each local currency (cash-in) and separate accounts for foreign currencies (cash-in and cash-out). To check their IDs, look on the Bank Accounts page, on the Attrus Portal, or in this documentation, right below.

Understanding Internal Account Types

You will typically have the following types of internal accounts:

Account TypeCurrencyPurposeWhen to Use
Cash-in (Local)BRL, MXN, COP, CLPReceives local currency payments from customersUse as to_bank_account_id for pay-in transactions
Cash-in (Foreign)USD, EURHolds converted foreign currency fundsUse as to_bank_account_id for conversions
Cash-out (Foreign)USD, EURSource for payout transactionsUse as from_bank_account_id for payouts
Cash-out (Local)BRL, MXN, COP, CLPHolds local currency for local payoutsUse as from_bank_account_id for local payouts
info

The ID shown in the table below is the UUID you will use in API calls for the from_bank_account_id or to_bank_account_id fields, depending on the transaction type.

After authenticating, you can view the internal bank accounts assigned to your user by clicking the button below:

Internal Bank Account Balance

To check the current balance of any of your internal accounts, you can use the following endpoint:

curl -X GET "https://api.facilitapay.com/api/v1/bank_accounts/:id/balance" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...."

Response

{
"data": {
"debit_value": "65078.64",
"debit_transactions": 26,
"currency": "BRL",
"credit_value": "143078.64",
"credit_transactions": 8,
"balance": "78000.00"
}
}

HTTP Request

GET /bank_accounts/:id/balance

Path Parameters

ParameterDescriptionTypeRequired
idYour internal bank account IDstringtrue

Response Fields

ParameterDescriptionType
balanceCurrent account balancestring
currencyAccount currency (ISO 4217 format)string
credit_valueTotal credit valuestring
credit_transactionsNumber of credit transactionsinteger
debit_valueTotal debit valuestring
debit_transactionsNumber of debit transactionsinteger

Internal Bank Account Statement

Returns the statement of an internal account. If needed, you can filter for date/time intervals.

curl -X GET "https://api.facilitapay.com/api/v1/bank_accounts/:id/statement" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9...."

Response

{
"data": [
{
"wire_id": "9292fdf5-c0c1-467c-ba5c-dcc511450210",
"value": "249.38",
"subject_id": "f64e512c-1a81-42d9-9ac9-05f369bc98e3",
"social_name": "POWER HOME THEATER",
"kind": "DEBIT",
"inserted_at": "2022-05-11T20:49:31Z",
"id": "b2d8eabe-4754-43e4-a7a9-93adeb8e679c",
"exchanged_value": "1300.00",
"exchange_rate": "5.21518",
"exchange_id": "4be232cc-40e7-489d-b010-30df251b4464",
"exchange_currency": "BRL",
"document_type": "tax_id",
"document_number": "2348909854385",
"currency": "EUR"
}
]
}

HTTP Request

GET /bank_accounts/:id/statement

Path Parameters

ParameterDescriptionTypeRequired
idYour internal bank account IDstringtrue

Query Parameters

ParameterDescriptionTypeRequired
fromDate/time beginning interval, e.g.: 2022-01-01T03%3A00%3A00.000Zstringfalse
toDate/time end interval, e.g.: 2022-03-01T03%3A00%3A00.000Zstringfalse

Response Fields

ParameterDescriptionType
idTransaction IDstring
wire_idWire transfer IDstring
valueTransaction valuestring
currencyTransaction currencystring
kindTransaction type (DEBIT/CREDIT)string
inserted_atTransaction timestampstring
subject_idCustomer IDstring
social_nameCustomer social namestring
document_typeCustomer document typestring
document_numberCustomer document numberstring
exchanged_valueExchanged value (if applicable)string
exchange_rateExchange rate (if applicable)string
exchange_idExchange ID (if applicable)string
exchange_currencyExchange currency (if applicable)string