clusterfudge / starting-a-flat-rate-subscription

Getting started with Stripe Elements and Stripe Billing to charge a customer for a monthly subscription.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stripe Billing charging for subscriptions

This sample shows how to create a customer and subscribe them to a flat rate single plan with Stripe Billing. For step by step directions of how to implement this use the Stripe Billing quickstart.

See a hosted version of the demo in test mode or fork on codesandbox.io Preview of recipe

Features:

  • Collect card details 💳
  • Save a card to a customer
  • Subscribe a customer to a plan in Stripe Billing 💰

How to run locally

This recipe includes 5 server implementations in our most popular languages.

If you want to run the recipe locally, copy the .env.example file to your own .env file in this directory:

cp .env.example .env

You will need a Stripe account with its own set of API keys.

FAQ

Q: Why did you pick these frameworks?

A: We chose the most minimal framework to convey the key Stripe calls and concepts you need to understand. These demos are meant as an educational tool that helps you roadmap how to integrate Stripe within your own system independent of the framework.

Q: Can you show me how to build X?

A: We are always looking for new recipe ideas, please email dev-samples@stripe.com with your suggestion!

Author(s)

@ctrudeau-stripe

About

Getting started with Stripe Elements and Stripe Billing to charge a customer for a monthly subscription.


Languages

Language:CSS 22.4%Language:JavaScript 20.4%Language:Java 17.7%Language:PHP 12.8%Language:Python 10.4%Language:Ruby 8.6%Language:HTML 7.7%