Get Account Statement

This API retrieves a paginated list of bank account transactions (statement) for a specific account within a date range. It uses cursor-based bidirectional pagination for efficient navigation through transaction history.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Endpoint

GET /v3/account-statements/{account_branch_identifier}/{account_number}

Headers

ParameterTypeDescriptionExample
AuthorizationStringBearer + Access_tokenBearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzEzMzAwOTMxLCJpYXQiOjE3MTMyOTczMzEsImp0aSI6Ijc2ZWI4ZTE5ZjM4YjQ4NmZiODdmNzNjNTdkMWVmNDJhIiwidXNlcl9pZCI6MjQ2fQ.5zekMa7CUj9p-MvNHns5ke4ZPhYV3Y1CLOsYL7hDUUo
hmacStringHMAC (Hash-based Message Authentication Code) is an authentication algorithm that combines a private key with a message to create a Message Authentication Code (MAC).hmac: 57373705c83bc5efe41001790c54642e670088c0c87d56bc8f990f2260c7740b99f4081ff231b87f82118c1e77a959e1f40eacf690a8fa61a827a9ba01d546f6

Path Parameters

ParameterTypeDescriptionRequiredExample
account_branch_identifierStringBranch/agency number of the accountYes0001
account_numberStringAccount number to retrieve statementYes12345678-9

Query Parameters

ParameterTypeDescriptionRequiredDefaultExample
startDateTimeStart date and time for the transaction period (ISO 8601 format with timezone). Must be before end.Yes-2026-04-01T00:00:00Z
endDateTimeEnd date and time for the transaction period (ISO 8601 format with timezone). Must be after start.Yes-2026-04-30T23:59:59Z
limitIntegerMaximum number of transactions per page. Minimum: 1, Maximum: 100.No5050
cursorStringOpaque cursor token for pagination. Automatically provided in next/previous URLs. Do not construct manually.No-opaque_cursor_xyz123
directionStringPagination direction when using cursor. Values: next (forward) or previous (backward). Required if cursor is set.No-next

Request Examples

Get first page (initial request):

GET /v3/account-statements/0001/12345678-9?start=2026-04-01T00:00:00Z&end=2026-04-30T23:59:59Z
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
hmac: 57373705c83bc5efe41001790c54642e670088c0c87d56bc8f990f2260c7740b...

Get first page with custom limit:

GET /v3/account-statements/0001/12345678-9?start=2026-04-01T00:00:00Z&end=2026-04-30T23:59:59Z&limit=100
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
hmac: 57373705c83bc5efe41001790c54642e670088c0c87d56bc8f990f2260c7740b...

Navigate to next page (use the complete URL from next field in response):

GET /v3/account-statements/0001/12345678-9?start=2026-04-01T00:00:00Z&end=2026-04-30T23:59:59Z&limit=50&cursor=abc123def&direction=next
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
hmac: 57373705c83bc5efe41001790c54642e670088c0c87d56bc8f990f2260c7740b...

Navigate to previous page (use the complete URL from previous field in response):

GET /v3/account-statements/0001/12345678-9?start=2026-04-01T00:00:00Z&end=2026-04-30T23:59:59Z&limit=50&cursor=xyz789ghi&direction=previous
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
hmac: 57373705c83bc5efe41001790c54642e670088c0c87d56bc8f990f2260c7740b...

Response Details

