Elements SDK — API Reference
OzVault
The main entry point. Manages all elements, the hidden tokenizer iframe, and vault credentials.Constructor
BothapiKey and options.pubKey are required. Tokenization will fail if either is missing.
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | ✅ | Vault API key — client-side key, safe to expose in browser code |
options | VaultOptions | ✅ | Configuration object (see below) |
VaultOptions
Properties
| Property | Type | Description |
|---|---|---|
vaultId | string | Unique ID for this vault instance |
isReady | boolean | true once the tokenizer iframe has loaded |
Methods
createElement
.mount() on the result to attach it to the DOM.
ElementType values: 'cardNumber' | 'expirationDate' | 'cvv'
getElement
null.
createBankElement
'accountNumber' | 'routingNumber'
getBankElement
null.
createToken
OzError on failure.
createBankToken
OzError on failure.
destroy
message listener. Call this when the checkout component unmounts.
OzElement
Returned bycreateElement() and createBankElement(). Represents a single input field.
Properties
| Property | Type | Description |
|---|---|---|
frameId | string | Unique ID for this element’s iframe |
type | ElementType | BankElementType | The element type |
isReady | boolean | true once the iframe has loaded |
Methods
mount
target can be a CSS selector string or an HTMLElement.
unmount
unmount(). Use destroy() for permanent teardown.
on
this for chaining.
off
once
update
focus
blur
clear
setCvvLength
destroy
unmount().
Events
change
focus / blur
ready
loaderror
loadTimeoutMs.
TokenizeOptions
TokenResponse
BillingDetails
BankTokenizeOptions
BankTokenResponse
ElementOptions
ElementStyleConfig
ElementStyle keys.
Appearance
Theappearance option on OzVault and <OzElements> accepts an Appearance object, not a raw ElementStyleConfig. It applies a preset theme and/or CSS variable overrides across all elements.