Reference
View the web SDK’s methods and type definitions.
Initialize Checkout
bias.beginCheckout(params)
Create a new checkout instance for a given client secret.
Parameters
- Name
params
- Type
- object,
- Child properties
- Name
clientSecret
- Type
- string or null,
or
Returns
A checkout instance.
Create a Checkout Element
checkout.createElement(type, element)
Construct a checkout element and add it to the page.
Get the current Checkout Session
checkout.session()
Get the full current checkout session for the provided client secret. This will also update the components with new data if the session has changed.
Returns
A promise that resolves to a Checkout Session object.
Update Checkout appearance
checkout.updateAppearance(appearance)
Update the appearance of the checkout component.
Parameters
- Name
appearance
- Type
- object,
- Child properties
Returns
A void promise.
Update Checkout billing details
checkout.updateBillingDetails(billingDetails)
Update the session’s billing details.
Parameters
- Name
billingDetails
- Type
- object,
- Child properties
Returns
A void promise.
Update Checkout email
checkout.updateEmail(email)
Update the session’s email. When the session completes, the created customer will have this email.
Parameters
- Name
email
- Type
- string,
Returns
A void promise.
Update Checkout phone
checkout.updatePhone(phone)
Update the session’s phone number. When the session completes, the created customer will have this phone number.
Parameters
- Name
phone
- Type
- string,
Returns
A void promise.
Update Checkout client secret
checkout.updateClientSecret(clientSecret)
Update the Checkout client secret to point to a different session. This will reset the state of the checkout component(s).
Submit all components
checkout.submit()
Returns
Void.
Add an event listener
checkout.addEventListener(event, listener)
Add an event listener to the checkout session.
Parameters
- Name
event
- Type
- enum,
- Array item properties
readycomplete- Name
listener
- Type
- () => void,
Returns
A void promise.