コンテンツにスキップ
アカウントを作成
または
サインイン
Stripe ドキュメントのロゴ
/
AI に質問する
アカウントを作成
サインイン
始める
支払い
財務の自動化
プラットフォームおよびマーケットプレイス
資金管理
開発者向けのツール
始める
支払い
財務の自動化
始める
支払い
財務の自動化
プラットフォームおよびマーケットプレイス
資金管理
概要
Billing
    概要
    Billing API について
    サブスクリプション
    Invoicing
    従量課金
    Connect と Billing
    Tax と Billing
    見積もり
    売上回収
    オートメーション
    スクリプト
    収益認識
    顧客管理
      顧客
      顧客の請求書残高
      カスタマーポータル
      ノーコードのカスタマーポータルを設定
      API でカスタマーポータルを設定する
      カスタマーポータルを設定する
      カスタマーポータルのディープリンクとフロー
      カスタマーポータルにキャンセルページを追加
    エンタイトルメント
    実装内容をテストする
税金
レポート機能
データ
スタートアップの企業設立
ホーム財務の自動化BillingCustomer management

注

このページはまだ日本語ではご利用いただけません。より多くの言語で文書が閲覧できるように現在取り組んでいます。準備が整い次第、翻訳版を提供いたしますので、もう少しお待ちください。

カスタマーポータルのディープリンク

カスタマーポータルの API を使用して、効率的な顧客フローを設計します。

ページをコピー

With the customer portal, you can provide subscription and payment method management to your customers without building it yourself. If you want to streamline customer actions and further customize workflows between your own app and Stripe, you can create a customer portal flow.

カスタマーポータルのフロー

「フロー」は、カスタマーポータルへのカスタマイズ可能なディープリンクです。ポータルフローでは以下を行うことができます。

  1. 顧客に実行を求める指定アクションが表示されるページにディープリンクで直接接続します。カスタマーポータルの他の部分にアクセスするナビゲーションコンポーネントは非表示になるため、顧客は 1 つのアクションに注目できます。
  2. 顧客がアクションを完了した後のリダイレクトの動作をカスタマイズします。お客様独自の URL、オンラインの確認ページ、またはポータルのホームページに即時にリダイレクトします。
  3. Personalize the flow with unique options like prefilled promotion codes or custom messages.

フローのタイプ

A flow’s type defines what single flow or action your customer will complete. Below are the currently available flow types:

フロータイプ説明例
payment_method_update顧客が新しい支払い方法を追加できるようにするには、payment_method_update を使用します。支払い方法は、customer.invoice_settings.default_payment_method として設定されます。
支払い方法の更新フローの例

支払い方法の更新フロー

subscription_cancel

顧客が特定のサブスクリプションをキャンセルできるようにするには、subscription_cancel を使用します。

You can customize whether the subscription cancels immediately or at the end of the period by updating your portal configuration through the API or the Dashboard.

サブスクリプションのキャンセルフローの例

サブスクリプションのキャンセルフロー

subscription_update

別のプランへのアップグレードやダウングレード、現在のプランの数量の更新など、別の更新オプションを顧客が選択できるようにするには、subscription_update を使用します。

You can customize the available plans by updating your portal configuration through the API or the Dashboard.

サブスクリプションの更新フローの例

サブスクリプションの更新フロー

subscription_update_confirm

顧客がサブスクリプションへの更新の明細を確定できるようにするには、subscription_update_confirm を使用します。

You can use this option when you have your own pricing page but want to offload the work of displaying update details such as upcoming invoice and prorations, handling payment failures, or handling 3D Secure authentication.

サブスクリプション更新に適用するクーポンやプロモーションコードも指定できます。これは、別のプランへの切り替えに対して割引を提供するプロモーションキャンペーンなどで使用できます。

サブスクリプション更新の確認フローの例

サブスクリプション更新の確認フロー

フローを作成する

注

Customer portal flows are an extension to the customer portal API. First follow the general guide to integrate the customer portal with the API before using this guide.

To create a flow, specify flow_data when you create a portal session.

Set the type of flow you want your customer to complete. Depending on the flow type, you might need to pass in additional data such as a subscription ID.

Below are examples on how to set up each flow type.

Command Line
cURL
curl https://api.stripe.com/v1/billing_portal/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer=
{{CUSTOMER_ID}}
\ --data-urlencode return_url="https://example.com/account/overview" \ -d "flow_data[type]"=payment_method_update

レスポンスのポータルセッションの url が、作成したフローにディープリンクで接続されます。この URL を使用して、サイトからポータルフローに顧客をリダイレクトします。

完了後の動作をカスタマイズする

顧客がフローを正常に完了すると、完了した更新の詳細を示すローカライズ版の確認ページが表示されます。このページの確認メッセージをカスタマイズしたり、選択した URL やアカウント情報がすべて表示されるカスタマーポータルのホームページにリダイレクトしたりすることができます。

To customize this behavior, set after_completion on flow_data.

以下の例では、顧客がサブスクリプションをキャンセルし、その後でお客様のサイトにリダイレクトされます。

Command Line
cURL
curl https://api.stripe.com/v1/billing_portal/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ -d customer=
{{CUSTOMER_ID}}
\ --data-urlencode return_url="https://example.com/account/overview" \ -d "flow_data[type]"=subscription_cancel \ -d "flow_data[subscription_cancel][subscription]"=
{{SUBSCRIPTION_ID}}
\ -d "flow_data[after_completion][type]"=redirect \ --data-urlencode "flow_data[after_completion][redirect][return_url]"="https://example.com/account/subscription_canceled"

注

上位の return_url は、顧客がいつでもクリックしてウェブサイトに戻ることができるリンクです (たとえば、キャンセルしないことにした場合など)。flow_data[after_completion][redirect][return_url] は、顧客がサブスクリプションを正常にキャンセルした後にウェブサイトに戻るためのリンクです。

このページはお役に立ちましたか。
はいいいえ
お困りのことがございましたら 、サポートにお問い合わせください。
早期アクセスプログラムにご参加ください。
変更ログをご覧ください。
ご不明な点がございましたら、お問い合わせください。
LLM ですか?llms.txt を読んでください。
Powered by Markdoc