Skip to main content
@qonto/embed-sdk / transactions

Variable: transactions

const transactions: object
The transactions namespace contains all the client-side functions related to transaction operations. This version uses proxy-based authentication (proxyEndpointDescriptor) and is designed for browser environments. For server-side operations using access tokens, import from ‘@qonto/embed-sdk/server/transactions’. It can be accessed like this:
import { transactions } from '@qonto/embed-sdk/transactions';
Then, the transactions object contains the functions to perform transaction operations:
// Fetch all transactions with optional filtering
const { transactions: txns, meta } = await transactions.getTransactions({
  transactionSettings: {
    status: 'completed',
    side: 'debit',
    bankAccountId: 'account_123'
  },
  operationSettings: {
    // For client side authentication, you must provide a proxy endpoint descriptor (recommended for
    // security reasons). Read more in the Proxy endpoint descriptor implementation documentation.
    // proxyEndpointDescriptor: { path: '/v2/transactions', method: 'GET' }
  }
});

// Fetch a specific transaction by ID
const transaction = await transactions.getTransaction({
  transactionSettings: { transactionId: 'txn_123' },
  operationSettings: {
    proxyEndpointDescriptor: { path: '/v2/transactions/:transactionId', method: 'GET' }
  }
});

Type declaration

getTransaction()

getTransaction: (getTransactionParams) => Promise<Transaction>
Fetches a single transaction of the current user by ID.

Parameters

getTransactionParams
TransactionParams<GetTransactionSettings> An object containing:
  • transactionSettings: An object with the transactionId property (string).
  • operationSettings: An object with operation-level settings including proxyEndpointDescriptor (required). See TransactionParams.

Returns

Promise<Transaction> A promise that resolves to a transaction.

Remarks

This is the client-side implementation that requires proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use “@qonto/embed-sdk/server/transactions” only in server-side/backend environments.

Throws

InvalidParametersError If the transactionId parameter is not a string or is missing.

Throws

AuthenticationError If proxyEndpointDescriptor is missing within operationSettings.

Throws

EmbedApiError If the API request fails or returns an error.

getTransactions()

getTransactions: (getTransactionsParams?) => Promise<GetTransactionsResponse>
Fetches the list of transactions for the current user with optional filtering.

Parameters

getTransactionsParams?
TransactionParams<GetTransactionsSettings> An object containing:
  • transactionSettings: An object with optional filtering parameters such as bankAccountId, iban, status, side, operationType, date ranges, and attachment filters.
  • operationSettings: An object with operation-level settings including proxyEndpointDescriptor (required), and optional paginationSettings for managing pagination (accepts an object with page and itemsPerPage properties). See TransactionParams.

Returns

Promise<GetTransactionsResponse> A promise that resolves to an array of transactions and a meta object containing pagination state.

Remarks

This is the client-side implementation that requires proxyEndpointDescriptor. For security, never expose access tokens in the browser. Use “@qonto/embed-sdk/server/transactions” only in server-side/backend environments.

Throws

InvalidParametersError If any of the values provided under operationSettings or transactionSettings is invalid.

Throws

AuthenticationError If proxyEndpointDescriptor is missing within operationSettings.

Throws

EmbedApiError If the API request fails or returns an error.