Skip to main content

Objects Overview

Introduction​

This section documents the core data objects that powers the PaidCommunities platform. These objects represent the structured data that flows through the system, from customers and subscriptions to orders and licenses.

Understanding these objects is essential for several key activities:

  • Email Template Design: When creating or customizing email templates, you'll reference these objects to personalize communications with dynamic content.
  • Webhook Processing: When building integrations that respond to webhook events, you'll need to parse and utilize these objects in the payload data.
  • Data Export Analysis: When analyzing exported data, understanding the structure of these objects helps you extract meaningful insights.

What's Included​

Each object page in this section provides:

  • Object Description: A clear explanation of what the object represents and its role in the system.
  • Attribute Reference: A comprehensive table of all available fields, their data types, and descriptions.
  • Status Values: For objects with status fields, explanations of each possible status value.
  • Related Objects: Information about how this object relates to other objects in the system.

JSON Structure​

All objects are represented as JSON (JavaScript Object Notation) with attributes in snake case format. Nested objects and arrays are used where appropriate to organize related data hierarchically.

Core Objects​

The following core objects are documented in this section:

  • Subscription: Represents a recurring billing relationship with a customer.
  • Order: Represents a one-time purchase transaction.
  • Customer: Represents a user who has made purchases on your platform.
  • License: Represents an entitlement to use a specific product or feature.
  • Product: Represents an item or service that can be purchased.
  • Invoice: Represents a bill issued to a customer.
  • Payment: Represents a financial transaction.

Accessing Object Data​

In Email Templates​

When designing email templates, you can access object data using the double curly brace syntax:

Hello {{customer.first_name}},

Your {{subscription.id}} will renew on {{formatTime subscription.next_payment}}.

For more details on the template syntax, see the Email Templates section.

In Webhook Handlers​

When processing webhook events, the relevant objects will be included in the event payload:

app.post('/webhooks', (req, res) => {
const event = req.body;

if (event.type === 'order.paid') {
const order = event.data;

// Perform some action...
}

res.status(200).send();
});

For more information on webhooks, see the Webhooks section.

Object Relationships​

Objects in the system relate to each other in specific ways. For example:

  • A Customer can have multiple Subscriptions and Orders
  • A Subscription contains one or more Products
  • A License is typically associated with a Subscription or Order

Understanding these relationships helps you navigate between related objects when building your integrations.

Next Steps​

Browse the specific object documentation using the sidebar navigation, or start with these common objects: