- Widget Library
- Widget Library
Widget Library
Widget Library
Embed Remitian portal experiences inside your platform with the JavaScript SDK.
The Widget Library lets you embed Remitian portal experiences directly inside your platform via our JavaScript SDK, instead of redirecting users away from your product. Each widget opens as a modal, authenticated with a passwordless token.
Available Widgets
| Widget | Status | What it does | When to use it |
|---|---|---|---|
| Pay All | Available, recommended | Lets a taxpayer approve, in one session, every tax payment of a tax entity that is pending their approval, resolving the tax authority connections and the funding bank account on the way | You create the tax entity and schedule its tax payments with the Public API, and the taxpayer only needs to review and approve them |
| Pay with Remitian | Available | Lets a user complete a single tax payment inside your application, from entity and bank account setup through approval, without leaving your product | The tax entity, tax account, bank account or tax payment may not exist yet, and the widget should create what is missing for one payment |
Pay All is the recommended flow for every integration, and the examples in this guide use it. Preview both widgets from the Widget Library section of the Developer Portal before integrating.
Both widgets use the same SDK. SDK Setup covers what they share: installation, the host page, the widget lifecycle and the callbacks.
Quick Start
- Install the SDK from npm or a CDN script tag. See Install the SDK.
- Generate a passwordless token on your server (optional). See Passwordless Authentication.
- Create and open the widget. The example opens Pay All for one tax entity, identified by the external id you provide:
const widget = Remitian.create(
Remitian.buildPayAllConfig({
passwordlessToken: 'xxxx', // optional; omit to let the user log in
environment: 'sandbox', // 'sandbox' | 'production' (default)
taxEntity: { externalId: 'my_tax_entity_123' },
onSuccess: (result) => {}, // approved payments only
onError: (error) => {}, // failed payments only
onExit: (reason) => {}, // never a success signal
}),
);
widget.open();
- Handle the callbacks. See Callbacks, then the events and payloads of the flow you use: Pay All or Pay with Remitian.
Callbacks
The four callbacks (onSuccess, onError, onExit and onEvent) are the same for every widget and are described in Callbacks of the SDK Setup page. The payload of each one depends on the flow: see Pay All and Pay with Remitian.
Need Help?
- Email: support@remitian.com
- Response Time: Within 1-2 business days