@flittpayments/flitt-node-js-sdk

中文文档
2.0.0发布于 2026/08/29GPL-3.0TypeScriptCommonJS零依赖近 30 天下载 3896

原始使用文档
文档目录12 节
  1. Payment service provider
  2. Installation
  3. Required
  4. Simple Start
  5. API additions from Python SDK 2.0
  6. Open Banking and installments
  7. IBAN withdrawal
  8. Full capture, full reverse, and fiscal data
  9. Company Reports
  10. Deprecated methods
  11. Notice
  12. Examples

Flitt NODEJS-SDK

raiting raiting raiting

Payment service provider

A payment service provider (PSP) offers shops online services for accepting electronic payments by a variety of payment methods including credit card, bank-based payments such as direct debit, bank transfer, and real-time bank transfer based on online banking. Typically, they use a software as a service model and form a single payment gateway for their clients (merchants) to multiple payment methods. read more

Installation

npm install @flittpayments/flitt-node-js-sdk

Manual installation

git clone -b master https://github.com/flittpayments/node-js-sdk.git

Required

node >= 7

Simple Start

const FlittPay = require('@flittpayments/flitt-node-js-sdk')

const flitt = new FlittPay(
  {
    merchantId: 1549901,
    secretKey: 'test'
  }
)
const requestData = {
  order_id: 'Your Order Id',
  order_desc: 'test order',
  currency: 'GEL',
  amount: '1000'
}
flitt.Checkout(requestData).then(data => {
  console.log(data)
}).catch((error) => {
  console.log(error)
})

API additions from Python SDK 2.0

The Node SDK includes the payment methods added to the Python SDK 2.0 API.

Open Banking and installments

const openBanking = await flitt.OpenBanking({
  currency: 'GEL',
  amount: 10000,
  payment_method: 'tbc'
})

const installments = await flitt.Installments({
  currency: 'GEL',
  amount: 5000,
  payment_method: 'tbc'
})

The returned checkout_url can be a bank-app deep link. Pass it to the customer unchanged after an explicit user action, and confirm payment using the server callback or Status.

IBAN withdrawal

IBAN withdrawal uses the payout secret configured as creditKey.

const payout = await flitt.Ibancredit({
  currency: 'GEL',
  amount: 10000,
  receiver_iban: 'GE00TB0000000000000001'
})

Full capture, full reverse, and fiscal data

await flitt.CaptureFull({ order_id: 'order-id', currency: 'GEL' })
await flitt.ReverseFull({ order_id: 'order-id', currency: 'GEL' })
const fiscalData = await flitt.FiscalData({ order_id: 'order-id' })

CaptureFull and ReverseFull first request the current order status and calculate the available amount after client fees and prior reversals.

Company Reports

Company Reports uses separate application_id and key credentials and the portal.flitt.com service. Override the domain with the constructor option reportsBaseUrl when needed.

const report = await flitt.CompanyReports({
  application_id: 'application-id',
  key: 'reports-key',
  report_id: 745,
  merchant_id: 1549902,
  filters: []
})

Reports accepts the same Company Reports data as a compatibility alias. Calls using the old date_from/date_to shape still reach the legacy endpoint, but that usage is deprecated.

Deprecated methods

  • TransactionList is kept for backward compatibility but was removed from the Python SDK 2.0 API. Use Status for current order state.
  • LegacyReports and date-range calls to Reports use the legacy /reports/ endpoint. They are kept for backward compatibility; use CompanyReports or Reports with Company Reports credentials.

Notice

merchant_data must be string.

Example:

 const merchant_data = JSON.stringify([{
    email: '[email protected]',
    comment: 'Some comment'
 }])

Api

See docs

Examples

See all SDK examples, including:

版本与发布记录

@flittpayments/flitt-node-js-sdk 共发布 4 个版本,首次发布于 2025/03/27;过去 12 个月发布了 1 个版本。

版本发布日期距今
2.0.0latest2026/08/292 个月前
1.0.12025/03/271.6 年前
1.0.02025/03/271.6 年前
1.0.82025/03/271.6 年前

关于 @flittpayments/flitt-node-js-sdk 的常见问题

如何安装 @flittpayments/flitt-node-js-sdk?

在项目目录运行 npm install @flittpayments/flitt-node-js-sdk,或使用 pnpm add / yarn add / bun add。

@flittpayments/flitt-node-js-sdk 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@flittpayments/flitt-node-js-sdk 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@flittpayments/flitt-node-js-sdk 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=7.6.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@flittpayments/flitt-node-js-sdk 可以商用吗?

@flittpayments/flitt-node-js-sdk 使用 GPL-3.0 许可。强 Copyleft:分发包含该代码的软件时,整个作品需以 GPL-3.0 兼容许可开源,并附带专利与反锁定条款。仅内部使用不触发此义务。以上为概括,不构成法律意见,请以许可原文为准。

@flittpayments/flitt-node-js-sdk 的下载量有多少?

根据 npm 官方下载统计,@flittpayments/flitt-node-js-sdk 在 2026/10/15 – 2026/11/13 这 30 天内被下载 3,896 次,日均约 130 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@flittpayments/flitt-node-js-sdk 还在维护吗?

最新版本 2.0.0 发布于 2026/08/29(2 个月前);至今共发布 4 个版本,其中过去 12 个月发布了 1 个;首次发布于 2025/03/27。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。