Discourse 購読プラグイン

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

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

機能

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

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

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

ユーザーが支払い詳細と住所を入力し、「Subscribe」をクリックすると、「Thank you!」のメッセージが表示され、請求ページに移動します:

ユーザーはまた、自動的に選択したグループに追加されるため、どのユーザーがサブスクライブしているかを簡単に確認でき、そのグループのみが見えるカテゴリでアクセス制限付きコンテンツを提供できます。

用語

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

:police_car_light: Stripe の秘密鍵を常に安全かつ安全に保管してください。

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

設定

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

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

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

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

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

Stripe にアカウントを作成した後、特定の取引について通知できるように、Stripe に Web サイトのアドレスを伝える 必要があります。これは Stripe ダッシュボードの Endpoints > URL で入力できます。

Webhook アドレス: [あなたのサーバーアドレス]/s/hooks – ここで [あなたのサーバーアドレス] は Discourse インストールの URL です。

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

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

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

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

Stripe は Web サイトとの通信を許可される必要があります。これを行うために、秘密 API キーと公開 API キーのペア、および Web フック用の署名秘密を公開します。

Webhook を許可するには、Stripe の API キーと Webhook 秘密を、設定ページ(Developers の下)に追加します。

:warning: 本番環境のキーを追加すると、実際の支払いが行われます。テストする場合は、View test data モードに切り替えて、Developers の下で pk_testsk_test キーを取得することを確認してください。

Stripe アカウント設定で、以下を参照してください:

これらのキーを 管理 > プラグイン > インストール済み > Subscriptions > 設定 の適切な設定に追加してください /admin/site_settings/category/discourse_subscriptions?filter=plugin%3Adiscourse-subscriptions.

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

ユーザーが Discourse アプリケーションに正常にサブスクライブし、クレジットカードの取引が処理された後、ユーザーはユーザーグループに追加されます。ユーザーをユーザーグループに割り当てることで、ユーザーが Web サイト上でアクセスできるものを管理できます。ユーザーグループは Discourse のコア機能であり、このプラグインは、プランに関連付けたグループからユーザーの追加と削除を行うだけです。

1 つ以上の製品とプランの作成。

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

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 にサブスクリプションを自動的にキャンセルさせるには、Manage failed payments の設定を下図に似せて設定し、上記のように Webhook を設定することを確認してください。

支払い情報の更新

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

Stripe Pricing Tables を使用した Stripe Checkout

Subscription プラグインの製品ページとチェックアウトページを置き換え、代わりに Stripe CheckoutStripe Pricing Tables を使用することもできます。

Stripe ダッシュボードで:

  1. Discourse で製品を作成した後、Products > Product catalog に移動します
  2. 価格表に含めたい製品をクリックします
  3. Edit product をクリックします
  4. More Options をクリックし、Metadata の下に以下を入力します:
    • Key: group_name
    • Value: Discourse 上のグループ名(例:trust_level_0
  5. 保存するために Update product をクリックします

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

Stripe 価格表の作成

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

推奨手順:

Stripe 内で Pricing Table を設定する際、チェックアウトが完了した後にユーザーをサイトにリンクすることを推奨します。そうしないと、サイトへのリンクなしで 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 Subscription プラグインの取引の例で、消費税が自動的に徴収されたことを示しています:

設定

名前 説明
discourse subscriptions enabled Discourse Subscriptions プラグインを有効にします。
discourse subscriptions extra nav subscribe 主要ナビゲーションに 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 価格表の使用を有効にし、既存の Subscribe ページを置き換えます
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 Subscriptions - user not removed from group when subscription cancelled
Discourse Subscriptions - user not removed from group when subscription cancelled
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?
Just migrated a Xenforo site to Discourse
Just migrated a Xenforo site to Discourse
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