Skip to main content
This guide explains how the core API objects in Fungies work together to power your store. Understanding these relationships will help you build integrations and process webhook events effectively.

Object Relationships


Core Objects

User

Customers who purchase from your store. Contains contact and billing information.

Product

Items you sell - games, subscriptions, digital downloads, etc.

Offer

Pricing configurations for products with region/currency support.

Discount

Price reductions via coupon codes or automatic sales.

Order

Purchase transactions containing items, totals, and status.

Payment

Financial transactions with charges and payment method details.

Subscription

Recurring billing relationships for subscription products.

Event

Webhook notifications about activity in your store.

Common Flows

One-Time Purchase Flow

Subscription Flow

Refund Flow


Subscription Lifecycle


Object Hierarchy

Catalog Structure

A Product is the top-level catalog item. Products can have:
  • Variants - Different versions (Standard, Deluxe, Ultimate editions)
  • Plans - Subscription billing options (Monthly, Annual)
  • Offers - Pricing per region/currency

Transaction Hierarchy

Each customer action creates linked transaction objects:

ID Formats

ObjectFormatExample
UserUUID123e4567-e89b-12d3-a456-426614174000
ProductUUIDbb0e8400-e29b-41d4-a716-446655440006
OfferUUID990e8400-e29b-41d4-a716-446655440004
DiscountUUID880e8400-e29b-41d4-a716-446655440003
OrderUUID550e8400-e29b-41d4-a716-446655440000
Order NumberString#ABC123DEF456
PaymentUUID660e8400-e29b-41d4-a716-446655440001
SubscriptionString#SUB123DEF456 (based on order number)
EventUUIDevt_123e4567-e89b-12d3-a456-426614174000
Order numbers and subscription IDs are human-readable strings prefixed with #. These can be used interchangeably with UUIDs in most API endpoints.

Webhook Events by Object

ObjectEvents
Paymentpayment_success, payment_failed, payment_refunded
Subscriptionsubscription_created, subscription_updated, subscription_interval, subscription_cancelled
Each Event includes the related objects in its data payload:
  • data.order - The Order
  • data.payment - The Payment
  • data.customer - The User
  • data.items - Array of purchased items with Product and Offer references

Next Steps

Webhooks Setup

Configure endpoints to receive events

API Authentication

Get your API keys and authenticate