API reference

Below you will find all the objects and components that can be referred to in our API.

Volt object

Volt object is the entry point to use Volt client-side JavaScript SDK.

Parameters

mode
required
string
"sandbox" | "production"

Payment Container object

Payment Container is required to create a Volt payment. Container object groups and manages a group of elements.

Parameters

payment
required
PaymentResponse
Full response from payment creation endpoint
language string
two-letter language code
country string
two-letter country code


Methods

setLanguage(languageCode: string)
void
This method can be used to update the language after drop-in initialisation
setCountry(countryCode: string)
void
This method can be used to update the country after drop-in initialisation
createPayment()
void
 
createTerms()
void
 


Events

languageChange Triggered when Drop-in language gets changed

event: { language: string }
countryChange Triggered when Drop-in country gets changed

event: { country: string }
error Triggered when any error occurs

event: {
  "code": ERROR_CODE,
  "message": "Error message",
  ...
}

Payment Component

iFrame-based component displaying:

  • UI allowing users to select a bank and provide additional bank details
    • Express payment toggle which allows faster checkout for the returning users by remembering their payment data
  • Pay button (optional)
  • Terms statement (optional)

Parameters

displayPayButton boolean
default: true
autoHeight boolean
default: true


Methods

mount(el)
void
Mount component in DOM tree.
Arguments:

  • el: DOM element or CSS selector


Events

change Triggered when the user’s input is changed; complete flag indicates the user data completeness. It should be used to control the external pay button state:

  • enabling/showing if the value is true
  • disabling/hiding it when it’s false

event: { complete: boolean }
ready Triggered when the Component is fully rendered and can accept user-input

event: {}
redirect Triggered when the user is redirected (bank redirection), the drop-in will handle the redirection

event: { url: string }
heightChange Triggered when the content of an iFrame changes size

event: { value: number }