npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@archetypeapi/pricing-page

v0.1.28

Published

Generate a pricing page from the Archetype dashboard.

Downloads

70

Readme

Archetype Pricing Page

Drop-in pricing pages as React components.

Sync your public pricing page with Archetype data to launch new products, run A/B tests, and let your frontend team save time.

Getting Started

To get started with Archetype, view the quickstart guide.

Install the package:

npm i @archetypeapi/pricing-page

Requirements

react: "^18.1.0"

Usage

Setup

To get started, simply publish a pricing page from the Archetype dashboard. Archetype will generate some code for you.

  1. Navigate to Products → Create a Pricing Page
  2. Select your products then set your title, description, and redirect URL.
  3. Preview your layout. To re-order plans, simply drag-and-drop within the preview.
  4. Click "Publish & Copy Code" to copy the code snippet.

Grab your public_key from Archetype settings. Use a test key (archetype_pk_test...) to access test-mode products, or a prod key (archetype_pk_prod...) when you're ready to go live.

Installation

In a React 18 project (tested in Next.js), paste the snippet into a page or component:

import { PricingPage } from "@archetypeapi/pricing-page";

export default function Home() {
  return <PricingPage public_key={"archetype_pk_test_abc123"} config={{...}} />;
}

Configuration

The config gives programmatic control to some of your pages features. Typical example:

export default function Page() {
  return (
    <PricingPage
      public_key="archetype_pk_test_abc123"
      config={{
        title: "Pricing for Everyone",
        description: "A pricing plan for every scale.",
        featured_product_id: "product_abc123",
        radius: "round",
        colors: {
          primary: "#33d889",
          secondary: "#555",
          tertiary: "#777",
        },
        staging: false,
      }}
    />
  );
}

Looking to use our APIs directly? See the API reference.

Looking to develop with the package? Set staging: true to force the page to fetch data from a staging environment.

About Archetype

Archetype is the revenue infrastructure that makes API monetization quick and painless. It works by integrating a powerful, reliable purchase server with cross-platform support. Our open-source framework provides a backend wrapper around payment processors like Stripe to save engineers months of building custom billing infrastructure for their APIs.

Whether you are building a new API or already have millions of customers, you can use Archetype to:

Sign up to get started.

With Archetype, you can keep track of all your app transactions in one place — whether your customers are charged through iOS, Android, or the web. As the single source of truth for your API business, we make sure your customers' subscription status is always up to date.