Skip to content
Returning.AIDocs

Embed Loyalty Widgets
in Minutes

Drop-in components with Access Key authentication, or embed scripts. Any framework, any backend.

index.html
1<rai-store-widget
2 community-id="YOUR_COMMUNITY_ID"
3 embed-token="TOKEN_FROM_YOUR_SERVER"
4 bundle-url="https://prod-widgets.returning.ai/store-widget/bundle/widget.js"
5></rai-store-widget>
Time to first widget
Embed script~5 min
SDK + Access Key~15 min

/ Works with your stack

Built on Web Components - works in any framework

/ Showcase

See What You Can Build

yoursite.com/rewards

Electronics

4 items
FeaturediPhone 17 Pro Max

iPhone 17 Pro Max

Latest flagship with A19 chip

5 left
C45,000
PopulariPad Pro 14" M4

iPad Pro 14" M4

Liquid Retina XDR display

12 left
C28,000
LimitedAirPods Pro 3

AirPods Pro 3

Active noise cancellation

24 left
C8,500
ExclusiveApple Watch Ultra 3

Apple Watch Ultra 3

Titanium case, GPS + cellular

8 left
C22,000

Luxury Goods

2 items
ExclusiveRolex Submariner

Rolex Submariner

Oystersteel, black dial

2 left
C185,000
LimitedTag Heuer Monaco

Tag Heuer Monaco

Chronograph, blue dial

3 left
C95,000

/ Authentication

Two ways to authenticate

Both approaches verify identity before the widget renders. Pick Access Key Embed when you have a backend; pick Attribute Auth for HTML-only environments.

No Backend Required

Attribute Auth

Pass user identity directly as HTML attributes. Ideal when you only have access to an HTML container or limited backend resources.

<script
src=".../widget-loader.js"
data-widget-id="YOUR_WIDGET_ID"
data-customer-id="CUST-10482"
data-custom-tier="gold"
></script>

This is a browser-visible fallback. Prefer a stable field like data-customer-id over email when you can.

Recommended

Access Key Embed

Your backend exchanges access credentials for a short-lived JWT. Inject the token as an attribute - no client-side secrets.

<rai-store-widget
community-id="YOUR_COMMUNITY_ID"
embed-token="TOKEN_FROM_YOUR_SERVER"
bundle-url="https://prod-widgets.returning.ai/store-widget/bundle/widget.js"
></rai-store-widget>

Server-verified identity with bundle mode rendering. The recommended approach for any platform with backend access.

/ Widget catalog

Every widget you need

Drop the right component into your platform. Each widget ships as a single web component with sensible defaults — switch out the tag, keep the rest.

Store

Rewards marketplace with loyalty currency

<rai-store-widget>

Channel

Community hub with missions and quests

<rai-channel-widget>

Milestone

Achievement stages and unlock rewards

<rai-milestone-widget>

Social

Social media engagement tasks

<rai-social-widget>

Currency

Points balance and transaction history

<rai-currency-widget>

Referral

Invite links and referral rewards

<rai-referral-widget>

Custom

Flexible admin-configured widget

<rai-custom-widget>

/ Get started

Ready to integrate?

Get your loyalty widgets live in under 10 minutes.

/ Included with every deployment

  • Web component widgets
  • Bundle and iframe rendering
  • Access Key + Attribute auth
  • Framework guides for React, Vue, Angular, Qwik