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: includespaymentIntentIdand optionalpaymentMethodprocessing: includespaymentIntentIdand optionalpaymentMethodrequires_payment_method: includespaymentIntentId,error, and optionalpaymentMethod
PaymentError contains a machine-readable code and display-safe message.
Payment-method summaries
Card results may includebrand, 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 withcode,message, andretryableConfigError: invalid constructor configuration or non-browser constructionMountError: invalid mount container or Checkout lifecycle state
LynqErrorCode and recommended handling.
VERSION
VERSION is the SDK package version string. It is useful in diagnostics when reporting an integration problem.