Steps to Build Stripe Reports: A Comprehensive Guide

Aman Sharma • Last Modified: September 7th, 2023

STRIPE REPORTS

Stripe is growingly popular among businesses that desire to simplify their payment processing requirements. With API integrations, compatible with over 135 currencies and several effective payouts-related features Stripe aids to accept and process payments with great ease. This article deals with Stripe reports that are comprehensive representations of your business and financial data. You will read about how to build Stripe Reports, the limitations of these methods, and alternatives to avoid the same. 

Table of Contents 

Hevo, A Simpler Alternative to Integrate your Data for Analysis

Hevo offers a faster way to move data from databases or SaaS applications into your data warehouse to be visualized in a BI tool. Hevo is fully automated and hence does not require you to code.

Get Started with Hevo for Free

Check out some of the cool features of Hevo:

  • Completely Automated: The Hevo platform can be set up in just a few minutes and requires minimal maintenance.
  • Real-time Data Transfer: Hevo provides real-time data migration, so you can have analysis-ready data always.
  • 100% Complete & Accurate Data Transfer: Hevo’s robust infrastructure ensures reliable data transfer with zero data loss.
  • Scalable Infrastructure: Hevo has in-built integrations for 100+ sources that can help you scale your data infrastructure as required.
  • 24/7 Live Support: The Hevo team is available round the clock to extend exceptional support to you through chat, email, and support calls.
  • Schema Management: Hevo takes away the tedious task of schema management & automatically detects the schema of incoming data and maps it to the destination schema.
  • Security: Hevo is SOC II, GDPR, and HIPPA compliant. Hevo also enables top-grade security with end-to-end encryption, two-factor authentication, and more.
  • Live Monitoring: Hevo allows you to monitor the data flow so you can check where your data is at a particular point in time.
Sign up here for a 14-Day Free Trial!

Introduction to Stripe Reports 


The Stripe interface is one that offers several data analytics and management features for businesses to handle and efficiently acknowledge their transactions. Stripe reports are robust and greatly aid in understanding your Stripe balance and analyzing other parameters. 

Stripe Reporting and Analytics  - Transfer Data for Free from Stripe to your target destination
Stripe Reporting and Analytics- Image via Putler

Significance of Stripe Reports

There are mainly three kinds of reporting options rendered by Stripe – Financial reports, Dashboard Exports, and Sigma.  Financial reports convey details that impact your Stripe balance. You can access important details like the original date, payout date, and other important details regarding every transaction. The transactional and payout data can be filtered and accessed in the CSV format. Sigma makes your business data insights available in an interactive format in the dashboard. 

Types of Reporting in Stripe  - Transfer Data for Free from Stripe to your target destination
Types of Reporting in Stripe- Image via Stripe

How to Build Stripe Reports

In order to build an insightful Stripe report custom suited for your business requirements implement the following steps:

Step 1: Specify a Report type and Data Availability

You can either choose to create a balance summary report or a payout reconciliation. To specify the same you can run a code structured as follows:

// Note that a live-mode API key is required.
ReportType reportType = ReportType.retrieve("balance.summary.1");
{
  id: "balance.summary.1",
  name: "Balance summary",
  version: "1",
  object: "reporting.report_type",
  data_available_start: 1519862400, # 2018-03-01 00:00
  data_available_end: 1517356800, # 2018-05-04 00:00
  updated: 1517382720, # 2018-05-04 07:12
}

Step 2: Create and Access Report Runs

A ReportRun API can be used to represent different instances of the type of report you choose. Typically, details as shown below are considered followed by a “build” method to create the report.

// Timestamps are for 2020-01-01 00:00 PST and 2020-02-01 00:00 PST.
// The columns parameter is optional. A default set of columns will be provided if you don't specify a value.
// Note that a live-mode API key is required.
ReportRunCreateParams params =
  ReportRunCreateParams.builder()
    .setParameters(
      ReportRunCreateParams.Parameters.builder()
        .setIntervalStart(1577865600L)
        .setIntervalEnd(1580544000L)
        .setTimezone(ReportRunCreateParams.Parameters.Timezone.AMERICA_LOS_ANGELES)
        .addColumn('created')
        .addColumn('reporting_category')
        .addColumn('net')
        .build())
    .setReportType("balance_change_from_activity.itemized.3")
    .build();

