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 priceDashboard
Products (商品) は、販売しているアイテムまたはサービスを表します。Prices (価格) は、商品の価格と請求頻度を定義します。これには、商品の価格、受け付ける通貨、および 1 回限りの支払いか継続支払いかが含まれます。商品と価格が数個のみの場合は、ダッシュボードでそれらを作成および管理します。
このガイドでは、例としてストックフォトサービスを使用し、15 AUD の月次サブスクリプションを顧客に請求します。これをモデル化するには、次のようにします。
- 商品ページに移動し、商品を作成をクリックします。
- 商品の名前を入力します。オプションで説明を追加して、商品の画像をアップロードできます。
- 商品税コードを選択します。商品税コードの詳細をご確認ください。
- 継続を選択します。次に、価格に**15を入力し、通貨として**を選択します。
- 価格に税金を含めるかどうかを選択します。税金設定のデフォルト値を使用するか、値を手動で設定できます。この例では、自動を選択します。
- 請求期間で月次を選択します。
- その他の料金体系オプションをクリックします。次に、この例の料金体系モデルとして定額を選択します。定額料金とその他の料金体系モデルの詳細をご確認ください。
- 将来的に特定の価格を整理、クエリ、更新するために、内部価格の説明と検索キー 追加します。
- 次へをクリックします。次に、商品を追加をクリックします。
商品と価格を作成したら、価格 ID を記録しておき、後続のステップで使用できるようにします。ID は料金体系ページで price_ のように表示されます。
Create a Checkout SessionServer-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.
<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_ as several banks always reject mandates without an amount specified.
Test your integration
以下のさまざまなテスト用 PayID と銀行口座情報を使用して、テスト API キーで PayTo の実装内容をテストします。各セットによって、本番環境でシステムが直面する各種シナリオが再現されています。