Configuration

All options passed to mount(selector, config).

Config options

OptionTypeRequiredDefaultDescription
amountnumberYesPayment amount (e.g. 25.00)
currency'USD' | 'ZWG'YesTransaction currency
referencestringYesYour unique order or invoice reference
descriptionstringNoundefinedShort description shown to the customer
tabs('card' | 'mobile' | 'zimswitch')[]No['card','mobile','zimswitch']Which payment tabs to show
branding{ showPoweredBy?: boolean }No{ showPoweredBy: true }Set showPoweredBy: false to hide footer branding
themeWatengaThemeNoWatenga defaultColors, border radius, and font family
appearanceAppearanceNoStripe-like appearance API (variables + rules)
onSuccess(txn: SuccessPayload) => voidNoCalled when payment is confirmed client-side
onError(err: ErrorPayload) => voidNoCalled on payment failure
onClose() => voidNoCalled when customer closes the widget