Skip to Content

Monetisation Screens

A server-configured paywall, a self-serve customer center, an admin billing timeline and a promotional grant form.

Go further with Pro

Cancel anytime.

Plans

7-day free trial

import { RemotePaywall } from "@dapplelight/signet-ui/screens/monetisation-screens"
import { offering } from "./offering"

function RemotePaywallDemo() {
  return (
    <RemotePaywall
      offering={offering}
      display={{
        starter: { name: "Starter", features: ["5 projects", "Email support"] },
        pro: { name: "Pro", features: ["Unlimited projects", "Priority support", "API access"] },
      }}
      onPurchase={() => undefined}
      onImpression={() => undefined}
    />
  )
}

Installation

npm i @dapplelight/signet-ui

Usage

import {
  RemotePaywall,
  CustomerCenter,
  CustomerTimeline,
  PromotionalGrantForm,
} from "@dapplelight/signet-ui/screens/monetisation-screens"

Data is shaped like signet-db's offerings and customers results (or their JSON); actions come out as callbacks.

import { RemotePaywall } from "@dapplelight/signet-ui/screens/monetisation-screens"
import { checkout } from "./billing"
import { offering } from "./offering"

<RemotePaywall offering={offering} onPurchase={(product) => checkout(product)} />

Examples

RemotePaywall

Go further with Pro

Cancel anytime.

Plans

7-day free trial

import { RemotePaywall } from "@dapplelight/signet-ui/screens/monetisation-screens"
import { offering } from "./offering"

function RemotePaywallDemo() {
  return (
    <RemotePaywall
      offering={offering}
      display={{
        starter: { name: "Starter", features: ["5 projects", "Email support"] },
        pro: { name: "Pro", features: ["Unlimited projects", "Priority support", "API access"] },
      }}
      onPurchase={() => undefined}
      onImpression={() => undefined}
    />
  )
}

CustomerCenter

Your subscription

Current planPro
Active
Stripe

import { CustomerCenter } from "@dapplelight/signet-ui/screens/monetisation-screens"

function CustomerCenterDemo() {
  return (
    <CustomerCenter
      className="w-full max-w-xl"
      overview={{
        plan: "pro",
        status: "active",
        currentPeriodEnd: "2026-12-14",
        renews: true,
        source: { gateway: "stripe", subscriptionId: "sub_1042" },
        store: false,
        manageUrl: null,
        canCancel: true,
        retention: { kind: "discount", percent: 30, months: 3 },
      }}
      onCancel={() => true}
      onAcceptRetention={() => true}
      onRequestRefund={() => true}
      onContactSupport={() => true}
    />
  )
}

CustomerTimeline

Timeline

Paid
$57≈
Refunded
$19
paymentstripe$19
subscriptionstripe
paymentApp Store$19 ≈
Refundstripe$19
import { CustomerTimeline } from "@dapplelight/signet-ui/screens/monetisation-screens"

function CustomerTimelineDemo() {
  return (
    <CustomerTimeline
      className="w-full max-w-xl"
      entries={[
        { id: "1", kind: "payment", gateway: "stripe", eventType: "payment_succeeded", amount: 1900, currency: "USD", occurredAt: "2026-11-14T08:00:00Z" },
        { id: "2", kind: "subscription", gateway: "stripe", eventType: "subscription_renewed", subscriptionId: "sub_1042", occurredAt: "2026-11-14T08:00:00Z" },
        { id: "3", kind: "payment", gateway: "appstore", eventType: "payment_succeeded", amount: 1900, currency: "USD", approximate: true, occurredAt: "2026-10-14T08:00:00Z" },
        { id: "4", kind: "refund", gateway: "stripe", eventType: "refund_request", amount: 1900, currency: "USD", occurredAt: "2026-09-20T11:30:00Z" },
      ]}
      totals={[{ currency: "USD", paid: 5700, refunded: 1900, approximate: true }]}
    />
  )
}

PromotionalGrantForm

Grant a promotional plan

import { PromotionalGrantForm } from "@dapplelight/signet-ui/screens/monetisation-screens"

function PromotionalGrantFormDemo() {
  return (
    <PromotionalGrantForm
      className="w-full max-w-sm"
      plans={["starter", "pro"]}
      defaultDays={14}
      onGrant={() => true}
    />
  )
}

API Reference

All screens accept the props of their root element and labels (Partial<MonetisationLabels>, defaults in DEFAULT_MONETISATION_LABELS).

RemotePaywall

Also takes the Paywall props from billing-screens (value, interval, currentPlan, source, onRestore and so on) except plans, onSubscribe, title and subtitle, which come from the offering.

PropTypeDefaultDescription
offeringRemoteOfferingrequiredThe server's current offering with its paywall config.
displayRecord<string, Partial<BillingPlan>>-Names, descriptions and features per plan key; prices come from the offering.
onPurchase(product, plan, interval, offer?) => unknown-Buy the product through your checkout or store. offer is the best offer for this customer.
onImpression(offering: RemoteOffering) => unknown-Called once when the paywall is shown.

CustomerCenter

PropTypeDefaultDescription
overviewCustomerOverviewrequiredPlan, status, renewal date, source and retention offer.
plansreadonly BillingPlan[]-Plans, to name the current one.
onCancel() => unknown-Cancel a web subscription. Resolve false on failure.
onAcceptRetention() => unknown-Accept the retention offer shown before cancelling.
onRequestRefund(reason: string) => unknown-Request a refund of the latest payment.
onContactSupport(message: string) => unknown-Send a message to support.
onRestore() => unknown-Restore earlier store purchases.

CustomerTimeline

PropTypeDefaultDescription
entriesreadonly CustomerTimelineEntry[]requiredBilling events across App Store, Google Play and web, newest first.
totalsreadonly CustomerTimelineTotal[][]Ledger totals per currency.

PromotionalGrantForm

PropTypeDefaultDescription
plansreadonly string[]requiredPlan keys an admin may grant.
defaultDaysnumber30Days preselected.
onGrant(grant: { plan: string; days: number; note?: string }) => unknownrequiredGrant the plan; it lapses on its own.

plansFromOffering

plansFromOffering(offering, source = "web", display = {}, badge?) returns the BillingPlan[] for one source, ready for PlanPicker.