0Pricing
Stripe Payments & SaaS Billing Systems · レッスン

Stripeのテストモードとテストカードを理解する

Stripeのサンドボックスを実際に操作します。テストモードへの切り替え、テストカード番号の使用、成功・拒否・認証が必要な決済の安全なシミュレーションを行います。

「Stripeのテストモードとテストカードを理解する」はCoddyKit上の無料Stripe Payments & SaaS Billing Systemsレッスンです。 これはレッスン4/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはStripe Payments & SaaS Billing Systems学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Stripe Payments & SaaS Billing Systemsコースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

What Is Test Mode?

Every Stripe account gets a fully isolated test mode — build and experiment freely without moving real money or touching live customers.

Test vs Live Keys

Each mode has its own API keys: test keys start with sk_test_ and pk_test_, live keys with sk_live_. Data never crosses between modes.

// Test secret key example (not a real key)
const stripe = require('stripe')('sk_test_123abc');

Toggling in the Dashboard

The dashboard has a Test mode switch in the top corner. Flip it to see test payments, customers, and logs kept separate from live data.

The Magic Success Card

The classic test card 4242 4242 4242 4242 always succeeds — pair it with any future expiry and any 3-digit CVC.

// Card: 4242 4242 4242 4242
// Exp: 12 / 34   CVC: 123

Simulating a Decline

Stripe gives you cards that always decline so you can test error handling — like 4000...0002 for a generic decline or ...9995 for insufficient funds.

Triggering 3D Secure

Card 4000 0025 0000 3155 forces a 3D Secure step, letting you test the SCA authentication flow before going live.

Handling the Decline in Code

Test cards let you confirm your error branches actually run — here, mapping a payment status to a human-readable outcome.

function describeOutcome(status) {
  if (status === 'succeeded') return 'Payment complete';
  if (status === 'requires_action') return 'Needs authentication';
  return 'Payment failed';
}
console.log(describeOutcome('requires_action'));

Test Clocks

For subscriptions, test clocks fast-forward time so renewals and trial expirations fire instantly instead of after days.

Reading Test Logs

The Developers > Logs view in test mode shows every API request and response — invaluable for debugging integration issues.

Going Live Checklist

Going live checklist: swap to live keys, re-test the full flow, configure live webhooks, and confirm your business profile is activated.

Never Mix Modes

A classic bug is mixing modes — a test key with a live webhook secret, or vice versa. Keep mode-specific config separate per environment.

Quick Check

Which test card always results in a successful charge?

Recap

Recap: test mode gives isolated keys and a dashboard toggle, success/decline/3DS test cards, test clocks for subscriptions, and a go-live checklist.

よくある質問

「Stripeのテストモードとテストカードを理解する」レッスンは無料ですか?

はい。「Stripeのテストモードとテストカードを理解する」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Stripe Payments & SaaS Billing Systemsコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Stripe Payments & SaaS Billing Systemsコースには全4レッスンが含まれています。

「Stripeのテストモードとテストカードを理解する」で何を学びますか?

Stripeのサンドボックスを実際に操作します。テストモードへの切り替え、テストカード番号の使用、成功・拒否・認証が必要な決済の安全なシミュレーションを行います。 ブラウザで直接実行するハンズオンコードでStripe Payments & SaaS Billing Systemsを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

Stripe Payments & SaaS Billing Systemsを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのStripe Payments & SaaS Billing Systemsは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン4/4です。

「Stripeのテストモードとテストカードを理解する」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このStripe Payments & SaaS Billing Systemsレッスンでコードを書いて実行できますか?

はい。すべてのStripe Payments & SaaS Billing Systemsレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. オンライン決済エコシステムの理解
  2. Stripeアカウントの設定とダッシュボードツアー
  3. Checkoutで初めての決済を処理する
  4. Stripeのテストモードとテストカードを理解する
← Stripe Payments & SaaS Billing Systemsに戻る