ReportRun report = ReportRun.create(params);
{
  id: "frr_123",
  object: "reporting.report_run",
  livemode: true,
  report_type: "balance_change_from_activity.itemized.3",
  parameters: {
    columns: [ "created", "reporting_category", "net" ],
    interval_start: 1577865600,      # 2020-01-01 00:00 PST
    interval_end: 1580544000,        # 2020-02-01 00:00 PST
    timezone: "America/Los_Angeles",
  },
  created: 1580832900, # 2020-02-04 08:15 PST
  status: "pending",
  result: nil,
}

Step 3: Confirm Status and Retrieve File Contents 

The following script can be an example of a successful confirmation of the process. After the script is run successfully a status change from pending to success will be observed as shown:

{
  id: "frr_123",
  object: "reporting.report_run",
  livemode: true,
  report_type: "balance_change_from_activity.itemized.3",
  parameters: {
    columns: [ "created", "reporting_category", "net" ],
    interval_start: 1577865600,      # 2020-01-01 00:00 PST
    interval_end: 1580544000,        # 2020-02-01 00:00 PST
    timezone: "America/Los_Angeles",
  },
  created: 1580832900, # 2020-02-04 08:15 PST
  status: "succeeded",
  succeeded_at: 1580832960, # 2020-02-04 08:16 PST
  result: {
    id: "file_xs8vrJzC",
    object: "file",
    url: "https://files.stripe.com/v1/files/file_xs8vrJzC/contents",
    created: 1580832960, # 2020-02-04 08:16 PST
    purpose: "report_run",
    size: 53075,
    type: "csv"
  },
}

For retrieving file content you will need to use your API key and get access as specified by result.url. The file can be recognized as follows:

curl https://files.stripe.com/v1/files/file_xs8vrJzC/contents 
  -u 
sk_test_4eC39HqLyjWDarjtT1zdp7dc
 

# Note that a live-mode API key is required.

Step 4: Add any Custom Parameters required

You can also implement a custom Report Run to generate your report with specific parameters.  A typical report run object would look something like this:

{
  "id": "frr_1Hqz0i2eZvKYlo2CDzMrK7FK",
  "object": "reporting.report_run",
  "created": 1606214676,
  "error": null,
  "livemode": true,
  "parameters": {
    "interval_end": 1525132800,
    "interval_start": 1522540800
  },
  "report_type": "balance.summary.1",
  "result": {
    "id": "file_1CoyB52eZvKYlo2CNsSN1co5",
    "object": "file",
    "created": 1531853139,
    "expires_at": null,
    "filename": "file_1CoyB52eZvKYlo2CNsSN1co5",
    "links": {
      "object": "list",
      "data": [],
      "has_more": false,
      "url": "/v1/file_links?file=file_1CoyB52eZvKYlo2CNsSN1co5"
    },
    "purpose": "finance_report_run",
    "size": 9863,
    "title": null,
    "type": "csv",
    "url": "https://files.stripe.com/v1/files/file_1CoyB52eZvKYlo2CNsSN1co5/contents"
  },
  "status": "succeeded",
  "succeeded_at": 1525192811
}

For this, you need to create a customized Report Run, consequently retrieve it and all the returns will be listed to initiate the reporting. To achieve this, your code will have to be run in the manner shown below:

Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";

Map<String, Object> parameters = new HashMap<>();
parameters.put("interval_start", 1522540800);
parameters.put("interval_end", 1525132800);
Map<String, Object> params = new HashMap<>();
params.put("report_type", "balance.summary.1");
params.put("parameters", parameters);

ReportRun reportRun = ReportRun.create(params);
Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";

ReportRun reportRun =
  ReportRun.retrieve(
    "frr_1Hr0IU2eZvKYlo2CeVDO86FM"
  );
Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";

Map<String, Object> params = new HashMap<>();
params.put("limit", 3);

ReportRunCollection reportRuns =
  ReportRun.list(params);

The responses to the same would appear as shown:

