@bambora/checkout-sdk-web

中文文档
3.2.1发布于 2026/06/10MITTypeScriptESM + CJS零依赖近 30 天下载 1.1万

JavaScript SDK for Checkout.

原始使用文档
文档目录6 节
  1. Installation
  2. Build
  3. Test
  4. Contributing
  5. Main Developer Dependencies
  6. Continuous Integration and Delivery

JavaScript SDK for Bambora Checkout

Provides the tools necessary for integrating Bambora Checkout with your website.

Currently, the following integrations are available:

  • Full page redirect.
  • Modal, as a full page overlay.
  • Inline, as a component of a page.

Full documentation is available at the Bambora developer portal.

Installation

NPM: npm install @bambora/checkout-sdk-web

CDN: https://static.bambora.com/checkout-sdk-web/latest/checkout-sdk-web.min.js

The CDN version contains a polyfill to support promises in IE 11.

The NPM package supports ESM.

Browser support: All major browsers above version N - 1, where N is the most recent version. For Internet Explorer, only version 11 is supported via Promise polyfill (only on CDN). The NPM package does not include the polyfill. We don't test other browsers, but bug reports and pull requests for bugs related to older versions or uncommon browsers are always welcome.

Build

Requirements are Node and NPM.

Clone the project, navigate to the project root, and run:

npm install
npm run build

This installs dependencies and outputs build assets to the dist folder.

It is also possible to set up a watcher for source files for changes by running npm start.

Test

Run the following commands in the project root:

  • npm run lint for linting.
  • npm test for browser tests.
  • npm run test:package to validate package contents and installability.
  • npm run test:all to run the full validation pipeline.

Contributing

Create a pull request or an issue. Be sensible and respectful. Thanks.

Main Developer Dependencies

PurposeDependencies
LanguageTypeScript
BundlingRollup
TestingWeb Test Runner, Mocha, Chai, Sinon
Code qualityESLint, Prettier

Continuous Integration and Delivery

Use npm version to bump the version and create a tagged commit as it ensures consistency.

版本与发布记录

@bambora/checkout-sdk-web 共发布 11 个版本,首次发布于 2018/02/27;过去 12 个月发布了 1 个版本。

版本发布日期距今
3.2.1latest2026/06/104 个月前
3.1.02024/04/112 年前
3.0.72021/02/035 年前
3.0.62020/05/206 年前
3.0.52020/05/206 年前
3.0.22018/06/158 年前

关于 @bambora/checkout-sdk-web 的常见问题

@bambora/checkout-sdk-web 是什么?

JavaScript SDK for Checkout.

如何安装 @bambora/checkout-sdk-web?

在项目目录运行 npm install @bambora/checkout-sdk-web,或使用 pnpm add / yarn add / bun add。

@bambora/checkout-sdk-web 支持 TypeScript 吗?

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

@bambora/checkout-sdk-web 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@bambora/checkout-sdk-web 需要什么版本的 Node.js?

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

@bambora/checkout-sdk-web 可以商用吗?

@bambora/checkout-sdk-web 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@bambora/checkout-sdk-web 的下载量有多少?

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

@bambora/checkout-sdk-web 还在维护吗?

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