Getting started with our API

It may be possible to import or export data using our API if our existing integrations don’t fit the unique needs of your business.

In this article, we provide an overview of our API and some common solutions to help you understand how your business can build a custom integration with ChartMogul.

Here’s what we cover in this article:

Resources and further reading:

Setting up the API

You’ll need to be a Staff, Admin, or Owner to create a read & write API key.

To get started, create a read & write API key to authenticate your account.

API data is imported using a custom source. Add a new custom source programmatically or in app by navigating to Data & Config > Sources. Then:

  1. Click Add Source and select Custom Source.
  2. Enter a unique name in the Name field.
  3. Click NEXT to create the custom source.

Once your setup is complete, visit our Developer Hub for comprehensive guides and documentation for building an integration.

API solutions

We’ve outlined some common scenarios and the solutions our customers have developed using our API.

Integrating your billing system or data warehouse

Scenario: You want to import data from a billing system that is not integrated with ChartMogul or stored in a data warehouse.

Solution: Use the API to build an integration for importing customer and invoice data. If your business doesn’t bill customers using invoices and instead keeps records of subscriptions, you may need to use an alternative import method. Learn more in Getting started with importing data for Subscription Analytics.

Your team can customize how data is sent and edit it as needed. The key data points required to build an integration are:

  • Customers — their unique identifier, such as an ID or email address.
  • Plans — sometimes called products, which customers pay for on a recurring basis.
  • Invoices — sometimes called transactions, which must include information about the customer, the amount billed, their plan, their related subscription, and the service period dates.
  • Cancellations — the date a subscription was canceled.

View the full list of data points in our Developer Hub.

ChartMogul generates subscriptions based on line item data in an invoice. Customers become subscribers and contribute to MRR after their first invoice. Transaction data is not required; however, it is used to generate cash flow reports.

Learn how Cronofy integrated the ChartMogul API on our blog.

Integrating your Customer Relationship Management (CRM) software

On April 4, 2023 we launched ChartMogul CRM. Learn more on our blog or read our setup guide.

Scenario: You’ve integrated your billing system and ChartMogul is receiving customer and billing data. However, your business tracks leads and trials in a CRM software and you want to import them to ChartMogul.

Solution: Use the API to integrate your CRM and send trial and lead data to ChartMogul before the customer is created in your billing system. Once connected, you’ll be able to access the Leads and Free Trials reports.

For further analysis, use the Add Custom Attributes to a Customer endpoint to add and modify additional data points to customer records — such as marketing campaign or product usage — as custom attributes. Custom attributes are similar to custom fields and create new filters for segmentation.

Integrating your external reporting tool

Scenario: You want to share your ChartMogul metrics with your team or investors.

Solution: Use the API to export key subscription metrics and add them to reports or presentations. Send a complete overview, or segment the data by plan or region.

Was this article helpful?

We’re sorry to hear that. Would you like to share more feedback?

Thanks for your feedback!