# 継続支払い 顧客に定期的に請求するためのオプションをご紹介します。 Stripe は、顧客に継続的に請求するための方法をいくつか提供しています。このガイドでは、ビジネスに最適な方法やアプローチを把握できるようにします。 このガイドでは、オプションを確認する方法をいくつかご紹介します。 - [ユースケース](https://docs.stripe.com/recurring-payments.md#use-cases): ビジネスに適したユースケースを探します。 - [継続支払いのタイプ](https://docs.stripe.com/recurring-payments.md#recurring-payment-types): Stripe がサポートしているすべての継続支払いのタイプを表示します。 - [Stripe プロダクト](https://docs.stripe.com/recurring-payments.md#stripe-products): 継続課金がサポートされている Stripe プロダクトをご確認ください。 ## ユースケース [継続支払いを受け付ける](https://docs.stripe.com/recurring-payments.md#accept-recurring-payments): 顧客が Stripe で定期的に繰り返し支払うことができるようにします。 [購入金額を複数回の支払いに分割する](https://docs.stripe.com/recurring-payments.md#installment-plans): 顧客が一定の回数にわたる一部支払いで合計金額を支払うことができる分割払いプランを作成します。 [顧客がサブスクリプションを自身で管理できるようにする](https://docs.stripe.com/recurring-payments.md#enable-customer-portal): カスタマーポータルを設定して、顧客各自がサブスクリプションを作成して管理できるようにします。 [継続的な寄付を受け付ける](https://docs.stripe.com/recurring-payments.md#recurring-donations): 顧客が貴団体に定期的に寄付を行えるようにします。 [既存のサブスクリプションを Stripe に移行する](https://docs.stripe.com/recurring-payments.md#migrate-subscriptions): 既存のサブスクリプションをサードパーティーサービスから Stripe に移行します。 ## 継続支払いのタイプ 以下のタブでは、Stripe がサポートする各タイプの継続支払いについて説明しています。 #### サブスクリプション | | | | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **概要** | [Stripe Billing](https://docs.stripe.com/billing.md) を使用して、ダッシュボードで、または API でプログラムによってサブスクリプションを作成して管理します。 - [継続支払いの商品の決済用のリンクを作成](https://docs.stripe.com/payment-links/create.md)します。 - [ダッシュボード](https://dashboard.stripe.com/subscriptions)でサブスクリプションを作成するか、[サブスクリプションシステムを構築](https://docs.stripe.com/billing/subscriptions/build-subscriptions.md)します。 - サブスクリプションのユースケースが複雑な場合は、[サブスクリプションのスケジュール](https://docs.stripe.com/billing/subscriptions/subscription-schedules.md)を作成します。 - Connect を使用する場合は、連結アカウントと最終顧客の[サブスクリプションを作成](https://docs.stripe.com/connect/subscriptions.md)します。 | | **機能** | - コーディング不要 (必要に応じて、Subscriptions API と Stripe Checkout や Elements などの構築済みのコンポーネントを使用して、プログラムによるサブスクリプションの実装を構築できます)。 - アプリのデザインと動作をカスタマイズします。 - さまざまな通貨での複数のプロダクトや料金プランをサポートしています。 - レスポンシブウェブおよびモバイルネイティブをサポートしています。 - ウェブサイトが必要です。Stripe Elements を使用して、決済フォームのデザインをカスタマイズできます。 | | **ユースケース** | - [顧客から継続的に決済を受け付ける](https://docs.stripe.com/recurring-payments.md#accept-recurring-payments) - [継続的な寄付を受け付ける](https://docs.stripe.com/recurring-payments.md#recurring-donations) - [顧客がサブスクリプションを自身で管理できるようにする](https://docs.stripe.com/recurring-payments.md#enable-customer-portal) - [既存のサブスクリプションを Stripe に移行する](https://docs.stripe.com/recurring-payments.md#migrate-subscriptions) | #### 分割払い | | | | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **概要** | 分割払いを使用すると、支払いを複数回の継続支払いに分割することができます。この方法により、高価な商品のコンバージョン率を高め、カートに投入される平均数を引き上げ、新規顧客を獲得することができます。 サブスクリプションスケジュールを使用して、[分割払いプラン](https://docs.stripe.com/billing/subscriptions/subscription-schedules.md#installment-plans)を設定します。 *後払い (BNPL)* (Buy now, pay later (BNPL) allows customers to purchase a product immediately and pay for it over time—often interest free) サービス (例: Klarna) を使用して、顧客が分割払いできるようにします。[後払いオプション](https://docs.stripe.com/payments/buy-now-pay-later.md)についての詳細は、こちらのドキュメントをご覧ください。 ビジネスがメキシコを拠点としている場合は、スケジュールを使用した分割払いでカード支払いを受け付けます。[カード支払いの分割払い](https://docs.stripe.com/payments/mx-installments.md)の詳細をご覧ください。(メキシコでのみ利用可能) | | **機能** | - サブスクリプションのスケジュールにはコーディングが必要です。BNPL の支払い方法の大半は、ダッシュボードで有効にすることができます。 - アプリのデザインと動作をカスタマイズします。 - さまざまな通貨での複数のプロダクトや料金プランをサポートしています。 - レスポンシブウェブおよびモバイルネイティブをサポートしています。 - ウェブサイトが必要です。Stripe Elements を使用して、決済フォームのデザインをカスタマイズできます。 | | **ユースケース** | [購入金額を複数回の決済に分割する](https://docs.stripe.com/recurring-payments.md#installment-plans) | #### 継続的な請求書 | | | | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **概要** | 請求書により、即時の支払い、将来の支払い、継続支払いを受け付けることができます。請求書はダッシュボードまたは API で作成します。[顧客に対する自動請求](https://docs.stripe.com/invoicing/automatic-charging.md)を設定します。サブスクリプションを作成し、スケジュールを作成して継続請求書を生成します。請求書を使用し、[顧客に自動請求](https://docs.stripe.com/recurring-payments.md#use-invoices)するか、[顧客に請求書を自動送信](https://docs.stripe.com/recurring-payments.md#schedule-recurring-invoices)して、支払いを回収します。 今後の支払いの予定を設定するには、[オンライン請求書ページ](https://docs.stripe.com/invoicing/hosted-invoice-page/scheduled-payments.md)を使用します。アメリカでのみ利用できます。[制限事項の詳細なリスト](https://docs.stripe.com/invoicing/hosted-invoice-page/scheduled-payments.md#limitations)をご覧ください。 | | **機能** | - Stripe がオンラインで提供。 - 方法に応じて、最小限のコーディングが必要であるか、コーディング不要。 - 請求書、メール、決済ページのブランディングをカスタマイズできる。 - さまざまな通貨での複数のプロダクトや料金プランをサポートしています。 - レスポンシブウェブのモバイル対応。 - ウェブサイトは不要。Stripe が決済ページをオンラインで提供。 - [Stripe Tax](https://docs.stripe.com/tax.md) に対応。 | | **ユースケース** | - [顧客から継続的に決済を受け付ける](https://docs.stripe.com/recurring-payments.md#accept-recurring-payments) | #### 保存された支払い方法での請求 | | | | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **概要** | *Payment Intents API* (The Payment Intents API tracks the lifecycle of a customer checkout flow and triggers additional authentication steps when required by regulatory mandates, custom Radar fraud rules, or redirect-based payment methods) を使用して、将来の継続的な使用に備えて、初回の決済フロー中に決済手段の詳細を[決済フローの一部として](https://docs.stripe.com/payments/save-during-payment.md?payment-ui=elements)保存します。 顧客に請求する準備ができたら、[保存されている支払い方法に請求](https://docs.stripe.com/payments/save-and-reuse.md?platform=web&ui=elements#charge-saved-payment-method)します。 | | **機能** | - 部分的なコーディングが必要です。 - アプリのデザインと動作をカスタマイズします。 - さまざまな通貨での複数のプロダクトや料金プランをサポートしています。 - レスポンシブウェブおよびモバイルネイティブをサポートしています。 - ウェブサイトが必要です。Stripe Elements を使用して、決済フォームのデザインをカスタマイズできます。 | | **ユースケース** | - [顧客から継続的に決済を受け付ける](https://docs.stripe.com/recurring-payments.md#accept-recurring-payments) - [継続的な寄付を受け付ける](https://docs.stripe.com/recurring-payments.md#recurring-donations) - [顧客がサブスクリプションを自身で管理できるようにする](https://docs.stripe.com/recurring-payments.md#enable-customer-portal) | ## 継続支払いに対応した Stripe プロダクト 次の表では、継続支払いをサポートする Stripe 製品について説明しています。 | 商品 | 機能 | ユースケース | | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Payment Links** | - コーディング不要 - ブランディングをカスタマイズする - 1 つ以上の商品に対して 1 つの決済リンク - レスポンシブウェブのモバイル対応 - Web サイトは必要ありません。SMS、メール、ソーシャルメディアからリンクをお知らせください - [Stripe Tax](https://docs.stripe.com/tax.md) に対応 | - [継続支払いを受け付ける](https://docs.stripe.com/recurring-payments.md#accept-recurring-payments) - [顧客がサブスクリプションを自身で管理できるようにする](https://docs.stripe.com/recurring-payments.md#enable-customer-portal) - [継続的な寄付を受け付ける](https://docs.stripe.com/recurring-payments.md#recurring-donations) | | **請求書作成** | - コーディング不要 (必要に応じて、[Invoices API](https://docs.stripe.com/api/invoices.md) と Stripe Checkout や Elements などの構築済みのコンポーネントを使用して、プログラムによる請求の実装を構築することができます)。 - ブランディングとテンプレートをカスタマイズします。 - 1 つ以上の商品が含まれる 1 件の請求書。必要に応じて 1 回限りの商品と継続支払いの商品を組み合わせます。 - レスポンシブウェブのモバイル対応。 - ウェブサイトは不要です。カスタマーポータル、オンライン請求書ページ、PDF で請求書を共有します。 - [Stripe Tax](https://docs.stripe.com/tax.md) に対応。 | - [継続支払いを受け付ける](https://docs.stripe.com/recurring-payments.md#accept-recurring-payments) - [顧客がサブスクリプションを自身で管理できるようにする](https://docs.stripe.com/recurring-payments.md#enable-customer-portal) - [継続的な寄付を受け付ける](https://docs.stripe.com/recurring-payments.md#recurring-donations) | | **サブスクリプション** | - コーディング不要 (必要に応じて、[Subscriptions API](https://docs.stripe.com/api/subscriptions.md) と Stripe Checkout や Elements などの構築済みのコンポーネントを使用して、プログラムによるサブスクリプションの実装を構築することができます)。 - 決済フォームと決済機能のデザインをすべてカスタマイズします。 - 複数の商品、価格、料金体系モデル、通貨。 - レスポンシブウェブのモバイル対応。 - ウェブサイトは不要です。サブスクリプションをサイトに追加することもできます。 - [Stripe Tax](https://docs.stripe.com/tax.md) に対応。 | - [継続支払いを受け付ける](https://docs.stripe.com/recurring-payments.md#accept-recurring-payments) - [顧客がサブスクリプションを自身で管理できるようにする](https://docs.stripe.com/recurring-payments.md#enable-customer-portal) - [継続的な寄付を受け付ける](https://docs.stripe.com/recurring-payments.md#recurring-donations) | | **Checkout** | - 最小限のコーディング - ブランディングをカスタマイズする - 複数の商品および複数通貨による価格 - レスポンシブウェブのモバイル対応 - Web サイトが必要ですが、支払いページは Stripe がオンラインで提供します - [Stripe Tax](https://docs.stripe.com/tax.md) に対応 | - [継続支払いを受け付ける](https://docs.stripe.com/recurring-payments.md#accept-recurring-payments) - [顧客がサブスクリプションを自身で管理できるようにする](https://docs.stripe.com/recurring-payments.md#enable-customer-portal) - [購入金額を複数回の決済に分割する](https://docs.stripe.com/recurring-payments.md#installment-plans) - [継続的な寄付を受け付ける](https://docs.stripe.com/recurring-payments.md#recurring-donations) | | **Elements** | - 多くのコーティングが必要 - デザイン全体をカスタマイズする - 複数の商品および複数通貨による価格 - レスポンシブ Web およびモバイルネイティブ - Web サイトが必要です。Elements を支払いページに追加します。 - [Stripe Tax](https://docs.stripe.com/tax.md) は独自の[税務連携](https://docs.stripe.com/tax/standalone-tax-api.md)に対応しています | - [継続支払いを受け付ける](https://docs.stripe.com/recurring-payments.md#accept-recurring-payments) - [顧客がサブスクリプションを自身で管理できるようにする](https://docs.stripe.com/recurring-payments.md#enable-customer-portal) - [購入金額を複数回の決済に分割する](https://docs.stripe.com/recurring-payments.md#installment-plans) - [継続的な寄付を受け付ける](https://docs.stripe.com/recurring-payments.md#recurring-donations) | | **API** | - ほぼコーディング - デザイン全体をカスタマイズし、独自の UI で決済を受け付ける - 複数の商品および複数通貨による価格 - ウェブサイトが必要。独自の UI で決済を受け付ける - [Stripe Tax](https://docs.stripe.com/tax.md) は独自の[税務連携](https://docs.stripe.com/tax/standalone-tax-api.md)に対応しています | - [継続支払いを受け付ける](https://docs.stripe.com/recurring-payments.md#accept-recurring-payments) - [顧客がサブスクリプションを自身で管理できるようにする](https://docs.stripe.com/recurring-payments.md#enable-customer-portal) - [購入金額を複数回の決済に分割する](https://docs.stripe.com/recurring-payments.md#installment-plans) - [継続的な寄付を受け付ける](https://docs.stripe.com/recurring-payments.md#recurring-donations) | ## 継続支払いを受け付ける Stripe では、継続支払いを受け付ける方法をいくつか提供しています。サブスクリプションは、Stripe Billing、PaymentIntents、SetupIntents、または Invoicing で使用してください。 ### サブスクリプションを使用して継続支払いを受け付ける 顧客が定期的に支払うビジネスモデルがある場合、通常はサブスクリプションを提供できます。Stripe は、サブスクリプションを作成して管理する方法をいくつか提供しています。 [Organizations](https://docs.stripe.com/get-started/account/orgs.md) を使用している場合は、すべてのアカウントのサブスクリプションをリスト表示できます。このリストは、アカウントごとにフィルタリングすることも可能です。ただし、サブスクリプションは、アカウントのサブスクリプションページからのみ作成・分析できます。 > サブスクリプションは、固有の料金プランがある Stripe Billing の一部です。 #### ダッシュボードでサブスクリプションを作成する サブスクリプションを作成するには、以下のようにします。 1. Stripe ダッシュボードで、[サブスクリプション](https://dashboard.stripe.com/test/subscriptions)ページに移動します。 2. **+サブスクリプションを作成する**をクリックします。 3. 顧客を検索または追加します。 4. 価格と商品の情報を入力します。複数の商品を追加できます。 5. サブスクリプションの開始日と終了日を設定します。 6. 請求サイクルの開始日を設定します。これにより、次回のインボイスが生成されるタイミングを定義します。設定によっては、保存されている登録済みの決済手段も請求サイクルの日付に自動的に請求される場合があります。[請求サイクルの日付](https://docs.stripe.com/billing/subscriptions/billing-cycle.md)の詳細をご覧ください。 7. (推奨) [メールリマインダーと通知を設定する](https://docs.stripe.com/invoicing/send-email.md#email-configuration)を登録者に適用します。 8. (オプション) デフォルトの税金処理、クーポン、無料トライアル、またはメタデータを追加します。 9. (オプション) ダッシュボードで [売上回収](https://docs.stripe.com/billing/revenue-recovery.md)機能を有効にすると、サブスクリプションにおける支払いの失敗を減らしたり、回収したりするのに役立ちます。失敗した支払いの自動再試行、カスタムの自動化機能の構築、顧客メールの設定などを行うことができます。 #### Payment Links でサブスクリプションを作成する Payment Links を使用してサブスクリプションを作成するには、決済用のリンクの作成時に **Sell a subscription (サブスクリプションを販売)** を選択します。次に、リンクを顧客と共有します。決済用のリンクの[作成](https://docs.stripe.com/payment-links/create.md)と[共有](https://docs.stripe.com/payment-links/share.md)の詳細をご覧ください。 #### Checkout を使用してサブスクリプションを作成する 決済 UI として *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) を使用している場合は、[Checkout Sessions API](https://docs.stripe.com/api/checkout/sessions.md#checkout_sessions) を使用してサブスクリプションを作成します。一般的な実装では、申し込みのバックエンドを呼び出すボタンをサイトに追加します。詳細は、[Subscriptions 導入ガイド](https://docs.stripe.com/billing/subscriptions/build-subscriptions.md?payment-ui=checkout&ui=stripe-hosted)をご覧ください。 決済が完了すると、サブスクリプションの状態がアクティブになます。また、[CheckoutSession](https://docs.stripe.com/api/checkout/sessions/object.md#checkout_session_object) オブジェクトに `Account` オブジェクトまたは `Customer` オブジェクト、そして `Subscription` オブジェクトへの参照が含まれます。 この API を使用してサブスクリプションを作成するには、`mode=subscription` を渡します。 #### Ruby ```ruby # Don't put any keys in code. See https://docs.stripe.com/keys-best-practices. # Find your keys at https://dashboard.stripe.com/apikeys. client = Stripe::StripeClient.new('<>') # The price ID passed from the front end. # price_id = params['priceId'] price_id = '{{PRICE_ID}}' session = client.v1.checkout.sessions.create({ success_url: 'https://example.com/success.html?session_id={CHECKOUT_SESSION_ID}', mode: 'subscription', line_items: [{ # For usage-based billing, don't pass quantity quantity: 1, price: price_id }], subscription_data: { billing_mode: { type: 'flexible' } } }) # Redirect to the URL returned on the session # redirect session.url, 303 ``` #### Elements でサブスクリプションを作成する *Elements* (A set of UI components for building a web checkout flow. They adapt to your customer's locale, validate input, and use tokenization, keeping sensitive customer data from touching your server) を決済 UI として使用している場合は、[Subscriptions API](https://docs.stripe.com/api/subscriptions.md) でサブスクリプションを作成します。 選択した価格 ID と顧客レコードの ID をバックエンドに渡します。次に、バックエンドで、`payment_behavior=default_incomplete` を使用し、ステータスが `incomplete` のサブスクリプションを作成します。これで、サブスクリプションの最初の [PaymentIntent](https://docs.stripe.com/payments/paymentintents/lifecycle.md) からフロントエンドに `client_secret` が返され、決済を完了します。[Elements を使用](https://docs.stripe.com/billing/subscriptions/build-subscriptions.md?payment-ui=elements)してサブスクリプションの導入方法をご確認ください。 次の例では `Subscription` を作成すると同時に、レスポンス内で最新の請求書から `confirmation_secret` を展開して取得しています。それにより、シークレットキーをフロントエンドに渡して決済を確定できます。 #### Accounts v2 ```curl curl https://api.stripe.com/v1/subscriptions \ -u "<>:" \ -d "customer_account={{CUSTOMERACCOUNT_ID}}" \ -d "items[0][price]={{PRICE_ID}}" \ -d payment_behavior=default_incomplete \ -d "payment_settings[save_default_payment_method]=on_subscription" \ -d "billing_mode[type]=flexible" \ -d "expand[0]=latest_invoice.confirmation_secret" ``` #### Customers v1 ```curl curl https://api.stripe.com/v1/subscriptions \ -u "<>:" \ -d "customer={{CUSTOMER_ID}}" \ -d "items[0][price]={{PRICE_ID}}" \ -d payment_behavior=default_incomplete \ -d "payment_settings[save_default_payment_method]=on_subscription" \ -d "billing_mode[type]=flexible" \ -d "expand[0]=latest_invoice.confirmation_secret" ``` この時点でサブスクリプションは `inactive` であり、支払いを待っています。次のレスポンスの例では、保存が「必要な」最小限のフィールドが強調表示されています。アプリケーションが頻繁にアクセスするフィールドも保存することをお勧めします。 #### Accounts v2 ```json {"id": "sub_JgRjFjhKbtD2qz", "object": "subscription", "application_fee_percent": null, "automatic_tax": { "disabled_reason": null, "enabled": false, "liability": "null" }, "billing_cycle_anchor": 1623873347, "billing_cycle_anchor_config": null, "cancel_at": null, "cancel_at_period_end": false, "canceled_at": null, "cancellation_details": { "comment": null, "feedback": null, "reason": null }, "collection_method": "charge_automatically", "created": 1623873347, "currency": "usd","customer_account": identifier("customerAccount"), "days_until_due": null, "default_payment_method": null, "default_source": null, "default_tax_rates": [ ], "discounts": [], "ended_at": null, "invoice_customer_balance_settings": { "account_tax_ids": null, "issuer": { "type": "self" } }, "items": { "object": "list", "data": [ { "id": "si_JgRjmS4Ur1khEx", "object": "subscription_item", "created": 1623873347,"current_period_end": 1626465347, "current_period_start": 1623873347, "discounts": [], "metadata": { }, "plan": { "id": "price_1J32RfGPZ1iASj5zHHp57z7C", "object": "plan", "active": true, "amount": 2000, "amount_decimal": "2000", "billing_scheme": "per_unit", "created": 1623864151, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": { }, "nickname": null, "product": "prod_JgPF5xnq7qBun3", "tiers": null, "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed" }, "price": { "id": "price_1J32RfGPZ1iASj5zHHp57z7C", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1623864151, "currency": "usd", "livemode": false, "lookup_key": null, "metadata": { }, "nickname": null, "product": "prod_JgPF5xnq7qBun3", "recurring": { "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed" }, "tiers_mode": null, "transform_quantity": null, "type": "recurring", "unit_amount": 2000, "unit_amount_decimal": "2000" }, "quantity": 1, "subscription": "sub_JgRjFjhKbtD2qz", "tax_rates": [ ] } ], "has_more": false, "total_count": 1, "url": "/v1/subscription_items?subscription=sub_JgRjFjhKbtD2qz" }, "latest_invoice": { "id": "in_1J34pzGPZ1iASj5zB87qdBNZ", "object": "invoice", "account_country": "US", "account_name": "Angelina's Store", "account_tax_ids": null, "amount_due": 2000, "amount_overpaid": 0, "amount_paid": 0, "amount_remaining": 2000, "amount_shipping": 0, "attempt_count": 0, "attempted": false, "auto_advance": false, "automatic_tax": { "disabled_reason": null, "enabled": false, "liability": null, "status": null }, "automatically_finalizes_at": null, "billing_reason": "subscription_update", "collection_method": "charge_automatically", "created": 1623873347, "currency": "usd", "custom_fields": null, "customer_account": identifier("customerAccount"), "customer_address": null, "customer_email": "angelina@stripe.com", "customer_name": null, "customer_phone": null, "customer_shipping": { "address": { "city": "", "country": "US", "line1": "Berry", "line2": "", "postal_code": "", "state": "" }, "name": "", "phone": null }, "customer_tax_exempt": "none", "customer_tax_ids": [ ], "default_payment_method": null, "default_source": null, "default_tax_rates": [ ], "description": null, "discounts": [], "due_date": null, "effective_at": "1623873347", "ending_balance": 0, "footer": null, "from_invoice": null, "hosted_invoice_url": "https://invoice.stripe.com/i/acct_1By64KGPZ1iASj5z/invst_JgRjzIOILGeq2MKC9T0KtyXnD5udsLp", "invoice_pdf": "https://pay.stripe.com/invoice/acct_1By64KGPZ1iASj5z/invst_JgRjzIOILGeq2MKC9T0KtyXnD5udsLp/pdf", "last_finalization_error": null, "latest_revision": null, "lines": { "object": "list", "data": [ { "id": "il_1N2CjMBwKQ696a5NeOawRQP2", "object": "line_item", "amount": 2000, "currency": "usd", "description": "1 × Gold Special (at $20.00 / month)", "discount_amounts": [ ], "discountable": true, "discounts": [ ], "invoice": "in_1J34pzGPZ1iASj5zB87qdBNZ", "livemode": false, "metadata": { }, "parent": { "invoice_item_details": null, "subscription_item_details": { "invoice_item": null, "proration": false, "proration_details": { "credited_items": null }, "subscription": "sub_JgRjFjhKbtD2qz", "subscription_item": "si_JgRjmS4Ur1khEx" }, "type": "subscription_item_details" }, "period": { "end": 1626465347, "start": 1623873347 }, "plan": { "id": "price_1J32RfGPZ1iASj5zHHp57z7C", "object": "plan", "active": true, "amount": 2000, "amount_decimal": "2000", "billing_scheme": "per_unit", "created": 1623864151, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": { }, "nickname": null, "product": "prod_JgPF5xnq7qBun3", "tiers": null, "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed" }, "price": { "id": "price_1J32RfGPZ1iASj5zHHp57z7C", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1623864151, "currency": "usd", "livemode": false, "lookup_key": null, "metadata": { }, "nickname": null, "product": "prod_JgPF5xnq7qBun3", "recurring": { "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed" }, "tiers_mode": null, "transform_quantity": null, "type": "recurring", "unit_amount": 2000, "unit_amount_decimal": "2000" }, "quantity": 1, "taxes": [] } ], "has_more": false, "total_count": 1, "url": "/v1/invoices/in_1J34pzGPZ1iASj5zB87qdBNZ/lines" }, "livemode": false, "metadata": { }, "next_payment_attempt": null, "number": "C008FC2-0354", "on_behalf_of": null, "parent": { "quote_details": null, "subscription_details": { "metadata": {}, "pause_collection": null, "subscription": "sub_JgRjFjhKbtD2qz" } }, "payment_intent": { "id": "pi_1J34pzGPZ1iASj5zI2nOAaE6", "object": "payment_intent", "allowed_source_types": [ "card" ], "amount": 2000, "amount_capturable": 0, "amount_received": 0, "application": null, "application_fee_amount": null, "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", "charges": { "object": "list", "data": [ ], "has_more": false, "total_count": 0, "url": "/v1/charges?payment_intent=pi_1J34pzGPZ1iASj5zI2nOAaE6" }, "client_secret": "pi_1J34pzGPZ1iASj5zI2nOAaE6_secret_l7FN6ldFfXiFmJEumenJ2y2wu", "confirmation_method": "automatic", "created": 1623873347, "currency": "usd", "customer": "cus_CMqDWO2xODTZqt", "description": "Subscription creation", "invoice": "in_1J34pzGPZ1iASj5zB87qdBNZ", "last_payment_error": null, "livemode": false, "metadata": { }, "next_action": null, "next_source_action": null, "on_behalf_of": null, "payment_method": null, "payment_method_options": { "card": { "installments": null, "network": null, "request_three_d_secure": "automatic" } }, "payment_method_types": [ "card" ], "receipt_email": null, "review": null, "setup_future_usage": "off_session", "shipping": null, "source": "card_1By6iQGPZ1iASj5z7ijKBnXJ", "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "requires_confirmation", "transfer_data": null, "transfer_group": null }, "payment_settings": { "payment_method_options": null, "payment_method_types": null, "save_default_payment_method": "on_subscription" }, "period_end": 1623873347, "period_start": 1623873347, "post_payment_credit_notes_amount": 0, "pre_payment_credit_notes_amount": 0, "receipt_number": null, "starting_balance": 0, "statement_descriptor": null, "status": "open", "status_transitions": { "finalized_at": 1623873347, "marked_uncollectible_at": null, "paid_at": null, "voided_at": null }, "subscription": "sub_JgRjFjhKbtD2qz", "subtotal": 2000, "tax": null, "tax_percent": null, "total": 2000, "total_discount_amounts": [], "total_tax_amounts": [], "transfer_data": null, "webhooks_delivered_at": 1623873347 }, "livemode": false, "metadata": { }, "next_pending_invoice_item_invoice": null, "pause_collection": null, "pending_invoice_item_interval": null, "pending_setup_intent": null, "pending_update": null, "plan": { "id": "price_1J32RfGPZ1iASj5zHHp57z7C", "object": "plan", "active": true, "amount": 2000, "amount_decimal": "2000", "billing_scheme": "per_unit", "created": 1623864151, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": { }, "nickname": null, "product": "prod_JgPF5xnq7qBun3", "tiers": null, "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed" }, "quantity": 1, "schedule": null, "start": 1623873347, "start_date": 1623873347, "status": "incomplete", "tax_percent": null, "transfer_data": null, "trial_end": null, "trial_start": null } ``` #### Customers v1 ```json {"id": "sub_JgRjFjhKbtD2qz", "object": "subscription", "application_fee_percent": null, "automatic_tax": { "disabled_reason": null, "enabled": false, "liability": "null" }, "billing_cycle_anchor": 1623873347, "billing_cycle_anchor_config": null, "cancel_at": null, "cancel_at_period_end": false, "canceled_at": null, "cancellation_details": { "comment": null, "feedback": null, "reason": null }, "collection_method": "charge_automatically", "created": 1623873347, "currency": "usd","customer": identifier("customer"), "days_until_due": null, "default_payment_method": null, "default_source": null, "default_tax_rates": [ ], "discounts": [], "ended_at": null, "invoice_customer_balance_settings": { "account_tax_ids": null, "issuer": { "type": "self" } }, "items": { "object": "list", "data": [ { "id": "si_JgRjmS4Ur1khEx", "object": "subscription_item", "created": 1623873347,"current_period_end": 1626465347, "current_period_start": 1623873347, "discounts": [], "metadata": { }, "plan": { "id": "price_1J32RfGPZ1iASj5zHHp57z7C", "object": "plan", "active": true, "amount": 2000, "amount_decimal": "2000", "billing_scheme": "per_unit", "created": 1623864151, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": { }, "nickname": null, "product": "prod_JgPF5xnq7qBun3", "tiers": null, "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed" }, "price": { "id": "price_1J32RfGPZ1iASj5zHHp57z7C", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1623864151, "currency": "usd", "livemode": false, "lookup_key": null, "metadata": { }, "nickname": null, "product": "prod_JgPF5xnq7qBun3", "recurring": { "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed" }, "tiers_mode": null, "transform_quantity": null, "type": "recurring", "unit_amount": 2000, "unit_amount_decimal": "2000" }, "quantity": 1, "subscription": "sub_JgRjFjhKbtD2qz", "tax_rates": [ ] } ], "has_more": false, "total_count": 1, "url": "/v1/subscription_items?subscription=sub_JgRjFjhKbtD2qz" }, "latest_invoice": { "id": "in_1J34pzGPZ1iASj5zB87qdBNZ", "object": "invoice", "account_country": "US", "account_name": "Angelina's Store", "account_tax_ids": null, "amount_due": 2000, "amount_overpaid": 0, "amount_paid": 0, "amount_remaining": 2000, "amount_shipping": 0, "attempt_count": 0, "attempted": false, "auto_advance": false, "automatic_tax": { "disabled_reason": null, "enabled": false, "liability": null, "status": null }, "automatically_finalizes_at": null, "billing_reason": "subscription_update", "collection_method": "charge_automatically", "created": 1623873347, "currency": "usd", "custom_fields": null, "customer": identifier("customer"), "customer_address": null, "customer_email": "angelina@stripe.com", "customer_name": null, "customer_phone": null, "customer_shipping": { "address": { "city": "", "country": "US", "line1": "Berry", "line2": "", "postal_code": "", "state": "" }, "name": "", "phone": null }, "customer_tax_exempt": "none", "customer_tax_ids": [ ], "default_payment_method": null, "default_source": null, "default_tax_rates": [ ], "description": null, "discounts": [], "due_date": null, "effective_at": "1623873347", "ending_balance": 0, "footer": null, "from_invoice": null, "hosted_invoice_url": "https://invoice.stripe.com/i/acct_1By64KGPZ1iASj5z/invst_JgRjzIOILGeq2MKC9T0KtyXnD5udsLp", "invoice_pdf": "https://pay.stripe.com/invoice/acct_1By64KGPZ1iASj5z/invst_JgRjzIOILGeq2MKC9T0KtyXnD5udsLp/pdf", "last_finalization_error": null, "latest_revision": null, "lines": { "object": "list", "data": [ { "id": "il_1N2CjMBwKQ696a5NeOawRQP2", "object": "line_item", "amount": 2000, "currency": "usd", "description": "1 × Gold Special (at $20.00 / month)", "discount_amounts": [ ], "discountable": true, "discounts": [ ], "invoice": "in_1J34pzGPZ1iASj5zB87qdBNZ", "livemode": false, "metadata": { }, "parent": { "invoice_item_details": null, "subscription_item_details": { "invoice_item": null, "proration": false, "proration_details": { "credited_items": null }, "subscription": "sub_JgRjFjhKbtD2qz", "subscription_item": "si_JgRjmS4Ur1khEx" }, "type": "subscription_item_details" }, "period": { "end": 1626465347, "start": 1623873347 }, "plan": { "id": "price_1J32RfGPZ1iASj5zHHp57z7C", "object": "plan", "active": true, "amount": 2000, "amount_decimal": "2000", "billing_scheme": "per_unit", "created": 1623864151, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": { }, "nickname": null, "product": "prod_JgPF5xnq7qBun3", "tiers": null, "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed" }, "price": { "id": "price_1J32RfGPZ1iASj5zHHp57z7C", "object": "price", "active": true, "billing_scheme": "per_unit", "created": 1623864151, "currency": "usd", "livemode": false, "lookup_key": null, "metadata": { }, "nickname": null, "product": "prod_JgPF5xnq7qBun3", "recurring": { "interval": "month", "interval_count": 1, "trial_period_days": null, "usage_type": "licensed" }, "tiers_mode": null, "transform_quantity": null, "type": "recurring", "unit_amount": 2000, "unit_amount_decimal": "2000" }, "quantity": 1, "taxes": [] } ], "has_more": false, "total_count": 1, "url": "/v1/invoices/in_1J34pzGPZ1iASj5zB87qdBNZ/lines" }, "livemode": false, "metadata": { }, "next_payment_attempt": null, "number": "C008FC2-0354", "on_behalf_of": null, "parent": { "quote_details": null, "subscription_details": { "metadata": {}, "pause_collection": null, "subscription": "sub_JgRjFjhKbtD2qz" } }, "payment_intent": { "id": "pi_1J34pzGPZ1iASj5zI2nOAaE6", "object": "payment_intent", "allowed_source_types": [ "card" ], "amount": 2000, "amount_capturable": 0, "amount_received": 0, "application": null, "application_fee_amount": null, "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", "charges": { "object": "list", "data": [ ], "has_more": false, "total_count": 0, "url": "/v1/charges?payment_intent=pi_1J34pzGPZ1iASj5zI2nOAaE6" }, "client_secret": "pi_1J34pzGPZ1iASj5zI2nOAaE6_secret_l7FN6ldFfXiFmJEumenJ2y2wu", "confirmation_method": "automatic", "created": 1623873347, "currency": "usd", "customer": "cus_CMqDWO2xODTZqt", "description": "Subscription creation", "invoice": "in_1J34pzGPZ1iASj5zB87qdBNZ", "last_payment_error": null, "livemode": false, "metadata": { }, "next_action": null, "next_source_action": null, "on_behalf_of": null, "payment_method": null, "payment_method_options": { "card": { "installments": null, "network": null, "request_three_d_secure": "automatic" } }, "payment_method_types": [ "card" ], "receipt_email": null, "review": null, "setup_future_usage": "off_session", "shipping": null, "source": "card_1By6iQGPZ1iASj5z7ijKBnXJ", "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "requires_confirmation", "transfer_data": null, "transfer_group": null }, "payment_settings": { "payment_method_options": null, "payment_method_types": null, "save_default_payment_method": "on_subscription" }, "period_end": 1623873347, "period_start": 1623873347, "post_payment_credit_notes_amount": 0, "pre_payment_credit_notes_amount": 0, "receipt_number": null, "starting_balance": 0, "statement_descriptor": null, "status": "open", "status_transitions": { "finalized_at": 1623873347, "marked_uncollectible_at": null, "paid_at": null, "voided_at": null }, "subscription": "sub_JgRjFjhKbtD2qz", "subtotal": 2000, "tax": null, "tax_percent": null, "total": 2000, "total_discount_amounts": [], "total_tax_amounts": [], "transfer_data": null, "webhooks_delivered_at": 1623873347 }, "livemode": false, "metadata": { }, "next_pending_invoice_item_invoice": null, "pause_collection": null, "pending_invoice_item_interval": null, "pending_setup_intent": null, "pending_update": null, "plan": { "id": "price_1J32RfGPZ1iASj5zHHp57z7C", "object": "plan", "active": true, "amount": 2000, "amount_decimal": "2000", "billing_scheme": "per_unit", "created": 1623864151, "currency": "usd", "interval": "month", "interval_count": 1, "livemode": false, "metadata": { }, "nickname": null, "product": "prod_JgPF5xnq7qBun3", "tiers": null, "tiers_mode": null, "transform_usage": null, "trial_period_days": null, "usage_type": "licensed" }, "quantity": 1, "schedule": null, "start": 1623873347, "start_date": 1623873347, "status": "incomplete", "tax_percent": null, "transfer_data": null, "trial_end": null, "trial_start": null } ``` #### Subscriptions API を使用してサブスクリプションを作成する [Subscriptions API](https://docs.stripe.com/api/subscriptions.md) を使用して、継続的な価格の基本的なサブスクリプションを作成します。[エンドツーエンドのサブスクリプションの実装を構築](https://docs.stripe.com/billing/subscriptions/build-subscriptions.md)する方法を確認するか、[実践的なクイックスタート](https://docs.stripe.com/billing/quickstart.md)を使用してください。 以下は、最初の支払いに 1 回限りの購入 (サービス手数料など) も含まれるサブスクリプションを作成する方法です。 #### Accounts v2 ```curl curl https://api.stripe.com/v1/subscriptions \ -u "<>:" \ -d "customer_account={{CUSTOMERACCOUNT_ID}}" \ -d "items[0][price]={{RECURRING_PRICE_ID}}" \ -d "add_invoice_items[0][price]={{ONE_TIME_PRICE_ID}}" ``` #### Customer v1 ```curl curl https://api.stripe.com/v1/subscriptions \ -u "<>:" \ -d "customer={{CUSTOMER_ID}}" \ -d "items[0][price]={{RECURRING_PRICE_ID}}" \ -d "add_invoice_items[0][price]={{ONE_TIME_PRICE_ID}}" ``` #### Subscription Schedules API を使用してサブスクリプションを作成する サブスクリプションのシナリオが複雑な場合は、[Subscription Schedules API](https://docs.stripe.com/api/subscription_schedules.md) を使用します。[サブスクリプションスケジュール](https://docs.stripe.com/billing/subscriptions/subscription-schedules.md)とそれぞれの[ユースケース](https://docs.stripe.com/billing/subscriptions/subscription-schedules.md#use-cases)をご紹介します。 以下は、継続的なサブスクリプションを作成する方法です。 #### Accounts v2 ```curl curl https://api.stripe.com/v1/subscriptions \ -u "<>:" \ -d "customer_account={{CUSTOMERACCOUNT_ID}}" \ -d "items[0][price]=price_F52b2UdntfQsfR" \ -d "expand[0]=latest_invoice.payments" \ -d "expand[1]=latest_invoice.confirmation_secret" \ -d off_session=true ``` #### Customers v1 ```curl curl https://api.stripe.com/v1/subscriptions \ -u "<>:" \ -d "customer={{CUSTOMER_ID}}" \ -d "items[0][price]=price_F52b2UdntfQsfR" \ -d "expand[0]=latest_invoice.payments" \ -d "expand[1]=latest_invoice.confirmation_secret" \ -d off_session=true ``` ### 継続支払いの決済情報を保存して再利用する 保存されている顧客の決済情報で請求して、継続支払いを設定します。*PaymentIntent* (API object that represents your intent to collect payment from a customer, tracking charge attempts and payment state changes throughout the process) または *SetupIntent* (The Setup Intents API lets you build dynamic flows for collecting payment method details for future payments. It tracks the lifecycle of a payment setup flow and can trigger additional authentication steps if required by law or by the payment method) を使用して、決済の詳細をキャプチャーします。次に、これらのオブジェクトに関連付けられている *client secret* (The client secret is a unique key returned from Stripe as part of a PaymentIntent. This key lets the client access important fields from the PaymentIntent (status, amount, currency) while hiding sensitive ones (metadata, customer)) を使用して、顧客に後で請求します。この方法は、サブスクリプションを使用しない場合や、自社のサブスクリプションロジックを実装している場合に適しています。これらの手順では、支払い方法の情報を収集して請求するために必要な作業のみを行います。[支払いの詳細を保存して再利用](https://docs.stripe.com/payments/save-and-reuse.md)するには、全体的な実装の詳細に関するガイドをご覧ください。 - \**PaymentIntents を使用して、決済フロー内で支払い情報をキャプチャーします。**即時の購入については顧客への請求をオンセッションで行いますが、請求は後で行います。このフローは、一連の継続支払いの最初の支払いを顧客に請求する場合や、サブスクリプションサービスの 1 回限りの設定手数料を請求する場合に適しています。 - \**SetupIntents を使用して、決済フローの外部で支払い情報をキャプチャーします。**顧客から詳細を収集して、SetupIntent に保存します。このフローは、後で請求する予定の顧客のアカウント登録時に支払い情報をキャプチャーする場合や、無料のトライアルを設定する場合に適しています。 #### 決済時に決済の詳細を保存する (PaymentIntents) 1. 決済プロセスの一部として、PaymentIntent を作成して、`setup_future_usage` を渡します。大半の場合は、継続支払いに `off_session` を使用します。[今後の支払いの最適化](https://docs.stripe.com/payments/payment-intents.md#future-usage)の詳細をご覧ください。 #### Accounts v2 ```curl curl https://api.stripe.com/v1/payment_intents \ -u "<>:" \ -d "customer_account={{CUSTOMERACCOUNT_ID}}" \ -d amount=1099 \ -d currency=usd \ -d setup_future_usage=off_session \ -d "automatic_payment_methods[enabled]=true" ``` #### Customers v1 ```curl curl https://api.stripe.com/v1/payment_intents \ -u "<>:" \ -d "customer={{CUSTOMER_ID}}" \ -d amount=1099 \ -d currency=usd \ -d setup_future_usage=off_session \ -d "automatic_payment_methods[enabled]=true" ``` 2. 決済手段の情報を保存して、顧客レコードに関連付けます。Stripe Checkout を使用している場合は、`payment_intent_data` 配列で `setup_future_usage` を渡します。Checkout で[支払いの詳細](https://docs.stripe.com/payments/accept-a-payment.md?payment-ui=checkout&ui=stripe-hosted#save-payment-method-details)を保存する方法の例をご覧ください。*Elements* (A set of UI components for building a web checkout flow. They adapt to your customer's locale, validate input, and use tokenization, keeping sensitive customer data from touching your server) をご利用の場合には、[Address Element](https://docs.stripe.com/elements/address-element.md) を使用して情報をキャプチャーします。 3. 準備ができたら、顧客の決済手段の情報を取得して、別の PaymentIntent を作成して請求します。決済拒否の可能性を減らすために、`off_session` と `confirm` を `True` として渡します。これらの引数は、顧客が非対面であることを示し、即時に確定できるようにします。 #### Accounts v2 ```curl curl https://api.stripe.com/v1/payment_intents \ -u "<>:" \ -d amount=1099 \ -d currency=usd \ -d "automatic_payment_methods[enabled]=true" \ -d "customer_account={{CUSTOMERACCOUNT_ID}}" \ -d payment_method={{PAYMENT_METHOD_ID}} \ --data-urlencode "return_url=https://example.com/order/123/complete" \ -d off_session=true \ -d confirm=true ``` #### Customers v1 ```curl curl https://api.stripe.com/v1/payment_intents \ -u "<>:" \ -d amount=1099 \ -d currency=usd \ -d "automatic_payment_methods[enabled]=true" \ -d "customer={{CUSTOMER_ID}}" \ -d payment_method={{PAYMENT_METHOD_ID}} \ --data-urlencode "return_url=https://example.com/order/123/complete" \ -d off_session=true \ -d confirm=true ``` #### 決済フローの外部で決済の詳細を保存する (SetupIntents) 1. サーバー側で SetupIntent を作成し、それを特定の `customer_account` ([Accounts v2 API](https://docs.stripe.com/api/v2/core/accounts/object.md#v2_account_object-configuration-customer-applied) で作成)、または `customer` ([Customers API](https://docs.stripe.com/api/customers.md) で作成) に関連付けてください。 2. 決済情報を収集します。 - Payment Element を使用して決済の詳細を収集します。 - Address Element を使用して配送の詳細を収集します。 - 必要に応じて、Link を決済手段として追加すると、決済フローをスピードアップできます。 3. 支払いの詳細を Stripe に送信します。Stripe が顧客をリダイレクトできるようにするため、`return_url` を設定してください。必要に応じて、顧客は銀行のオーソリページなどの中間サイトにリダイレクトされてから、`return_url` にリダイレクトされます。 4. オフセッションで決済を完了する準備ができたら、`Account` または `Customer` ID および `PaymentMethod` ID を使用して `PaymentIntent` を作成してください。 ### 請求書を使用して顧客に自動的に請求する 請求書を使用して、継続支払いを処理できます。たとえば、Powdur 社では毎月、造園管理サービスを利用しています。毎月、造園業者は Powdur 社に請求書を送信して、Powdur に登録されている支払い方法に自動的に請求します。 以下のセクションでは、継続支払いの請求書を使用するためのオプションについて説明します。 ### ダッシュボードで請求書を作成する 請求書を作成して送信するには、次の手順を実行してください。 1. ダッシュボードで[請求書ページ](https://dashboard.stripe.com/invoices)に移動し、**請求書を作成**をクリックして[請求書エディター](https://dashboard.stripe.com/invoices/create)を開きます。請求書エディターを終了するたびに、Stripe は下書きを保存します (請求書の下書きを削除するには、[請求書ページ](https://dashboard.stripe.com/invoices)で請求書の横にあるオーバーフローメニュー (⋯) をクリックします)。 2. 既存の顧客を選択するか、**新しい顧客を追加**をクリックします。新規顧客の場合は、名前を入力する必要があります。オプションで、メールアドレスなどの詳細情報を追加できます。 3. (オプション) **アイテム**セクションのオーバーフローメニュー (⋯) をクリックし、**アイテムのオプション**ダイアログを開きます。請求書で使用する通貨と税金の表示オプションを選択します。 4. 単一の項目を作成するには、**単一の項目を追加**を選択します。将来に備えて商品を保存するには、**新しい商品を作成**を選択します。 5. 新しいアイテムまたは商品の**数量**と**価格**を入力します。 6. (オプション) 税率、クーポン、提供日を追加するには、各アイテムの**アイテムのオプション**をクリックします。ダッシュボードを使用して[税率](https://dashboard.stripe.com/tax-rates)や[クーポン](https://dashboard.stripe.com/coupons/create)を作成することもできます。 7. (オプション) **メモ**ボックスを使用して、顧客への追加情報を入力します。請求書のメモを編集するには、詳細ページの**メモを編集**をクリックします。 8. 請求書の送付オプションを次の中から選択します。 - **登録されている決済手段に自動的に請求する**:請求金額が、登録されている顧客の決済手段で直ちに請求されます。 - **請求書または支払いページのリンクを手動で送信する**:請求書の確定後に顧客に送信する、決済用リンクを提供します。 - **請求書をリンク付きでメールで送信する**:Stripe が決済ページへのリンクと請求書 PDF をメールで送信できるようにします - **請求書をリンクなしでメールで送信する**:Stripe が請求書 PDF のみを送信するようにします。 9. (オプション) この請求書を将来の日付で[自動的に確定](https://docs.stripe.com/invoicing/scheduled-finalization.md)するように設定するには、**送信日を設定**を選択します。または、前のステップで選択した内容に応じて、**支払い日を期日指定**または**確定日を期日指定**することもできます。 10. (オプション) **詳細設定**を展開して、[カスタムフィールド](https://docs.stripe.com/invoicing/customize.md#custom-fields)を追加します。詳細については、[正味価格と税金](https://docs.stripe.com/invoicing/taxes.md#net-price-taxes)をご覧ください。**詳細設定**を展開して、[カスタムフィールド](https://docs.stripe.com/invoicing/customize.md#custom-fields)を追加します。 11. **請求書を審査**をクリックし、メールアドレスを追加するか、編集を続行するかを決定します。請求書を送信します。 ![](https://d37ugbyn3rpeym.cloudfront.net/videos/invoice-editor-net-price-supply-date.mp4) ### API を使用して請求書を作成する [Invoices API](https://docs.stripe.com/api/invoices.md) を使用して、請求書を作成できます。商品、価格、顧客は、値が請求書と請求書アイテムに使用されるため、請求書の作成前に作成しておく必要があります。[Invoicing API を実装](https://docs.stripe.com/invoicing/integration.md)するすべての手順に関するガイドをご確認ください。また、コード作成の実践的な手順については[クイックスタート](https://docs.stripe.com/invoicing/integration/quickstart.md)をご覧ください。 API を使用して請求書を作成するには、以下の手順を実行します。 [collection_method](https://docs.stripe.com/api/invoices/object.md#invoice_object-collection_method) 属性を `send_invoice` に設定します。Stripe がインボイスを期日経過とマークできるようにするために、[days_until_due](https://docs.stripe.com/api/invoices/create.md#create_invoice-days_until_due) パラメーターを追加する必要があります。インボイスを送るときに、インボイスおよび支払い手順がメールで顧客に送信されます。 #### Accounts v2 ```curl curl https://api.stripe.com/v1/invoices \ -u "<>:" \ -d "customer_account={{CUSTOMERACCOUNT_ID}}" \ -d collection_method=send_invoice \ -d days_until_due=30 ``` #### Customers v1 ```curl curl https://api.stripe.com/v1/invoices \ -u "<>:" \ -d "customer={{CUSTOMER_ID}}" \ -d collection_method=send_invoice \ -d days_until_due=30 ``` 次に、顧客 ID、製品 `price`、`Invoice` ID を指定して請求書の項目を作成します。 請求書アイテムの最大数は 250 です。 #### Accounts v2 ```curl curl https://api.stripe.com/v1/invoiceitems \ -u "<>:" \ -d "customer_account={{CUSTOMERACCOUNT_ID}}" \ -d "pricing[price]={{PRICE_ID}}" \ -d "invoice={{INVOICE_ID}}" ``` #### Customers v1 ```curl curl https://api.stripe.com/v1/invoiceitems \ -u "<>:" \ -d "customer={{CUSTOMER_ID}}" \ -d "pricing[price]={{PRICE_ID}}" \ -d "invoice={{INVOICE_ID}}" ``` `auto_advance` を `false` に設定した場合、インボイスは、[確定する](https://docs.stripe.com/invoicing/integration/workflow-transitions.md)前であればいつでも修正できます。インボイスの下書きを確定するには、ダッシュボードを使用するか、インボイスを顧客に送信するか、またはインボイスに対する支払いを行います。また、以下のように[Finalize (確定)](https://docs.stripe.com/api/invoices/finalize.md) API を使用することもできます。 ```curl curl -X POST https://api.stripe.com/v1/invoices/{{INVOICE_ID}}/finalize \ -u "<>:" ``` 誤って請求書を作成した場合は、それを[無効](https://docs.stripe.com/invoicing/overview.md#void)にします。請求書を[回収不能](https://docs.stripe.com/invoicing/overview.md#uncollectible)とマークすることもできます。 ### 継続的な請求書をスケジュールする 継続請求書を設定する場合は、サブスクリプションを作成します。 支払いの回収方法を選択できます。 - 顧客に請求書を送信します。期日や受付可能な支払い方法などの回収条件を設定できます。 - 保存済みの支払い方法に自動的に請求します。顧客が支払い方法を保存している場合、Stripe は自動的にその手段に請求します。 ダッシュボードではサブスクリプションエディターで支払いの回収を設定します。API では [collection_method](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-collection_method) パラメーターで支払いの回収を設定します。 また、[未払いの継続請求書に関するリマインドメール](https://docs.stripe.com/billing/revenue-recovery/customer-emails.md#unpaid-recurring-invoice-reminders)を顧客に送信するように、Stripe を設定することもできます。 Stripe はサブスクリプションの [請求サイクル](https://docs.stripe.com/billing/subscriptions/billing-cycle.md) ごとに請求書を自動生成します。[サブスクリプションの請求書のライフサイクル](https://docs.stripe.com/billing/invoices/subscription.md#sub-invoice-lifecycle) の詳細をご確認ください。 ## 購入金額を複数回の支払いに分割する [Subscription Schedules API](https://docs.stripe.com/api/subscription_schedules.md) (Stripe Billing の機能) を使用して分割払いの支払いプランや後払いの支払い方法を顧客に提供します。ビジネスがメキシコを拠点としている場合は、分割払いのカード支払いを提供できます。 ### サブスクリプションのスケジュールで分割払いプランを作成する 分割払いプランを使用すると、顧客は、設定された期間の支払いを、全額を支払い終えるまで分割して支払うことができます。たとえば、The Pacific が新しい印刷機を購入する際、古い印刷機を他の出版会社に販売します。小規模の出版会社は、全額を最初に支払う資金的な余裕がないことが多いため、分割払いを使用します。 ほとんどの印刷機について、The Pacific は月あたり 1,000 ドルを請求するため、再利用可能な価格が作成されます。 ```curl curl https://api.stripe.com/v1/prices \ -u "<>:" \ -d unit_amount=100000 \ -d currency=usd \ -d product=prod_Hh99apo1OViyGW \ -d "recurring[interval]=month" ``` 印刷機の型、モデル、使用年数に応じて、The Pacific が請求する金額は異なります。この例では、1 カ月当たり 1,000 ドルを 6 カ月間請求し、合計 6,000 ドルを請求します。 #### Accounts v2 ```curl curl https://api.stripe.com/v1/subscription_schedules \ -u "<>:" \ -d "customer_account={{CUSTOMERACCOUNT_ID}}" \ -d start_date=now \ -d end_behavior=cancel \ -d "phases[0][items][0][price]={{PRICE_ID}}" \ -d "phases[0][items][0][quantity]=1" \ -d "phases[0][iterations]=6" ``` #### Customers v1 ```curl curl https://api.stripe.com/v1/subscription_schedules \ -u "<>:" \ -d "customer={{CUSTOMER_ID}}" \ -d start_date=now \ -d end_behavior=cancel \ -d "phases[0][items][0][price]={{PRICE_ID}}" \ -d "phases[0][items][0][quantity]=1" \ -d "phases[0][iterations]=6" ``` `iterations` の数に価格の期間を乗じて顧客に対する請求回数 (この例では 6 回の月次支払い) が決定されます。`end_behavior` は、最後の繰り返し終了後にサブスクリプションがどのようになるかを決定します。分割払いプランでは、サブスクリプションは必要なくなるため、`end_behavior` は `cancel` に設定されます。 まれに、The Pacific が請求する金額が通常の 1,000 ドル/月よりも少ない場合があります。この場合、`price_data` を使用して 1 回限りの使用の価格を作成します。この例では、500 ドルの価格を作成し、6 カ月間、毎月請求します。 #### Accounts v2 ```curl curl https://api.stripe.com/v1/subscription_schedules \ -u "<>:" \ -d "customer_account={{CUSTOMERACCOUNT_ID}}" \ -d start_date=now \ -d end_behavior=cancel \ -d "phases[0][items][0][price_data][currency]=usd" \ -d "phases[0][items][0][price_data][product]=prod_Hh99apo1OViyGW" \ -d "phases[0][items][0][price_data][recurring][interval]=month" \ -d "phases[0][items][0][price_data][unit_amount]=50000" \ -d "phases[0][items][0][quantity]=1" \ -d "phases[0][iterations]=6" ``` #### Customers v1 ```curl curl https://api.stripe.com/v1/subscription_schedules \ -u "<>:" \ -d "customer={{CUSTOMER_ID}}" \ -d start_date=now \ -d end_behavior=cancel \ -d "phases[0][items][0][price_data][currency]=usd" \ -d "phases[0][items][0][price_data][product]=prod_Hh99apo1OViyGW" \ -d "phases[0][items][0][price_data][recurring][interval]=month" \ -d "phases[0][items][0][price_data][unit_amount]=50000" \ -d "phases[0][items][0][quantity]=1" \ -d "phases[0][iterations]=6" ``` ### 後払いの支払い方法を使用する Stripe は、後払いの決済手段を複数サポートしています。これらの決済手段では、顧客は時間の経過に合わせて分割払いを行うことができます。お客様には、すぐに全額が支払われます。顧客は、その場では支払いを行わなかったり、購入総額の一部しか支払いません。後払いの決済手段は、小売業者が購入完了率を高めたり、カート内の購入額を増やしたり、クレジットカードを持っていない新規顧客にリーチするのに役立ちます。 [後払いの支払い方法についてもっと知る](https://docs.stripe.com/payments/buy-now-pay-later.md) ### クレジットカードでの分割払いを受け付ける (メキシコでのみ利用可能) ビジネスがメキシコを拠点としている場合は、カード支払いの分割払いまたは [meses sin intereses](https://docs.stripe.com/payments/meses-sin-intereses/accept-a-payment.md) を顧客に提供できます。この方法を使用する場合は、標準的なクレジットカード取引の手数料に[さらに手数料が加算](https://docs.stripe.com/payments/mx-installments.md#fees)されます。 Stripe がオンラインで提供する決済ページ ([Stripe Checkout](https://docs.stripe.com/payments/meses-sin-intereses/accept-a-payment.md?platform=web&ui=stripe-hosted))、構築済みの UI コンポーネント ([Stripe Elements](https://docs.stripe.com/payments/meses-sin-intereses/accept-a-payment.md?platform=web&ui=direct-api))、[Invoicing API](https://docs.stripe.com/payments/meses-sin-intereses/accept-a-payment.md?platform=web&ui=invoices)、[Payment Links](https://docs.stripe.com/payments/meses-sin-intereses/accept-a-payment.md?platform=no-code) を使用して、ノーコードで分割払いを受け付けます。 一部の[コネクターとプラグイン](https://docs.stripe.com/payments/mx-installments.md#connectors-and-plugins)も分割払いに対応しています。 #### meses sin interes の要件 Meses sin intereses を使用できる取引とカードには制限があります。これらのルールをご自身で実装する必要はありません。支払い方法を設定すると、Meses sin intereses の対象となるかどうかが自動的に判断されます。 - Stripe はメキシコのアカウントでのみ分割払いをサポートしています。 - 支払い方法は、メキシコで発行されたクレジットカードである必要があります。 - カードは消費者向けカードである必要があります。分割払いは、法人向けカードには対応していません。 - カードは、[サポート対象のカード発行会社](https://docs.stripe.com/payments/mx-installments.md#supported-cards)のいずれかが発行したものである必要があります。 - 通貨の値は、MXN (ペソ) である必要があります。 - 支払い総額は、[最低取引金額](https://docs.stripe.com/payments/mx-installments.md#fees)以上である必要があります。Stripe は、選択されたプランの月数に基づいて最低取引金額を指定します。ダッシュボードで、有効にする分割払いプランを指定し、[カスタムの分割払いの設定](https://docs.stripe.com/payments/meses-sin-intereses/accept-a-payment.md#custom-settings)を行うことでカスタムの最低取引金額と最高取引金額を定義できます。 ## 顧客がサブスクリプションを自身で管理できるようにする 顧客がアカウントと継続的なサブスクリプションを自身で管理するようにする場合は、カスタマーポータルを使用します。Stripe はカスタマーポータルをオンラインで提供しているため、顧客は 1 つの場所で決済の詳細を自身で管理して、請求書をダウンロードし、サブスクリプションを管理することができます。詳細については、[ノーコードのカスタマーポータルのガイド](https://docs.stripe.com/customer-management/activate-no-code-customer-portal.md)をご覧ください。 [API でカスタマーポータルを実装する](https://docs.stripe.com/customer-management/integrate-customer-portal.md) ### カスタマーポータルを設定します 1. Stripe ダッシュボードの[カスタマーポータルの設定ページ](https://dashboard.stripe.com/settings/billing/portal)で顧客のポータルリンクを有効にします。 2. 同じページで、カスタマーポータルの設定オプションを実行します。[コードを記述することなくカスタマーポータルを設定](https://docs.stripe.com/customer-management/activate-no-code-customer-portal.md)します。すべての[設定オプション](https://docs.stripe.com/customer-management/configure-portal.md)の詳細をご確認ください。 3. ポータルリンクを顧客と共有します。 4. (オプション) ブランディングをカスタマイズし、`prefilled_email` URL パラメーターをポータルリンクに追加してメールアドレスを事前入力します。 ![](https://d37ugbyn3rpeym.cloudfront.net/videos/customer_portal/PortalFunctionalityTrimmed.mp4) [デモを見る](https://billing.stripe.com/customer-portal-demo) ## 継続的な寄付を受け付ける Stripe では、継続支払いと同じ方法で継続的な寄付を受け付けることができます。たとえば、Llama House というラマ救済団体があり、支援者が毎月の継続的な寄付額を選択できるようにしたいと考えているとします。これに対応するため、Payment Links を使用して、ソーシャルメディアやメールで共有できるリンクを作成できます。また、作成したその決済用のリンクから、ダッシュボードのみを使用して、広告に追加できる QR コードや、ウェブサイトに埋め込み可能な購入ボタンを生成することもできます。 ### Payment Links で継続的な寄付を受け付ける 1. Stripe ダッシュボードで、[決済用のリンクを作成](https://dashboard.stripe.com/test/payment-links/create)します。 2. **商品またはサブスクリプション**を選択します。 3. 継続的な寄付を表す継続支払いの商品を見つけるか、追加します。 4. **詳細設定**で、行動喚起オプションを**寄付**に切り替えます。 5. リンクを作成して共有します。リンクを直接共有するか、サイトのボタンとして埋め込むか、QR コードを生成することができます。 6. [ダッシュボードの支払いの概要](https://dashboard.stripe.com/payments)で、決済用のリンクに関連付けられている支払いを追跡します。 決済用のリンクの[作成](https://docs.stripe.com/payment-links/create.md)と[共有](https://docs.stripe.com/payment-links/share.md)の詳細をご確認ください。 ## 既存のサブスクリプションを Stripe に移行する 別のシステムに既存のサブスクリプションがある場合は、Stripe Billing に移行できます。詳細については、[ガイド](https://docs.stripe.com/billing/subscriptions/migrate-subscriptions.md)をご覧ください。 ## See also - [サブスクリプションの概要を確認する](https://docs.stripe.com/billing.md) - [決済用のリンクを作成する](https://docs.stripe.com/payment-links/create.md) - [ノーコードの請求書を使ってみる](https://docs.stripe.com/invoicing/no-code-guide.md) - [支払い中に支払いの詳細を保存して支払いを事前設定する](https://docs.stripe.com/payments/save-during-payment.md) - [カードの詳細を保存して支払いを事前設定する](https://docs.stripe.com/payments/save-and-reuse.md)