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

CheckoutConfig

environment selects the hosted Checkout application, not payment test/live mode. Test/live mode is determined by the API keys and Payment Intent. Use local only while developing Lynq’s hosted Checkout application locally.

new Checkout(config)

Creates an unmounted browser Checkout instance. It throws ConfigError when publicKey, clientSecret, or environment 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.

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 August 8, 2026