O Google tem o compromisso de promover a igualdade racial para as comunidades negras. Saiba como.

Run Subscription Payments with Stripe

Stripe
Made by Stripe

Controls access to paid content by syncing your subscriptions with Firebase Authentication.

Como esta extensão funciona

Use this extension to create subscriptions for your users with the Stripe payments platform and manage access control via Firebase Authentication.

Users can sign-up for your digital goods and paid content with Stripe Checkout and manage their subscriptions with the Stripe customer portal.

This extension syncs customers' subscription status with your Cloud Firestore and adds custom claims using Firebase Authentication for convenient access control in your application.

The design for Stripe Checkout and the customer portal can be customized in your Stripe Dashboard branding settings. See this example which is customized to match the Firebase color scheme:

Stripe Checkout Page Stripe Customer Portal

This extension is meant for the web platform. If you're developing native mobile applications and want to sell digital products or services within your app, (e.g. subscriptions, in-game currencies, game levels, access to premium content, or unlocking a full version), you must use the app store's in-app purchase APIs. See Apple's and Google's guidelines for more information.

Additional setup

Before installing this extension, set up the following Firebase services in your Firebase project:

Then, in the Stripe Dashboard:

  • Create a new restricted key with write access for the "Customers", "Checkout Sessions" and "Customer portal" resources, and read-only access for the "Subscriptions" resource.

Billing

This extension uses the following Firebase services which may have associated charges:

  • Cloud Firestore
  • Cloud Functions
  • Firebase Authentication

This extension also uses the following third-party services:

You are responsible for any costs associated with your use of these services.

Note from Firebase

To install this extension, your Firebase project must be on the Blaze (pay-as-you-go) plan. You will only be charged for the resources you use. Most Firebase services offer a free tier for low-volume use. Learn more about Firebase billing.

Starting August 17 2020, you will be billed a small amount (typically less than $0.10) when you install or reconfigure this extension. See the Cloud Functions for Firebase billing FAQ for a detailed explanation.

Como instalar a extensão

Como usar o Console do Firebase

Para instalar e gerenciar extensões, use o Console do Firebase.

Instalar usando o console

Como usar a Firebase CLI

Para instalar e gerenciar extensões, também é possível usar a Firebase CLI:

Etapa 1: execute o comando npm (em inglês) a seguir para instalar a CLI ou atualizá-la para a versão mais recente.

npm install -g firebase-tools
Não está funcionando? Consulte a referência da Firebase CLI ou altere suas permissões do npm (em inglês).

Etapa 2: execute o comando a seguir para instalar a extensão.

firebase ext:install firestore-stripe-subscriptions --project=projectId_or_alias
Compatível com
Autenticação Cloud Firestore
Autor
In collaboration with
Licença
Apache-2.0
Versão
0.1.6