{
  "worked": true,
  "next": "https://api.somossimpay.com.br/v3/account-statements/0001/12345678-9?start=2026-04-01T00:00:00Z&end=2026-04-30T23:59:59Z&limit=50&cursor=next_cursor_token&direction=next",
  "previous": null,
  "results": [
    {
      "credit_or_debit": "CREDIT",
      "transaction_type": "PIX_CASHIN",
      "amount": 500.00,
      "date_time": "2026-04-15T14:30:00-03:00",
      "date_time_utc": "2026-04-15T17:30:00Z",
      "identification": "E123456789202604151430ABCD1234",
      "code_transaction": "E123456789202604151430ABCD1234",
      "code": 98765,
      "qr_code_id": null,
      "transaction_id": 5001,
      "tag_id": "invoice-4321",
      "end_to_end": "E123456789202604151430ABCD1234",
      "user_name": "João Silva",
      "user_document": "123.456.789-00",
      "user_agency": "0002",
      "user_account": "87654321-0"
    },
    {
      "credit_or_debit": "DEBIT",
      "transaction_type": "PIX_CASHOUT",
      "amount": 250.00,
      "date_time": "2026-04-14T10:15:00-03:00",
      "date_time_utc": "2026-04-14T13:15:00Z",
      "identification": "E987654321202604141015WXYZ9876",
      "code_transaction": "E987654321202604141015WXYZ9876",
      "code": 98764,
      "qr_code_id": 1234,
      "transaction_id": null,
      "tag_id": "payment-order-789",
      "end_to_end": "E987654321202604141015WXYZ9876",
      "user_name": "Maria Santos",
      "user_document": "987.654.321-00",
      "user_agency": "0003",
      "user_account": "11223344-5"
    }
  ]
}

Pagination Fields

FieldTypeDescription
workedBooleanAlways returns true when the request is successful
nextStringComplete URL to fetch the next page of transactions. null if this is the last page.
previousStringComplete URL to fetch the previous page of transactions. null if this is the first page.
resultsArrayArray of transaction records (see Transaction Fields below)

Transaction Fields

FieldTypeDescription
credit_or_debitStringTransaction direction: CREDIT (money entering the account) or DEBIT (money leaving the account)
transaction_typeStringType of transaction. Possible values: PIX_CASHIN, PIX_CASHOUT, PIX_CASHIN_TAX, PIX_CASHOUT_TAX, PIX_CASHOUT_TAX_MED, PIX_CHARGEBACK, PIX_CHARGEBACK_REFUND, PIX_CASHOUT_REFUND, PIX_CREDIT_IN_ACCOUNT
amountFloatTransaction amount in BRL (Brazilian Real). Always positive regardless of credit/debit direction.
date_timeDateTimeTransaction date and time in local timezone (Brazilian time, GMT-3). Format: ISO 8601.
date_time_utcDateTimeTransaction date and time in UTC timezone. Format: ISO 8601. Use this for consistent time comparisons across timezones.
identificationStringTransaction identifier. For PIX transactions, this is the end-to-end ID. May be null for some transaction types.
code_transactionStringUnique transaction code. Usually matches identification. May be null for some transaction types.
codeIntegerInternal database ID of the transaction record. Unique across all transactions.
qr_code_idIntegerID of the PIX QR Code used for this transaction (if applicable). null if the transaction did not use a QR Code.
transaction_idIntegerID of the associated transaction object (if applicable). null if not linked to a transaction object.
tag_idStringCustom tag/label associated with the transaction. Useful for grouping or identifying transactions in your system. null if no tag was assigned.
end_to_endStringPIX end-to-end identifier (UUID format). Unique identifier for PIX transactions. null for non-PIX transactions.
user_nameStringName of the counterparty (person or company involved in the transaction). null if not available or not applicable.
user_documentStringCPF or CNPJ of the counterparty (formatted with dots and dashes, e.g., "123.456.789-00"). null if not available.
user_agencyStringBank branch/agency number of the counterparty. null if not available or not applicable.
user_accountStringAccount number of the counterparty (formatted with dash, e.g., "12345678-9"). null if not available or not applicable.

Transaction Direction (credit_or_debit):

ValueDescription
CREDITMoney entering the account
DEBITMoney leaving the account

Transaction Types (transaction_type):

