# 顧客のサブスクリプションを 1 つに制限する 顧客がすでに所有している自分のサブスクリプションを管理できるように転送します。 # ホスト型ページ > This is a ホスト型ページ for when payment-ui is stripe-hosted. View the full page at https://docs.stripe.com/payments/checkout/limit-subscriptions?payment-ui=stripe-hosted. すでに有効なサブスクリプションに加入している顧客を、*カスタマーポータル* (The customer portal is a secure, Stripe-hosted page that lets your customers manage their subscriptions and billing details)や貴社のウェブサイトにリダイレクトして、サブスクリプションを管理できます。このリダイレクトは、*Checkout* (A low-code payment integration that creates a customizable form for collecting payments. You can embed Checkout directly in your website, redirect customers to a Stripe-hosted payment page, or create a customized checkout page with Stripe Elements) ([料金表](https://docs.stripe.com/payments/checkout/pricing-table.md)を含む) と Payment Links で機能します。 Stripe は [Customer オブジェクト](https://docs.stripe.com/api/checkout/sessions/object.md#checkout_session_object-customer) (Checkout セッションで指定した場合) またはメールアドレスを使用して、顧客がすでに有効なサブスクリプションに加入しているかどうかを検出します。 ![サブスクリプションを管理する](https://b.stripecdn.com/docs-statics-srv/assets/manage-subscription.47036dfee120d3651fc3819c8b7abfbb.png) ## 顧客をカスタマーポータルまたはウェブサイトに誘導する #### カスタマーポータル 1. [ノーコードのカスタマーポータルを有効にする](https://docs.stripe.com/customer-management/activate-no-code-customer-portal.md)と、ログインした顧客が自らサブスクリプションを管理できるようになります。この機能を有効なままにするには、カスタマーポータルへのログインリンクを有効な状態に保つ必要があります。ログインリンクを無効にするとこの機能は無効になり、顧客は複数のサブスクリプションを作成できるようになります。 1. [Checkout と Payment Links の設定](https://dashboard.stripe.com/settings/checkout#subscriptions)で、顧客をカスタマーポータルにリダイレクトできるようにします。 ![サブスクリプションの設定](https://b.stripecdn.com/docs-statics-srv/assets/subscription-settings.28f8c4efc7a1ca0efceeee8ebeae4786.png) #### ウェブサイト サブスクリプションが有効な顧客をお客様の Web サイトにリダイレクトできます。これを行うには、[Checkout と Payment Links の設定](https://dashboard.stripe.com/settings/checkout#subscriptions)ページに移動します。必要に応じて、顧客が Web サイトにリダイレクトするときに URL に`{CHECKOUT_SESSION_ID}` と `{CUSTOMER_EMAIL}` を入力して、それらを事前入力します。 ``` https://example.com/login?session_id={CHECKOUT_SESSION_ID}&customer_email={CUSTOMER_EMAIL} ``` ![サブスクリプションの設定](https://b.stripecdn.com/docs-statics-srv/assets/subscription-settings-website.3cafc5e43ce9f4d7647a2fd9a811b29f.png) ## 有効なサブスクリプションのステータス 有効なサブスクリプションには、次の [4 つのステータス](https://docs.stripe.com/api/subscriptions/object.md#subscription_object-status)があります。 - `Active` - `PastDue` - `Unpaid` - `Paused` # 埋め込みページ > This is a 埋め込みページ for when payment-ui is embedded-form. View the full page at https://docs.stripe.com/payments/checkout/limit-subscriptions?payment-ui=embedded-form. すでに有効なサブスクリプションに加入している顧客を、*カスタマーポータル* (The customer portal is a secure, Stripe-hosted page that lets your customers manage their subscriptions and billing details)や貴社のウェブサイトにリダイレクトして、サブスクリプションを管理できます。このリダイレクトは、*Checkout* (A low-code payment integration that creates a customizable form for collecting payments. You can embed Checkout directly in your website, redirect customers to a Stripe-hosted payment page, or create a customized checkout page with Stripe Elements) ([料金表](https://docs.stripe.com/payments/checkout/pricing-table.md)を含む) と Payment Links で機能します。 Stripe は [Customer オブジェクト](https://docs.stripe.com/api/checkout/sessions/object.md#checkout_session_object-customer) (Checkout セッションで指定した場合) またはメールアドレスを使用して、顧客がすでに有効なサブスクリプションに加入しているかどうかを検出します。 ![サブスクリプションを管理する](https://b.stripecdn.com/docs-statics-srv/assets/manage-subscription.47036dfee120d3651fc3819c8b7abfbb.png) ## 顧客をカスタマーポータルまたはウェブサイトに誘導する #### カスタマーポータル 1. [ノーコードのカスタマーポータルを有効にする](https://docs.stripe.com/customer-management/activate-no-code-customer-portal.md)と、ログインした顧客が自らサブスクリプションを管理できるようになります。この機能を有効なままにするには、カスタマーポータルへのログインリンクを有効な状態に保つ必要があります。ログインリンクを無効にするとこの機能は無効になり、顧客は複数のサブスクリプションを作成できるようになります。 1. [Checkout と Payment Links の設定](https://dashboard.stripe.com/settings/checkout#subscriptions)で、顧客をカスタマーポータルにリダイレクトできるようにします。 ![サブスクリプションの設定](https://b.stripecdn.com/docs-statics-srv/assets/subscription-settings.28f8c4efc7a1ca0efceeee8ebeae4786.png) #### ウェブサイト サブスクリプションが有効な顧客をお客様の Web サイトにリダイレクトできます。これを行うには、[Checkout と Payment Links の設定](https://dashboard.stripe.com/settings/checkout#subscriptions)ページに移動します。必要に応じて、顧客が Web サイトにリダイレクトするときに URL に`{CHECKOUT_SESSION_ID}` と `{CUSTOMER_EMAIL}` を入力して、それらを事前入力します。 ``` https://example.com/login?session_id={CHECKOUT_SESSION_ID}&customer_email={CUSTOMER_EMAIL} ``` ![サブスクリプションの設定](https://b.stripecdn.com/docs-statics-srv/assets/subscription-settings-website.3cafc5e43ce9f4d7647a2fd9a811b29f.png) ## 有効なサブスクリプションのステータス 有効なサブスクリプションには、次の [4 つのステータス](https://docs.stripe.com/api/subscriptions/object.md#subscription_object-status)があります。 - `Active` - `PastDue` - `Unpaid` - `Paused`