MCPcopy Index your code
hub / github.com/bigcommerce/checkout-js

github.com/bigcommerce/checkout-js @v1.829.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.829.0 ↗ · + Follow
3,911 symbols 12,225 edges 1,701 files 5 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Checkout JS

Ask DeepWiki

Checkout JS is a browser-based application providing a seamless UI for BigCommerce shoppers to complete their checkout. It is also known as Optimized One-Page Checkout, which is currently the recommended checkout option for all BigCommerce stores.

Requirements

In order to build from the source code, you must have the following set up in your development environment.

  • Node >= v22.
  • NPM >= v10.
  • Unix-based operating system. (WSL on Windows)

One of the simplest ways to install Node is using NVM. You can follow their instructions to set up your environment if it is not already set up.

Development

Once you have cloned the repository and set up your environment, you can start developing with it.

First, you have to pull in the dependencies required for the application.

npm ci

After that, you can make changes to the source code and run the following command to build it.

npm run build

If you are developing the application locally and want to build the source code in watch mode, you can run the following command:

npm run dev

If you want to create a prerelease (i.e.: alpha) for testing in the integration environment, you can run the following command:

npm run release:alpha

After that, you need to push the prerelease tag to your fork so it can be referenced remotely.

Testing

To run E2E tests, use the following command:

npm run e2e

The E2E tests in this project use HAR files to stub network calls. If you need to manually update the HAR files to make minor changes to the requests, you must run the command below to regenerate the ID for each updated request. Otherwise, the stubs will not function properly.

npm run regenerate-har

Custom Checkout installation

Follow this guide for instructions on how to fork and install this app as a Custom Checkout in your store.

If you want to test your checkout implementation, you can run:

npm run dev:server

And enter the local URL for auto-loader-dev.js in Checkout Settings, e.g http://127.0.0.1:8080/auto-loader-dev.js

Release

Everytime a PR is merged to the master branch, CircleCI will trigger a build automatically. However, it won't create a new Git release until it is approved by a person with write access to the repository. If you have write access, you can approve a release job by going to CircleCI and look for the job you wish to approve. You can also navigate directly to the release job by clicking on the yellow dot next to the merged commit.

Contribution

More information can be found in the contribution guide and code of conduct for this project.

Copyright (C) 2019-Present BigCommerce Inc. All rights reserved.

Extension points exported contracts — how you extend this code

CheckoutPagePreset (Interface)
(no doc) [11 implementers]
packages/test-framework/src/fixture/pagePreset/CheckoutPagePreset.ts
FastlanePrivacySettings (Interface)
(no doc) [6 implementers]
packages/paypal-fastlane-integration/src/types.ts
PaymentMethodFilter (Interface)
(no doc) [7 implementers]
packages/payment-integration-api/src/PaymentMethodFilter.ts
CheckoutSupport (Interface)
(no doc) [4 implementers]
packages/core/src/app/checkout/CheckoutSupport.ts
ErrorLogger (Interface)
(no doc) [4 implementers]
packages/contexts/src/checkout/ErrorLogger.ts
ErrorLogger (Interface)
(no doc) [1 implementers]
packages/error-handling-utils/src/ErrorLogger.ts
BigCommercePaymentsPaymentMethodComponentProps (Interface)
(no doc)
packages/bigcommerce-payments-integration/src/components/BigCommercePaymentsPaymentMethodComponent.tsx
ExtensionProps (Interface)
(no doc)
packages/checkout-extension/src/Extension.tsx

Core symbols most depended-on inside this repo

n
called by 1121
packages/klarna-integration/e2e/support/klarnaMock.js
call
called by 316
packages/klarna-integration/e2e/support/klarnaMock.js
getState
called by 251
packages/core/src/app/address/googleAutocomplete/AddressSelector.ts
r
called by 246
packages/klarna-integration/e2e/support/klarnaMock.js
i
called by 220
packages/klarna-integration/e2e/support/klarnaMock.js
get
called by 217
packages/utility/src/storage/B2BSessionStorage.ts
filter
called by 174
packages/error-handling-utils/src/ErrorBoundary.tsx
set
called by 159
packages/utility/src/storage/B2BSessionStorage.ts

Shape

Function 2,025
Method 994
Interface 632
Class 220
Enum 40

Languages

TypeScript100%

Modules by API surface

packages/klarna-integration/e2e/support/klarnaMock.js720 symbols
packages/google-pay-integration/e2e/support/googlePay.mock.js195 symbols
packages/core/src/app/payment/Payment.tsx37 symbols
packages/core/src/app/payment/storedInstrument/AccountInstrumentSelect.tsx30 symbols
packages/instrument-utils/src/storedInstrument/AccountInstrumentSelect/AccountInstrumentSelect.tsx28 symbols
packages/hosted-widget-integration/src/HostedWidgetPaymentComponent.tsx28 symbols
packages/core/src/app/payment/storedInstrument/InstrumentSelect.tsx27 symbols
packages/instrument-utils/src/storedInstrument/InstrumentSelect/InstrumentSelect.tsx21 symbols
packages/credit-card-integration/src/CreditCardPaymentMethodComponent.tsx20 symbols
packages/core/src/app/payment/paymentMethod/CreditCardPaymentMethod.tsx20 symbols
packages/test-framework/src/fixture/pageObject/Checkout.ts19 symbols
packages/contexts/src/analytics/AnalyticsProvider.tsx17 symbols

For agents

$ claude mcp add checkout-js \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page