Skip to main content
The package exports the Checkout class, error classes, version constant, and TypeScript types used by the public API.

CheckoutConfig

Test or live mode follows the publishable key. With a pk_test_… key the SDK writes diagnostics to the browser console; with a pk_live_… key it writes nothing. appearance fields are listed under Customize the appearance. locale is a hint forwarded to hosted Checkout.

new Checkout(config)

Creates an unmounted browser Checkout instance. It throws ConfigError when publicKey or clientSecret is invalid, or when constructed outside a browser. At most one Checkout can be mounted on a page at a time.

Lifecycle methods

Subscription methods

Every on... method returns this for chaining. Pass the original handler to off to remove one listener, or omit it to remove every listener for that event. destroy() clears all listeners. onValidation describes the form, not the payment: neither it nor isReady() and isValid() confirms that a payment completed.

Event payloads

ReadyEvent

ValidationState

PaymentResult

PaymentResult is a discriminated union on status:
  • succeeded: includes paymentIntentId and optional paymentMethod
  • processing: includes paymentIntentId and optional paymentMethod
  • requires_payment_method: includes paymentIntentId, error, and optional paymentMethod
PaymentError contains a machine-readable code and display-safe message.

Payment-method summaries

Card results may include brand, last4, expMonth, expYear, and cardholderName. Idram results identify the Idram provider. These summaries do not contain the full card number or security code.

Error classes

  • LynqError: base error with code, message, and retryable
  • ConfigError: invalid constructor configuration or non-browser construction
  • MountError: invalid mount container or Checkout lifecycle state
See Errors and troubleshooting for every LynqErrorCode and recommended handling.

VERSION

VERSION is the SDK package version string. It is useful in diagnostics when reporting an integration problem.
Last modified on November 11, 2026