Skip to main content
View as Markdown
Version: v2

Checkout SDK

ODUS Checkout SDK provides two integration paths for accepting payments in your application. Both are part of the @odus/checkout package and share the same backend APIs, 3DS handling, and payment lifecycle — they differ in how much control you have over the UI.

Choose Your Integration​

Drop-in Checkout (OdusCheckout)​

A pre-built, full checkout form rendered into a single container. Ideal when you want to get up and running quickly with minimal frontend code.

  • Single mount('#container') call renders the entire form (card inputs, pay button, error display, alternative payment methods)
  • Highly customizable through configuration objects (appearance, layout, initialValues)
  • Handles validation and authorization internally

Get started with Drop-in →

Elements (OdusElements)​

Composable, headless individual input elements that you mount into your own layout. Ideal when you need full control over the checkout experience.

  • Mount only the elements you need — unmounted elements are automatically skipped during validation and authorization
  • Full layout control with Shadow DOM encapsulation per element
  • CSS custom property theming via applyTheme() or per-element setTheme()
  • You provide and control the pay button, form layout, and submission flow

Get started with Elements →

Load from the ODUS CDN​

Both integrations can load from js.odus.com when your page loads, instead of being bundled into your app. Your checkout then receives our fixes without you upgrading the package. You change one import to loadOdus() from @odus/checkout/loader, and allow js.odus.com in your Content Security Policy.

Load the SDK from the ODUS CDN →

Comparison​

FeatureDrop-inElements
Import@odus/checkout@odus/checkout/elements
Styles import@odus/checkout/stylesBuilt-in (none needed)
UI controlConfiguration-basedFull merchant layout
Layout controlappearance.layout config objectMount elements anywhere in your DOM
Pay buttonBuilt-inMerchant-provided
ValidationAutomatic on submitvalidate() called by merchant
Authorization triggerBuilt-in pay buttonauthorize() called by merchant
Shadow DOMSingle root for entire formPer-element Shadow DOM
Styling approachappearance.styles config objectCSS custom properties (applyTheme())
Ideal use caseQuick integration, standard layoutCustom checkout experiences
tip

Not sure which integration fits best? Read the Choosing Between Drop-in and Elements guide for a detailed comparison with a decision flowchart. You can also try the interactive Drop-in Builder or Elements Builder to experiment directly in your browser.