Discourseサブスクリプションプラグイン

:discourse: 概要 Discourse Subscriptions プラグインを使用すると、サイト管理者は Discourse インスタンス上のグループへのアクセス権を付与する、定期購入および一括購入のサブスクリプションを販売できます。
:open_book: インストールガイド このプラグインは Discourse コアにバンドルされています。プラグインを個別にインストールする必要はありません。

Discourse Subscriptions プラグインを使用すると、ユーザーがゲート付きコンテンツにアクセスするために支払いを行うことができる、一括購入および定期購入のサブスクリプションを作成できます。これは、コミュニティのホスティングコストを資金調達する優れた方法となります。

機能

Discourse Subscriptions プラグインは以下の機能をサポートしています:

上部ナビゲーションにある「購読」ボタンをクリックすると、サブスクリプションページ /s に移動し、サイト用に構成したサブスクリプションの一覧が表示されます:

ユーザーが特定のプランの「購読」ボタンのいずれかをクリックすると、そのプランの支払いページが開きます:

ユーザーが支払い詳細と住所を入力し、「購読」をクリックすると、「ありがとうございます!」メッセージが表示され、請求ページに移動します:

ユーザーはまた、選択したグループに自動的に追加されるため、どのユーザーが購読したかを簡単に確認でき、そのグループのみが閲覧できるカテゴリでゲート付きコンテンツを提供できます。

用語

  • サブスクリプション - サブスクリプションは、コミュニティ内のコンテンツへのアクセスを制御できる定期支払いプランです。サブスクリプションが作成または削除されると、ユーザーはサブスクリプションプランに関連付けられたユーザーグループに追加または削除されます。サブスクリプションは、製品とプランで構成されます。
  • 製品 - Stripe の用語では、製品はあなたが販売しているものを指します。製品には1つ以上のプランを含めることができます。
    • 製品に説明を追加するには、「description」という名前のメタデータフィールドを追加し、それを使用してください。Markdown を使用できます。
  • プラン - プランには価格、定期サイクルが含まれ、購読者がアクセスできるグループに関連付けられます。

:police_car_light: Stripe のプライベートキーは常に安全に保管してください。

:warning: Discourse のインスタンスをシャットダウンした場合、このプラグインをアンインストールした場合、またはサイトがオフラインになった場合、Stripe はサブスクリプションがキャンセルされるまで、お客様のサービスに対して顧客に請求し続けます。

設定

  1. プラグインをインストールして有効にする
  2. 支払いゲートウェイ(Stripe)を設定
  3. Stripe で Webhook とイベントを設定
  4. 管理 > プラグイン > インストール済み > サブスクリプション > 設定 で Stripe キー(公開鍵、秘密鍵、Webhook シークレット)を追加 /admin/site_settings/category/discourse_subscriptions?filter=plugin%3Adiscourse-subscriptions.
  5. 購入を通じて参加する購読者用のグループを作成
  6. 管理 > プラグイン > サブスクリプション で製品とプランを作成
  7. 利益を得る!

支払いゲートウェイの設定

まず、Stripe 支払いゲートウェイのアカウントが必要です。始めるには、テストモードでアカウントを設定し、実際の取引を行ったり銀行口座を設定したりすることなく、すべてがどのように機能するかを確認できます。プラグインにはテストモードのトグルはありません。代わりに、開発者キー(pk_testsk_test で始まる)を使用してください。

Stripe アカウントで Webhook とイベントを設定

:bomb: Webhook はサブスクリプションのキャンセルを完全に機能させるために必要です。正しく設定されていることを確認してください。

Stripe にアカウントを取得したら、Stripe にウェブサイトのアドレスを伝える必要があります。これにより、特定のトランザクションについて通知を受け取ることができます。これは、Stripe ダッシュボードの エンドポイント > URL で入力できます。

Webhook アドレス[your server address]/s/hooks – ここで [your server address] は Discourse インストールの URL です。

また、Webhook URL を介して Stripe が通知すべきイベントを伝える必要があります。

