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 Type | Currency | Purpose | When to Use |
|---|---|---|---|
| Cash-in (Local) | BRL, MXN, COP, CLP | Receives local currency payments from customers | Use as to_bank_account_id for pay-in transactions |
| Cash-in (Foreign) | USD, EUR | Holds converted foreign currency funds | Use as to_bank_account_id for conversions |
| Cash-out (Foreign) | USD, EUR | Source for payout transactions | Use as from_bank_account_id for payouts |
| Cash-out (Local) | BRL, MXN, COP, CLP | Holds local currency for local payouts | Use as from_bank_account_id for local payouts |
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
| Parameter | Description | Type | Required |
|---|---|---|---|
id | Your internal bank account ID | string | true |
Response Fields
| Parameter | Description | Type |
|---|---|---|
balance | Current account balance | string |
currency | Account currency (ISO 4217 format) | string |
credit_value | Total credit value | string |
credit_transactions | Number of credit transactions | integer |
debit_value | Total debit value | string |
debit_transactions | Number of debit transactions | integer |
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
| Parameter | Description | Type | Required |
|---|---|---|---|
id | Your internal bank account ID | string | true |
Query Parameters
| Parameter | Description | Type | Required |
|---|---|---|---|
from | Date/time beginning interval, e.g.: 2022-01-01T03%3A00%3A00.000Z | string | false |
to | Date/time end interval, e.g.: 2022-03-01T03%3A00%3A00.000Z | string | false |
Response Fields
| Parameter | Description | Type |
|---|---|---|
id | Transaction ID | string |
wire_id | Wire transfer ID | string |
value | Transaction value | string |
currency | Transaction currency | string |
kind | Transaction type (DEBIT/CREDIT) | string |
inserted_at | Transaction timestamp | string |
subject_id | Customer ID | string |
social_name | Customer social name | string |
document_type | Customer document type | string |
document_number | Customer document number | string |
exchanged_value | Exchanged value (if applicable) | string |
exchange_rate | Exchange rate (if applicable) | string |
exchange_id | Exchange ID (if applicable) | string |
exchange_currency | Exchange currency (if applicable) | string |