Skip to main content

Account statements

Statements are returned as binary payloads with helpers to inspect content type and text — suitable for archiving or reconciliation jobs.
Use getAccountStatement to request statements for date ranges, currency, and format.
import { Currency, StatementFormat } from 'gopay-sdk';

const statement = await client.getAccountStatement({
  goid: 8123456789,
  date_from: '2026-01-01',
  date_to: '2026-01-31',
  currency: Currency.CZK,
  format: StatementFormat.CSV_A,
});

Response shape

type AccountStatementResponse = {
  data: ArrayBuffer;
  contentType: string | null;
  contentDisposition: string | null;
  toText(encoding?: string): string;
};
Example:
console.log(statement.contentType);
console.log(statement.contentDisposition);
console.log(statement.toText().slice(0, 200));

Supported formats

Use StatementFormat enum values such as:
  • XLS_A, XLS_B, XLS_C
  • CSV_A, CSV_B, CSV_C, CSV_D, CSV_E
  • ABO_A, ABO_B
  • PDF_A

Tips

  • Prefer CSV variants for service-to-service parsing.
  • Use contentDisposition to infer suggested filename.
  • Store binary payload in secure storage if retaining statements.