現在、Discourse Subscriptions は以下のイベントに応答します:

  • customer.subscription.deleted
  • customer.subscription.updated
  • checkout.session.completed

Stripe API および Webhook キーをプラグイン設定に追加

Stripe はウェブサイトと通信する権限を持っている必要があります。これを行うために、Stripe はプライベートおよびパブリックの API キー署名シークレット を公開します。

Webhook を承認するには、Stripe の設定ページ(開発者向け)に API キーと Webhook シークレットを追加します。

:warning: 本番環境のキーを追加すると、実際の支払いが行われます。テストする場合は、View test data モードに切り替え、開発者セクションで pk_test および sk_test キーを取得してください。

Stripe アカウント設定で確認してください:

これらを 管理 > プラグイン > インストール済み > サブスクリプション > 設定 の適切な設定の下に追加します /admin/site_settings/category/discourse_subscriptions?filter=plugin%3Adiscourse-subscriptions.

Discourse でユーザーグループを設定

ユーザーが Discourse アプリケーションに正常に購読すると、クレジットカード取引が処理された後、ユーザーグループに追加されます。ユーザーをユーザーグループに割り当てることで、ウェブサイト上でユーザーがアクセスできるコンテンツを管理できます。ユーザーグループは Discourse の中核的な機能であり、このプラグインはプランに関連付けられたグループからユーザーを追加および削除すること以外、グループに対して何もしません。

1つ以上の製品をプランで作成

管理 > プラグイン > サブスクリプション で、新しい製品を追加をクリックします。製品を保存したら、それにプランを追加できます。プランの価格と課金間隔は、作成後に変更できないことに注意してください。これは、サブスクリプション管理に関する混乱を避けるためです。

Stripe ダッシュボード を確認すると、それらの製品とプランがすべてリストされているのがわかります。Discourse Subscriptions はローカルにそれらを作成しません。それらは Stripe で作成されます。

テスト

以下のクレジットカード番号でテストしてください:

  • 4242 4242 4242 4242
  • 4111 1111 1111 1111(認証不要)
  • 4000 0027 6000 3184(認証必要)

さらに多くのテストカード番号については:Test card numbers | Stripe Documentation

/s にアクセスし、いくつかのテストトランザクションを入力してください。

本番環境への移行

本番環境に移行する準備ができたら、API キーと Webhook シークレットキーを本番環境用に変更してください。本番モードで新しい製品とプランを作成する必要があります。

Stripe の Webhook が適切に設定されていない場合、および定期支払いが何らかの理由(期限切れのクレジットカードなど)で処理できない場合、ユーザーは引き続きグループにアクセスできることに注意してください。Stripe がサブスクリプションを自動的にキャンセルするようにするには、失敗した支払いの管理 設定を以下の画像と同様に設定し、上記のように Webhook を構成してください。

支払い情報の更新

ユーザーは、請求ページにアクセスし、サブスクリプションの横にある編集ボタンをクリックすることで、個別のサブスクリプションに使用されるカードを更新できます。これにより、この画面が開きます:

Stripe Checkout と Stripe Pricing Tables の併用

サブスクリプションプラグインの製品ページとチェックアウトページを置き換え、Stripe CheckoutStripe Pricing Tables と一緒に使用することも選択できます。

