Configuration
All options passed to mount(selector, config).
Config options
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
amount | number | Yes | — | Payment amount (e.g. 25.00) |
currency | 'USD' | 'ZWG' | Yes | — | Transaction currency |
reference | string | Yes | — | Your unique order or invoice reference |
description | string | No | undefined | Short 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 |
theme | WatengaTheme | No | Watenga default | Colors, border radius, and font family |
appearance | Appearance | No | — | Stripe-like appearance API (variables + rules) |
onSuccess | (txn: SuccessPayload) => void | No | — | Called when payment is confirmed client-side |
onError | (err: ErrorPayload) => void | No | — | Called on payment failure |
onClose | () => void | No | — | Called when customer closes the widget |
