コンテンツにスキップ
アカウントを作成またはサインイン
Stripe ドキュメントのロゴ
/
AI に質問する
アカウントを作成サインイン
導入方法
決済管理
売上管理
プラットフォームとマーケットプレイス
資金管理
開発者向けリソース
API & SDKヘルプ

注

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

Accept subscription payments with PayTo

Learn how to create and charge for a subscription with PayTo.

Use this guide to set up a subscription using PayTo as a payment method.

You can use the Checkout API to create and confirm a subscription with a prebuilt checkout page.

Create a product and price
Dashboard

Products (商品) は、販売しているアイテムまたはサービスを表します。Prices (価格) は、商品の価格と請求頻度を定義します。これには、商品の価格、受け付ける通貨、および 1 回限りの支払いか継続支払いかが含まれます。商品と価格が数個のみの場合は、ダッシュボードでそれらを作成および管理します。

このガイドでは、例としてストックフォトサービスを使用し、15 AUD の月次サブスクリプションを顧客に請求します。これをモデル化するには、次のようにします。

  1. 商品ページに移動し、商品を作成をクリックします。
  2. 商品の名前を入力します。オプションで説明を追加して、商品の画像をアップロードできます。
  3. 商品税コードを選択します。商品税コードの詳細をご確認ください。
  4. 継続を選択します。次に、価格に**15を入力し、通貨として**を選択します。
  5. 価格に税金を含めるかどうかを選択します。税金設定のデフォルト値を使用するか、値を手動で設定できます。この例では、自動を選択します。
  6. 請求期間で月次を選択します。
  7. その他の料金体系オプションをクリックします。次に、この例の料金体系モデルとして定額を選択します。定額料金とその他の料金体系モデルの詳細をご確認ください。
  8. 将来的に特定の価格を整理、クエリ、更新するために、内部価格の説明と検索キー 追加します。
  9. 次へをクリックします。次に、商品を追加をクリックします。

商品と価格を作成したら、価格 ID を記録しておき、後続のステップで使用できるようにします。ID は料金体系ページで price_G0FvDp6vZvdwRZ のように表示されます。

Create a Checkout Session
Server-side

Your customer must authorize you to use their bank account for future payments through Stripe Checkout. This allows you to accept PayTo payments. Add a checkout button to your website that calls a server-side endpoint to create a Checkout Session.

index.html
<html> <head> <title>Checkout</title> </head> <body> <form action="/create-checkout-session" method="POST"> <button type="submit">Checkout</button> </form> </body> </html>

Create a Checkout Session in subscription mode to collect the required information. After creating the Checkout Session, redirect your customer to the URL that the response returns.

Limit the amount on your mandates by setting amount in the payment_method_options as several banks always reject mandates without an amount specified.

Command Line
cURL
No results
curl https://api.stripe.com/v1/checkout/sessions \ -u "
sk_test_BQokikJOvBiI2HlWgH4olfQ2
:"
\ --data-urlencode success_url="https://example.com/success" \ --data-urlencode cancel_url="https://example.com/cancel" \ -d "line_items[0][price]"={{RECURRING_PRICE_ID}} \ -d "line_items[0][quantity]"=1 \ -d "payment_method_types[0]"=card \ -d "payment_method_types[1]"=payto \ -d "payment_method_options[payto][mandate_options][amount]"=1500 \ -d mode=subscription

Test your integration

以下のさまざまなテスト用 PayID と銀行口座情報を使用して、テスト API キーで PayTo の実装内容をテストします。各セットによって、本番環境でシステムが直面する各種シナリオが再現されています。

PayID説明
{any_prefix}+succeed@{any_domain}The PaymentIntent status transitions from requires_action to processing after 10 seconds, then transitions to succeeded after an additional 5 seconds. The mandate enters an active state.
{any_prefix}+decline@{any_domain}The PaymentIntent status transitions from requires_action to requires_payment_method after 10 seconds. Stripe returns the payment_method_provider_decline error code and an invalid_authorization decline code. The mandate enters an inactive state.
{any_prefix}+expire@{any_domain}The PaymentIntent status transitions from requires_action to requires_payment_method after 10 seconds. Stripe returns the payment_method_provider_decline error code and a generic_decline decline code. The mandate enters an inactive state.
{any_prefix}+insufficient_funds@{any_domain}The PaymentIntent status transitions from requires_action to processing after 10 seconds, then transitions to requires_payment_method after an additional 5 seconds. Stripe returns the payment_method_provider_decline error code and an insufficient_funds decline code. The mandate enters an inactive state.
{any_prefix}+revoke@{any_domain}The PaymentIntent status transitions from requires_action to processing after 10 seconds then to succeeded after a further 5 seconds. The mandate begins in an active state and transitions to inactive after 1 minute.
{any_prefix}+agreement_type_not_supported@{any_domain}The PaymentIntent status transitions from requires_action to requires_payment_method after 10 seconds. Stripe returns the payment_method_provider_decline error code. The mandate enters an inactive state.
このページはお役に立ちましたか。
はいいいえ
  • お困りのことがございましたら 、サポートにお問い合わせください。
  • 変更ログをご覧ください。
  • ご不明な点がございましたら、お問い合わせください。
  • LLM ですか?llms.txt を読んでください。
  • Powered by Markdoc