The SDK is written in TypeScript and ships full type definitions (dist/index.d.ts).
import CashierSDK, {
DeviceType,
PaymentAction,
CashierEmitEvent,
type CashierProperties,
type PaymentEmitEventData,
} from "@omno-payment/checkout-js";
const config: CashierProperties = {
baseUrl: "https://checkout.omno.com",
device: DeviceType.AUTO,
};
const cashier = new CashierSDK(config);
cashier.on(CashierEmitEvent.PAYMENT_SUCCESS, (data: PaymentEmitEventData) => {
console.log("Payment success", data);
});- Default export:
CashierSDK. - Enums:
DeviceType(DESKTOP,MOBILE,AUTO),PaymentAction(DEPOSIT,WITHDRAW),CashierEmitEvent. - Types:
CashierProperties,CashierStyles,ModalStyles,MobileStyles,PaymentEmitEventData,KYCRequiredFieldErrorsData,KYCRequiredLevelErrorsData,CashierEventMap, and the Hosted Payment Fields types (HpfStyles,HpfFieldConfig,HpfFieldName,mountFieldsParameters,openCashierParameters).