Get Balance
Use this route to get the financial balance of your account or a specific partner. The response returns the available balance for withdrawal and, optionally, the future balance and the related transactions list.
This route requires prior enablement by Marlim. Contact our support team for more information.
Request Query Params
| Attribute | Type | Description |
|---|---|---|
| sub_seller_id | string | Partner ID whose balance will be retrieved. When omitted, the query returns the seller account balance. |
| with_transactions | boolean | When true, includes the list of transactions linked to each balance in the response. Default: false. |
| with_future_balance | boolean | When true, includes the future object with the balance that has not yet been settled. Default: false. |
Monetary values returned by this route are always in cents. For example, 15000 represents R$ 150.00.
When a transaction is refunded, the amount is deducted from the balance according to the settlement stage:
| Transaction situation | Impacted balance |
|---|---|
| Still not settled (awaiting settlement) | Deducted from the future balance (balance.future) |
| Already settled, withdrawal requested or completed | Deducted from the available balance (balance.available) |
Response Object
The response returns an object with the balance property.
| Attribute | Type | Description |
|---|---|---|
| balance | object | Object containing the retrieved balances. |
| balance[available] | object | Balance available for withdrawal. |
| balance[available][amount] | int32 | Available amount in cents. |
| balance[available][transactions] | array | List of already settled transactions. Returns an empty array when with_transactions is false. |
| balance[available][residual_balance] | object | null | Residual balance generated when a withdrawal does not withdraw the full available balance. Returns null when there is no residual (for example, after withdrawing the full balance or when no partial withdrawal has been made). |
| balance[available][residual_balance][amount] | int32 | null | Residual amount of the available balance at the time of the referenced withdrawal, in cents. |
| balance[available][residual_balance][referenced_withdrawal_id] | string | null | ID of the withdrawal that originated the residual balance. |
| balance[available][residual_balance][date_created] | dateTime | null | Residual balance creation date in ISODateTime format. |
| balance[available][residual_balance][date_updated] | dateTime | null | Residual balance update date in ISODateTime format. |
| balance[future] | object | Future balance, still awaiting settlement. Present only when with_future_balance is true. |
| balance[future][amount] | int32 | Future amount in cents. |
| balance[future][transactions] | array | List of transactions awaiting settlement. Returns an empty array when with_transactions is false. |
The residual_balance field records the amount that remained in the available balance after a partial withdrawal, that is, when the withdrawn amount was less than the available balance at that moment.
- With residual: returns the object with the remaining amount (
amount), the ID of the withdrawal that originated it (referenced_withdrawal_id), and the creation/update dates. - Without residual: returns
null, for example, after a full balance withdrawal or when no partial withdrawal has occurred yet.
The value in balance.available.amount already includes the residual balance. Do not add the two fields together.
Transaction object (transactions)
When with_transactions=true, each item in the transactions array contains:
| Attribute | Type | Description |
|---|---|---|
| transaction_id | string | Marlim transaction ID. |
| date_created | dateTime | Transaction creation date in ISODateTime format. |
| date_updated | dateTime | Transaction update date in ISODateTime format. |
| paid_amount | int32 | Paid amount in cents. |
| net_value | int32 | Net transaction amount in cents. |
| amount_to_receive | int32 | Amount to receive in cents. The calculation depends on the account type (see note below). |
| installments | string | Number of installments. |
| authorization_code | string | Transaction authorization code. |
| nsu | string | Unique Sequential Number of the transaction. |
| item_id | string | Transaction identifier in your platform. |
| customer_name | string | Customer name. |
| customer_document_number | string | Customer document. |
| customer_email | string | Customer email. |
| customer_phone_number | string | Customer phone number. |
| card_brand | string | Card brand. |
| card_first_digits | string | First digits of the card. |
| card_last_digits | string | Last digits of the card. |
| card_expiration_date | string | Card expiration date. |
| status | string | Transaction status. |
The meaning of amount_to_receive changes depending on who is querying the balance:
Partner: amount from thesplitallocated to them in the transaction, in cents.Seller: net transaction amount after deducting fees and splits, in cents.
{
"balance": {
"available": {
"amount": 15000,
"transactions": [],
"residual_balance": null
}
}
}
{
"balance": {
"available": {
"amount": 5000,
"transactions": [],
"residual_balance": {
"amount": 5000,
"referenced_withdrawal_id": "wd_k4m6Rw5rlQszEY7fiuRe",
"date_created": "2026-07-22T11:00:00.000Z",
"date_updated": "2026-07-22T11:00:00.000Z"
}
}
}
}
{
"balance": {
"available": {
"amount": 15000,
"transactions": [
{
"transaction_id": "HcDscltTIVK3VMAAOj7J",
"date_created": "2026-07-20T14:30:00.000Z",
"date_updated": "2026-07-21T10:00:00.000Z",
"paid_amount": 10000,
"net_value": 9700,
"amount_to_receive": 9700,
"installments": "1",
"authorization_code": "112233",
"nsu": "98765432",
"item_id": "ABC123456789",
"customer_name": "Luke Skywalker",
"customer_document_number": "12345678900",
"customer_email": "luke@jedi.com",
"customer_phone_number": "11999999999",
"card_brand": "visa",
"card_first_digits": "555544",
"card_last_digits": "2222",
"card_expiration_date": "1228",
"status": "paid"
}
],
"residual_balance": null
},
"future": {
"amount": 5000,
"transactions": [
{
"transaction_id": "XyZabcDefGhiJklMnOp",
"date_created": "2026-07-25T18:00:00.000Z",
"date_updated": "2026-07-25T18:00:00.000Z",
"paid_amount": 5200,
"net_value": 5000,
"amount_to_receive": 5000,
"installments": "2",
"authorization_code": "445566",
"nsu": "11223344",
"item_id": "PEDIDO-987",
"customer_name": "Leia Organa",
"customer_document_number": "98765432100",
"customer_email": "leia@rebel.com",
"customer_phone_number": "11988888888",
"card_brand": "mastercard",
"card_first_digits": "544433",
"card_last_digits": "1111",
"card_expiration_date": "1129",
"status": "paid"
}
]
}
}
}
Error Object
| Attribute | Type | Description |
|---|---|---|
| errors | array | Array with all errors found while processing the request. |
| errors[][type] | string | Type of error that occurred. |
| errors[][message] | string | Detailed message of the error that occurred. |
{
"errors": [
{
"type": "not_found",
"message": "Sub Seller with id [sub_123456789] was not found"
}
]
}
Examples
The values used in the examples below are for illustration only and must not be used to make requests to Marlim APIs.
- Seller balance
- Partner balance
- With residual balance
- With future balance
- With transactions
- Partner not found
curl -X GET "https://api.marlim.co/v3/financial/balance" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d '{}'
{
"balance": {
"available": {
"amount": 15000,
"transactions": [],
"residual_balance": null
}
}
}
curl -X GET -G "https://api.marlim.co/v3/financial/balance" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d sub_seller_id="sub_k4m6Rw5rlQszEY7fiuRe"
{
"balance": {
"available": {
"amount": 8500,
"transactions": [],
"residual_balance": null
}
}
}
curl -X GET "https://api.marlim.co/v3/financial/balance" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d '{}'
{
"balance": {
"available": {
"amount": 5000,
"transactions": [],
"residual_balance": {
"amount": 5000,
"referenced_withdrawal_id": "wd_k4m6Rw5rlQszEY7fiuRe",
"date_created": "2026-07-22T11:00:00.000Z",
"date_updated": "2026-07-22T11:00:00.000Z"
}
}
}
}
curl -X GET -G "https://api.marlim.co/v3/financial/balance" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d with_future_balance="true"
{
"balance": {
"available": {
"amount": 15000,
"transactions": [],
"residual_balance": null
},
"future": {
"amount": 5000,
"transactions": []
}
}
}
curl -X GET -G "https://api.marlim.co/v3/financial/balance" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d with_transactions="true" \
-d with_future_balance="true"
{
"balance": {
"available": {
"amount": 15000,
"transactions": [
{
"transaction_id": "HcDscltTIVK3VMAAOj7J",
"date_created": "2026-07-20T14:30:00.000Z",
"date_updated": "2026-07-21T10:00:00.000Z",
"paid_amount": 10000,
"net_value": 9700,
"amount_to_receive": 9700,
"installments": "1",
"authorization_code": "112233",
"nsu": "98765432",
"item_id": "ABC123456789",
"customer_name": "Luke Skywalker",
"customer_document_number": "12345678900",
"customer_email": "luke@jedi.com",
"customer_phone_number": "11999999999",
"card_brand": "visa",
"card_first_digits": "555544",
"card_last_digits": "2222",
"card_expiration_date": "1228",
"status": "paid"
}
],
"residual_balance": null
},
"future": {
"amount": 5000,
"transactions": [
{
"transaction_id": "XyZabcDefGhiJklMnOp",
"date_created": "2026-07-25T18:00:00.000Z",
"date_updated": "2026-07-25T18:00:00.000Z",
"paid_amount": 5200,
"net_value": 5000,
"amount_to_receive": 5000,
"installments": "2",
"authorization_code": "445566",
"nsu": "11223344",
"item_id": "PEDIDO-987",
"customer_name": "Leia Organa",
"customer_document_number": "98765432100",
"customer_email": "leia@rebel.com",
"customer_phone_number": "11988888888",
"card_brand": "mastercard",
"card_first_digits": "544433",
"card_last_digits": "1111",
"card_expiration_date": "1129",
"status": "paid"
}
]
}
}
}
curl -X GET -G "https://api.marlim.co/v3/financial/balance" \
-H "Content-Type: application/json" \
-H "api_key: api_key_value" \
-d sub_seller_id="sub_123456789"
{
"errors": [
{
"type": "not_found",
"message": "Sub Seller with id [sub_123456789] was not found"
}
]
}