Skip to main content
GET
/
v1
/
merchants
/
{merchantId}
/
ledger-entries
Get ledger entries for a specific merchant
curl --request GET \
  --url https://api-sandbox.rinne.com.br/core/v1/merchants/{merchantId}/ledger-entries \
  --header 'x-api-key: <api-key>'
import requests

url = "https://api-sandbox.rinne.com.br/core/v1/merchants/{merchantId}/ledger-entries"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://api-sandbox.rinne.com.br/core/v1/merchants/{merchantId}/ledger-entries', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.rinne.com.br/core/v1/merchants/{merchantId}/ledger-entries",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api-sandbox.rinne.com.br/core/v1/merchants/{merchantId}/ledger-entries"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api-sandbox.rinne.com.br/core/v1/merchants/{merchantId}/ledger-entries")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.rinne.com.br/core/v1/merchants/{merchantId}/ledger-entries")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "data": [
    {
      "id": "le_123456789",
      "posting_set_id": "ps_123456789",
      "pair_token": "pair_123456789",
      "event_id": "evt_123456789",
      "owner_type": "COMPANY",
      "owner_id": "comp_123456789",
      "amount": 10050,
      "operation": "CREDIT",
      "type": "TRANSACTION",
      "currency": "BRL",
      "payment_date": "2023-12-01",
      "installment": 1,
      "total_installments": 1,
      "outstanding_amount": 0,
      "settled": true,
      "created_at": "2023-12-01T10:00:00.000Z",
      "updated_at": "2023-12-01T10:00:00.000Z",
      "settlement_items": [
        {
          "id": "si_123456789",
          "ledger_entry_id": "le_123456789",
          "settled_amount": 10050,
          "settlement_date": "2023-12-01",
          "method": "PIX",
          "status": "PAID",
          "operation_id": "op_123456789",
          "created_at": "2023-12-01T10:00:00.000Z",
          "updated_at": "2023-12-01T10:00:00.000Z",
          "affiliation_bank_account_id": "ba_123456789",
          "settlement_bank_account_id": "sba_123456789"
        }
      ],
      "company_id": "comp_123456789",
      "organization_id": "org_123456789",
      "affiliation_id": "aff_123456789",
      "transaction_id": "tx_123456789",
      "refund_id": "ref_123456789",
      "dispute_id": "dis_123456789",
      "cashout_id": "co_123456789",
      "fully_settled_at": "2023-12-01T10:00:00.000Z",
      "last_clearing_at": "2023-12-01T10:00:00.000Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 50,
    "totalPages": 3,
    "hasNext": true,
    "hasPrev": false
  }
}
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation error",
"status": 400,
"details": {
"issues": [
{
"field": "email",
"type": "REQUIRED",
"message": "Field 'email' is required",
"value": "invalid_value",
"constraints": {
"min": 18,
"max": 120
}
}
]
},
"path": "/companies",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}
{
"error": {
"code": "AUTHENTICATION_ERROR",
"message": "Authentication required to access this resource",
"status": 401,
"details": {
"reason": "Invalid API key"
},
"path": "/companies/me",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}
{
"error": {
"code": "AUTHORIZATION_ERROR",
"message": "You need 'admin' permissions to access this resource",
"status": 403,
"path": "/companies",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}
{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Company with ID '123' not found",
"status": 404,
"path": "/companies/me",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}
{
"error": {
"code": "INTERNAL_SERVER_ERROR",
"message": "An unexpected error occurred",
"status": 500,
"path": "/companies",
"timestamp": "2023-12-01T10:00:00.000Z",
"requestId": "req_123456789"
}
}

Authorizations

x-api-key
string
header
required

Company API key for authentication

Path Parameters

merchantId
string
required

The merchant ID

Query Parameters

page
integer
default:1

Page number for pagination

Required range: x >= 1
limit
integer
default:20

Number of entries per page

Required range: 1 <= x <= 100
owner_id
string

Filter by owner ID

posting_set_id
string

Filter by posting set ID

event_id
string

Filter by event ID

type
enum<string>[]

Comma-separated list of entry types to filter by.

Available options:
TRANSACTION,
ORGANIZATION_FEE,
PLATFORM_COST,
PROVIDER_COST,
ORGANIZATION_ANTICIPATION_FEE,
PLATFORM_ANTICIPATION_COST,
PLATFORM_REFUND_COST,
PROVIDER_REFUND_COST,
TRANSACTION_REFUND,
TRANSACTION_REFUND_REVERSAL,
ORGANIZATION_FEE_REFUND,
PLATFORM_COST_REFUND,
PROVIDER_COST_REFUND,
TRANSACTION_DISPUTE,
TRANSACTION_DISPUTE_REVERSAL
operation
enum<string>

Filter by operation type

Available options:
CREDIT,
DEBIT
payment_date_from
string<date>

Start payment date (inclusive)

payment_date_to
string<date>

End payment date (inclusive)

transaction_id
string

Filter by transaction ID

refund_id
string

Filter by refund ID

cashout_id
string

Filter by cashout ID

settled
boolean

Filter by settled status

sort
enum<string>[]

Multi-field sort string (e.g., -created_at,amount). Allowed fields: created_at, payment_date, amount

Available options:
created_at,
payment_date,
amount,
-created_at,
-payment_date,
-amount

Response

Paginated list of ledger entries for the merchant

Paginated list of ledger entries

data
object[]
required

Array of ledger entries

pagination
object
required