コンテンツにスキップ
アカウントを作成
または
サインイン
Stripe ドキュメントのロゴ
/
AI に質問する
アカウントを作成
サインイン
始める
支払い
売上
プラットフォームおよびマーケットプレイス
資金管理
開発者向けリソース
概要
バージョン管理
変更ログ
API バージョンのアップグレード
SDK バージョンをアップグレードする
Essentials
SDK
API
テスト
Stripe CLI
サンプルプロジェクト
ツール
ワークベンチ
開発者ダッシュボード
Stripe Shell
Visual Studio Code をご利用の場合
機能
ワークフロー
イベントの送信先
Stripe 健全性アラートファイルのアップロード
AI ソリューション
エージェントツールキット
モデルコンテキストプロトコル
セキュリティとプライバシー
セキュリティ
Stripebot ウェブクローラー
プライバシー
Stripe を拡張する
Stripe Appsを構築する
Stripe アプリを使用する
    概要
    Stripeが構築したアプリケーション
    Adobe Commerce
    Cegid
    Commercetools
      構築済みのチェックアウトアプリをインストールする
      カスタムチェックアウトアプリをインストールする
        サブスクリプションを使用する
    Mirakl
    NetSuite
    Oracle Opera
    Oracle Simphony
    Oracle Xstore
    PrestaShop
    Salesforce
    SAP
    Shopware 6
    Stripe Tax for BigCommerce
    Stripe Tax for WooCommerce
    パートナーアプリ
    独自のアプリを構築する
パートナー
Partner Ecosystem
パートナー認定
ホーム開発者向けリソースUse apps from StripeCommercetoolsInstall custom checkout app

注

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

Use Stripe Billing to enable subscriptions for Commercetools

Configure the Stripe app for Composable Commerce to enable subscriptions for any Commercetools product.

警告

This guide only applies to the Stripe app for Composable commerce and does not cover the Checkout App integration.

You can enable Subscriptions for any Commercetools product by defining the required attributes and variants in the product catalog section of the Commercetools merchant center. When a customer buys a subscription product, the integration uses Stripe Billing to register a recurring payment against that order. Stripe manages this subscription, attempting payment collection on a recurring basis based on the subscription settings in Commercetools. If a payment fails, Stripe can notify the customer and ask them to update their billing details. You can configure this in your Subscriptions and emails settings. If a payment succeeds, your website receives a webhook notification from Stripe. The module automatically creates a new order within Commercetools for each renewal increment. The app recalculates the shipping and tax amounts for each individual recurring subscription product before each iteration.

はじめに

  • You have installed the Stripe Payment app for Composable Commerce.
  • Stripe Billing is enabled in your Stripe account.
  • You have created relevant products and their variants using the product type generated by the app called payment-app-subscription-information.
  • Your webhook endpoint handles the following events:
    • invoice.paid
    • invoice.payment_failed

Product variant configuration

How to enable and configure Subscriptions

Subscriptions are enabled automatically when the recurring products are published on Commercetools storefront. The products are configured as one-time and recurring in Commercetools merchant center. To mark a product variant as a subscription, apply the payment-app-subscription-information custom type and define the following fields:

フィールド説明
descriptionA description for the subscription
recurring_intervalDefines the billing frequency (day, week, month, year)
recurring_interval_countSpecifies the number of intervals between billings
off_sessionWhether the subscription can be used off-session
collection_methodPayment collection method (charge_automatically or send_invoice)
days_until_dueOptional number of days before the invoice is due (only applies when collection method is send_invoice)
cancel_at_period_endOptional flag to cancel at the end of the current period
cancel_atOptional specific date and time to cancel the subscription
billing_cycle_anchor_dayOptional day of the month for billing
billing_cycle_anchor_timeOptional time of day for billing
billing_cycle_anchor_dateOptional specific date and time for billing anchor
trial_period_daysOptional trial period length in days
trial_end_dateOptional specific date and time for trial end
missing_payment_method_at_trial_endOptional behavior when payment method is missing at trial end (cancel, create_invoice, or pause)
proration_behaviorOptional behavior for proration when making changes (none, create_prorations, or always_invoice)

Core Components Overview

The Stripe subscription management is primarily managed by the following key services:

  • StripeSubscriptionService: Main orchestrator for subscription operations
  • CtPaymentCreationService: Handles CommerceTools payment creation
  • StripePaymentService: Manages payment processing and order creation
  • SubscriptionEventConverter: Converts Stripe events to CT transactions

Handling Prorations

Handling Prorations

This app supports prorations automatically based on the product variant configuration in the Commercetools product catalog section. When enabled:

  • For downgrades, a refund is automatically created and recorded as part of original order.
  • For upgrades that require an extra payment, a new order creation is triggered with the prorated amount for the remainder of the billing period.

Available services

This composable commerce app provides the core logic for subscription management, including support for mixed carts and order creation. The app exposes the essential API endpoints required to extend your subscription commerce use cases: creating and managing subscriptions, retrieving a customer’s subscription list, updating subscriptions with other commercetools products, and canceling subscriptions. You can extend the app by using packaged, prebuilt services:

Endpoint serviceメソッド説明
/setupIntentPOSTCan be used in trial mode, where a payment method can be captured for future payment recovery
/subscription/withSetupIntentPOSTCreate a subscription with trial setup on a commercetools product
/subscriptionPOSTCreate a subscription (without trial)
/subscription/confirmPOSTConfirm and finalize the subscription payment
/subscription-api/:customerIdGETRetrieve all subscriptions for a specific customer
/subscription-api/:customerIdPOSTUpdate a customer’s subscription by upgrading or downgrading with a new commercetools product
/subscription-api/:customerId/:subscriptionIdDELETECancel a specific subscription for a customer
このページはお役に立ちましたか。
はいいいえ
  • お困りのことがございましたら 、サポートにお問い合わせください。
  • 早期アクセスプログラムにご参加ください。
  • 変更ログをご覧ください。
  • ご不明な点がございましたら、お問い合わせください。
  • LLM ですか?llms.txt を読んでください。
  • Powered by Markdoc