ValueDescription
PIX_CASHINPIX incoming payment received
PIX_CASHOUTPIX outgoing payment sent
PIX_CASHIN_TAXTax charged on PIX incoming payment
PIX_CASHOUT_TAXTax charged on PIX outgoing payment
PIX_CASHOUT_TAX_MEDTax charged on PIX outgoing payment for MED
PIX_CHARGEBACKPIX chargeback transaction
PIX_CHARGEBACK_REFUNDRefund of a PIX chargeback
PIX_CASHOUT_REFUNDRefund of a PIX outgoing payment
PIX_CREDIT_IN_ACCOUNTPIX credit directly added to account

Error Responses

HTTP CodeError MessageDescription
400Account not foundThe account was not found or does not belong to your company.
400Cursor does not belong to this accountThe cursor was created for a different account. Ensure you're using the cursor with the same account parameters.
400Cursor not found or expiredThe cursor token is invalid, not found, or has expired. Start a new request from the first page.
400direction (next or previous) is required when cursor is providedYou must specify direction parameter (next or previous) when using cursor-based pagination.
401UnauthorizedInvalid or missing authentication token. Ensure you are sending a valid Bearer token and HMAC signature.
403ForbiddenYour user does not have the necessary permissions to access this account's statement.
404Not foundThe account does not exist.
422Validation errorOne or more query parameters are invalid. Check date formats (ISO 8601), limit range (1-100), and that start is before end.

Business Rules

Account Validation:

  • Account must exist in the system
  • Account must belong to your company
  • User must have permission to access this specific account's transactions
  • Both branch identifier and account number are required and must match exactly

Date Range Validation:

  • Both start and end parameters are required
  • start must be before end
  • Dates must be in ISO 8601 format with timezone (e.g., 2026-04-01T00:00:00Z)
  • Maximum period length: No hard limit, but very large ranges may impact performance
  • Recommended maximum: 90 days per request for optimal performance

Pagination Limits:

  • Minimum records per page: 1
  • Maximum records per page: 100
  • Default records per page: 50
  • Changing limit during pagination applies to the current cursor position

Transaction Ordering:

  • Transactions are ordered by creation date (newest to oldest by default)
  • Order is consistent throughout pagination
  • The same date range will always return transactions in the same order

Cursor Expiration:

  • Cursors are stored temporarily and expire after a period of inactivity
  • Typical expiration: 15-30 minutes from last use
  • If a cursor expires, start a new request from the first page
  • Cursors are tied to specific account and date range parameters

Pagination Usage

How Cursor-Based Pagination Works:

This API uses opaque cursor-based pagination. You don't need to understand or parse the cursor—simply follow the URLs provided in the response.

First Request:

  • Make an initial request without cursor or direction parameters
  • The response includes next URL for the next page (or null if no more pages)
  • The previous field is always null on the first page

Navigate Forward:

  • Use the complete URL from the next field in the response
  • The cursor and direction parameters are automatically included in the URL

Navigate Backward:

  • Use the complete URL from the previous field in the response
  • The cursor and direction parameters are automatically included in the URL

Best Practices:

  • Always use the complete URLs provided in next and previous fields
  • Check if URLs are null before making requests
  • If a cursor expires, start from the first page again
  • Don't manually construct or parse cursor values
  • Don't change start or end parameters while using a cursor (this resets to first page)
  • Changing limit parameter applies to the current cursor position
Path Params
string
required

Branch/agency number of the account

string
required

Account number to retrieve statement

Query Params
date-time
required

Start date and time for the transaction period (ISO 8601)

date-time
required

End date and time for the transaction period (ISO 8601)

integer
1 to 100
Defaults to 50

Maximum number of transactions per page

string

Opaque cursor token for pagination (provided in next/previous URLs)

string
enum

Pagination direction when using cursor (required if cursor is set)

Allowed:
Responses

400

Bad request - Account not found, cursor expired, or invalid parameters

401

Unauthorized - Invalid or missing authentication

403

Forbidden - Insufficient permissions

404

Not found - Account does not exist

422

Validation error - Invalid query parameters

500

Internal server error

Language
LoadingLoading…
Response
Choose an example:
application/json