# テスト 決済をシミュレーションして導入をテストします。 テスト値を使用して取引をシミュレートし、*サンドボックス* (A sandbox is an isolated test environment that allows you to test Stripe functionality in your account without affecting your live integration. Use sandboxes to safely experiment with new features and changes) で統合をテストします。これらの取引では資金は移動しません。 [ダッシュボード](https://dashboard.stripe.com/sandboxes)のアカウント選択機能を使用して、サンドボックスにアクセスできます。 テストカードは「偽の」クレジットカードとして機能し、以下のシナリオをシミュレートできます。 - [カードブランド](https://docs.stripe.com/testing.md#cards)または[国](https://docs.stripe.com/testing.md#international-cards)別の成功した決済 - [決済拒否](https://docs.stripe.com/testing.md#declined-payments)、[不正利用](https://docs.stripe.com/testing.md#fraud-prevention)、または[無効なデータ](https://docs.stripe.com/testing.md#invalid-data)によるカードエラー - [不審請求の申し立て](https://docs.stripe.com/testing.md#disputes)と[返金](https://docs.stripe.com/testing.md#refunds) - [3D セキュア](https://docs.stripe.com/testing.md#regulatory-cards)と [PIN](https://docs.stripe.com/testing.md#terminal) による認証 サンドボックスでカード以外の支払いもテストできます。カード以外の支払いとは、クレジットカードやデビットカードではない支払い方法です。Stripe は、デジタルウォレットや銀行振込など、さまざまなカード以外の支払いオプションをサポートしています。[各決済手段](https://docs.stripe.com/testing.md#non-card-payments)には、独自の特別な値があります。 導入の負荷テストにはテスト環境を使用しないでください。[レート制限](https://docs.stripe.com/testing.md#rate-limits)に達する可能性があるためです。導入の負荷テストについては、[負荷テスト](https://docs.stripe.com/rate-limits.md#load-testing)を参照してください。 ## テストカードの使用方法 テストカードを使用する場合は、対話式でテストできる支払いフォームを提供する場合でも、テストコードを作成する場合でも、すべての API コールで必ず[テスト API キー](https://docs.stripe.com/keys.md#obtain-api-keys)を使用してください。 > #### 実際のカード詳細を使用しない > > 実際のカード詳細は使用しないでください。実際の決済手段の情報を使用して本番環境でテストすることは、[Stripe 利用規約](https://stripe.com/legal/ssa#1-your-stripe-account)で禁止されています。テスト API キーと以下のカード番号を使用してください。 ### 対話式でテストする 対話式でテストする場合は、[4242 4242 4242 4242](https://docs.stripe.com/testing.md?testing-method=card-numbers#visa) などのカード番号を使用します。ダッシュボードまたは決済フォームにカード番号を入力します。 - 有効な将来の日付を使用します (**12/34** など)。 - 任意の 3 桁 (American Express カードの場合は 4 桁) のセキュリティコードを使用します。 - その他のフォームフィールドには任意の値を使用します。 ### テストコード テストコードを記述する際には、カード番号の代わりに [pm_card_visa](https://docs.stripe.com/testing.md?testing-method=payment-methods#visa) などの `PaymentMethod` を使用します。テスト環境であっても、API コールまたはサーバー側のコードで直接、カード番号を使用することはお勧めしません。使用すると、本番環境に移行するときにコードの PCI 準拠が損なわれる可能性があります。デフォルトでは、`PaymentMethod` は *Customer* に関連付けられていません。 ```curl curl https://api.stripe.com/v1/payment_intents \ -u "<>:" \ -d amount=500 \ -d currency=gbp \ -d payment_method=pm_card_visa \ -d "payment_method_types[]"=card ``` 導入を本番に移行する準備ができたら、テスト用の公開可能およびシークレットの [API キー](https://docs.stripe.com/keys.md)を本番キーに置き換えてください。導入でテスト API キーがまだ使用されている場合は、本番決済を処理できません。本番環境のシークレットキーは、シークレットボールトまたは環境変数に保存してください。バージョン管理にチェックインされたソースコードや設定ファイルにキーを保存しないでください。本番キーを安全に使用する方法については、[シークレット API キー管理のベストプラクティス](https://docs.stripe.com/keys-best-practices.md)を参照してください。 ## カードブランドによる決済のシミュレーション 特定のカードブランドの決済の成功をシミュレーションするには、以下に記載されているテストカードを使用します。 国際手数料はカード発行会社の国に基づいて評価されます。カード発行会社の国がアメリカではないカード (JCB やUnionPayなど) がテスト環境でも国際手数料の対象となる場合があります。 #### カード番号 | ブランド | 数字 | セキュリティコード | 日付 | | ------------------- | ------------------- | ---------- | -------- | | Visa | 4242424242424242 | 任意の 3 桁の数字 | 任意の将来の日付 | | Visa (デビット) | 4000056655665556 | 任意の 3 桁の数字 | 任意の将来の日付 | | Mastercard | 5555555555554444 | 任意の 3 桁の数字 | 任意の将来の日付 | | Mastercard (2 シリーズ) | 2223003122003222 | 任意の 3 桁の数字 | 任意の将来の日付 | | Mastercard (デビット) | 5200828282828210 | 任意の 3 桁の数字 | 任意の将来の日付 | | Mastercard (プリペイド) | 5105105105105100 | 任意の 3 桁の数字 | 任意の将来の日付 | | アメリカン・エキスプレス | 378282246310005 | 任意の 4 桁の数字 | 任意の将来の日付 | | アメリカン・エキスプレス | 371449635398431 | 任意の 4 桁の数字 | 任意の将来の日付 | | Discover | 6011111111111117 | 任意の 3 桁の数字 | 任意の将来の日付 | | Discover | 6011000990139424 | 任意の 3 桁の数字 | 任意の将来の日付 | | Discover (デビット) | 6011981111111113 | 任意の 3 桁の数字 | 任意の将来の日付 | | ダイナースクラブ | 3056930009020004 | 任意の 3 桁の数字 | 任意の将来の日付 | | ダイナースクラブ (14 桁のカード) | 36227206271667 | 任意の 3 桁の数字 | 任意の将来の日付 | | BCcard と DinaCard | 6555900000604105 | 任意の 3 桁の数字 | 任意の将来の日付 | | JCB | 3566002020360505 | 任意の 3 桁の数字 | 任意の将来の日付 | | UnionPay | 6200000000000005 | 任意の 3 桁の数字 | 任意の将来の日付 | | UnionPay (デビット) | 6200000000000047 | 任意の 3 桁の数字 | 任意の将来の日付 | | UnionPay (19 桁のカード) | 6205500000000000004 | 任意の 3 桁の数字 | 任意の将来の日付 | #### PaymentMethods | ブランド | PaymentMethod | | ------------------ | ---------------------------- | | Visa | `pm_card_visa` | | Visa (デビット) | `pm_card_visa_debit` | | Mastercard | `pm_card_mastercard` | | Mastercard (デビット) | `pm_card_mastercard_debit` | | Mastercard (プリペイド) | `pm_card_mastercard_prepaid` | | アメリカン・エキスプレス | `pm_card_amex` | | Discover | `pm_card_discover` | | ダイナースクラブ | `pm_card_diners` | | JCB | `pm_card_jcb` | | UnionPay | `pm_card_unionpay` | #### トークン ほとんどの実装ではトークンが使用されなくなっていますが、必要に応じて [tok_visa](https://docs.stripe.com/testing.md?testing-method=tokens#visa) などのテスト用トークンを使用できます。 | ブランド | トークン | | ------------------ | ------------------------ | | Visa | `tok_visa` | | Visa (デビット) | `tok_visa_debit` | | Mastercard | `tok_mastercard` | | Mastercard (デビット) | `tok_mastercard_debit` | | Mastercard (プリペイド) | `tok_mastercard_prepaid` | | アメリカン・エキスプレス | `tok_amex` | | Discover | `tok_discover` | | ダイナースクラブ | `tok_diners` | | JCB | `tok_jcb` | | UnionPay | `tok_unionpay` | 大半の Cartes Bancaires および eftpos のカードは Visa または Mastercard とブランド提携しています。次の表のテストカードは、ブランド提携カードによる決済の成功をシミュレーションします。 #### カード番号 | ブランド / 提携ブランド | 数字 | セキュリティコード | 日付 | | --------------------------- | ---------------- | ---------- | -------- | | Cartes Bancaires/Visa | 4000002500001001 | 任意の 3 桁の数字 | 任意の将来の日付 | | Cartes Bancaires/Mastercard | 5555552500001001 | 任意の 3 桁の数字 | 任意の将来の日付 | | eftpos オーストラリア/Visa | 4000050360000001 | 任意の 3 桁の数字 | 任意の将来の日付 | | eftpos オーストラリア/Mastercard | 5555050360000080 | 任意の 3 桁の数字 | 任意の将来の日付 | #### PaymentMethods | ブランド | PaymentMethod | | --------------------------- | -------------------------------------------- | | Cartes Bancaires/Visa | `pm_card_visa_cartesBancaires` | | Cartes Bancaires/Mastercard | `pm_card_mastercard_cartesBancaires` | | eftpos オーストラリア/Visa | `pm_card_visa_debit_eftposAuCoBranded` | | eftpos オーストラリア/Mastercard | `pm_card_mastercard_debit_eftposAuCoBranded` | #### トークン ほとんどの実装ではトークンが使用されなくなっていますが、必要に応じて [tok_visa](https://docs.stripe.com/testing.md?testing-method=tokens#visa) などのテスト用トークンを使用できます。 | ブランド | トークン | | --------------------------- | ---------------------------------------- | | Cartes Bancaires/Visa | `tok_visa_cartesBancaires` | | Cartes Bancaires/Mastercard | `tok_mastercard_cartesBancaires` | | eftpos オーストラリア/Visa | `tok_visa_debit_eftposAuCoBranded` | | eftpos オーストラリア/Mastercard | `tok_mastercard_debit_eftposAuCoBranded` | ## 国別の決済のシミュレーション 特定の国の決済の成功をシミュレーションするには、以降のセクションに記載されているテストカードを使用します。 > *強力な顧客認証 (SCA)* (Strong Customer Authentication (SCA) is a regulatory requirement in effect as of September 14, 2019, that impacts many European online payments. It requires customers to use two-factor authentication like 3D Secure to verify their purchase) 規制により、*欧州経済領域 (EEA)* (The European Economic Area is a regional single market with free movement of labor, goods, and capital. It encompasses the European Union member states and three additional states that are part of the European Free Trade Association) 内のオンライン決済では *3D セキュア* (3D Secure (3DS) provides an additional layer of authentication for credit card transactions that protects businesses from liability for fraudulent card payments) 認証が必要です。ヨーロッパおよび中東セクションに記載されているテストカードは、認証なしで成功する決済をシミュレーションします。[3D セキュアテストカード](https://docs.stripe.com/testing.md#regulatory-cards)を使用して、認証シナリオもテストすることをお勧めします。 #### カード番号 | 国 | 数字 | ブランド | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | ------------ | | **アメリカ大陸** | | アメリカ (US) | 4242424242424242 | Visa | | アルゼンチン (AR) | 4000000320000021 | Visa | | ブラジル (BR) | 4000000760000002 | Visa | | カナダ (CA) | 4000001240000000 | Visa | | チリ (CL) | 4000001520000001 | Visa | | コロンビア (CO) | 4000001700000003 | Visa | | コスタリカ (CR) | 4000001880000005 | Visa | | エクアドル (EC) | 4000002180000000 | Visa | | メキシコ (MX) | 4000004840008001 | Visa | | メキシコ (MX) | 5062210000000009 | Carnet | | パナマ (PA) | 4000005910000000 | Visa | | パラグアイ (PY) | 4000006000000066 | Visa | | ペルー (PE) | 4000006040000068 | Visa | | ウルグアイ (UY) | 4000008580000003 | Visa | | **ヨーロッパ・中東** | | アラブ首長国連邦 (AE) | 4000007840000001 | Visa | | アラブ首長国連邦 (AE) | 5200007840000022 | Mastercard | | オーストリア (AT) | 4000000400000008 | Visa | | ベルギー (BE) | 4000000560000004 | Visa | | ブルガリア (BG) | 4000001000000000 | Visa | | ベラルーシ (BY) | 4000001120000005 | Visa | | クロアチア (HR) | 4000001910000009 | Visa | | キプロス (CY) | 4000001960000008 | Visa | | チェコ共和国 (CZ) | 4000002030000002 | Visa | | デンマーク (DK) | 4000002080000001 | Visa | | エストニア (EE) | 4000002330000009 | Visa | | フィンランド (FI) | 4000002460000001 | Visa | | フランス (FR) | 4000002500000003 | Visa | | ドイツ (DE) | 4000002760000016 | Visa | | ジブラルタル (GI) | 4000002920000005 | Visa | | ギリシャ (GR) | 4000003000000030 | Visa | | ハンガリー (HU) | 4000003480000005 | Visa | | アイルランド (IE) | 4000003720000005 | Visa | | イタリア (IT) | 4000003800000008 | Visa | | ラトビア (LV) | 4000004280000005 | Visa | | リヒテンシュタイン (LI) | 4000004380000004 | Visa | | リトアニア (LT) | 4000004400000000 | Visa | | ルクセンブルク (LU) | 4000004420000006 | Visa | | マルタ (MT) | 4000004700000007 | Visa | | オランダ (NL) | 4000005280000002 | Visa | | ノルウェー (NO) | 4000005780000007 | Visa | | ポーランド (PL) | 4000006160000005 | Visa | | ポルトガル (PT) | 4000006200000007 | Visa | | ルーマニア (RO) | 4000006420000001 | Visa | | サウジアラビア (SA) | 4000006820000007 | Visa | | スロベニア (SI) | 4000007050000006 | Visa | | スロバキア (SK) | 4000007030000001 | Visa | | スペイン (ES) | 4000007240000007 | Visa | | スウェーデン (SE) | 4000007520000008 | Visa | | スイス (CH) | 4000007560000009 | Visa | | イギリス (GB) | 4000008260000000 | Visa | | イギリス (GB) | 4000058260000005 | Visa (デビット) | | イギリス (GB) | 5555558265554449 | Mastercard | | **アジア太平洋** > 同意書と引き落としの事前通知が必要なサブスクリプションをテストするには、[インド継続決済](https://docs.stripe.com/india-recurring-payments.md?integration=paymentIntents-setupIntents#testing)をご覧ください。 | | オーストラリア (AU) | 4000000360000006 | Visa | | 中国 (CN) | 4000001560000002 | Visa | | 香港 (HK) | 4000003440000004 | Visa | | インド (IN) | 4000003560000008 | Visa | | 日本 (JP) | 4000003920000003 | Visa | | 日本 (JP) | 3530111333300000 | JCB | | マレーシア (MY) | 4000004580000002 | Visa | | ニュージーランド (NZ) | 4000005540000008 | Visa | | シンガポール (SG) | 4000007020000003 | Visa | | 台湾 (TW) | 4000001580000008 | Visa | | タイ (TH) | 4000007640000003 | Visa (クレジット) | | タイ (TH) | 4000057640000008 | Visa (デビット) | #### PaymentMethods | 国 | PaymentMethod | ブランド | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | ------------ | | **アメリカ大陸** | | アメリカ (US) | `pm_card_us` | Visa | | アルゼンチン (AR) | `pm_card_ar` | Visa | | ブラジル (BR) | `pm_card_br` | Visa | | カナダ (CA) | `pm_card_ca` | Visa | | チリ (CL) | `pm_card_cl` | Visa | | コロンビア (CO) | `pm_card_co` | Visa | | コスタリカ (CR) | `pm_card_cr` | Visa | | エクアドル (EC) | `pm_card_ec` | Visa | | メキシコ (MX) | `pm_card_mx` | Visa | | パナマ (PA) | `pm_card_pa` | Visa | | パラグアイ (PY) | `pm_card_py` | Visa | | ペルー (PE) | `pm_card_pe` | Visa | | ウルグアイ (UY) | `pm_card_uy` | Visa | | **ヨーロッパ・中東** > *強力な顧客認証 (SCA)* (Strong Customer Authentication (SCA) is a regulatory requirement in effect as of September 14, 2019, that impacts many European online payments. It requires customers to use two-factor authentication like 3D Secure to verify their purchase) 規制により、*欧州経済領域 (EEA)* (The European Economic Area is a regional single market with free movement of labor, goods, and capital. It encompasses the European Union member states and three additional states that are part of the European Free Trade Association) 内のオンライン決済では *3D セキュア* (3D Secure (3DS) provides an additional layer of authentication for credit card transactions that protects businesses from liability for fraudulent card payments)認証を行う必要があります。このセクションに記載されているテストカードは、認証を行わずに成功する決済をシミュレーションします。また、[3D セキュアテストカード](https://docs.stripe.com/testing.md#regulatory-cards)を使用して、認証が必要なシナリオもテストすることをお勧めします。 | | アラブ首長国連邦 (AE) | `pm_card_ae` | Visa | | アラブ首長国連邦 (AE) | `pm_card_ae_mastercard` | Mastercard | | オーストリア (AT) | `pm_card_at` | Visa | | ベルギー (BE) | `pm_card_be` | Visa | | ブルガリア (BG) | `pm_card_bg` | Visa | | ベラルーシ (BY) | `pm_card_by` | Visa | | クロアチア (HR) | `pm_card_hr` | Visa | | キプロス (CY) | `pm_card_cy` | Visa | | チェコ共和国 (CZ) | `pm_card_cz` | Visa | | デンマーク (DK) | `pm_card_dk` | Visa | | エストニア (EE) | `pm_card_ee` | Visa | | フィンランド (FI) | `pm_card_fi` | Visa | | フランス (FR) | `pm_card_fr` | Visa | | ドイツ (DE) | `pm_card_de` | Visa | | ジブラルタル (GI) | `pm_card_gi` | Visa | | ギリシャ (GR) | `pm_card_gr` | Visa | | ハンガリー (HU) | `pm_card_hu` | Visa | | アイルランド (IE) | `pm_card_ie` | Visa | | イタリア (IT) | `pm_card_it` | Visa | | ラトビア (LV) | `pm_card_lv` | Visa | | リヒテンシュタイン (LI) | `pm_card_li` | Visa | | リトアニア (LT) | `pm_card_lt` | Visa | | ルクセンブルク (LU) | `pm_card_lu` | Visa | | マルタ (MT) | `pm_card_mt` | Visa | | オランダ (NL) | `pm_card_nl` | Visa | | ノルウェー (NO) | `pm_card_no` | Visa | | ポーランド (PL) | `pm_card_pl` | Visa | | ポルトガル (PT) | `pm_card_pt` | Visa | | ルーマニア (RO) | `pm_card_ro` | Visa | | スロベニア (SI) | `pm_card_si` | Visa | | スロバキア (SK) | `pm_card_sk` | Visa | | スペイン (ES) | `pm_card_es` | Visa | | スウェーデン (SE) | `pm_card_se` | Visa | | スイス (CH) | `pm_card_ch` | Visa | | イギリス (GB) | `pm_card_gb` | Visa | | イギリス (GB) | `pm_card_gb_debit` | Visa (デビット) | | イギリス (GB) | `pm_card_gb_mastercard` | Mastercard | | **アジア太平洋** 2 > 同意書と引き落としの事前通知が必要なサブスクリプションをテストするには、[インド継続決済](https://docs.stripe.com/india-recurring-payments.md?integration=paymentIntents-setupIntents#testing)をご覧ください。 | | オーストラリア (AU) | `pm_card_au` | Visa | | 中国 (CN) | `pm_card_cn` | Visa | | 香港 (HK) | `pm_card_hk` | Visa | | インド (IN) | `pm_card_in` | Visa | | 日本 (JP) | `pm_card_jp` | Visa | | 日本 (JP) | `pm_card_jcb` | JCB | | マレーシア (my) | `pm_card_my` | Visa | | ニュージーランド (NZ) | `pm_card_nz` | Visa | | シンガポール (SG) | `pm_card_sg` | Visa | | 台湾 (TW) | `pm_card_tw` | Visa | | タイ (TH) | `pm_card_th_credit` | Visa (クレジット) | | タイ (TH) | `pm_card_th_debit` | Visa (デビット) | #### トークン ほとんどの実装ではトークンが使用されなくなっていますが、必要に応じて [tok_visa](https://docs.stripe.com/testing.md?testing-method=tokens#visa) などのテスト用トークンを使用できます。 | 国 | トークン | ブランド | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ------------ | | **アメリカ大陸** | | アメリカ (US) | `tok_us` | Visa | | アルゼンチン (AR) | `tok_ar` | Visa | | ブラジル (BR) | `tok_br` | Visa | | カナダ (CA) | `tok_ca` | Visa | | チリ (CL) | `tok_cl` | Visa | | コロンビア (CO) | `tok_co` | Visa | | コスタリカ (CR) | `tok_cr` | Visa | | エクアドル (EC) | `tok_ec` | Visa | | メキシコ (MX) | `tok_mx` | Visa | | パナマ (PA) | `tok_pa` | Visa | | パラグアイ (PY) | `tok_py` | Visa | | ペルー (PE) | `tok_pe` | Visa | | ウルグアイ (UY) | `tok_uy` | Visa | | **ヨーロッパ・中東** | | アラブ首長国連邦 (AE) | `tok_ae` | Visa | | アラブ首長国連邦 (AE) | `tok_ae_mastercard` | Mastercard | | オーストリア (AT) | `tok_at` | Visa | | ベルギー (BE) | `tok_be` | Visa | | ブルガリア (BG) | `tok_bg` | Visa | | ベラルーシ (BY) | `tok_by` | Visa | | クロアチア (HR) | `tok_hr` | Visa | | キプロス (CY) | `tok_cy` | Visa | | チェコ共和国 (CZ) | `tok_cz` | Visa | | デンマーク (DK) | `tok_dk` | Visa | | エストニア (EE) | `tok_ee` | Visa | | フィンランド (FI) | `tok_fi` | Visa | | フランス (FR) | `tok_fr` | Visa | | ドイツ (DE) | `tok_de` | Visa | | ジブラルタル (GI) | `tok_gi` | Visa | | ギリシャ (GR) | `tok_gr` | Visa | | ハンガリー (HU) | `tok_hu` | Visa | | アイルランド (IE) | `tok_ie` | Visa | | イタリア (IT) | `tok_it` | Visa | | ラトビア (LV) | `tok_lv` | Visa | | リヒテンシュタイン (LI) | `tok_li` | Visa | | リトアニア (LT) | `tok_lt` | Visa | | ルクセンブルク (LU) | `tok_lu` | Visa | | マルタ (MT) | `tok_mt` | Visa | | オランダ (NL) | `tok_nl` | Visa | | ノルウェー (NO) | `tok_no` | Visa | | ポーランド (PL) | `tok_pl` | Visa | | ポルトガル (PT) | `tok_pt` | Visa | | ルーマニア (RO) | `tok_ro` | Visa | | スロベニア (SI) | `tok_si` | Visa | | スロバキア (SK) | `tok_sk` | Visa | | スペイン (ES) | `tok_es` | Visa | | スウェーデン (SE) | `tok_se` | Visa | | スイス (CH) | `tok_ch` | Visa | | イギリス (GB) | `tok_gb` | Visa | | イギリス (GB) | `tok_gb_debit` | Visa (デビット) | | イギリス (GB) | `tok_gb_mastercard` | Mastercard | | **アジア太平洋** > 同意書と引き落としの事前通知が必要なサブスクリプションをテストするには、[インド継続決済](https://docs.stripe.com/india-recurring-payments.md?integration=paymentIntents-setupIntents#testing)をご覧ください。 | | オーストラリア (AU) | `tok_au` | Visa | | 中国 (CN) | `tok_cn` | Visa | | 香港 (HK) | `tok_hk` | Visa | | インド (IN) | `tok_in` | Visa | | 日本 (JP) | `tok_jp` | Visa | | 日本 (JP) | `tok_jcb` | JCB | | マレーシア (my) | `tok_my` | Visa | | ニュージーランド (NZ) | `tok_nz` | Visa | | シンガポール (SG) | `tok_sg` | Visa | | 台湾 (TW) | `tok_tw` | Visa | | タイ (TH) | `tok_th_credit` | Visa (クレジット) | | タイ (TH) | `tok_th_debit` | Visa (デビット) | ## HSA または FSA カード決済のシミュレーション 以下は、HSA (医療貯蓄口座) と FSA (医療費支出口座) を使用して取引をシミュレートするためのテストカード番号です。これらの口座は一般的に医療費に使用され、これらを使用してテストすることで、アプリケーション内で医療関連の取引が適切に処理されるようになります。 #### カード番号 | ブランド/タイプ | 数字 | セキュリティコード | 日付 | | -------------- | ---------------- | ---------- | -------- | | Visa FSA | 4000051230000072 | 任意の 3 桁の数字 | 任意の将来の日付 | | Visa HSA | 4000051230000072 | 任意の 3 桁の数字 | 任意の将来の日付 | | Mastercard FSA | 5200828282828897 | 任意の 3 桁の数字 | 任意の将来の日付 | #### PaymentMethods | ブランド/タイプ | PaymentMethod | | -------------- | --------------------------------------------------- | | Visa FSA | `pm_card_debit_visaFsaProductCode` | | Visa HSA | `pm_card_debit_visaHsaProductCode` | | Mastercard FSA | `pm_card_mastercard_debit_mastercardFsaProductCode` | ## 決済拒否のシミュレーション カード発行会社がさまざまな理由で拒否する支払いをシミュレートして統合のエラー処理ロジックをテストするには、このセクションのテストカードを使用します。これらのカードは、記載されている[エラーコード](https://docs.stripe.com/error-codes.md)と[拒否コード](https://docs.stripe.com/declines/codes.md)を含む[カードエラー](https://docs.stripe.com/error-handling.md#payment-errors)を返します。 CVC の動作をテストする際は CVC を指定します。CVC を省略すると、Stripe は CVC チェックをスキップするため、チェックが失敗することはありません。誤った CVC をシミュレートするには、次の表に記載されている「Incorrect CVC decline」テストカードを使用し、任意の 3 桁の CVC を指定します。 #### カード番号 | 説明 | 数字 | エラーコード | 決済拒否コード | | --------------------- | ---------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | 一般的な決済拒否 | 4000000000000002 | [card_declined](https://docs.stripe.com/error-codes.md#card-declined) | [generic_decline](https://docs.stripe.com/declines/codes.md#generic_decline) | | 資金不足による決済拒否 | 4000000000009995 | [card_declined](https://docs.stripe.com/error-codes.md#card-declined) | [insufficient_funds](https://docs.stripe.com/declines/codes.md#insufficient_funds) | | カードの紛失による決済拒否 | 4000000000009987 | [card_declined](https://docs.stripe.com/error-codes.md#card-declined) | [lost_card](https://docs.stripe.com/declines/codes.md#lost_card) | | 盗難カードによる決済拒否 | 4000000000009979 | [card_declined](https://docs.stripe.com/error-codes.md#card-declined) | [stolen_card](https://docs.stripe.com/declines/codes.md#stolen_card) | | 有効期限切れクレジットカードによる決済拒否 | 4000000000000069 | [expired_card](https://docs.stripe.com/error-codes.md#expired-card) | 該当なし | | セキュリティコードの誤りによる決済拒否 | 4000000000000127 | [incorrect_cvc](https://docs.stripe.com/declines/codes.md#incorrect_cvc) | 該当なし | | 処理エラーによる決済拒否 | 4000000000000119 | [processing_error](https://docs.stripe.com/error-codes.md#processing-error) | 該当なし | | 番号の誤りによる決済拒否 | 4242424242424241 | [incorrect_number](https://docs.stripe.com/declines/codes.md#incorrect_number) | 該当なし | | 利用頻度の上限を超過したことによる決済拒否 | 4000000000006975 | [card_declined](https://docs.stripe.com/error-codes.md#card-declined) | [card_velocity_exceeded](https://docs.stripe.com/declines/codes.md#card_velocity_exceeded) | カード発行会社の拒否をシミュレートするカードを `Customer` オブジェクトに関連付けることはできません。関連付けられたカードで拒否された支払いをシミュレートするには、次の表に記載されている「Decline after attaching」テストカードを使用します。 | 説明 | 数字 | 詳細 | | ------------ | ---------------- | ---------------------------------------------------------------------------------------------- | | 関連付けた後の支払い拒否 | 4000000000000341 | このカードを [Customer](https://docs.stripe.com/api/customers.md) オブジェクトに関連付けることはできますが、顧客への請求は失敗します。 | #### PaymentMethods | 説明 | 数字 | エラーコード | 決済拒否コード | | --------------------- | -------------------------------------------------- | ------------------ | ------------------------ | | 一般的な決済拒否 | `pm_card_visa_chargeDeclined` | `card_declined` | `generic_decline` | | 資金不足による決済拒否 | `pm_card_visa_chargeDeclinedInsufficientFunds` | `card_declined` | `insufficient_funds` | | カードの紛失による決済拒否 | `pm_card_visa_chargeDeclinedLostCard` | `card_declined` | `lost_card` | | 盗難カードによる決済拒否 | `pm_card_visa_chargeDeclinedStolenCard` | `card_declined` | `stolen_card` | | 有効期限切れクレジットカードによる決済拒否 | `pm_card_chargeDeclinedExpiredCard` | `expired_card` | 該当なし | | セキュリティコードの誤りによる決済拒否 | `pm_card_chargeDeclinedIncorrectCvc` | `incorrect_cvc` | 該当なし | | 処理エラーによる決済拒否 | `pm_card_chargeDeclinedProcessingError` | `processing_error` | 該当なし | | 利用頻度の上限を超過したことによる決済拒否 | `pm_card_visa_chargeDeclinedVelocityLimitExceeded` | `card_declined` | `card_velocity_exceeded` | カード発行会社の拒否をシミュレートするカードを `Customer` オブジェクトに関連付けることはできません。関連付けられたカードで拒否された支払いをシミュレートするには、次の表に記載されている「Decline after attaching」テストカードを使用します。 | 説明 | PaymentMethod | 詳細 | | ------------ | ---------------------------- | ---------------------------------------------------------------------------------------------- | | 関連付けた後の支払い拒否 | `pm_card_chargeCustomerFail` | このカードを [Customer](https://docs.stripe.com/api/customers.md) オブジェクトに関連付けることはできますが、顧客への請求は失敗します。 | #### トークン ほとんどの実装ではトークンが使用されなくなっていますが、必要に応じて [tok_visa](https://docs.stripe.com/testing.md?testing-method=tokens#visa) などのテスト用トークンを使用できます。 | 説明 | 数字 | エラーコード | 決済拒否コード | | --------------------- | ------------------------------------------------ | ------------------ | ------------------------ | | 一般的な決済拒否 | `tok_visa_chargeDeclined` | `card_declined` | `generic_decline` | | 資金不足による決済拒否 | `tok_visa_chargeDeclinedInsufficientFunds` | `card_declined` | `insufficient_funds` | | デビット資金不足による決済拒否 | `tok_visa_debit_chargeDeclinedInsufficientFunds` | `card_declined` | `insufficient_funds` | | カードの紛失による決済拒否 | `tok_visa_chargeDeclinedLostCard` | `card_declined` | `lost_card` | | 盗難カードによる決済拒否 | `tok_visa_chargeDeclinedStolenCard` | `card_declined` | `stolen_card` | | 有効期限切れクレジットカードによる決済拒否 | `tok_chargeDeclinedExpiredCard` | `expired_card` | 該当なし | | 有効期限切れクレジットカードによる決済拒否 | `tok_visa_chargeDeclinedExpiredCard` | `expired_card` | 該当なし | | 不正利用クレジットカード決済の失敗 | `tok_visa_chargeDeclinedFraudulent` | `expired_card` | 該当なし | | セキュリティコードの誤りによる決済拒否 | `tok_chargeDeclinedIncorrectCvc` | `incorrect_cvc` | 該当なし | | セキュリティコードの誤りによる決済拒否 | `tok_visa_chargeDeclinedIncorrectCvc` | `incorrect_cvc` | 該当なし | | 処理エラーによる決済拒否 | `tok_chargeDeclinedProcessingError` | `processing_error` | 該当なし | | 処理エラーによる決済拒否 | `tok_visa_chargeDeclinedProcessingError` | `processing_error` | 該当なし | | 利用頻度の上限を超過したことによる決済拒否 | `tok_visa_chargeDeclinedVelocityLimitExceeded` | `card_declined` | `card_velocity_exceeded` | カード発行会社の拒否をシミュレートするカードを `Customer` オブジェクトに関連付けることはできません。関連付けられたカードで拒否された支払いをシミュレートするには、次の表に記載されている「Decline after attaching」テストカードを使用します。 | 説明 | トークン | 詳細 | | -------------- | --------------------------------------- | -------------------------------------------------------------------------------------------------------- | | 関連付けた後の支払い拒否 | `tok_chargeCustomerFail` | このカードを [Customer](https://docs.stripe.com/api/customers.md) オブジェクトに関連付けることはできますが、顧客への請求は失敗します。 | | 関連付けた後の支払い拒否 | `tok_visa_chargeCustomerFail` | このカードを [Customer](https://docs.stripe.com/api/customers.md) オブジェクトに関連付けることはできますが、顧客への請求は失敗します。 | | カードの紛失による決済の失敗 | `tok_visa_chargeCustomerFailLostCard` | このカードを [Customer](https://docs.stripe.com/api/customers.md) オブジェクトに関連付けることができますが、カードを紛失したため顧客への請求は失敗します。 | | カードの盗難による決済の失敗 | `tok_visa_chargeCustomerFailStolenCard` | このカードを [Customer](https://docs.stripe.com/api/customers.md) オブジェクトに添付できましたが、盗まれたカードにより、顧客への請求は失敗しました。 | ## 不正利用防止 Stripe の不正利用防止システムである Radar により、リスクレベルが高い場合や検証チェックに失敗した場合に決済がブロックされることがあります。このセクションに記載されているカードを使用して、Radar の設定をテストできます。また、導入が、ブロックされた決済にどう対応するかをテストする場合にも使用できます。 各カードは特定のリスク要因をシミュレーションします。Radar の設定により、決済をブロックする原因となるリスク要因が決定されます。ブロックされた決済は、[不正利用のエラーコードでカードエラー](https://docs.stripe.com/error-handling.md)になります。 CVC チェックの失敗をトリガーするには、CVC (任意の 3 桁の数字) を含めます。郵便番号チェックの失敗をトリガーするには、有効な郵便番号を含めます。これらのフィールドを省略すると、Radar はこれらのチェックをスキップするため、失敗することはありません。 #### カード番号 | 説明 | 数字 | 詳細 | | ------------------------ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | 常にブロック | 4100000000000019 | 決済の[リスクレベルは「最高」です](https://docs.stripe.com/radar/risk-evaluation.md#high-risk) Radar によって常にブロックされます。 | | 非常に高いリスク | 4000000000004954 | 決済の[リスクレベルは「最高」です](https://docs.stripe.com/radar/risk-evaluation.md#high-risk) [設定によっては](https://docs.stripe.com/radar/risk-settings.md)、Radar でブロックされる場合があります。 | | 比較的高リスク | 4000000000009235 | 請求の[リスクレベルは「高」です](https://docs.stripe.com/radar/risk-evaluation.md#elevated-risk) Radar for Fraud Teams を使用している場合、Radar は[審査のために待機する](https://docs.stripe.com/radar/reviews.md)ことがあります。 | | 不正関連の不審請求(ディスピュート)スコアが高い | 4000008400000407 | この請求は不正利用の疑いが高いと判定されております。 [設定によっては](https://docs.stripe.com/radar/risk-settings.md)、Radar でブロックされる場合があります。 | | 不正利用の早期警告スコアが高い | 4000008400000159 | この支払いは、不正利用の早期警告スコアが高い状態です。 [設定によっては](https://docs.stripe.com/radar/risk-settings.md)、Radar でブロックされる場合があります。 | | 動的なリスクしきい値 | 4000008400001017 | このチャージは、有効化されている場合、Radar の動的リスクしきい値コントロールをトリガーします。 Radar blocks the transaction if you enable the [Dynamic risk threshold](https://docs.stripe.com/radar/risk-settings.md#dynamic-risk-threshold). | | 適応型 3DS | 4000008405600003 | この支払いは、Radar 適応型 3DS のリスク管理機能が有効になっている場合にトリガーされます。 適応型 3DS を有効にすると、このテストカードを使用した場合に Radar が 3DS 認証を要求します。 | | セキュリティコードチェックの失敗 | 4000000000000101 | セキュリティコードを指定した場合に、セキュリティコードのチェックが失敗します。 [設定によっては](https://docs.stripe.com/radar/rules.md#traditional-bank-checks)、Radar でブロックされる場合があります。 | | 郵便番号チェックの失敗 | 4000000000000036 | 郵便番号を指定した場合に、郵便番号チェックが失敗します。 [設定によっては](https://docs.stripe.com/radar/rules.md#traditional-bank-checks)、Radar でブロックされる場合があります。 | | セキュリティコードチェックが、高リスクで失敗する | 4000058400307872 | セキュリティコード番号を指定すると、セキュリティコードのチェックは[リスクレベル「elevated」](https://docs.stripe.com/radar/risk-evaluation.md#elevated-risk)で失敗します。 [設定によっては](https://docs.stripe.com/radar/rules.md#traditional-bank-checks)、Radar でブロックされる場合があります。 | | 郵便番号チェックが失敗してリスクが高い | 4000058400306072 | 郵便番号を指定すると、郵便番号チェックは[リスクレベル「高」で失敗します](https://docs.stripe.com/radar/risk-evaluation.md#elevated-risk) [設定によっては](https://docs.stripe.com/radar/rules.md#traditional-bank-checks)、Radar でブロックされる場合があります。 | | 住所 (1 行目) のチェックの失敗 | 4000000000000028 | 住所 (1 行目) のチェックが失敗します。 [カスタム Radar ルールでブロック](https://docs.stripe.com/radar/rules/reference.md#post-authorization-attributes)しない限り、決済は成功します。 | | 住所チェックの失敗 | 4000000000000010 | 住所の郵便番号チェックと住所 (1 行目) のチェックのどちらも失敗します。 [設定によっては](https://docs.stripe.com/radar/rules.md#traditional-bank-checks)、Radar でブロックされる場合があります。 | | 住所を使用できない | 4000000000000044 | 住所の郵便番号チェックと住所 (1 行目) のチェックのどちらも使用できません。 [カスタム Radar ルールでブロック](https://docs.stripe.com/radar/rules/reference.md#post-authorization-attributes)しない限り、決済は成功します。 | #### PaymentMethods | 説明 | PaymentMethod | 詳細 | | ------------------------ | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | 常にブロック | `pm_card_radarBlock` | 決済の[リスクレベルは「最高」です](https://docs.stripe.com/radar/risk-evaluation.md#high-risk) Radar によって常にブロックされます。 | | 非常に高いリスク | `pm_card_riskLevelHighest` | 決済の[リスクレベルは「最高」です](https://docs.stripe.com/radar/risk-evaluation.md#high-risk) 設定によっては、Radar でブロックされる場合があります。 | | 比較的高リスク | `pm_card_riskLevelElevated` | 請求の[リスクレベルは「高」です](https://docs.stripe.com/radar/risk-evaluation.md#elevated-risk) Radar for Fraud Teams を使用している場合、Radar は[審査のために待機する](https://docs.stripe.com/radar/reviews.md)ことがあります。 | | 不正関連の不審請求(ディスピュート)スコアが高い | `pm_card_highFraudDisputeScore` | この請求は不正利用の疑いが高いと判定されております。 [設定によっては](https://docs.stripe.com/radar/risk-settings.md)、Radar でブロックされる場合があります。 | | 不正利用の早期警告スコアが高い | `pm_card_highEfwScore` | この支払いは、不正利用の早期警告スコアが高い状態です。 [設定によっては](https://docs.stripe.com/radar/risk-settings.md)、Radar でブロックされる場合があります。 | | 動的なリスクしきい値 | `pm_card_radarDynamicRiskThreshold` | このチャージは、有効化されている場合、Radar の動的リスクしきい値コントロールをトリガーします。 Radar blocks the transaction if you enable the [Dynamic risk threshold](https://docs.stripe.com/radar/risk-settings.md#dynamic-risk-threshold). | | 適応型 3DS | `pm_card_adaptive3dsChallenge` | この支払いは、Radar 適応型 3DS のリスク管理機能が有効になっている場合にトリガーされます。 適応型 3DS を有効にすると、このテストカードを使用した場合に Radar が 3DS 認証を要求します。 | | セキュリティコードチェックの失敗 | `pm_card_cvcCheckFail` | セキュリティコードを指定した場合に、セキュリティコードのチェックが失敗します。 [設定によっては](https://docs.stripe.com/radar/rules.md#traditional-bank-checks)、Radar でブロックされる場合があります。 | | 郵便番号チェックの失敗 | `pm_card_avsZipFail` | 郵便番号を指定した場合に、郵便番号チェックが失敗します。 [設定によっては](https://docs.stripe.com/radar/rules.md#traditional-bank-checks)、Radar でブロックされる場合があります。 | | セキュリティコードチェックが、高リスクで失敗する | `pm_card_cvcCheckFailElevatedRisk` | セキュリティコード番号を指定すると、セキュリティコードのチェックは[リスクレベル「elevated」](https://docs.stripe.com/radar/risk-evaluation.md#elevated-risk)で失敗します。 [設定によっては](https://docs.stripe.com/radar/rules.md#traditional-bank-checks)、Radar でブロックされる場合があります。 | | 郵便番号チェックが失敗してリスクが高い | `pm_card_avsZipFailElevatedRisk` | 郵便番号を指定すると、郵便番号チェックは[リスクレベル「高」で失敗します](https://docs.stripe.com/radar/risk-evaluation.md#elevated-risk) [設定によっては](https://docs.stripe.com/radar/rules.md#traditional-bank-checks)、Radar でブロックされる場合があります。 | | 住所 (1 行目) のチェックの失敗 | `pm_card_avsLine1Fail` | 住所 (1 行目) のチェックが失敗します。 [カスタム Radar ルールでブロック](https://docs.stripe.com/radar/rules/reference.md#post-authorization-attributes)しない限り、決済は成功します。 | | 住所チェックの失敗 | `pm_card_avsFail` | 住所の郵便番号チェックと住所 (1 行目) のチェックのどちらも失敗します。 [設定によっては](https://docs.stripe.com/radar/rules.md#traditional-bank-checks)、Radar でブロックされる場合があります。 | | 住所を使用できない | `pm_card_avsUnchecked` | 住所の郵便番号チェックと住所 (1 行目) のチェックのどちらも使用できません。 [カスタム Radar ルールでブロック](https://docs.stripe.com/radar/rules/reference.md#post-authorization-attributes)しない限り、決済は成功します。 | #### トークン ほとんどの実装ではトークンが使用されなくなっていますが、必要に応じて [tok_visa](https://docs.stripe.com/testing.md?testing-method=tokens#visa) などのテスト用トークンを使用できます。 | 説明 | トークン | 詳細 | | ------------------------ | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | 常にブロック | `tok_radarBlock` | 決済の[リスクレベルは「最高」です](https://docs.stripe.com/radar/risk-evaluation.md#high-risk) Radar によって常にブロックされます。 | | 非常に高いリスク | `tok_riskLevelHighest` | 決済の[リスクレベルは「最高」です](https://docs.stripe.com/radar/risk-evaluation.md#high-risk) 設定によっては、Radar でブロックされる場合があります。 | | 比較的高リスク | `tok_riskLevelElevated` | 請求の[リスクレベルは「高」です](https://docs.stripe.com/radar/risk-evaluation.md#elevated-risk) Radar for Fraud Teams を使用している場合、Radar は[審査のために待機する](https://docs.stripe.com/radar/reviews.md)ことがあります。 | | 不正関連の不審請求(ディスピュート)スコアが高い | `tok_highFraudDisputeScore` | この請求は不正利用の疑いが高いと判定されております。 [設定によっては](https://docs.stripe.com/radar/risk-settings.md)、Radar でブロックされる場合があります。 | | 不正利用の早期警告スコアが高い | `tok_highEfwScore` | この支払いは、不正利用の早期警告スコアが高い状態です。 [設定によっては](https://docs.stripe.com/radar/risk-settings.md)、Radar でブロックされる場合があります。 | | 動的なリスクしきい値 | `tok_radarDynamicRiskThreshold` | このチャージは、有効化されている場合、Radar の動的リスクしきい値コントロールをトリガーします。 Radar blocks the transaction if you enable the [Dynamic risk threshold](https://docs.stripe.com/radar/risk-settings.md#dynamic-risk-threshold). | | 適応型 3DS | `tok_adaptive3dsChallenge` | この支払いは、Radar 適応型 3DS のリスク管理機能が有効になっている場合にトリガーされます。 適応型 3DS を有効にすると、このテストカードを使用した場合に Radar が 3DS 認証を要求します。 | | セキュリティコードチェックの失敗 | `tok_cvcCheckFail` | セキュリティコードを指定した場合に、セキュリティコードのチェックが失敗します。 [設定によっては](https://docs.stripe.com/radar/rules.md#traditional-bank-checks)、Radar でブロックされる場合があります。 | | 郵便番号チェックの失敗 | `tok_avsZipFail` | 郵便番号を指定した場合に、郵便番号チェックが失敗します。 [設定によっては](https://docs.stripe.com/radar/rules.md#traditional-bank-checks)、Radar でブロックされる場合があります。 | | セキュリティコードチェックが、高リスクで失敗する | `tok_cvcCheckFailElevatedRisk` | セキュリティコード番号を指定すると、セキュリティコードのチェックは[リスクレベル「elevated」](https://docs.stripe.com/radar/risk-evaluation.md#elevated-risk)で失敗します。 [設定によっては](https://docs.stripe.com/radar/rules.md#traditional-bank-checks)、Radar でブロックされる場合があります。 | | 郵便番号チェックが失敗してリスクが高い | `tok_avsZipFailElevatedRisk` | 郵便番号を指定すると、郵便番号チェックは[リスクレベル「高」で失敗します](https://docs.stripe.com/radar/risk-evaluation.md#elevated-risk) [設定によっては](https://docs.stripe.com/radar/rules.md#traditional-bank-checks)、Radar でブロックされる場合があります。 | | 住所 (1 行目) のチェックの失敗 | `tok_avsLine1Fail` | 住所 (1 行目) のチェックが失敗します。 [カスタム Radar ルールでブロック](https://docs.stripe.com/radar/rules/reference.md#post-authorization-attributes)しない限り、決済は成功します。 | | 住所チェックの失敗 | `tok_avsFail` | 住所の郵便番号チェックと住所 (1 行目) のチェックのどちらも失敗します。 [設定によっては](https://docs.stripe.com/radar/rules.md#traditional-bank-checks)、Radar でブロックされる場合があります。 | | 住所を使用できない | `tok_avsUnchecked` | 住所の郵便番号チェックと住所 (1 行目) のチェックのどちらも使用できません。 [カスタム Radar ルールでブロック](https://docs.stripe.com/radar/rules/reference.md#post-authorization-attributes)しない限り、決済は成功します。 | ## 無効なデータでエラーをトリガーする 無効なデータが原因のエラーをテストするには、無効な詳細を指定します。これに専用のテストカードは必要ありません。どの無効な値でも機能します。以下に例を示します。 - [invalid_expiry_month](https://docs.stripe.com/declines/codes.md#invalid_expiry_month): 無効な月を使用する (**13** など)。 - [invalid_expiry_year](https://docs.stripe.com/declines/codes.md#invalid_expiry_year): **95** のように、過去 50 年までの年を使用します。 - [invalid_cvc](https://docs.stripe.com/declines/codes.md#invalid_cvc): 2 桁の数字を使用する (**99** など) - [incorrect_number](https://docs.stripe.com/declines/codes.md#incorrect_number): `4242424242424241` のように、[Luhn チェック](https://en.wikipedia.org/wiki/Luhn_algorithm)に失敗するカード番号を使用します。 ## 不審請求の申し立てのシミュレーション [不審請求が申し立てられた](https://docs.stripe.com/disputes.md)取引をシミュレーションするには、このセクションに記載されているテストカードを使用します。また、不審請求の申し立てで勝訴または敗訴をシミュレーションするには、[勝訴または敗訴の証拠](https://docs.stripe.com/testing.md#evidence)を提出します。 #### カード番号 | 説明 | 数字 | 詳細 | | ---------------------------- | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 不正利用 | 4000000000000259 | デフォルトのアカウント設定では、請求は成功しますが、[不正利用](https://docs.stripe.com/disputes/categories.md)として不審請求を申し立てるだけです。このタイプの不審請求の申し立ては、3D セキュア認証後[に保護さ](https://docs.stripe.com/payments/3d-secure/authentication-flow.md#disputed-payments)れます。 | | 未受領 | 4000000000002685 | デフォルトのアカウント設定では、決済は成功し、[商品未受領](https://docs.stripe.com/disputes/categories.md)として不審請求が申し立てられるのみです。このタイプの不審請求の申し立ては、3D セキュア認証後[は保護さ](https://docs.stripe.com/payments/3d-secure/authentication-flow.md#disputed-payments)れません。 | | 照会 | 4000000000001976 | デフォルトのアカウント設定では、決済が成功し、[照会](https://docs.stripe.com/disputes/how-disputes-work.md#inquiries)として不審請求の申し立てがのみ行われます。 | | 警告 | 4000000000005423 | デフォルトのアカウント設定では、請求が成功し、[不正利用の早期警告](https://docs.stripe.com/disputes/how-disputes-work.md#early-fraud-warnings)のみが返されます。 | | 複数の不審請求の申し立て | 4000000404000079 | デフォルトのアカウント設定では、決済が成功し、[複数回](https://docs.stripe.com/disputes/how-disputes-work.md#multiple-disputes)不審請求の申し立てが行われる結果となります。 | | Visa Compelling Evidence 3.0 | 4000000404000038 | デフォルトのアカウント設定では、決済が成功し、[Visa Compelling Evidence 3.0 の適格な不審請求](https://docs.stripe.com/disputes/api/visa-ce3.md#testing)としてのみ不審請求の申し立てが行われます。 | | Visa コンプライアンス | 4000008400000779 | デフォルトのアカウント設定では、請求が成功し、[Visa コンプライアンス不審請求の申し立て](https://docs.stripe.com/disputes/api/visa-compliance.md#testing)としてのみ不審請求の申し立てが行われます。 | #### PaymentMethods | 説明 | PaymentMethod | 詳細 | | ---------------------------- | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 不正利用 | `pm_card_createDispute` | デフォルトのアカウント設定では、請求は成功しますが、[不正利用](https://docs.stripe.com/disputes/categories.md)として不審請求を申し立てるだけです。このタイプの不審請求の申し立ては、3D セキュア認証後[に保護さ](https://docs.stripe.com/payments/3d-secure/authentication-flow.md#disputed-payments)れます。 | | 未受領 | `pm_card_createDisputeProductNotReceived` | デフォルトのアカウント設定では、決済は成功し、[商品未受領](https://docs.stripe.com/disputes/categories.md)として不審請求が申し立てられるのみです。このタイプの不審請求の申し立ては、3D セキュア認証後[は保護さ](https://docs.stripe.com/payments/3d-secure/authentication-flow.md#disputed-payments)れません。 | | 照会 | `pm_card_createDisputeInquiry` | デフォルトのアカウント設定では、決済が成功し、[照会](https://docs.stripe.com/disputes/how-disputes-work.md#inquiries)として不審請求の申し立てがのみ行われます。 | | 警告 | `pm_card_createIssuerFraudRecord` | デフォルトのアカウント設定では、請求が成功し、[不正利用の早期警告](https://docs.stripe.com/disputes/how-disputes-work.md#early-fraud-warnings)のみが返されます。 | | 複数の不審請求の申し立て | `pm_card_createMultipleDisputes` | デフォルトのアカウント設定では、決済が成功し、[複数回](https://docs.stripe.com/disputes/how-disputes-work.md#multiple-disputes)不審請求の申し立てが行われる結果となります。 | | Visa Compelling Evidence 3.0 | `pm_card_createCe3EligibleDispute` | デフォルトのアカウント設定では、決済が成功し、[Visa Compelling Evidence 3.0 の適格な不審請求](https://docs.stripe.com/disputes/api/visa-ce3.md#testing)としてのみ不審請求の申し立てが行われます。 | | Visa コンプライアンス | `pm_card_createComplianceDispute` | デフォルトのアカウント設定では、請求が成功し、[Visa コンプライアンス不審請求の申し立て](https://docs.stripe.com/disputes/api/visa-compliance.md#testing)としてのみ不審請求の申し立てが行われます。 | #### トークン ほとんどの実装ではトークンが使用されなくなっていますが、必要に応じて [tok_visa](https://docs.stripe.com/testing.md?testing-method=tokens#visa) などのテスト用トークンを使用できます。 | 説明 | トークン | 詳細 | | ---------------------------- | ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 不正利用 | `tok_createDispute` | デフォルトのアカウント設定では、請求は成功しますが、[不正利用](https://docs.stripe.com/disputes/categories.md)として不審請求を申し立てるだけです。このタイプの不審請求の申し立ては、3D セキュア認証後[に保護さ](https://docs.stripe.com/payments/3d-secure/authentication-flow.md#disputed-payments)れます。 | | 未受領 | `tok_createDisputeProductNotReceived` | デフォルトのアカウント設定では、決済は成功し、[商品未受領](https://docs.stripe.com/disputes/categories.md)として不審請求が申し立てられるのみです。このタイプの不審請求の申し立ては、3D セキュア認証後[は保護さ](https://docs.stripe.com/payments/3d-secure/authentication-flow.md#disputed-payments)れません。 | | 照会 | `tok_createDisputeInquiry` | デフォルトのアカウント設定では、決済が成功し、[照会](https://docs.stripe.com/disputes/how-disputes-work.md#inquiries)として不審請求の申し立てがのみ行われます。 | | 警告 | `tok_createIssuerFraudRecord` | デフォルトのアカウント設定では、請求が成功し、[不正利用の早期警告](https://docs.stripe.com/disputes/how-disputes-work.md#early-fraud-warnings)のみが返されます。 | | 複数の不審請求の申し立て | `tok_createMultipleDisputes` | デフォルトのアカウント設定では、決済が成功し、[複数回](https://docs.stripe.com/disputes/how-disputes-work.md#multiple-disputes)不審請求の申し立てが行われる結果となります。 | | Visa Compelling Evidence 3.0 | `tok_createCe3EligibleDispute` | デフォルトのアカウント設定では、決済が成功し、[Visa Compelling Evidence 3.0 の適格な不審請求](https://docs.stripe.com/disputes/api/visa-ce3.md#testing)としてのみ不審請求の申し立てが行われます。 | | Visa コンプライアンス | `tok_createComplianceDispute` | デフォルトのアカウント設定では、請求が成功し、[Visa コンプライアンス不審請求の申し立て](https://docs.stripe.com/disputes/api/visa-compliance.md#testing)としてのみ不審請求の申し立てが行われます。 | ### 証拠 不審請求の申し立てに対する主張が認められる場合と認められない場合をシミュレーションするには、次の表のいずれかの反証資料の値で応答します。 - [API を使用](https://docs.stripe.com/disputes/api.md)して応答する場合は、表の値を [uncategorized_text](https://docs.stripe.com/api/disputes/update.md#update_dispute-evidence-uncategorized_text) として渡します。 - [ダッシュボード](https://docs.stripe.com/disputes/responding.md)または[Connect 埋め込みコンポーネント](https://docs.stripe.com/connect/supported-embedded-components/disputes-list.md)で応答する場合は、表の値を**追加情報**フィールドに入力してから、**反証資料を提出**をクリックします。 | 証拠 | 説明 | | --------------------------- | ---------------------------------------------------------------------------------- | | `winning_evidence` | 不審請求の申し立てを勝訴としてクローズし、支払い額と関連手数料をアカウントに入金します。 | | `losing_evidence` | アカウントに入金せずに不審請求の申し立てを敗訴としてクローズします。照会の場合は、エスカレーションせずに照会がクローズされます。 | | `escalate_inquiry_evidence` | 照会をチャージバックにエスカレーションします。これにより照会が不審請求の申し立て全体に移行し、不審請求の申し立ての金額と関連手数料がアカウントから引き落とされます。 | ## 非同期の返金のシミュレーション 本番環境では、返金は非同期で行われます。返金は成功したように表示されてから失敗したり、最初は `pending` と表示され、後で成功したりする場合があります。このような動作の返金をシミュレートするには、このセクションのテストカードを使用します。その他のすべてのテストカードでは、返金は即座に成功し、その後ステータスは変更されません。 #### カード番号 | 説明 | 数字 | 詳細 | | ------ | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 非同期の成功 | 4000000000007726 | 請求は成功します。返金を開始する場合、ステータスは `pending` で始まります。しばらくすると、ステータスは `succeeded` に移行し、`refund.updated` [イベント](https://docs.stripe.com/api/events/types.md#event_types-refund.updated)が送信されます。 | | 非同期の失敗 | 4000000000005126 | 請求は成功します。返金を開始する場合、ステータスは `succeeded` で始まります。しばらくすると、ステータスは `failed` に移行し、`refund.failed` [イベント](https://docs.stripe.com/api/events/types.md#event_types-refund.failed)が送信されます。 | #### PaymentMethods | 説明 | PaymentMethod | 詳細 | | ------ | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 非同期の成功 | `pm_card_pendingRefund` | 請求は成功します。返金を開始する場合、ステータスは `pending` で始まります。しばらくすると、ステータスは `succeeded` に移行し、`refund.updated` [イベント](https://docs.stripe.com/api/events/types.md#event_types-refund.updated)が送信されます。 | | 非同期の失敗 | `pm_card_refundFail` | 請求は成功します。返金を開始する場合、ステータスは `succeeded` で始まります。しばらくすると、ステータスは `failed` に移行し、`refund.failed` [イベント](https://docs.stripe.com/api/events/types.md#event_types-refund.failed)が送信されます。 | #### トークン ほとんどの実装ではトークンが使用されなくなっていますが、必要に応じて [tok_visa](https://docs.stripe.com/testing.md?testing-method=tokens#visa) などのテスト用トークンを使用できます。 | 説明 | トークン | 詳細 | | ------ | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 非同期の成功 | `tok_pendingRefund` | 請求は成功します。返金を開始する場合、ステータスは `pending` で始まります。しばらくすると、ステータスは `succeeded` に移行し、`refund.updated` [イベント](https://docs.stripe.com/api/events/types.md#event_types-refund.updated)が送信されます。 | | 非同期の失敗 | `tok_refundFail` | 請求は成功します。返金を開始する場合、ステータスは `succeeded` で始まります。しばらくすると、ステータスは `failed` に移行し、`refund.failed` [イベント](https://docs.stripe.com/api/events/types.md#event_types-refund.failed)が送信されます。 | カードの返金は、ダッシュボードを使用する場合にのみキャンセルできます。本番環境では、特定でない短期間でカードの返金をキャンセルできます。テスト環境では、30分以内にカードの返金をキャンセルできるようにすることで、その期間をシミュレーションします。 ## 利用可能な残高に資金を送金 テスト取引から利用可能残高に直接、資金を送金するには、このセクションに記載されているテストカードを使用します。他のテストカードでは、成功した決済から保留中の残高に資金が送金されます。 #### カード番号 | 説明 | 数字 | 詳細 | | ----------- | ---------------- | ----------------------------------------------- | | 保留中の残高のバイパス | 4000000000000077 | アメリカでの請求は成功します。売上は利用可能残高に直接追加され、保留中の残高をバイパスします。 | | 保留中の残高のバイパス | 4000003720000278 | 国際決済は成功します。売上は利用可能残高に直接追加され、保留中の残高をバイパスします。 | #### PaymentMethods | 説明 | PaymentMethod | 詳細 | | ----------- | ------------------------------------ | ----------------------------------------------- | | 保留中の残高のバイパス | `pm_card_bypassPending` | アメリカでの請求は成功します。売上は利用可能残高に直接追加され、保留中の残高をバイパスします。 | | 保留中の残高のバイパス | `pm_card_bypassPendingInternational` | 国際決済は成功します。売上は利用可能残高に直接追加され、保留中の残高をバイパスします。 | #### トークン ほとんどの実装ではトークンが使用されなくなっていますが、必要に応じて [tok_visa](https://docs.stripe.com/testing.md?testing-method=tokens#visa) などのテスト用トークンを使用できます。 | 説明 | トークン | 詳細 | | ----------- | -------------------------------- | ----------------------------------------------- | | 保留中の残高のバイパス | `tok_bypassPending` | アメリカでの請求は成功します。売上は利用可能残高に直接追加され、保留中の残高をバイパスします。 | | 保留中の残高のバイパス | `tok_bypassPendingInternational` | 国際決済は成功します。売上は利用可能残高に直接追加され、保留中の残高をバイパスします。 | ## 3D セキュア認証をテストする 3D セキュアでは、クレジットカード取引に追加の認証レイヤーが必要になります。このセクションに記載されているテストカードを使用して、各種決済フローにおける認証のトリガーをシミュレーションできます。 このセクションのカードのみが、定義された 3DS の動作 (チャレンジフローや未対応のカードなど) をシミュレーションすることによって、3D セキュアの導入を効果的にテストできます。他の Stripe テストカードでも 3DS がトリガーされる可能性がありますが、`attempt_acknowledged` が返され、追加のステップは迂回されます。これは、3DS テストがそれらのカード用には設計されていないためです。 > #### ダッシュボードはサポート対象外 > > Stripe ダッシュボードで直接作成された決済では 3D セキュアのリダイレクトは行われません。代わりに、導入の独自のフロントエンドまたは API コールを使用してください。 ### 認証と設定 認証を含む決済フローをシミュレーションするには、このセクションに記載されているテストカードを使用します。一部のカードは、将来の決済に備えた[設定](https://docs.stripe.com/payments/save-and-reuse.md)が可能であるか、すでに設定されていることもあります。 #### カード番号 | 説明 | 数字 | 詳細 | | ---------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 設定がない場合に認証 | 4000002500003155 | このカードでは、将来の決済に備えて[設定して](https://docs.stripe.com/payments/save-and-reuse.md)いない限り、オフセッションの決済で認証が必要です。設定した後は、オフセッションの決済で認証は不要になります。ただし、このカードを使用したオンセッション決済には常に認証が必要です。 | | 常に認証 | 4000002760003184 | このカードは、カードの設定にかかわらず、すべての取引で認証を必要とします。 | | すでに設定 | 4000003800000446 | このカードはすでにオフセッションで使用するために設定されています。[1 回限り](https://docs.stripe.com/payments/accept-a-payment.md?platform=web)の決済やその他の[オンセッション](https://docs.stripe.com/payments/existing-customers.md?platform=web&ui=elements)の決済には認証が必要です。ただし、*オフセッションの決済* (A payment is described as off-session if it occurs without the direct involvement of the customer, using previously-collected payment information)はすべて、カードが以前に[設定されている](https://docs.stripe.com/payments/save-and-reuse.md)ものとして成功します。 | | 資金不足 | 4000008260003178 | このカードは [1 回限りの決済](https://docs.stripe.com/payments/accept-a-payment.md?platform=web)の場合、認証が必要です。認証に成功しても、以前[に設定](https://docs.stripe.com/payments/save-and-reuse.md)しても、すべての決済が `insufficient_funds` 失敗コードで拒否されます。 | #### PaymentMethods | 説明 | PaymentMethod | 詳細 | | ---------- | --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 設定がない場合に認証 | `pm_card_authenticationRequiredOnSetup` | このカードでは、将来の決済に備えて[設定し](https://docs.stripe.com/payments/save-and-reuse.md)ない限り、すべての決済で認証が必要です。設定した後は、認証が不要になります。 | | 常に認証 | `pm_card_authenticationRequired` | このカードは、カードの設定にかかわらず、すべての取引で認証を必要とします。 | | すでに設定 | `pm_card_authenticationRequiredSetupForOffSession` | このカードはすでにオフセッションで使用するために設定されています。 [1 回限り](https://docs.stripe.com/payments/accept-a-payment.md?platform=web)の決済やその他の[オンセッション](https://docs.stripe.com/payments/existing-customers.md?platform=web&ui=elements)の決済には認証が必要です。ただし、オフセッションの決済はすべて、カードがすでに[設定されている](https://docs.stripe.com/payments/save-and-reuse.md)ものとして成功します。 | | 資金不足 | `pm_card_authenticationRequiredChargeDeclinedInsufficientFunds` | このカードは [1 回限りの決済](https://docs.stripe.com/payments/accept-a-payment.md?platform=web)の場合、認証が必要です。認証に成功しても、以前[に設定](https://docs.stripe.com/payments/save-and-reuse.md)しても、すべての決済が `insufficient_funds` 失敗コードで拒否されます。 | ### サポートおよび対応状況 規制により義務付けられている場合や、Radar ルールまたはカスタムコードによってトリガーされた場合に、Stripe は認証をリクエストします。ただし、認証がリクエストされた場合でも、必ず実行できるとは限りません。たとえば、顧客のカードが登録されていなかったり、エラーが発生したりして実行できない場合があります。このセクションに記載されているテストカードを使用して、このような要因のさまざまな組み合わせをシミュレーションしてください。 すべての 3DS リファレンスは、[3D セキュア 2](https://stripe.com/guides/3d-secure-2) を示します。 #### カード番号 | 3D セキュアの使用状況 | 結果 | 数字 | 詳細 | | --------------- | --------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | 3DS が必須 | OK | 4000000000003220 | この決済を正常に完了させるには、3D セキュア認証を実行する必要があります。デフォルトの場合、Radar ルールによってこのカードの 3D セキュア認証がリクエストされます。 | | 3DS が必須 | 拒否 | 4000008400001629 | 3D セキュア認証が必要ですが、認証後に決済が `card_declined` エラーコードで拒否されます。デフォルトの場合、Radar ルールによってこのカードの 3D セキュア認証がリクエストされます。 | | 3DS が必須 | エラー | 4000008400001280 | 3D セキュア認証が必要ですが、3D セキュア検索リクエストが処理エラーで失敗します。決済は、`card_declined` 失敗コードで拒否されます。デフォルトの場合、Radar ルールでこのカードの 3D セキュア認証がリクエストされます。 | | 3DS に対応 | OK | 4000000000003055 | 3D セキュア認証を実行できますが、必須ではありません。デフォルトの場合、Radar ルールはこのカードの 3D セキュア認証をリクエストしません。 | | 3DS に対応 | エラー | 4000000000003097 | 3D セキュア認証を実行できますが、必須ではありません。ただし、3D セキュアを実行しようとすると、処理エラーが発生します。デフォルトの場合、Radar ルールでこのカードの 3D セキュア認証はリクエストされません。 | | 3DS に対応 | 未登録 | 4242424242424242 | このカードでは 3D セキュアがサポートされていますが、このカードは 3D セキュアに登録されていません。Radar ルールによって 3D セキュアがリクエストされても、顧客は認証するように求められません。デフォルトの場合、Radar ルールではこのカードの 3D セキュア認証がリクエストされません。 | | 3DS に未対応 | 378282246310005 | このカードでは 3D セキュアがサポートされていないため、呼び出すことができません。PaymentIntent または SetupIntent は、認証を行わずに続行されます。 | | 3DS フリクションレスフロー | OK | 4000000032200000 | カードの設定にかかわらず、すべての取引で 3D セキュア認証が必要です。認証はフリクションレスフローで進行し、成功します。 | #### PaymentMethods | 3D セキュアの使用状況 | 結果 | PaymentMethod | 詳細 | | ------------ | --- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | 必須 | OK | `pm_card_threeDSecure2Required` | この決済を正常に完了させるには、3D セキュア認証を実行する必要があります。デフォルトの場合、Radar ルールによってこのカードの 3D セキュア認証がリクエストされます。 | | 必須 | 拒否 | `pm_card_threeDSecureRequiredChargeDeclined` | 3D セキュア認証が必要ですが、認証後に決済が `card_declined` エラーコードで拒否されます。デフォルトの場合、Radar ルールによってこのカードの 3D セキュア認証がリクエストされます。 | | 必須 | エラー | `pm_card_threeDSecureRequiredProcessingError` | 3D セキュア認証が必要ですが、3D セキュア検索リクエストが処理エラーで失敗します。決済は、`card_declined` 失敗コードで拒否されます。デフォルトの場合、Radar ルールでこのカードの 3D セキュア認証がリクエストされます。 | | サポート対象 | OK | `pm_card_threeDSecureOptional` | 3D セキュア認証を実行できますが、必須ではありません。デフォルトの場合、Radar ルールはこのカードの 3D セキュア認証をリクエストしません。 | | サポート対象 | エラー | `pm_card_threeDSecureOptionalProcessingError` | 3D セキュア認証を実行できますが、必須ではありません。ただし、3D セキュアを実行しようとすると、処理エラーが発生します。デフォルトの場合、Radar ルールでこのカードの 3D セキュア認証はリクエストされません。 | | サポート対象 | 未登録 | `pm_card_visa` | このカードでは 3D セキュアがサポートされていますが、このカードは 3D セキュアに登録されていません。Radar ルールによって 3D セキュアがリクエストされても、顧客は認証するように求められません。デフォルトの場合、Radar ルールではこのカードの 3D セキュア認証がリクエストされません。 | | 未対応 | | `pm_card_amex_threeDSecureNotSupported` | このカードでは 3D セキュアがサポートされていないため、呼び出すことができません。PaymentIntent または SetupIntent は、認証を行わずに続行されます。 | #### トークン ほとんどの実装ではトークンが使用されなくなっていますが、必要に応じて [tok_visa](https://docs.stripe.com/testing.md?testing-method=tokens#visa) などのテスト用トークンを使用できます。 | 3D セキュアの使用状況 | 結果 | トークン | 詳細 | | ------------ | --- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | 必須 | OK | `tok_threeDSecure2Required` | この決済を正常に完了させるには、3D セキュア認証を実行する必要があります。デフォルトの場合、Radar ルールによってこのカードの 3D セキュア認証がリクエストされます。 | | 必須 | 拒否 | `tok_threeDSecureRequiredChargeDeclined` | 3D セキュア認証が必要ですが、認証後に決済が `card_declined` エラーコードで拒否されます。デフォルトの場合、Radar ルールによってこのカードの 3D セキュア認証がリクエストされます。 | | 必須 | エラー | `tok_threeDSecureRequiredProcessingError` | 3D セキュア認証が必要ですが、3D セキュア検索リクエストが処理エラーで失敗します。決済は、`card_declined` 失敗コードで拒否されます。デフォルトの場合、Radar ルールでこのカードの 3D セキュア認証がリクエストされます。 | | サポート対象 | OK | `tok_threeDSecureOptional` | 3D セキュア認証を実行できますが、必須ではありません。デフォルトの場合、Radar ルールはこのカードの 3D セキュア認証をリクエストしません。 | | サポート対象 | エラー | `tok_threeDSecureOptionalProcessingError` | 3D セキュア認証を実行できますが、必須ではありません。ただし、3D セキュアを実行しようとすると、処理エラーが発生します。デフォルトの場合、Radar ルールでこのカードの 3D セキュア認証はリクエストされません。 | | サポート対象 | 未登録 | `tok_visa` | このカードでは 3D セキュアがサポートされていますが、このカードは 3D セキュアに登録されていません。Radar ルールによって 3D セキュアがリクエストされても、顧客は認証するように求められません。デフォルトの場合、Radar ルールではこのカードの 3D セキュア認証がリクエストされません。 | | 未対応 | | `tok_amex_threeDSecureNotSupported` | このカードでは 3D セキュアがサポートされていないため、呼び出すことができません。PaymentIntent は、認証を行わずに続行されます。 | ### 3D セキュアのモバイルチャレンジフロー モバイル決済の場合、顧客が UI プロンプトに対応するチャレンジフローをいくつか提供できます。テスト目的で特定のチャレンジフローを起動するには、このセクションに記載されているテストカードを使用します。このカードは、ブラウザベースの決済フォームまたは API コールでの使用には適しません。こうした環境では、機能はするものの、特定の動作を起動することはありません。API コールには適さないため、テスト用の `PaymentMethod` と `Token` の値は提供していません。 | チャレンジフロー | 数字 | 詳細 | | ---------- | ---------------- | ------------------------------------------------------------------- | | 帯域外 | 4000582600000094 | すべての取引で 3D セキュア 2 認証を実行する必要があります。帯域外 UI によってチャレンジフローが起動されます。 | | ワンタイムパスコード | 4000582600000045 | すべての取引で 3D セキュア 2 認証を実行する必要があります。ワンタイムパスコード UI によってチャレンジフローが起動されます。 | | 単一選択 | 4000582600000102 | すべての取引で 3D セキュア 2 認証を実行する必要があります。単一選択の UI によってチャレンジフローが起動されます。 | | 複数選択 | 4000582600000110 | すべての取引で 3D セキュア 2 認証を実行する必要があります。複数選択の UI を使用してチャレンジフローを起動します。 | ## CAPTCHA チャレンジのシミュレーション 不正利用を防止するため、Stripe は、決済ページでユーザーに CAPTCHA チャレンジを表示する場合があります。以下のテストカードを使用して、このフローをシミュレーションします。 | 説明 | 数字 | 詳細 | | ------------- | ---------------- | -------------------------------------- | | CAPTCHA チャレンジ | 4000000000001208 | ユーザーが CAPTCHA チャレンジに正しく回答すると、請求は成功します。 | | CAPTCHA チャレンジ | 4000000000003725 | ユーザーが CAPTCHA チャレンジに正しく回答すると、請求は成功します。 | ## PIN による対面決済のシミュレーション PIN が使用される対面決済の成功をシミュレーションするには、このセクションに記載されているテストカードを使用します。その他にも、シミュレーションされたリーダーやテスト用の物理カードなど、対面決済をテストするための多くのオプションがあります。詳細については、[Stripe Terminal をテストする](https://docs.stripe.com/terminal/references/testing.md)をご覧ください。 #### カード番号 | 説明 | 数字 | 詳細 | | -------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | オフライン PIN | 4001007020000002 | このクレジットカードは、カード会員にプロンプトが表示され、*オフライン PIN* (Offline PIN is a card verification method for EMV chip cards. These cards store the PIN securely on the chip itself, so PIN verification can occur without a network connection) を入力する決済をシミュレーションします。生成される請求では、[cardholder_verification_method](https://docs.stripe.com/api/charges/object.md#charge_object-payment_method_details-card_present-receipt-cardholder_verification_method) が `offline_pin` に設定されます。 | | オフライン PIN の再試行 | 4000008260000075 | SCA トリガーの再試行フローがシミュレーションされます。このフローでは、カード会員の初回の非接触型決済が失敗し、リーダーから、ユーザーにカードを挿入し、*オフライン PIN* (Offline PIN is a card verification method for EMV chip cards. These cards store the PIN securely on the chip itself, so PIN verification can occur without a network connection) を入力するように求めるプロンプトが表示されます。生成される決済では、[cardholder_verification_method](https://docs.stripe.com/api/charges/object.md#charge_object-payment_method_details-card_present-receipt-cardholder_verification_method) が `offline_pin` に設定されます。 | | オンライン PIN | 4001000360000005 | このクレジットカードは、カード会員が*オンライン PIN* (Online PIN is a card verification method for EMV chip cards. These cards require the terminal to contact the issuer over a network connection to verify the PIN) の入力を求められる決済をシミュレーションします。生成される請求では、[cardholder_verification_method](https://docs.stripe.com/api/charges/object.md#charge_object-payment_method_details-card_present-receipt-cardholder_verification_method) が `online_pin` に設定されます。 | | オンライン PIN の再試行 | 4000002760000008 | SCA トリガーの再試行フローがシミュレーションされます。このフローでは、カード会員の初回の非接触型請求が失敗し、リーダーから、ユーザーにクレジットカードを挿入し、*オンライン PIN* (Online PIN is a card verification method for EMV chip cards. These cards require the terminal to contact the issuer over a network connection to verify the PIN) を入力するように求めるプロンプトが表示されます。生成される請求では、[cardholder_verification_method](https://docs.stripe.com/api/charges/object.md#charge_object-payment_method_details-card_present-receipt-cardholder_verification_method) が `online_pin` に設定されます。 | #### PaymentMethods | 説明 | 数字 | 詳細 | | -------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | オフライン PIN | `offline_pin_cvm` | このクレジットカードは、カード会員にプロンプトが表示され、*オフライン PIN* (Offline PIN is a card verification method for EMV chip cards. These cards store the PIN securely on the chip itself, so PIN verification can occur without a network connection) を入力する決済をシミュレーションします。生成される請求では、[cardholder_verification_method](https://docs.stripe.com/api/charges/object.md#charge_object-payment_method_details-card_present-receipt-cardholder_verification_method) が `offline_pin` に設定されます。 | | オフライン PIN の再試行 | `offline_pin_sca_retry` | SCA トリガーの再試行フローがシミュレーションされます。このフローでは、カード会員の初回の非接触型決済が失敗し、リーダーから、ユーザーにカードを挿入し、*オフライン PIN* (Offline PIN is a card verification method for EMV chip cards. These cards store the PIN securely on the chip itself, so PIN verification can occur without a network connection) を入力するように求めるプロンプトが表示されます。生成される決済では、[cardholder_verification_method](https://docs.stripe.com/api/charges/object.md#charge_object-payment_method_details-card_present-receipt-cardholder_verification_method) が `offline_pin` に設定されます。 | | オンライン PIN | `online_pin_cvm` | このクレジットカードは、カード会員が*オンライン PIN* (Online PIN is a card verification method for EMV chip cards. These cards require the terminal to contact the issuer over a network connection to verify the PIN) の入力を求められる決済をシミュレーションします。生成される請求では、[cardholder_verification_method](https://docs.stripe.com/api/charges/object.md#charge_object-payment_method_details-card_present-receipt-cardholder_verification_method) が `online_pin` に設定されます。 | | オンライン PIN の再試行 | `online_pin_sca_retry` | SCA トリガーの再試行フローがシミュレーションされます。このフローでは、カード会員の初回の非接触型請求が失敗し、リーダーから、ユーザーにクレジットカードを挿入し、*オンライン PIN* (Online PIN is a card verification method for EMV chip cards. These cards require the terminal to contact the issuer over a network connection to verify the PIN) を入力するように求めるプロンプトが表示されます。生成される請求では、[cardholder_verification_method](https://docs.stripe.com/api/charges/object.md#charge_object-payment_method_details-card_present-receipt-cardholder_verification_method) が `online_pin` に設定されます。 | ## Webhook またはイベントの送信先をテストする Webhook エンドポイントまたは[イベントの送信先](https://docs.stripe.com/event-destinations.md)をテストするには、次の 2 つのオプションのいずれかを選択します。 1. サンドボックスでアクションを実行し、イベントの送信先に正規のイベントを送信します。たとえば、[charge.succeeded](https://docs.stripe.com/api.md#event_types-charge.succeeded) イベントをトリガーするには、[支払いを成功させるテストカード](https://docs.stripe.com/testing.md#cards)を使用できます。 1. [Stripe CLI を使用してイベントをトリガー](https://docs.stripe.com/webhooks.md#test-webhook)するか、[Stripe for Visual Studio Code を使用](https://docs.stripe.com/stripe-vscode.md#webhooks)してイベントをトリガーします。 ## レート制限 テスト環境でリクエストが `429` HTTP エラーを受け取るようになった場合は、その頻度を下げてください。これらのエラーは、本番環境よりもテスト環境の方が厳しい[レート制限](https://docs.stripe.com/rate-limits.md)から発生します。 テスト環境で Stripe API を使用して導入の負荷テストを行うことはお勧めしません。テスト環境の負荷制限機能は厳しいため、本番環境では表示されないエラーが表示される可能性があります。代替方法については、[負荷テスト](https://docs.stripe.com/rate-limits.md#load-testing)をご覧ください。 ## カード以外の決済手段をテストする テスト用のカード以外の決済手段を使用する場合は、対話式でテストできる支払いフォームを提供する場合でも、テストコードを作成する場合でも、すべての API コールで必ず[テスト API キー](https://docs.stripe.com/keys.md#obtain-api-keys)を使用してください。 テスト手順は決済手段ごとに異なります。 #### ACH Direct Debit [Financial Connections](https://docs.stripe.com/financial-connections/testing.md#web-how-to-use-test-accounts) を使用して即時確認を行うシナリオをテストする方法をご紹介します。 ### サンドボックスで取引メールを送信する 銀行口座の詳細を収集し、同意書を受け付けたら、*サンドボックス* (A sandbox is an isolated test environment that allows you to test Stripe functionality in your account without affecting your live integration. Use sandboxes to safely experiment with new features and changes)で同意書の確認メールと少額入金の確認メールを送信します。 ドメインが **{domain}** で、ユーザー名が **{username}** の場合、メール形式 **{username}+test\_email@{domain}** を使用してテスト取引メールを送信します。 たとえば、ドメインが **example.com** でユーザー名が **info** の場合、ACH Direct Debit 決済のテストには **info+test\_email@example.com** という形式を使用します。この形式により、メールが正しくルーティングされます。**+test\_email** サフィックスを含めない場合、メールは送信されません。 > テスト中にこれらのメールをトリガーするには、[Stripe の本番環境利用の申請](https://docs.stripe.com/get-started/account/activate.md)を行う必要があります。 ### テスト用口座番号 Stripe では、手動入力の銀行口座の組み込みが本番環境に移行する準備が整ったかどうかを確認するため、テスト用の口座番号と対応するトークンをいくつか用意しています。 | 口座番号 | トークン | 金融番号 | 動作 | | -------------- | -------------------------------------- | ----------- | ----------------------------------------------------------------------------------------------------------------- | | `000123456789` | `pm_usBankAccount_success` | `110000000` | 支払いは成功します。 | | `000111111113` | `pm_usBankAccount_accountClosed` | `110000000` | 口座が解約済みであるため、支払いは失敗します。 | | `000000004954` | `pm_usBankAccount_riskLevelHighest` | `110000000` | この支払いは、[不正利用のリスクが高い](https://docs.stripe.com/radar/risk-evaluation.md#high-risk)ため、Radar によってブロックされています。 | | `000111111116` | `pm_usBankAccount_noAccount` | `110000000` | 口座が見つからないため、支払いは失敗します。 | | `000222222227` | `pm_usBankAccount_insufficientFunds` | `110000000` | 残高不足のため、支払いは失敗します。 | | `000333333335` | `pm_usBankAccount_debitNotAuthorized` | `110000000` | 引き落としがオーソリされていないため、支払いは失敗します。 | | `000444444440` | `pm_usBankAccount_invalidCurrency` | `110000000` | 通貨が無効であるため、支払いは失敗します。 | | `000666666661` | `pm_usBankAccount_failMicrodeposits` | `110000000` | 支払いで少額入金の送金が失敗します。 | | `000555555559` | `pm_usBankAccount_dispute` | `110000000` | 支払いによって不審請求の申請が開始されています。 | | `000000000009` | `pm_usBankAccount_processing` | `110000000` | 支払いは無期限に処理中のままになります。 [PaymentIntent キャンセル](https://docs.stripe.com/api/payment_intents/cancel.md) をテストするのに役立ちます。 | | `000777777771` | `pm_usBankAccount_weeklyLimitExceeded` | `110000000` | 支払い額がアカウントの週次支払い額の上限を超えているため、支払いが失敗しました。 | | `000888888885` | | `110000000` | [トークン化されたアカウント番号](https://docs.stripe.com/financial-connections/tokenized-account-numbers.md)が無効化されると決済が失敗します。 | テスト取引を完了する前に、自動的に支払いに成功または失敗するテスト用のすべての口座を確認する必要があります。確認するには、下記の少額入金のテスト用の金額または明細書表記コードを使用します。 ### 少額入金の金額と明細書表記コードをテストする さまざまなシナリオを再現するために、これらの少額入金の金額「または」明細書表記コードの値 0.01 を使用します。 | 少額入金の金額 | 明細書表記コードの値 0.01 | シナリオ | | ------------- | --------------- | ------------------------- | | `32` および `45` | SM11AA | アカウントの確認をシミュレーションします。 | | `10` および `11` | SM33CC | 許容された確認回数の超過をシミュレーションします。 | | `40` および `41` | SM44DD | 少額入金のタイムアウトをシミュレーションします。 | ### 売上処理の動作をテストする テスト取引は即座に売上として処理され、利用可能なテスト残高に追加されます。この動作は、利用可能な残高で取引が売上として処理されるまでに[数日](https://docs.stripe.com/testing.md#timing)かかることがある、本番環境とは異なります。 #### SEPA ダイレクトデビット 以下の手順を使用して、結果が成功または失敗になるテストの `PaymentIntent` を作成します。 1. テスト用アカウント番号を使用して、テストの *PaymentMethod* (PaymentMethods represent your customer's payment instruments, used with the Payment Intents or Setup Intents APIs) を作成します。 1. 作成した `PaymentMethod` を `confirmSepaDebitPayment` リクエストで使用して、テスト決済を作成します。 ### AT | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | AT611904300234573201 | pm_success_at | The PaymentIntent status transitions from `processing` to `succeeded`. | | AT321904300235473204 | pm_successDelayed_at | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | AT861904300235473202 | pm_failed_at | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | AT051904300235473205 | pm_failedDelayed_at | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | AT591904300235473203 | pm_disputed_at | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | AT981904300000343434 | pm_exceedsWeeklyVolumeLimit_at | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | AT601904300000121212 | pm_exceedsWeeklyTransactionLimit_at | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | AT981904300002222227 | pm_insufficientFunds_at | The payment fails with an `insufficient_funds` failure code. | ### BE | Account Number | Token | Description | | ---------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | BE62510007547061 | pm_success_be | The PaymentIntent status transitions from `processing` to `succeeded`. | | BE78510007547064 | pm_successDelayed_be | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | BE68539007547034 | pm_failed_be | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | BE51510007547065 | pm_failedDelayed_be | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | BE08510007547063 | pm_disputed_be | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | BE90510000343434 | pm_exceedsWeeklyVolumeLimit_be | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | BE52510000121212 | pm_exceedsWeeklyTransactionLimit_be | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | BE90510002222227 | pm_insufficientFunds_be | The payment fails with an `insufficient_funds` failure code. | ### HR | Account Number | Token | Description | | --------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | HR7624020064583467589 | pm_success_hr | The PaymentIntent status transitions from `processing` to `succeeded`. | | HR6323600002337876649 | pm_successDelayed_hr | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | HR2725000096983499248 | pm_failed_hr | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | HR6723600004878117427 | pm_failedDelayed_hr | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | HR8724840081455523553 | pm_disputed_hr | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | HR7424020060000343434 | pm_exceedsWeeklyVolumeLimit_hr | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | HR3624020060000121212 | pm_exceedsWeeklyTransactionLimit_hr | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | HR7424020060002222227 | pm_insufficientFunds_hr | The payment fails with an `insufficient_funds` failure code. | ### EE | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | EE382200221020145685 | pm_success_ee | The PaymentIntent status transitions from `processing` to `succeeded`. | | EE222200221020145682 | pm_successDelayed_ee | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | EE762200221020145680 | pm_failed_ee | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | EE922200221020145683 | pm_failedDelayed_ee | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | EE492200221020145681 | pm_disputed_ee | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | EE672200000000343434 | pm_exceedsWeeklyVolumeLimit_ee | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | EE292200000000121212 | pm_exceedsWeeklyTransactionLimit_ee | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | EE672200000002222227 | pm_insufficientFunds_ee | The payment fails with an `insufficient_funds` failure code. | ### FI | Account Number | Token | Description | | ------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | FI2112345600000785 | pm_success_fi | The PaymentIntent status transitions from `processing` to `succeeded`. | | FI3712345600000788 | pm_successDelayed_fi | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | FI9112345600000786 | pm_failed_fi | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | FI1012345600000789 | pm_failedDelayed_fi | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | FI6412345600000787 | pm_disputed_fi | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | FI6712345600343434 | pm_exceedsWeeklyVolumeLimit_fi | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | FI2912345600121212 | pm_exceedsWeeklyTransactionLimit_fi | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | FI6712345602222227 | pm_insufficientFunds_fi | The payment fails with an `insufficient_funds` failure code. | ### FR | Account Number | Token | Description | | --------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | FR1420041010050500013M02606 | pm_success_fr | The PaymentIntent status transitions from `processing` to `succeeded`. | | FR3020041010050500013M02609 | pm_successDelayed_fr | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | FR8420041010050500013M02607 | pm_failed_fr | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | FR7920041010050500013M02600 | pm_failedDelayed_fr | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | FR5720041010050500013M02608 | pm_disputed_fr | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | FR9720041010050000000343434 | pm_exceedsWeeklyVolumeLimit_fr | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | FR5920041010050000000121212 | pm_exceedsWeeklyTransactionLimit_fr | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | FR9720041010050000002222227 | pm_insufficientFunds_fr | The payment fails with an `insufficient_funds` failure code. | ### DE | Account Number | Token | Description | | ---------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | DE89370400440532013000 | pm_success_de | The PaymentIntent status transitions from `processing` to `succeeded`. | | DE08370400440532013003 | pm_successDelayed_de | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | DE62370400440532013001 | pm_failed_de | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | DE78370400440532013004 | pm_failedDelayed_de | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | DE35370400440532013002 | pm_disputed_de | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | DE65370400440000343434 | pm_exceedsWeeklyVolumeLimit_de | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | DE27370400440000121212 | pm_exceedsWeeklyTransactionLimit_de | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | DE65370400440002222227 | pm_insufficientFunds_de | The payment fails with an `insufficient_funds` failure code. | ### GI | Account Number | Token | Description | | ----------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | GI60MPFS599327643783385 | pm_success_gi | The PaymentIntent status transitions from `processing` to `succeeded`. | | GI08RRNW626436291644533 | pm_successDelayed_gi | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | GI41SAFA461293238477751 | pm_failed_gi | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | GI50LROG772261344693297 | pm_failedDelayed_gi | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | GI26KJBC361883934534696 | pm_disputed_gi | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | GI14NWBK000000000343434 | pm_exceedsWeeklyVolumeLimit_gi | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | GI73NWBK000000000121212 | pm_exceedsWeeklyTransactionLimit_gi | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | GI14NWBK000000002222227 | pm_insufficientFunds_gi | The payment fails with an `insufficient_funds` failure code. | ### IE | Account Number | Token | Description | | ---------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | IE29AIBK93115212345678 | pm_success_ie | The PaymentIntent status transitions from `processing` to `succeeded`. | | IE24AIBK93115212345671 | pm_successDelayed_ie | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | IE02AIBK93115212345679 | pm_failed_ie | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | IE94AIBK93115212345672 | pm_failedDelayed_ie | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | IE51AIBK93115212345670 | pm_disputed_ie | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | IE10AIBK93115200343434 | pm_exceedsWeeklyVolumeLimit_ie | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | IE69AIBK93115200121212 | pm_exceedsWeeklyTransactionLimit_ie | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | IE10AIBK93115202222227 | pm_insufficientFunds_ie | The payment fails with an `insufficient_funds` failure code. | ### LI | Account Number | Token | Description | | --------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | LI0508800636123378777 | pm_success_li | The PaymentIntent status transitions from `processing` to `succeeded`. | | LI4408800387787111369 | pm_successDelayed_li | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | LI1208800143823175626 | pm_failed_li | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | LI4908800356441975566 | pm_failedDelayed_li | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | LI7708800125525347723 | pm_disputed_li | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | LI2408800000000343434 | pm_exceedsWeeklyVolumeLimit_li | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | LI8308800000000121212 | pm_exceedsWeeklyTransactionLimit_li | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | LI2408800000002222227 | pm_insufficientFunds_li | The payment fails with an `insufficient_funds` failure code. | ### LT | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | LT121000011101001000 | pm_success_lt | The PaymentIntent status transitions from `processing` to `succeeded`. | | LT281000011101001003 | pm_successDelayed_lt | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | LT821000011101001001 | pm_failed_lt | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | LT981000011101001004 | pm_failedDelayed_lt | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | LT551000011101001002 | pm_disputed_lt | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | LT591000000000343434 | pm_exceedsWeeklyVolumeLimit_lt | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | LT211000000000121212 | pm_exceedsWeeklyTransactionLimit_lt | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | LT591000000002222227 | pm_insufficientFunds_lt | The payment fails with an `insufficient_funds` failure code. | ### LU | Account Number | Token | Description | | -------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | LU280019400644750000 | pm_success_lu | The PaymentIntent status transitions from `processing` to `succeeded`. | | LU440019400644750003 | pm_successDelayed_lu | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | LU980019400644750001 | pm_failed_lu | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | LU170019400644750004 | pm_failedDelayed_lu | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | LU710019400644750002 | pm_disputed_lu | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | LU900010000000343434 | pm_exceedsWeeklyVolumeLimit_lu | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | LU520010000000121212 | pm_exceedsWeeklyTransactionLimit_lu | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | LU900010000002222227 | pm_insufficientFunds_lu | The payment fails with an `insufficient_funds` failure code. | ### NL | Account Number | Token | Description | | ------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | NL39RABO0300065264 | pm_success_nl | The PaymentIntent status transitions from `processing` to `succeeded`. | | NL55RABO0300065267 | pm_successDelayed_nl | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | NL91ABNA0417164300 | pm_failed_nl | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | NL28RABO0300065268 | pm_failedDelayed_nl | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | NL82RABO0300065266 | pm_disputed_nl | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | NL27RABO0000343434 | pm_exceedsWeeklyVolumeLimit_nl | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | NL86RABO0000121212 | pm_exceedsWeeklyTransactionLimit_nl | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | NL55RABO0300065267 | pm_insufficientFunds_nl | The payment fails with an `insufficient_funds` failure code. | ### NO | Account Number | Token | Description | | --------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | NO9386011117947 | pm_success_no | The PaymentIntent status transitions from `processing` to `succeeded`. | | NO8886011117940 | pm_successDelayed_no | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | NO6686011117948 | pm_failed_no | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | NO6186011117941 | pm_failedDelayed_no | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | NO3986011117949 | pm_disputed_no | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | NO0586010343434 | pm_exceedsWeeklyVolumeLimit_no | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | NO0586010343434 | pm_exceedsWeeklyTransactionLimit_no | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | NO0586012222227 | pm_insufficientFunds_no | The payment fails with an `insufficient_funds` failure code. | ### PT | Account Number | Token | Description | | ------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | PT50000201231234567890154 | pm_success_pt | The PaymentIntent status transitions from `processing` to `succeeded`. | | PT66000201231234567890157 | pm_successDelayed_pt | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | PT23000201231234567890155 | pm_failed_pt | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | PT39000201231234567890158 | pm_failedDelayed_pt | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | PT93000201231234567890156 | pm_disputed_pt | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | PT05000201230000000343434 | pm_exceedsWeeklyVolumeLimit_pt | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | PT64000201230000000121212 | pm_exceedsWeeklyTransactionLimit_pt | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | PT05000201230000002222227 | pm_insufficientFunds_pt | The payment fails with an `insufficient_funds` failure code. | ### ES | Account Number | Token | Description | | ------------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | ES0700120345030000067890 | pm_success_es | The PaymentIntent status transitions from `processing` to `succeeded`. | | ES2300120345030000067893 | pm_successDelayed_es | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | ES9121000418450200051332 | pm_failed_es | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | ES9300120345030000067894 | pm_failedDelayed_es | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | ES5000120345030000067892 | pm_disputed_es | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | ES1700120345000000343434 | pm_exceedsWeeklyVolumeLimit_es | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | ES7600120345000000121212 | pm_exceedsWeeklyTransactionLimit_es | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | ES1700120345000002222227 | pm_insufficientFunds_es | The payment fails with an `insufficient_funds` failure code. | ### SE | Account Number | Token | Description | | ------------------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | SE3550000000054910000003 | pm_success_se | The PaymentIntent status transitions from `processing` to `succeeded`. | | SE5150000000054910000006 | pm_successDelayed_se | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | SE0850000000054910000004 | pm_failed_se | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | SE2450000000054910000007 | pm_failedDelayed_se | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | SE7850000000054910000005 | pm_disputed_se | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | SE2850000000000000343434 | pm_exceedsWeeklyVolumeLimit_se | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | SE8750000000000000121212 | pm_exceedsWeeklyTransactionLimit_se | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | SE2850000000000002222227 | pm_insufficientFunds_se | The payment fails with an `insufficient_funds` failure code. | ### CH | Account Number | Token | Description | | --------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | CH9300762011623852957 | pm_success_ch | The PaymentIntent status transitions from `processing` to `succeeded`. | | CH8656663438253651553 | pm_successDelayed_ch | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | CH5362200119938136497 | pm_failed_ch | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | CH1843597160341964438 | pm_failedDelayed_ch | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | CH1260378413965193069 | pm_disputed_ch | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | CH1800762000000343434 | pm_exceedsWeeklyVolumeLimit_ch | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | CH7700762000000121212 | pm_exceedsWeeklyTransactionLimit_ch | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | CH1800762000002222227 | pm_insufficientFunds_ch | The payment fails with an `insufficient_funds` failure code. | ### GB | Account Number | Token | Description | | ---------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | GB82WEST12345698765432 | pm_success_gb | The PaymentIntent status transitions from `processing` to `succeeded`. | | GB98WEST12345698765435 | pm_successDelayed_gb | The PaymentIntent status transitions from `processing` to `succeeded` after at least three minutes. | | GB55WEST12345698765433 | pm_failed_gb | The PaymentIntent status transitions from `processing` to `requires_payment_method`. | | GB71WEST12345698765436 | pm_failedDelayed_gb | The PaymentIntent status transitions from `processing` to `requires_payment_method` after at least three minutes. | | GB28WEST12345698765434 | pm_disputed_gb | The PaymentIntent status transitions from `processing` to `succeeded`, but a dispute is immediately created. | | GB70WEST12345600343434 | pm_exceedsWeeklyVolumeLimit_gb | The payment fails with a `charge_exceeds_source_limit` failure code due to payment amount causing account to exceed its weekly payment volume limit. | | GB32WEST12345600121212 | pm_exceedsWeeklyTransactionLimit_gb | The payment fails with a `charge_exceeds_weekly_limit` failure code due to payment amount exceeding account's transaction volume limit. | | GB70WEST12345602222227 | pm_insufficientFunds_gb | The payment fails with an `insufficient_funds` failure code. | #### Bacs ダイレクトデビット この実装の準備ができていることを確認するために、*サンドボックス* (A sandbox is an isolated test environment that allows you to test Stripe functionality in your account without affecting your live integration. Use sandboxes to safely experiment with new features and changes)で使用できる[テスト用銀行口座番号](https://docs.stripe.com/keys.md#test-live-modes)が複数用意されています。 | 銀行コード | 口座番号 | 説明 | | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 108800 | 00012345 | 支払いが成功し、PaymentIntent が `processing` から `succeeded` に変化します。 | | 108800 | 90012345 | 支払いが 3 分後に成功し、PaymentIntent が `processing` から `succeeded` に変化します。 | | 108800 | 33333335 | 支払いが承認されますが、すぐに `debit_not_authorized` エラーコードによって失敗し、PaymentIntent が `processing` から `requires_payment_method` に変わります。同意書は `inactive` になり、この PaymentMethod を再び使用することはできません。 | | 108800 | 93333335 | 支払いが `debit_not_authorized` エラーコードによって 3 分後に失敗し、PaymentIntent が `processing` から `requires_payment_method` に変化します。同意書は `inactive` になり、この PaymentMethod を再び使用することはできません。 | | 108800 | 22222227 | 支払いが `insufficient_funds` エラーコードによって失敗し、PaymentIntent が `processing` から `requires_payment_method` に変化します。同意書は `active` のままで、この PaymentMethod は再使用が可能です。 | | 108800 | 92222227 | 支払いが `insufficient_funds` エラーコードによって 3 分後に失敗し、PaymentIntent が `processing` から `requires_payment_method` に変化します。同意書は `active` のままで、この PaymentMethod は再使用が可能です。 | | 108800 | 55555559 | 支払いが 3 分後に成功し、PaymentIntent が `processing` から `succeeded` に変わりますが、不審請求の申請が直ちに作成されます。 | | 108800 | 00033333 | 支払い方法の作成は成功しますが、同意書が顧客の銀行によって拒否され、即座に inactive に変化します。 | | 108800 | 00044444 | Bacs ダイレクトデビットの設定を求めるリクエストが、口座番号が無効なため即座に失敗し、顧客は送信前に情報を更新するように求められます。支払いの詳細は回収されません。 | | 108800 | 34343434 | 支払い額がアカウントの週次支払い額の上限を超えているため、支払いは `charge_exceeds_source_limit` エラーコードで失敗します。 | | 108800 | 12121212 | 支払い額がアカウントの取引金額の上限を超えているため、支払いは `charge_exceeds_weekly_limit` エラーコードで失敗します。 | テストの実行には前述の任意の口座番号を使用できます。ただし、Bacs ダイレクトデビットによる支払いは処理に数日かかるため、3 分の遅延で動作するテスト用口座番号を使用して、本番環境の支払いの動作のシミュレーションをしやすくします。 > デフォルトでは、Stripe は決済情報が初めて収集されたときと、顧客の口座から引き落としが行われるたびに、顧客に[メール](https://docs.stripe.com/payments/payment-methods/bacs-debit.md#debit-notifications)を送信します。これらの通知は、サンドボックスでは送信されません。 #### BECS ダイレクトデビット (オーストラリア) 以下の手順を使用して、結果が成功または失敗になるテストの `PaymentIntent` を作成できます。 テスト`BSB 000000`と以下のリストのテスト用アカウント番号を使用し、テストの *PaymentMethod* (PaymentMethods represent your customer's payment instruments, used with the Payment Intents or Setup Intents APIs) を作成します。生成された`PaymentMethod`を`confirmAuBecsDebitPayment`リクエストで使用して、テスト決済を作成します。 ### テスト用口座番号 | BSB 番号 | 口座番号 | 説明 | | -------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------- | | `000000` | `000123456` | PaymentIntent のステータスは、`processing` から `succeeded` へと変化します。同意書のステータスは引き続き `active` です。 | | `000000` | `900123456` | PaymentIntent のステータスは、`processing` から `succeeded` へと変化します (3 分の遅延あり)。同意書のステータスは引き続き `active` です。 | | `000000` | `111111113` | PaymentIntent のステータスは、`processing` から `requires_payment_method` に変わり、`account_closed` エラーコードが返されます。同意書のステータスは `inactive` になります。 | | `000000` | `111111116` | PaymentIntent のステータスは、`processing` から `requires_payment_method` に変わり、`no_account` エラーコードが返されます。同意書のステータスは `inactive` になります。 | | `000000` | `222222227` | PaymentIntent のステータスは、`processing` から `requires_payment_method` に変わり、`refer_to_customer` エラーコードが返されます。同意書のステータスは引き続き `active` です。 | | `000000` | `922222227` | PaymentIntent のステータスは、`processing` から `requires_payment_method` に変わり、`refer_to_customer` エラーコードが返されます (3 分の遅延あり)。同意書のステータスは引き続き `active` です。 | | `000000` | `333333335` | PaymentIntent のステータスは、`processing` から `requires_payment_method` に変わり、`debit_not_authorized` エラーコードが返されます。同意書のステータスは `inactive` になります。 | | `000000` | `666666660` | PaymentIntent のステータスは、`processing` から `succeeded` に変わりますが、不審請求の申請が直ちに作成されます。 | | `000000` | `343434343` | PaymentIntent は、支払い金額が原因でアカウントの週次支払い金額の上限を超えてしまうため、`charge_exceeds_source_limit` エラーで失敗します。 | | `000000` | `121212121` | PaymentIntent は、支払い金額がアカウントの取引金額の上限を超えているため、`charge_exceeds_transaction_limit` エラーで失敗します。 | #### その他 他の決済手段では、テスト情報はドキュメントに含まれています。[決済手段を探し](https://docs.stripe.com/payments/payment-methods/overview.md)て、決済の受け付けとテストに関連するガイドをご覧ください。 ## Link をテストする > Don’t store real user data in *sandbox* (A sandbox is an isolated test environment that allows you to test Stripe functionality in your account without affecting your live integration. Use sandboxes to safely experiment with new features and changes) Link accounts. Treat them as if they’re publicly available, because these test accounts are associated with your publishable key. Currently, Link only works with credit cards, debit cards, and qualified US bank account purchases. Link requires [domain registration](https://docs.stripe.com/payments/payment-methods/pmd-registration.md). You can create sandbox accounts for Link using any valid email address. The following table shows the fixed one-time passcode values that Stripe accepts for authenticating sandbox accounts: | 値 | 結果 | | --------------------- | -------------------- | | 以下に記載されていない任意の 6 桁の数字 | 成功 | | 000001 | エラー: コードが無効です | | 000002 | エラー: コードの有効期限が切れています | | 000003 | エラー: 最大試行回数を超えました | ### 複数の資金供給元 対応する資金供給元を Stripe が追加した場合でも、貴社で構築済みのシステムを更新する必要はありません。Stripe が自動的に対応し、カード決済や銀行口座決済の場合と同じ売上処理時間と保証が適用されます。 ## リダイレクトベースのフローをテストする リダイレクトフローを使用する決済 (iDEAL など) をシミュレーションして導入のリダイレクト処理ロジックをテストするには、[リダイレクトを必要](https://docs.stripe.com/payments/payment-methods/payment-method-support.md#additional-api-supportability)とするサポート対象の決済方法を使用します。 結果が成功または失敗になるテスト用 `PaymentIntent` を作成するには、以下のようにします。 1. [ダッシュボードの決済手段の設定](https://dashboard.stripe.com/settings/payment_methods)に移動し、テスト環境で **有効にする** をクリックして、サポートされている決済手段を有効にします。 1. 決済詳細を収集します。 1. Stripe に決済を送信します。 1. テスト決済をオーソリするか、失敗させます。 Web サイト上のページ (`return_url` に対応するページ) で、必ず決済のステータスが確認できるようにしてください。 ## See also - [Connect の導入をテストする](https://docs.stripe.com/connect/testing.md) - [Billing の導入をテストする](https://docs.stripe.com/billing/testing.md) - [Terminal の導入をテストする](https://docs.stripe.com/terminal/references/testing.md) - [負荷テスト](https://docs.stripe.com/rate-limits.md#load-testing)