# PayTo でサブスクリプション支払いを受け付ける
PayTo を使用したサブスクリプションの作成と支払いの方法をご紹介します。
このガイドを使用して、支払い方法として [PayTo](https://docs.stripe.com/payments/payto.md) を使用する *サブスクリプション* (A Subscription represents the product details associated with the plan that your customer subscribes to. Allows you to charge the customer on a recurring basis) を設定します。
# Stripe ホスト型ページ
> This is a Stripe ホスト型ページ for when api-integration is checkout. View the full page at https://docs.stripe.com/billing/subscriptions/payto?api-integration=checkout.
[Checkout API](https://docs.stripe.com/api/checkout/sessions.md) を使用すると、構築済みの決済ページでサブスクリプションを作成して確認できます。
## 商品と価格を作成する [ダッシュボード]
[Products (商品)](https://docs.stripe.com/api/products.md) は、販売しているアイテムまたはサービスを表します。[Prices (価格)](https://docs.stripe.com/api/prices.md) は、商品の価格と請求頻度を定義します。これには、商品の価格、受け付ける通貨、および 1 回限りの支払いか継続支払いかが含まれます。商品と価格が数個のみの場合は、ダッシュボードでそれらを作成および管理します。
このガイドでは、例としてストックフォトサービスを使用し、15 AUD の月次サブスクリプションを顧客に請求します。これをモデル化するには、次のようにします。
1. [商品](https://dashboard.stripe.com/products?active=true)ページに移動し、**商品を作成**をクリックします。
1. 商品の**名前**を入力します。オプションで**説明**を追加して、商品の画像をアップロードできます。
1. **商品税コード**を選択します。[商品税コード](https://docs.stripe.com/tax/tax-codes.md)の詳細をご確認ください。
1. **継続**を選択します。次に、価格に**15**を入力し、通貨として**\**を選択します。
1. **価格に税金を含める**かどうかを選択します。[税金設定](https://dashboard.stripe.com/test/settings/tax)のデフォルト値を使用するか、値を手動で設定できます。この例では、**自動**を選択します。
1. **請求期間**で**月次**を選択します。
1. **その他の料金体系オプション**をクリックします。次に、この例の料金体系モデルとして**定額**を選択します。[定額料金](https://docs.stripe.com/products-prices/pricing-models.md#flat-rate)とその他の[料金体系モデル](https://docs.stripe.com/products-prices/pricing-models.md)の詳細をご確認ください。
1. 将来的に特定の価格を整理、クエリ、更新するために、内部**価格の説明**と[検索キー](https://docs.stripe.com/products-prices/manage-prices.md#lookup-keys) 追加します。
1. **次へ**をクリックします。次に、**商品を追加**をクリックします。
商品と価格を作成したら、価格 ID を記録しておき、後続のステップで使用できるようにします。ID は料金体系ページで `price_G0FvDp6vZvdwRZ` のように表示されます。
## Checkout セッションを作成する [サーバー側]
顧客は、Stripe Checkout を通じて、今後の決済に銀行口座を使用することをオーソリする必要があります。これにより、PayTo 決済を受け付けることができます。サーバーサイドエンドポイントを呼び出す決済ボタンをウェブサイトに追加し、[Checkout Session](https://docs.stripe.com/api/checkout/sessions.md) を作成します。
```html
Checkout
```
`subscription` モードで Checkout セッションを作成して、必要な情報を収集します。Checkout セッションを作成したら、レスポンスで返される [URL](https://docs.stripe.com/api/checkout/sessions/object.md#checkout_session_object-url) に顧客をリダイレクトします。
`payment_method_options` に `amount` を設定して、同意書の金額を制限します。これは、金額が指定されていない [同意書は常に拒否される](https://docs.stripe.com/payments/payto.md#bank-limits) からです。
```curl
curl https://api.stripe.com/v1/checkout/sessions \
-u "<>:" \
--data-urlencode "success_url=https://example.com/success" \
-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
```
## 実装内容をテストする
以下のさまざまなテスト用 PayID と銀行口座情報を使用して、テスト API キーで PayTo の実装内容をテストします。各セットによって、本番環境でシステムが直面する各種シナリオが再現されています。
#### PayID
| PayID | 説明 |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `{any_prefix}+succeed@{any_domain}` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `processing` に移行し、さらに 5 秒後に `succeeded` に移行します。同意書は `active` 状態になります。 |
| `{any_prefix}+decline@{any_domain}` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `requires_payment_method` に移行します。Stripe は `payment_method_provider_decline` エラーコードと `invalid_authorization` 拒否コードを返します。同意書は `inactive` 状態になります。 |
| `{any_prefix}+expire@{any_domain}` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `requires_payment_method` に移行します。Stripe は `payment_method_provider_decline` エラーコードと `generic_decline` 拒否コードを返します。同意書は `inactive` 状態になります。 |
| `{any_prefix}+insufficient_funds@{any_domain}` | PaymentIntent のステータスは、10 秒後に `requires_action` から `processing` に移行し、さらに 5 秒後に `requires_payment_method` に移行します。Stripe は、 `payment_method_provider_decline` エラーコードと `insufficient_funds` 拒否コードを返します。同意書のステータスは `inactive` になります。 |
| `{any_prefix}+revoke@{any_domain}` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `processing` に移行し、さらに 5 秒後に `succeeded` に移行します。同意書は `active` 状態で開始し、1 分後に `inactive` 状態に移行します。 |
| `{any_prefix}+agreement_type_not_supported@{any_domain}` | PaymentIntent のステータスは、10 秒後に `requires_action` から `requires_payment_method` に移行します。Stripe は、`payment_method_provider_decline` エラーコードを返します。同意書のステータスは `inactive` になります。 |
#### 口座番号 + BSB 番号
| BSB 番号 | 口座番号 | 説明 |
| -------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `000000` | `000123456` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `processing` に移行し、さらに 5 秒後に `succeeded` に移行します。同意書は `active` 状態になります。 |
| `000000` | `333333335` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `requires_payment_method` に移行します。Stripe は `payment_method_provider_decline` エラーコードと `invalid_authorization` 拒否コードを返します。同意書は `inactive` 状態になります。 |
| `000000` | `333333337` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `requires_payment_method` に移行します。Stripe は `payment_method_provider_decline` エラーコードと `generic_decline` 拒否コードを返します。同意書は `inactive` 状態になります。 |
| `000000` | `222222227` | PaymentIntent のステータスは、10 秒後に `requires_action` から `processing` に移行し、さらに 5 秒後に `requires_payment_method` に移行します。Stripe は、 `payment_method_provider_decline` エラーコードと `insufficient_funds` 拒否コードを返します。同意書のステータスは `inactive` になります。 |
| `000000` | `444444447` | PaymentIntent のステータスは `requires_action` から 10 秒後に `processing` に移行し、さらに 5 秒後に `succeeded` に移行します。 同意書は `active` の状態で開始し、1 分後に `inactive` に移行します。 |
| `000000` | `666666667` | PaymentIntent のステータスは、10 秒後に `requires_action` から `requires_payment_method` に移行します。Stripe は、`payment_method_provider_decline` エラーコードを返します。同意書のステータスは `inactive` になります。 |
# Subscriptions API
> This is a Subscriptions API for when api-integration is subscription. View the full page at https://docs.stripe.com/billing/subscriptions/payto?api-integration=subscription.
2 回の API コールでサブスクリプションを作成および確認します。[最初の API コール](https://docs.stripe.com/billing/subscriptions/payto.md#pi-create-subscription) では、顧客情報と商品情報を [Subscriptions API](https://docs.stripe.com/api/subscriptions.md) に送信し、1 回の呼び出しでサブスクリプションと PaymentIntent を作成します。レスポンスには PaymentIntent ID が含まれており、この ID を使用して [Payment Intents API](https://docs.stripe.com/api/payment_intents.md) で [支払いを確認](https://docs.stripe.com/billing/subscriptions/payto.md#pi-confirm-payment) する必要があります。
## 商品と価格を作成する [ダッシュボード]
[Products (商品)](https://docs.stripe.com/api/products.md) は、販売しているアイテムまたはサービスを表します。[Prices (価格)](https://docs.stripe.com/api/prices.md) は、商品の価格と請求頻度を定義します。これには、商品の価格、受け付ける通貨、および 1 回限りの支払いか継続支払いかが含まれます。商品と価格が数個のみの場合は、ダッシュボードでそれらを作成および管理します。
このガイドでは、例としてストックフォトサービスを使用し、15 AUD の月次サブスクリプションを顧客に請求します。これをモデル化するには、次のようにします。
1. [商品](https://dashboard.stripe.com/products?active=true)ページに移動し、**商品を作成**をクリックします。
1. 商品の**名前**を入力します。オプションで**説明**を追加して、商品の画像をアップロードできます。
1. **商品税コード**を選択します。[商品税コード](https://docs.stripe.com/tax/tax-codes.md)の詳細をご確認ください。
1. **継続**を選択します。次に、価格に**15**を入力し、通貨として**\**を選択します。
1. **価格に税金を含める**かどうかを選択します。[税金設定](https://dashboard.stripe.com/test/settings/tax)のデフォルト値を使用するか、値を手動で設定できます。この例では、**自動**を選択します。
1. **請求期間**で**月次**を選択します。
1. **その他の料金体系オプション**をクリックします。次に、この例の料金体系モデルとして**定額**を選択します。[定額料金](https://docs.stripe.com/products-prices/pricing-models.md#flat-rate)とその他の[料金体系モデル](https://docs.stripe.com/products-prices/pricing-models.md)の詳細をご確認ください。
1. 将来的に特定の価格を整理、クエリ、更新するために、内部**価格の説明**と[検索キー](https://docs.stripe.com/products-prices/manage-prices.md#lookup-keys) 追加します。
1. **次へ**をクリックします。次に、**商品を追加**をクリックします。
商品と価格を作成したら、価格 ID を記録しておき、後続のステップで使用できるようにします。ID は料金体系ページで `price_G0FvDp6vZvdwRZ` のように表示されます。
## サブスクリプションを作成する [サーバー側]
`default_incomplete` の値を指定した [payment_behavior](https://docs.stripe.com/api/subscriptions/create.md#create_subscription-payment_behavior) パラメーターを指定して、価格と顧客のステータスが `incomplete` の [サブスクリプション](https://docs.stripe.com/api/subscriptions.md) を作成します。サブスクリプションが有効化されたときに支払い方法を保存するには、 `payment_settings.save_default_payment_method=on_subscription` パラメーターを設定します。
`payment_method_options` に `amount` を設定して、同意書の金額を制限します。これは、金額が指定されていない [同意書は常に拒否される](https://docs.stripe.com/payments/payto.md#bank-limits) からです。
```curl
curl https://api.stripe.com/v1/subscriptions \
-u "<>:" \
-d customer={{CUSTOMER_ID}} \
-d payment_behavior=default_incomplete \
-d "items[0][price]={{PRICE_ID}}" \
-d "payment_settings[save_default_payment_method]=on_subscription" \
-d "payment_settings[payment_method_options][payto][mandate_options][amount]=1500" \
-d "expand[0]=latest_invoice.payments" \
-d "expand[1]=latest_invoice.confirmation_secret"
```
レスポンスには *サブスクリプション* (A Subscription represents the product details associated with the plan that your customer subscribes to. Allows you to charge the customer on a recurring basis) の最初の [Invoice](https://docs.stripe.com/api/invoices.md) が含まれています。これには請求書の支払い情報が含まれており、請求書用に Stripe が生成したデフォルトの PaymentIntent と、クライアント側で安全に支払いを完了するために使用できる確認用シークレットが含まれています(PaymentIntent オブジェクト全体を渡す必要はありません)。支払いを完了するには `latest_invoice.confirmation_secret.client_secret` をフロントエンドに返してください。支払いを確認するために使用する PaymentIntent ID は `latest_invoice.payments` から取得します。
## 支払いを確定する [サーバー側]
サブスクリプションのレスポンスから取得した PaymentIntent ID を使用して、[PaymentIntents](https://docs.stripe.com/api/payment_intents.md) で支払いを確認します。その後、PaymentIntent ID を URL パスに追加し、`payment_method_types` パラメータの値を `payto` に設定します。
```curl
curl https://api.stripe.com/v1/payment_intents/:id/confirm \
-u "<>:" \
-d "payment_method_data[type]=payto" \
--data-urlencode "return_url=https://www.stripe.com" \
-d "mandate_data[customer_acceptance][type]=online" \
-d "mandate_data[customer_acceptance][online][ip_address]=127.0.0.0" \
-d "mandate_data[customer_acceptance][online][user_agent]=device" \
-d "mandate_data[customer_acceptance][accepted_at]=1660000000"
```
PaymentIntent のレスポンスにはステータス `requires_action` が含まれます。これは、PaymentIntent を完了するにはユーザーが PayTo の認証を行う必要があることを示します。支払いが成功すると、サブスクリプションは有効になり、その支払い方法がデフォルトの支払い方法として保存されます。
## 実装内容をテストする
以下のさまざまなテスト用 PayID と銀行口座情報を使用して、テスト API キーで PayTo の実装内容をテストします。各セットによって、本番環境でシステムが直面する各種シナリオが再現されています。
#### PayID
| PayID | 説明 |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `{any_prefix}+succeed@{any_domain}` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `processing` に移行し、さらに 5 秒後に `succeeded` に移行します。同意書は `active` 状態になります。 |
| `{any_prefix}+decline@{any_domain}` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `requires_payment_method` に移行します。Stripe は `payment_method_provider_decline` エラーコードと `invalid_authorization` 拒否コードを返します。同意書は `inactive` 状態になります。 |
| `{any_prefix}+expire@{any_domain}` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `requires_payment_method` に移行します。Stripe は `payment_method_provider_decline` エラーコードと `generic_decline` 拒否コードを返します。同意書は `inactive` 状態になります。 |
| `{any_prefix}+insufficient_funds@{any_domain}` | PaymentIntent のステータスは、10 秒後に `requires_action` から `processing` に移行し、さらに 5 秒後に `requires_payment_method` に移行します。Stripe は、 `payment_method_provider_decline` エラーコードと `insufficient_funds` 拒否コードを返します。同意書のステータスは `inactive` になります。 |
| `{any_prefix}+revoke@{any_domain}` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `processing` に移行し、さらに 5 秒後に `succeeded` に移行します。同意書は `active` 状態で開始し、1 分後に `inactive` 状態に移行します。 |
| `{any_prefix}+agreement_type_not_supported@{any_domain}` | PaymentIntent のステータスは、10 秒後に `requires_action` から `requires_payment_method` に移行します。Stripe は、`payment_method_provider_decline` エラーコードを返します。同意書のステータスは `inactive` になります。 |
#### 口座番号 + BSB 番号
| BSB 番号 | 口座番号 | 説明 |
| -------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `000000` | `000123456` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `processing` に移行し、さらに 5 秒後に `succeeded` に移行します。同意書は `active` 状態になります。 |
| `000000` | `333333335` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `requires_payment_method` に移行します。Stripe は `payment_method_provider_decline` エラーコードと `invalid_authorization` 拒否コードを返します。同意書は `inactive` 状態になります。 |
| `000000` | `333333337` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `requires_payment_method` に移行します。Stripe は `payment_method_provider_decline` エラーコードと `generic_decline` 拒否コードを返します。同意書は `inactive` 状態になります。 |
| `000000` | `222222227` | PaymentIntent のステータスは、10 秒後に `requires_action` から `processing` に移行し、さらに 5 秒後に `requires_payment_method` に移行します。Stripe は、 `payment_method_provider_decline` エラーコードと `insufficient_funds` 拒否コードを返します。同意書のステータスは `inactive` になります。 |
| `000000` | `444444447` | PaymentIntent のステータスは `requires_action` から 10 秒後に `processing` に移行し、さらに 5 秒後に `succeeded` に移行します。 同意書は `active` の状態で開始し、1 分後に `inactive` に移行します。 |
| `000000` | `666666667` | PaymentIntent のステータスは、10 秒後に `requires_action` から `requires_payment_method` に移行します。Stripe は、`payment_method_provider_decline` エラーコードを返します。同意書のステータスは `inactive` になります。 |
# SetupIntents API
> This is a SetupIntents API for when api-integration is setupintents. View the full page at https://docs.stripe.com/billing/subscriptions/payto?api-integration=setupintents.
2 つの API コールを使用してサブスクリプションを作成し、確定します。[最初の API コール](https://docs.stripe.com/billing/subscriptions/payto.md#create-setup-intent) では [Setup Intents API](https://docs.stripe.com/api/setup_intents.md) を使用して、支払い方法として PayTo を設定します。[2 つ目の API コール](https://docs.stripe.com/billing/subscriptions/payto.md#create-subscription) では、顧客、商品、支払い方法の情報を [Subscriptions API](https://docs.stripe.com/api/subscriptions.md) に送信して、サブスクリプションを作成し、1 回のコールで支払いを確定します。
## 商品と価格を作成する [ダッシュボード]
[Products (商品)](https://docs.stripe.com/api/products.md) は、販売しているアイテムまたはサービスを表します。[Prices (価格)](https://docs.stripe.com/api/prices.md) は、商品の価格と請求頻度を定義します。これには、商品の価格、受け付ける通貨、および 1 回限りの支払いか継続支払いかが含まれます。商品と価格が数個のみの場合は、ダッシュボードでそれらを作成および管理します。
このガイドでは、例としてストックフォトサービスを使用し、15 AUD の月次サブスクリプションを顧客に請求します。これをモデル化するには、次のようにします。
1. [商品](https://dashboard.stripe.com/products?active=true)ページに移動し、**商品を作成**をクリックします。
1. 商品の**名前**を入力します。オプションで**説明**を追加して、商品の画像をアップロードできます。
1. **商品税コード**を選択します。[商品税コード](https://docs.stripe.com/tax/tax-codes.md)の詳細をご確認ください。
1. **継続**を選択します。次に、価格に**15**を入力し、通貨として**\**を選択します。
1. **価格に税金を含める**かどうかを選択します。[税金設定](https://dashboard.stripe.com/test/settings/tax)のデフォルト値を使用するか、値を手動で設定できます。この例では、**自動**を選択します。
1. **請求期間**で**月次**を選択します。
1. **その他の料金体系オプション**をクリックします。次に、この例の料金体系モデルとして**定額**を選択します。[定額料金](https://docs.stripe.com/products-prices/pricing-models.md#flat-rate)とその他の[料金体系モデル](https://docs.stripe.com/products-prices/pricing-models.md)の詳細をご確認ください。
1. 将来的に特定の価格を整理、クエリ、更新するために、内部**価格の説明**と[検索キー](https://docs.stripe.com/products-prices/manage-prices.md#lookup-keys) 追加します。
1. **次へ**をクリックします。次に、**商品を追加**をクリックします。
商品と価格を作成したら、価格 ID を記録しておき、後続のステップで使用できるようにします。ID は料金体系ページで `price_G0FvDp6vZvdwRZ` のように表示されます。
## SetupIntent を作成する [サーバー側]
今後の支払いに備えて顧客の支払い方法を保存するために、[SetupIntent](https://docs.stripe.com/api/setup_intents.md) を作成します。`SetupIntent` はこの設定プロセスのステップを追跡します。
`payment_method_options` に `amount` を設定して、同意書の金額を制限します。これは、金額が指定されていない [同意書は常に拒否される](https://docs.stripe.com/payments/payto.md#bank-limits) からです。
```curl
curl https://api.stripe.com/v1/setup_intents \
-u "<>:" \
-d confirm=true \
--data-urlencode "return_url=https://www.stripe.com" \
-d usage=off_session \
-d customer=cus_ODQluYFNl44ODI \
-d "payment_method_data[type]=payto" \
-d "payment_method_types[]=payto" \
-d "payment_method_options[payto][mandate_options][amount]=1500" \
-d "mandate_data[customer_acceptance][type]=online" \
-d "mandate_data[customer_acceptance][online][ip_address]=127.0.0.0" \
-d "mandate_data[customer_acceptance][online][user_agent]=device"
```
SetupIntent オブジェクトには `client_secret` が含まれています。これは一意のキーで、買い手を PayTo にリダイレクトして同意書を承認するために、クライアント側で Stripe.js に渡す必要があります。
## サブスクリプションを作成する [サーバー側]
価格と顧客を含むサブスクリプションを作成します。`default_payment_method` パラメーターの値を SetupIntent から返された PaymentMethod ID に設定します。
```curl
curl https://api.stripe.com/v1/subscriptions \
-u "<>:" \
-d customer={{CUSTOMER_ID}} \
-d "items[0][price]={{PRICE_ID}}" \
-d default_payment_method={{PAYMENT_METHOD_ID}} \
-d off_session=true
```
サブスクリプションを作成すると、事前設定されたデフォルトの支払い方法があるため、顧客に自動的に請求されます。支払いが成功すると、Stripe ダッシュボードのステータスが **有効** に変わります。すでに設定済みの価格によって以降の請求額が決まります。
## 実装内容をテストする
以下のさまざまなテスト用 PayID と銀行口座情報を使用して、テスト API キーで PayTo の実装内容をテストします。各セットによって、本番環境でシステムが直面する各種シナリオが再現されています。
#### PayID
| PayID | 説明 |
| -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `{any_prefix}+succeed@{any_domain}` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `processing` に移行し、さらに 5 秒後に `succeeded` に移行します。同意書は `active` 状態になります。 |
| `{any_prefix}+decline@{any_domain}` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `requires_payment_method` に移行します。Stripe は `payment_method_provider_decline` エラーコードと `invalid_authorization` 拒否コードを返します。同意書は `inactive` 状態になります。 |
| `{any_prefix}+expire@{any_domain}` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `requires_payment_method` に移行します。Stripe は `payment_method_provider_decline` エラーコードと `generic_decline` 拒否コードを返します。同意書は `inactive` 状態になります。 |
| `{any_prefix}+insufficient_funds@{any_domain}` | PaymentIntent のステータスは、10 秒後に `requires_action` から `processing` に移行し、さらに 5 秒後に `requires_payment_method` に移行します。Stripe は、 `payment_method_provider_decline` エラーコードと `insufficient_funds` 拒否コードを返します。同意書のステータスは `inactive` になります。 |
| `{any_prefix}+revoke@{any_domain}` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `processing` に移行し、さらに 5 秒後に `succeeded` に移行します。同意書は `active` 状態で開始し、1 分後に `inactive` 状態に移行します。 |
| `{any_prefix}+agreement_type_not_supported@{any_domain}` | PaymentIntent のステータスは、10 秒後に `requires_action` から `requires_payment_method` に移行します。Stripe は、`payment_method_provider_decline` エラーコードを返します。同意書のステータスは `inactive` になります。 |
#### 口座番号 + BSB 番号
| BSB 番号 | 口座番号 | 説明 |
| -------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `000000` | `000123456` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `processing` に移行し、さらに 5 秒後に `succeeded` に移行します。同意書は `active` 状態になります。 |
| `000000` | `333333335` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `requires_payment_method` に移行します。Stripe は `payment_method_provider_decline` エラーコードと `invalid_authorization` 拒否コードを返します。同意書は `inactive` 状態になります。 |
| `000000` | `333333337` | PaymentIntent のステータスは、`requires_action` から 10 秒後に `requires_payment_method` に移行します。Stripe は `payment_method_provider_decline` エラーコードと `generic_decline` 拒否コードを返します。同意書は `inactive` 状態になります。 |
| `000000` | `222222227` | PaymentIntent のステータスは、10 秒後に `requires_action` から `processing` に移行し、さらに 5 秒後に `requires_payment_method` に移行します。Stripe は、 `payment_method_provider_decline` エラーコードと `insufficient_funds` 拒否コードを返します。同意書のステータスは `inactive` になります。 |
| `000000` | `444444447` | PaymentIntent のステータスは `requires_action` から 10 秒後に `processing` に移行し、さらに 5 秒後に `succeeded` に移行します。 同意書は `active` の状態で開始し、1 分後に `inactive` に移行します。 |
| `000000` | `666666667` | PaymentIntent のステータスは、10 秒後に `requires_action` から `requires_payment_method` に移行します。Stripe は、`payment_method_provider_decline` エラーコードを返します。同意書のステータスは `inactive` になります。 |