Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@checkout.com/checkout-web-components

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@checkout.com/checkout-web-components

Checkout Payment Components loader

  • 0.6.0-beta
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

CheckoutWebComponents Loader

License: MIT

Loader for CheckoutWebComponents.


Table of contents


Documentation

For more information on how to use the CheckoutWebComponents, please refer to the CheckoutWebComponents documentation.

Installation

Use npm to install the package.

npm install @checkout.com/checkout-web-components

Usage

The loadCheckoutWebComponents function is the entry point for the library.

The function returns a Promise resolving with a CheckoutWebComponents instance, and handles loading the CheckoutWebComponents script. This instance can then be used to create a Flow component that can be mounted.

import { loadCheckoutWebComponents } from '@checkout.com/checkout-web-components';

Example

// Insert your public key here
const publicKey = '{your_public_key}';

// Initialise a new Checkout Web Components instance
const checkout = await loadCheckoutWebComponents({
  paymentSession,
  publicKey,
  environment: 'sandbox'
});

// You can now create and mount a Flow component using 'checkout'
const flowComponent = checkout.create('flow');

// Mount Flow component to div element with an ID of 'flow-container'
flowComponent.mount('#flow-container');

You can find/create your public key in the Developers section of your Checkout.com Production Dashboard or Checkout.com Sandbox Dashboard. See our API keys documentation for more information.


License

This project is licensed under the MIT License.

FAQs

Package last updated on 01 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc