1. Widget Library
  2. Widget Library

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

WidgetStatusWhat it doesWhen to use it
Pay AllAvailable, recommendedLets 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 wayYou 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 RemitianAvailableLets a user complete a single tax payment inside your application, from entity and bank account setup through approval, without leaving your productThe 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

  1. Install the SDK from npm or a CDN script tag. See Install the SDK.
  2. Generate a passwordless token on your server (optional). See Passwordless Authentication.
  3. 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();
  1. 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?