Migrate to AWS Partner Central 3.0 in 30 minutes.

Migrate now (opens in a new tab)
Skip to main content

Send metered usage to SaaSify so the cloud marketplace bills the buyer for pay-as-you-go consumption.

Base URLs: https://api.saasify.ai (production). Test against https://api-demo.saasify.ai (demo). See Environments.

Before you start

You need: an authenticated service user with a role that can post usage, an active subscription, and the meter (dimension) names configured for its plan.

​How metering works

For usage-based pricing, the marketplace doesn't know how much a buyer consumed — your application does. You measure consumption against the plan's meters (dimensions) and report it to SaaSify, which forwards it to the right cloud so it appears on the buyer's bill. For the concept and how each cloud meters, see Metering and usage.

The usual loop is:

  1. Look up the meters for the subscription's plan.
  2. Measure usage in your app over a billing window.
  3. Post the usage for each meter.
  4. Confirm it posted (or handle a failure).

​Find the meters for a subscription

Before posting, get the meter names you can report against:

  • GET /api/subscriptions/{subscriptionID}/meters — meters configured for a subscription.
  • GET /api/subscriptions/metersbyplan — meters available on a plan.

​Post usage

Post a usage quantity for a subscription and meter. The canonical single-record endpoint is:

POST /api/subscriptions/{subscriptionID}/usage

A usage record identifies the meter (dimension), the quantity consumed, and the time it applies to.

curl -X POST https://api-demo.saasify.ai/api/subscriptions/SUBSCRIPTION_ID/usage \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
        "DimensionName": "api_calls",
        "Quantity": 1500,
        "UsageTime": "2026-12-04T00:00:00Z"
      }'

Posting from a CRM or external billing source has a parallel V2 endpoint that takes an origin (such as the system you post from):

POST /api/v2/subscriptions/{origin}/usagepost
GET  /api/v2/subscriptions/{origin}/usagepost/{subscriptionId}   # read what was posted

See the API reference for the exact V1 vs V2 shapes and choose one for your integration.

​Post usage in bulk

To upload many records at once rather than one call per record, use the batch endpoints:

  • POST /api/batchusage/bulkupload — submit a batch; this creates a job.
  • GET /api/batchusage/joblog — list batch jobs and their status.
  • GET /api/batchusage/{jobLogID}/usagehistory — see the per-record result of one job.

Batch upload is asynchronous: submit, then poll the job log (gently — see Rate limits) until the job completes, and read the usage history to find any rejected rows.

​Confirm it posted

Read back what SaaSify recorded:

  • GET /api/subscriptions/subscriptionmeteredusage/{subscriptionId} — metered usage recorded for a subscription.

A usage post can succeed into SaaSify but still be rejected later by the cloud. SaaSify raises a UsagePostingFailed event you can subscribe to — see Webhooks.

​Per-cloud notes

Usage is forwarded to AWS Marketplace metering. AWS has a dedicated meter-post path (api/aws/postmeterusage) in addition to the subscription usage endpoint. AWS meters by dimension; report against the dimension names configured on the plan.

Was this page helpful?