Google은 흑인 공동체를 위한 인종적 평등을 추구하기 위해 노력하고 있습니다. 자세히 알아보기

Stripe로 결제 실행

Stripe
Made by Stripe

Firebase 인증으로 일회성 및 반복 결제를 동기화하여 유료 콘텐츠에 대한 액세스를 제어합니다.

이 확장 프로그램의 작동 방식

Use this extension as a backend for your Stripe payments.

The extension supports multiple use cases:

  • Process one-time payments with Stripe Checkout on the web.
  • Create subscriptions for your users and manage access control via Firebase Authentication.
  • Process payments & set up payment methods with the mobile payment sheet on Android , iOS , or with React Native .

Subscription payments with Stripe Checkout

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

If you're building on the web platform, you can use this extension for any of your payment use cases.

If you're developing native mobile applications and you're selling 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.

For all other scenarios you can use the stripe-android , stripe-ios , stripe-react-native , or flutter_stripe SDKs.

Client SDK

You can use the @stripe/firestore-stripe-payments JavaScript package to easily access this extension from web clients. This client SDK provides TypeScript type definitions and high-level convenience APIs for most common operations client applications would want to implement using the extension.

Use a package manager like NPM to install the above package, and use it in conjunction with the Firebase Web SDK.

Events

This extension emits events, which allows you to listen to and run custom logic at different trigger points during the functioning of the extension. For example you can listen to events when a product has been added via the product.created event, or whenever a payment has succeeded through the invoice.payment_succeeded event.

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" and "Plans" resources.

Billing

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

  • Cloud Firestore
  • Cloud Functions
  • Cloud Secret Manager
  • Firebase Authentication
  • If you enable events Eventarc fees apply .

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.

확장 프로그램 설치 방법

Firebase Console 사용

Firebase Console을 사용해 확장 프로그램을 설치하고 관리할 수 있습니다.

Console을 사용해 설치하기

Firebase CLI 사용

Firebase CLI를 사용해 확장 프로그램을 설치하고 관리할 수도 있습니다.

1단계: 다음 npm 명령어를 실행하여 CLI를 설치하거나 최신 CLI 버전으로 업데이트합니다.

npm install -g firebase-tools
작동하지 않는 경우 Firebase CLI 참조 를 살펴보거나 npm 권한 을 변경하세요.

2단계: 새 Firebase 프로젝트 디렉터리를 설정 하거나 기존 디렉터리로 이동합니다.

3단계: 다음을 실행하여 이 확장 프로그램을 확장 프로그램 매니페스트 에 추가합니다.

firebase ext:install stripe/firestore-stripe-payments --local --project=projectId_or_alias

Step 4 (Optional): Test this extension locally with the Firebase Emulator Suite

firebase emulators:start

5단계: 매니페스트의 확장 프로그램을 프로젝트에 배포 합니다.

firebase deploy --only extensions --project=projectId_or_alias
지원
Authentication Cloud Firestore
작성자
협업 파트너
라이선스
Apache-2.0
버전
0.2.7