Publish any app, at any scale. Sign up to get the playbook.

Setup Stripe Analytics Dashboard in Python

play-icon

Meet the Speaker

Austin Kiesewetter

Austin Kiesewetter

Austin Kiesewetter is a Plotly community member and software engineer at Martin Engineering.

This video shows how to add analytics to an e-commerce app. The goal is to create an admin view that tracks revenue, transactions, and customer insights directly within a Plotly Dash application. A script of about 280 lines demonstrates how to fetch payment data from Stripe, process it with pandas, and display it in an analytics dashboard.

The process begins by pulling Stripe payment intent data within a specified date range, limited to the first 100 transactions. Each transaction is parsed for details such as payment ID, date, amount, currency, customer, and metadata. These values are stored in a pandas data frame which becomes the foundation for analysis. Functions are introduced to calculate total revenue, transaction counts, and average order size.

The analytics dashboard includes summary cards for quick metrics, a bar chart for daily revenue, and a line chart for sales volume. The video also shows how to group data by date, aggregate sums and counts, and render results in Plotly figures. Additional highlights are added to show transaction breakdowns by amount and count. The layout is built using Dash with navigation, titles, error handling, and summary sections. No callbacks are required since this page is purely analytic.

Key points

  • Stripe API integration with payment intent endpoint
  • Data extraction and transformation using pandas
  • Visualizations with Plotly bar and line charts
  • Summary cards for total revenue, transaction count, and averages
  • Export options to CSV, Excel, or JSON for further analysis

Watch the video to follow along and build your own Stripe-powered analytics dashboard.

Related Videos

Bluesky icon
X icon
Instagram icon
Youtube icon
Medium icon
Facebook icon

Product

© 2025
Plotly. All rights reserved.
Cookie Preferences