Stripe ダッシュボードで:

  1. Discourse で製品を作成した後、製品 > 製品カタログ に移動
  2. 価格表に含めたい製品をクリック
  3. 製品を編集 をクリック
  4. その他のオプション をクリックし、メタデータ の下に以下を入力:
    • キー: group_name
    • : Discourse 上のグループ名(例:trust_level_0
  5. 製品を更新 をクリックして保存

:red_exclamation_mark: グループ名が Discourse の User_Groups で選択されたグループと一致していることを確認してください

Stripe 価格表の作成

  1. 製品 > 価格表に移動
  2. 新しいテーブルを作成し、先ほど作成した製品を追加
  3. テーブルを公開した後、埋め込みコード内にある価格表 ID をコピーします(prctbl_... で始まります)
  4. 価格表 ID を discourse_subscriptions_pricing_table_id に貼り付け、サブスクリプション価格表設定を有効にします。
  5. 緑色のチェックマークをクリックして両方の設定を保存します。

推奨ステップ:

Stripe 内で価格表を設定する際、チェックアウト完了後にユーザーをサイトにリンクさせることをお勧めします。そうしないと、ユーザーはサイトへのリンクがない Stripe の確認ページにとどまります。

サブスクリプションの場合、https://<your-site>/my/billing/subscriptions へのリダイレクトが適切な選択です。一括支払いの場合、https://<your-site>/my/billing/payments に直接リンクすることもできます。

自動販売税の徴収

自動販売税の徴収を有効にするには、discourse_subscriptions_enable_automatic_tax のサイト設定ボックスをチェックします。

これを有効にしても、Stripe インスタンスが正しく設定されていない場合、ユーザーはチェックアウトプロセス完了後にこのポップアップを表示する可能性があります:

詳細についてはこちらのガイドがありますが、プラグインが適切な automatic_tax[enabled]=true パラメータを渡しているため(ステップ 5)、行うべきことはほとんどありません。

登録(ステップ 4)も設定してください:

以下は、税金が自動的に徴収されたことを示す Stripe の Discourse サブスクリプションプラグイントランザクションの例です:

設定

名前 説明
discourse subscriptions enabled Discourse Subscriptions プラグインを有効にします。
discourse subscriptions extra nav subscribe 主要ナビゲーションに購読ボタンを表示します
discourse subscriptions public key Stripe 公開鍵
discourse subscriptions secret key Stripe 秘密鍵
discourse subscriptions webhook secret Stripe Webhook シークレット
discourse subscriptions currency デフォルト通貨コード。サブスクリプションプラン作成時に上書きできます。
discourse subscriptions campaign enabled このコミュニティへの金銭的支援を促進するキャンペーンバナーを有効にします。
discourse subscriptions campaign goal サポートキャンペーンの数値目標(購読者数または調達額)。
discourse subscriptions campaign type 実行するキャンペーンの種類を選択します(購読者数または月間調達額)。
discourse subscriptions campaign banner location キャンペーンバナーの場所を選択します(上部またはサイドバー)。
discourse subscriptions campaign banner bg image キャンペーンバナーの背景として使用するカスタム画像をアップロードします。
discourse subscriptions campaign banner shadow color キャンペーンバナーのドロップシャドウの色を選択します。
discourse subscriptions campaign show contributors 最新のサブスクリプション製品購入者のアバターを表示します。
discourse subscriptions campaign product キャンペーンのボタンをクリックした際に支援者に送信する Stripe 製品 ID。この設定が空白の場合、支援者はメイン製品ページにリダイレクトされます。
discourse subscriptions campaign grant ユーザーにサブスクリプションの無料1ヶ月を付与します
discourse subscriptions pricing table id 埋め込みコードからの Stripe 価格表 ID
discourse subscriptions pricing table enabled Stripe 価格表の使用を有効にし、既存の購読ページを置き換えます
discourse_subscriptions_enable_automatic_tax 販売税の徴収を有効にするかどうかを切り替えます。Stripe でのいくつかの設定が必要です。
discourse_subscriptions_enable_verbose_logging デバッグを支援するためにより詳細なログを有効にします。本番環境で永久に有効にしたままにしないでください。

:discourse2: ホスティングサービスをご利用ですか? このプラグインは、当社の Pro、Business、Enterprise のホスティングプランで利用可能です Subscriptions | Discourse - Civilized Discussion

「いいね!」 139
Steady plugin for community funding
ProCourse Memberships :money_with_wings:
Group membership subscriptions with profit split
Email drip campaign
How to give unpaid users limited access without making Discourse private?
Super simple Discourse-Wordpress-membership integration
Discourse for Membership Association Members?
Please suggest a good Discourse Plugin for Membership that supports Indian Payment Gateway
Allow users to donate to pay hosting fees for a site
Login required after some days of free access
User can't repurchase a subscription product after canceling
User Card Directory
Subscription Access To Discourse
Multiple paywalls with common communication hub
Discourse Subscriptions + btcpayserver
Do I need Wordpress? Or Discourse can be my solution to ALL?
Send an invite to a user but complete their profile programmatically
Discourse subscriptions - changing price during recurring subscription
Any good Memberpress alternatives for wordpress?
Add user to group after purchase
How to move Topics in Category into their own Pinned Topic inside new Categories?
Discourse vs Skool
Subscription Access To Discourse
Tax implication of funding a forum
Discourse Unlock
Tick badge for username?
Subscription update problem
Setting up a subscription group
How would I install a cryptocurrency paywall?
Charging a membership fee
Discourse Subscriptions with Thrive Cart
Admin creating subscription for user
Plugin for charity donations?
Allow subscription of predetermined length
Link Sign Up to Subscriptions Plugin
User monetization with group access?
Discourse Category Lockdown
Allow option to open Stripe payment website
Is it possible to use the subscription plugin to limit creating topics in a category to subscribers?
Best approach to a landing page/payment front end
Managing consumable AI costs
Allow multiple ‘new topic’ drafts
Stripe iframe causes a blank page on my print layout
No 'deleted' event in Stripe?
Tell us how you manage subscriptions on Discourse
Addding a paid group who can reply to topics but not create them
Integration with WP membership Pro
Alternative sign up pathways
Control Category Visibility and Access by User Levels
Tighter integration of account-creation and subscriptions?
Does the Subscriptions plugin work with "one-off" payment pricing tables?
Subscriber group automation (Remove and Add users to specific group with subscription)
"Support Us" Banner Not Updating
Tip or Pay Button - for user post/content, does it exist already?
May I or can I monetize my forum?
May I or can I monetize my forum?
Bundling more popular plugins with Discourse core
Guest Gate Theme Component
Error loading route Caused by plugin 'discourse-subscriptions'
Embed a list of Discourse topics onto an external site
Blank page when resuming discourse app
Why doesn't Discourse hosting include the Subscriptions plugin on the Starter plan?
Hosting questions
Discourse Category Lockdown
Rebuild fails when these plugins are present
Changing excerpt length
Installing discourse for free?
Options to manage payments for paid Discourse communities
Using a plug-in to monetize my Discourse
ProCourse Memberships :money_with_wings:
UX: Add metadata to subscription page to improve SEO and link UI design
A feature request related to this plugin. Pointed questions or rewarded questions
Plugin to use Discourse for classified ads or as a job board?
Subscription Plugin not working (Error)
How to set message limits for user groups?
API POST for New User
ProCourse Memberships :money_with_wings:
Steady plugin for community funding
New customer setup
Making group joins automatic to an external pricing plan
Platform integration - videos
Any way to accept paypal or stripe payment at signup?
Looking for feedback on Discourse Subscriptons
WooCommerce Discourse Website newbie help
Switching to Discourse Subscriptions from WordPress Subscriptions
Integration with Wix.com membership to only let the paid member can access to Discourse
2020: The Year in Review
Managing Subscriptions through Wordpress (Ultimate Member + Paid Memberships Pro)
How does uninstalling the Subscriptions plugin affect Stripe billing?
Memberful opinions?
Is there an E-commerce plugin for Discourse?
Memberful opinions?
Prefill custom html with user's email address?
Can't make the subscription plugin work
How to charge members for my Discourse website?
Pay or Play usage?
Latest topics on homepage with only members to read in detail?
Banner text customization for Subscriptions plugin
Subscriptions: Change User's Plan
Donation Bar for House Ad
Can I use the Subscriptions plugin on my own server?
Limiting Subscription Length
Discourse Subscriptions - use API to find out product, plan and renewal date
Discourse Subscriptions - user not removed from group when subscription cancelled
Discourse Subscriptions - user not removed from group when subscription cancelled