{
  "id": "frr_1Hr0K72eZvKYlo2CvclsK6wj",
  "object": "reporting.report_run",
  "created": 1606219723,
  "error": null,
  "livemode": true,
  "parameters": {
    "interval_start": 1522540800,
    "interval_end": 1525132800
  },
  "report_type": "balance.summary.1",
  "result": {
    "id": "file_1CoyB52eZvKYlo2CNsSN1co5",
    "object": "file",
    "created": 1531853139,
    "expires_at": null,
    "filename": "file_1CoyB52eZvKYlo2CNsSN1co5",
    "links": {
      "object": "list",
      "data": [],
      "has_more": false,
      "url": "/v1/file_links?file=file_1CoyB52eZvKYlo2CNsSN1co5"
    },
    "purpose": "finance_report_run",
    "size": 9863,
    "title": null,
    "type": "csv",
    "url": "https://files.stripe.com/v1/files/file_1CoyB52eZvKYlo2CNsSN1co5/contents"
  },
  "status": "succeeded",
  "succeeded_at": 1525192811
}
{
  "id": "frr_1Hr0K72eZvKYlo2CvclsK6wj",
  "object": "reporting.report_run",
  "created": 1606219723,
  "error": null,
  "livemode": true,
  "parameters": {
    "interval_end": 1525132800,
    "interval_start": 1522540800
  },
  "report_type": "balance.summary.1",
  "result": {
    "id": "file_1CoyB52eZvKYlo2CNsSN1co5",
    "object": "file",
    "created": 1531853139,
    "expires_at": null,
    "filename": "file_1CoyB52eZvKYlo2CNsSN1co5",
    "links": {
      "object": "list",
      "data": [],
      "has_more": false,
      "url": "/v1/file_links?file=file_1CoyB52eZvKYlo2CNsSN1co5"
    },
    "purpose": "finance_report_run",
    "size": 9863,
    "title": null,
    "type": "csv",
    "url": "https://files.stripe.com/v1/files/file_1CoyB52eZvKYlo2CNsSN1co5/contents"
  },
  "status": "succeeded",
  "succeeded_at": 1525192811
}
{
  "object": "list",
  "url": "/v1/reporting/report_runs",
  "has_more": false,
  "data": [
    {
      "id": "frr_1Hr0K72eZvKYlo2CvclsK6wj",
      "object": "reporting.report_run",
      "created": 1606219723,
      "error": null,
      "livemode": true,
      "parameters": {
        "interval_end": 1525132800,
        "interval_start": 1522540800
      },
      "report_type": "balance.summary.1",
      "result": {
        "id": "file_1CoyB52eZvKYlo2CNsSN1co5",
        "object": "file",
        "created": 1531853139,
        "expires_at": null,
        "filename": "file_1CoyB52eZvKYlo2CNsSN1co5",
        "links": {
          "object": "list",
          "data": [],
          "has_more": false,
          "url": "/v1/file_links?file=file_1CoyB52eZvKYlo2CNsSN1co5"
        },
        "purpose": "finance_report_run",
        "size": 9863,
        "title": null,
        "type": "csv",
        "url": "https://files.stripe.com/v1/files/file_1CoyB52eZvKYlo2CNsSN1co5/contents"
      },
      "status": "succeeded",
      "succeeded_at": 1525192811
    },
    {...},
    {...}
  ]
}

Step 5: A Notification of Report Run Completion is indicated

Thus, the above-described procedure can be followed to build Stripe reports easily and even customize them to a great extent by running specific commands. To notify the completion of either of the two webhooks: reporting.report_run.succeeded or reporting.report_run.failed might be received. 

A success notification will be received to indicate that the run is complete and your report is good to go!

Screen Captures and Codes Sourced From: 

Limitations of Manual Methods

If you know how to code, building Stripe reports might seem fairly simple following the steps listed above. However, manually scripting these commands comes with certain limitations that are inevitable. Each iteration of changes will have to be manually modified and altered to the current status. This can be quite cumbersome when large amounts of datasets are involved in a business. There can be potential errors in the process of running a code and resolving these can be a great hassle.

For someone who cannot code or isn’t savvy with the language being used for implementation, the option of manual integration remains void. A readily available solution for the same can be automated platform integrations. Finding software to automate all integrations as well as cater to updates can make the process a lot more convenient.

Conclusion 

Thus, build your Stripe reports custom fit for your business, using the script formats and commands discussed in this article. If yours is a brand that isn’t IT-associated or steers away from technology, you can use Hevo to avoid running lengthy codes that you do not understand.

Visit our Website to Explore Hevo

Hevo Data provides its users with a simpler platform for integrating data from 100+ sources for Analysis such as Stripe. It is a No-code Data Pipeline that can help you combine data from multiple sources. You can use it to transfer data from multiple data sources into your Data Warehouses/Databases, or a destination of your choice. It provides you with a consistent and reliable solution to managing data in real-time, ensuring that you always have Analysis-ready data in your desired destination.

Want to take Hevo for a spin?Sign Up for a 14-day free trial and experience the feature-rich Hevo suite first hand. You can also have a look at our unbeatable pricing that will help you choose the right plan for your business needs!

Share your experience of learning about Stripe Reports! Let us know in the comments section below!

Free No-Code Data Pipeline for Stripe