Release Notes

Version history and change log for the Relay Web SDK.

1.7.0

Released 2026-10-13.

Added

  • Redemption fee disclosure. The widget bootstrap now carries an optional redemptionFeePercent. When it is above 0, the widget shows the fee in two places: an “Are there any fees?” help topic, and a tooltip on each payout row reading “£X after the Y% service fee.” The SDK does no fee maths of its own and shows the net amount the API sends. When the value is missing, malformed, outside 0 to 100, or 0, no fee copy appears.

Changed

  • Payout rows. Failed and cancelled payouts show a struck-through £0, since nothing left the account, rather than the amount the API sends. Requested payouts are labelled “Requested”. Rows without a purchase amount no longer show an empty £0.00 cell.

1.6.0

Released 2026-10-08.

Changed

  • Floating native shell. Android, iOS and React Native now load the native shell from https://cdn.fruga.co.uk/v1/native/index.html instead of a version-pinned shell. Every production CDN deploy moves /v1/, so a web fix reaches installed apps on their next launch, without an SDK release or an app update.
  • iOS on the current shell. iOS now gets the 1.3.5+ shell fixes (safe area, widget close) and the /v1 API paths. It no longer stays on the 1.3.0 shell.

Removed

  • Breaking for native code. FrugaRelayVersion.shell is removed from the Android and iOS SDKs. Use FrugaRelayVersion.shellUrl (Android) or shellURL (iOS) instead. The React Native FRUGA_SHELL_VERSION constant is also removed.

1.5.0

Released 2026-09-30.

Added

  • Widget open tracking. The widget records each panel open for billing by sending POST /v1/api/activity/interaction with the widget’s Bearer token. It is sent once per open, including a panel opened with panelOpen, and never on mount, polling or token refresh. It is not sent in test mode. A failed call is logged as FrugaRelay: failed to record widget interaction and never reaches your app. The path sits under /v1/api/*, so a gateway that already forwards that prefix covers it.
  • Safe-area updates in the native shell. A host can send a safeArea bridge message ({ safeArea: { top, right, bottom, left } }) whenever its insets change after init, such as on rotation or reopen. The shell re-applies them without re-mounting the widget.

Changed

  • The widget tightens its layout on short viewports, such as a phone in landscape, so the header, offers and bottom navigation fit.

1.4.1

Released 2026-09-30.

Fixed

  • Android. If the WebView render process dies, every pending getBalance() call settles immediately with a recoverable PROCESS_TERMINATED error. Previously they waited for BRIDGE_TIMEOUT five seconds later. iOS is not yet aligned.
  • Native shell width. The widget stays in its fullscreen layout at any width. A landscape phone or an iPad (768 px and wider) no longer gets the 410 px desktop card.

1.4.0

Released 2026-09-24.

Every Fruga API call now uses the /v1 path prefix: /v1/widget/bootstrap, /v1/api/wallet, /v1/api/offers, /v1/api/offers/categories, /v1/api/activity and /v1/api/payout-methods. Your backend’s token exchange and server calls use /v1 too: POST /v1/auth/external/token and POST /v1/api/cashback/claim.

  • baseUrl stays host-only (https://api.fruga.co.uk, or https://api-dev.fruga.co.uk for sandbox). Do not add /v1 to it.
  • A reverse proxy or gateway in front of the Fruga API must forward the /v1 prefix unchanged.
  • SDK 1.3.x and earlier keep calling the unprefixed paths, which Fruga serves during the transition. New integrations should pin 1.4.0.
  • The Android and React Native SDKs load the 1.4.0 widget shell and call /v1. The iOS SDK stays on the 1.3.0 shell and the unprefixed paths for now.
pnpm add @fruga/sdk@1.4.0
<script src="https://cdn.fruga.co.uk/v/1.4.0/loader.global.js"></script>

1.3.5

Released 2026-09-24.

Added

  • Native close. In the native shell, the widget’s header close button now asks the host app to close the widget (the host receives close {}) instead of collapsing to the launcher. Web embeds are unchanged.

Changed

  • Versioned CDN paths. Every released /v/<version>/ path stays available on the CDN and is cached as immutable. Unknown paths now return 404.
  • npm and CDN in step. A new version is published to npm only once the CDN is serving it.

Fixed

  • In the native shell, the fullscreen widget now stays inside the device’s safe area, so the widget and its close button no longer sit under the status bar.

1.3.0

Released 2026-09-09.

Added

  • Native shell. The web loader can now run inside a native WebView shell page (native/index.html), with messages to and from the host app carried over the native bridge. Init, token updates, network, back, and getBalance are forwarded, load errors are mapped onto native error codes, and the shell shows its own error screen when no bridge is present.
  • panelOpen option. Setting panelOpen mounts Relay with its panel already open, without a launcher tap.
  • Token refresh reason. NEED_TOKEN now carries a reason: 'ttl' when the token’s lifetime runs out, or 'unauthorized' after a 401.
  • Native assets on the CDN. Every CDN release, including the major-version alias, now ships native.global.js and native/index.html. They are not included in the npm package.

1.2.0

Released 2026-09-09.

Added

  • onEvent diagnostics. onEvent receives lifecycle, protocol, log, and error events. When set, it replaces the loader’s console output.
  • NOT_READY error. getBalance() now rejects with a NOT_READY FrugaLoadError when nothing is mounted or the widget never reports ready in time.
  • Exported errors. HttpError and UnauthorizedError are exported from @fruga/core, so you can narrow on them instead of a plain Error.

Changed

  • Error state instead of empty data. When a widget API call fails, the Relay panel shows “Something went wrong.” with a Retry button instead of rendering empty or zeroed data. Failed requests are retried once before the error appears.
  • Automatic token refresh on 401. A 401 from any widget API call now requests a new token automatically, once per token.
  • Initial token timing. The initial token is requested on the widget’s first mount(), not on init(). With autoMount: false, onTokenRequired('initial') is called once you call mount().
  • unmount() keeps your container. A container you provide via containerId stays on the page; only a container the loader created is removed. unmount() also resets the initial-token state, so the next mount() asks onTokenRequired again.
  • getBalance() waits for the widget. Requests are queued until the widget reports ready instead of being sent early and timing out.

Fixed

  • Opening the offers panel while the categories request was slow or failing no longer leaves the panel looking unresponsive.
  • The CDN now sends Content-Security-Policy: frame-ancestors * on the widget pages themselves, so the widget can be embedded reliably.

1.0.0

Initial public release of the Relay Web SDK on the npm registry as @fruga/sdk. Previously the SDK was distributed via GitHub Packages under the @frugainsurance scope — installation no longer requires any registry configuration or authentication.

pnpm add @fruga/sdk