Skip to main content

Overview

Metering and billing workflow overview.


Definitions

  • Seller: Suger users who sell products or services to customers.
  • Buyer: Customers who purchase products or services from sellers.

Workflow

Product

Seller creates a product and defines the pricing information. It can be Contract-based or Usage-based or those two combined.

For Cloud Partners (e.g. AWS, Azure, GCP):

  • For Contract-based pricing information, Seller defines Contract Duration, Contract Commitment
  • For Usage-based pricing information, Seller defines Usage Metering Dimensions. For example, API calls, network traffic, etc.

For Non-Cloud Partners (e.g. Stripe, Adyen), Buyer just enters the Basic Information.

Offer

Seller creates an offer based on the product and send it to Buyer. It can be Public offer or Private offer.

If it's a usage-based offer, Seller sets the metering and billing information.

  • For Cloud Partners (e.g. AWS, Azure, GCP), Seller sets the Usage Dimension Rates. For example, $1 for 100 API calls, $2 for 1 GB network traffic, etc.

  • For Non-Cloud Partners (e.g. Stripe, Adyen), Seller defines Billable dimensions. For details, see Billable Dimensions.

Entitlement

Buyer accepts the offer and an Entitlement is generated.

Metering

If it's a Usage-based entitlement, Usage Metering is needed. The metering process is as follows:

Buyer side

Buyer starts using the product.

Seller side

  • Seller collects Buyer's usage data. For example, usage records need to be generated to show that Buyer used 100 API calls, 10 GB network traffic, etc.
  • Seller reports usage records to Suger via the Metering API or other channels.

Suger side

  • Suger receives a batch of usage records and save them into a Usage record group.

  • Suger receives another batch of usage records and save them into another Usage record group, and so on.

  • Every hour, Suger collects up to 14 past days of Usage record groups valid for metering (those with status CREATED) for the given entitlement.

  • Suger aggregates the Usage record groups by different Billable metrics, and generates a Usage record report (Hourly report). The status of all included Usage record groups will be updated to REPORTED.

  • Once the Usage record report is created:

    • If the product is created with Cloud Partners (e.g. AWS, Azure, GCP), Suger sends the Usage record report to the Cloud Partner . The status of the Usage record report will be updated to SUCCESS or FAILED. If the status is FAILED, the status of all included Usage record groups will be updated to REPORT_FAILED (Suger team will receive an abnormal alert and take actions on it).
    • If the product is created with Non Cloud Partners (e.g. Stripe, Adyen), Suger processes the invoicing and payment process.

Invoice and payment

For Cloud Partners

  • Suger syncs Revenue Records from the cloud partner's Billing Events.
  • No invoice is created.
  • Buyer makes payments to the Cloud Partner directly.

For Non-Cloud Partners

  • Suger processes all entitlements daily and find out the which entitlements need to be invoiced.
  • Suger generates invoices based on the Usage record reports for the entitlements. For details, see Invoice.
  • Suger launches the payment process for the invoices. For details, see Payment.