Skip to content
Tutorials Center
My learning

Topics

Lesson 5 of 38 ยท Getting Started

Dashboard, Stripe CLI and Developer Tools

Tour the tools around the Stripe API: the Dashboard, request logs, the event log, the Stripe CLI for triggering events and forwarding webhooks, and how to debug a failing call.

A payment bug is rarely "the code does not run". It is "the customer says they paid but we show unpaid", or "this card works in test but fails live". To solve those you need to see what Stripe saw. Stripe gives you several tools for that, and learning them early saves hours. This lesson tours them and ends with a runnable stand-in that mimics what the request log and event log let you do.

None of the tools themselves run on this site (they need your account), so commands are read-only, with stand-ins for the ideas.

The Dashboard

The Dashboard is the web interface for your account. As a developer you will use these areas most:

  • Payments, Customers, Subscriptions, Invoices: browse objects, issue refunds, see timelines.
  • Developers or Workbench: API keys, webhooks, logs and events in one developer panel.
  • Balances and Payouts: what you are owed and when it lands in your bank.
  • Radar: fraud rules and reviews (see the fraud lesson later in this course).

Always check the test mode toggle (or which sandbox you are in) before you hunt for something. Half of all "missing payment" mysteries are a developer looking in live mode for a test payment.

Request logs

Every API call made with your keys is recorded: method, path, status, parameters, response body, the API version, the source IP and the Request-Id. Open the log entry for a failing call and you will see exactly what Stripe received. Compare it with what you thought you sent. Typical discoveries:

  • The amount was sent as "19.99" (a decimal) instead of 1999.
  • A required parameter was missing because a variable was undefined and the SDK dropped it.
  • The call used a test key against a live object ID.

The event log

An Event (evt_...) is created whenever something changes: payment_intent.succeeded, invoice.payment_failed, customer.subscription.updated. The event log lists them with their JSON payload, and shows webhook delivery attempts and the response your server gave. If your handler returned 500, you can see it, then resend the event after you fix the bug. You will rely on this heavily in the Webhooks chapter.

The Stripe CLI

The Stripe CLI is a command-line tool that logs in to your account. Install it with your package manager, run stripe login, and these commands become available (all read-only here):

Terminal
# See what the CLI can do with an API resource
stripe customers create --name "Ada" --email [email protected]

# Watch API requests live while you click around your app
stripe logs tail

# Forward real test events to your local server
stripe listen --forward-to localhost:3000/webhooks/stripe

# Make Stripe create a realistic event on demand
stripe trigger payment_intent.succeeded

# Replay a past event to your forwarded endpoint
stripe events resend evt_1Pq77A

The big one is stripe listen. Your laptop is not reachable from the internet, so Stripe cannot send webhooks to it. The CLI opens a connection to Stripe and forwards events to your local port, and prints a webhook signing secret (whsec_...) for that session. You will use that secret to verify signatures in the next-but-one chapter.

Your debugging toolbox

Request log What did I send?
Event log What happened next?
Stripe CLI Trigger and forward
Test mode Break things safely
1 / 2

A stand-in request log

To feel how useful a log is, here is a tiny stand-in that records calls like Stripe does and lets you search them. It is not Stripe, but it shows the questions a real log answers.

Node.js Searching a request log (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.

A stand-in event replay

When a webhook handler fails, you fix it and resend the stored event. The following stand-in stores events and delivers them to a handler, recording failures, then replays only the failed ones. The real event log works the same way conceptually.

Node.js Replaying failed events (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with node:readline or process.stdin), it gets the next line from this box.

A debugging routine

When a payment misbehaves, follow the same four steps every time:

  1. Find the object in the Dashboard (right mode!). Read its timeline.
  2. Open the request log for the call that created or changed it. Compare parameters with your intent.
  3. Open the event log to see what Stripe told your server, and what your server answered.
  4. Reproduce locally with the CLI: stripe trigger or stripe listen, then fix and resend.

With the tools covered, you are ready to learn how money and cards really work before writing checkout code: How Card Payments Work.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which tool lets Stripe events reach a server running on your laptop?

    stripe listen opens a connection to Stripe and forwards events to the local URL you give it.
  2. 2. A payment you made in test mode is not in the Dashboard. What do you check first?

    Test and live data are separate. Looking in the wrong mode is the most common cause.
  3. 3. Where would you look to see the exact parameters a failing API call contained?

    The request log stores each call with its parameters, status and response.
  4. 4. Your webhook handler returned 500 for an event. After fixing it, what is the best way to retry?

    Events are stored. Resending them delivers the same payload to the fixed handler.

Summary

  • The Dashboard, request log and event log show what Stripe saw and what it told you.
  • The Stripe CLI can forward webhooks (stripe listen), create events (stripe trigger) and resend them.
  • Always check which mode (test or live) you are viewing.
  • Debug in four steps: object, request log, event log, local reproduction.

Next: How Card Payments Work