crxpaydocs

Features

Everything crxpay provides for Chrome extension developers — payments, subscriptions, analytics, and more.

Payments

Accept payments with one tap. crxpay's checkout automatically shows wallet payment options when available — Apple Pay on Safari/iOS, Google Pay on Chrome/Android, and Stripe Link for returning Stripe customers who have saved payment info.

135+ Currencies

Set prices in any currency Stripe supports. Your international users see prices in their local currency — no more "I can't pay in USD" support tickets.

Create multiple prices per product to offer region-appropriate pricing (purchasing power parity). The SDK automatically shows the right price based on the user's locale.

Coupon and Promotion Codes

Create promotion codes in your Stripe dashboard. Users enter them on the checkout page — Stripe handles validation, discount calculation, and expiry automatically. Great for Product Hunt launches, holiday sales, or influencer partnerships.

One-Time and Recurring Payments

Support monthly, yearly, or lifetime (one-time) payment plans. Mix and match within a single extension — offer both a $4.99/month subscription and a $49.99 lifetime purchase.

Introductory Pricing

"$0.99 for the first month, then $4.99/month." Subscription schedules let you define price phases that automatically transition — higher conversion with low intro prices, no manual intervention needed.

Subscriptions

Automatic Subscription Management

crxpay manages the full subscription lifecycle:

  • Creation — User pays, subscription starts, entitlements granted instantly
  • Renewal — Automatic billing, no user action needed
  • Grace period — If payment fails, users keep access while Stripe retries
  • Cancellation — Users can cancel anytime via the Billing Portal
  • Expiry — Entitlements revoked automatically when the period ends
  • Reactivation — Users can resubscribe with one click

Smart Payment Recovery

When a recurring payment fails (expired card, insufficient funds), Stripe's ML-powered Smart Retries automatically retry at the optimal time. On average, this recovers 57% of failed payments — revenue that would otherwise be lost.

Users also receive automated dunning emails with a one-click link to update their payment method.

Self-Serve Billing Portal

Your users can manage their own subscription through Stripe's Billing Portal:

  • Update payment method
  • View invoice history
  • Switch between plans (upgrade/downgrade)
  • Cancel or pause subscription
  • Download receipts

No custom UI needed — one line of code: CrxPay.openBillingPortal().

Free Trials

Offer free trials with or without requiring a payment method upfront. Trial duration is server-enforced — users can't manipulate it client-side. When the trial ends, the subscription automatically converts to paid or expires.

SDK

Offline-First Signed Cache

The SDK stores subscription state in an HMAC-SHA256 signed local cache. When the network is unavailable, your extension still knows the user's subscription status — it never "disappears."

Network OK     → fresh data from API, re-cached locally
Network down   → cached data from chrome.storage.local
Cache tampered → signature verification fails, cache discarded
No cache       → graceful fallback to unknown state

Manifest V3 Native

Built for MV3 from day one:

  • Service worker lifecycle — signed cache persists across worker restarts
  • Background refresh — uses chrome.alarms, not setInterval
  • CORS handling — content scripts proxy through background automatically
  • Context invalidation — returns typed errors, never throws

XState Subscription State Machine

Subscription state transitions are managed by a finite state machine. Invalid states are impossible by construction — no more "paid but no access" or "expired but still showing features" bugs.

Instant Payment Confirmation

After a user completes checkout, the SDK automatically polls for payment confirmation every 3 seconds. When the webhook is processed and the subscription is active, onPaid fires immediately — no page refresh needed.

CrxPay.onPaid.addListener((subscription) => {
  showThankYou();
  if (subscription.hasEntitlement('pro')) {
    enableProFeatures();
  }
});

Entitlements System

Decouple "what the user paid for" from "what they can access":

// One boolean check — no plan name comparisons
if (subscription.hasEntitlement('pro')) { ... }
if (subscription.hasEntitlement('ai_features')) { ... }

Map multiple products to the same entitlement, or one product to multiple entitlements. Change your pricing structure without touching extension code.

Dashboard

Zero-Setup Payment Integration

Register your extension, set a price, and start accepting payments. crxpay creates the Stripe products and prices automatically — you never need to open the Stripe Dashboard.

Analytics

Track what matters:

  • MRR (Monthly Recurring Revenue)
  • Active subscribers count
  • Trial conversion rate
  • Churn rate (30-day)
  • Revenue recovered from failed payments
  • Per-customer timeline of every subscription event

Customer Management

View every customer, their subscription history, entitlements, and attributes. Manually grant or revoke entitlements for support cases — without affecting subscription-backed access.

Test/Live Mode Toggle

Switch between test and live modes with one click. Test mode uses isolated Stripe test data — create test customers, simulate payments, verify webhooks — all without touching real money. Unpacked extensions automatically use test mode.

Tax and Compliance

Automatic Sales Tax and VAT

Enable automatic tax calculation and crxpay handles the rest. Stripe calculates the correct tax amount based on the customer's location — EU VAT, US state sales tax, Canadian GST/HST — all automatic.

Your users see the tax amount on the checkout page. You get tax reports in your Stripe dashboard. Zero compliance headaches.

Fraud Protection

Every payment is screened by Stripe Radar — ML-powered fraud detection trained on data from millions of businesses. Suspicious transactions are automatically blocked. This protects both you and your users from unauthorized charges.

Stripe Integration

Your Stripe, Your Money

crxpay uses Stripe Express Connect. Your revenue goes directly to your Stripe account — crxpay never holds your money. You get a Stripe Express Dashboard to see your payouts, transactions, and disputes.

Generate a payment link for your extension and share it anywhere — Twitter, README, email newsletter, Discord. Users can pay without even installing the extension first.

Webhook Handling

crxpay processes Stripe webhooks automatically:

EventWhat happens
Subscription createdEntitlements granted, analytics recorded
Payment failedSmart Retries begin, dunning email sent
Payment recoveredEntitlements maintained, revenue recorded
Subscription cancelledAccess continues until period end, then revoked
Charge refundedEntitlements revoked immediately
Trial endingNotification event (3 days before)

Was this page helpful?

Your feedback shapes what we document next.