Coder Social home page Coder Social logo

thedemodev / stripe-billing-typographic Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stripe/stripe-billing-typographic

0.0 1.0 0.0 1.08 MB

⚡️Typographic is a webfont service (and demo) built with Stripe Billing.

License: MIT License

HTML 0.89% JavaScript 53.91% Vue 45.20%

stripe-billing-typographic's Introduction

Typographic: Stripe Billing Demo

Typographic is a sample web application for a hosted webfont service built with Stripe Billing and Elements. This is a complete Stripe integration that subscribes users to multiple plans (with monthly and metered billing), uses tiered pricing , tracks metered usage, and provides invoices.

You can try the app live at typographic.io.

Overview

Typographic is a complete, full-stack example of a Stripe Billing integration:

Features
🗂 Multiple plans. Each level of service (Starter, Growth, and Enterprise) include monthly and metered plans.
💸 Tiered pricing. Metered plans use tiered pricing to build a sophisticated pay-as-you-go billing model with graduated pricing.
📈 Usage records. Metered usage is tracked with the Usage Record API.
💌 Hosted invoices. Users can pay via credit card or receive a hosted invoice by email.
📬 Upcoming invoices. Estimated costs for the next billing cycle are calculated using the Invoices API (based on monthly and metered usage).
⚡️ Products and Plans. Typographic uses the Stripe Products and Plans APIs.
💳 Card payments with Elements. This demo uses pre-built Stripe components customized to fit the app design, including the Card Element which provides real-time validation, formatting, and autofill.
🌏 Vue.js frontend. Single-page Vue app demonstrating how to use Elements in a component-based web framework.
☕️ Node.js backend. An Express server manages billing and user data between the database and Stripe's API.
📦 Database support. Uses Knex.js and SQLite (by default) to demonstrate a data modeling pattern for the Billing API.
🔑 User authentication. JSON web tokens (JWT) and an Express authentication scheme are included for user login and registration.

Stripe Billing Integration

This repository includes two components:

Here are a few key files where we interact with Stripe's platform:

Requirements

You'll need a Stripe account to manage customer subscriptions and payments. Sign up for free before running the application.

Typographic also requires Node.js >=8.x to run this app.

Getting Started

Install dependencies using npm (or yarn):

npm install

Copy the example .env file. You'll need to fill out two details:

cp .env.example .env

If this is your first time running the app, you'll need to set up the app:

npm run setup

Run the app:

npm start

Go to http://localhost:3000 in your browser to start using Typographic.

Resetting Data

If you'd like to wipe the slate clean and start with a fresh environment, you can wipe all test data from your Stripe account, then rebuild your local database:

npm run setup

This recreates the tables Typographic uses in its local database.

Credits

stripe-billing-typographic's People

Contributors

willock-stripe avatar mglukhovsky avatar mg-stripe avatar ctrudeau-stripe avatar rlk-stripe avatar adrind avatar jeffchan avatar fred-stripe avatar pborreli avatar dependabot[bot] avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.