Checkout SDK
Quick Start
1. Install the SDK
npm install zotlo-checkoutyarn add zotlo-checkout2. Import the SDK
import 'zotlo-checkout/dist/zotlo-checkout.css';
import ZotloCheckout from 'zotlo-checkout';3. Initialize Checkout
const checkout = await ZotloCheckout({
token: 'YOUR_CHECKOUT_TOKEN',
packageId: 'YOUR_PACKAGE_ID',
returnUrl: 'YOUR_RETURN_URL',
language: 'en',
customParameters: {
myCustomParam: 'OK!'
},
events: {
onSuccess(result) {
// Payment succeeded
},
onFail(error) {
// Payment failed
}
}
});4. Mount Checkout Form
Using via CDN
Usage Example
Configuration Parameters
Parameter
Required
Description
Event Listeners
onLoad
onSubmit
onSuccess
onFail
onInvalidForm
SDK Methods
mount(containerId: string)
refresh()
unmount()
Branding & Styling
Last updated

