Orb Setup Documentation

Last updated: September 24, 2026

Clazar is an official integration partner with Orb. Clazar's Orb integration helps sellers streamline their billing process effortlessly with cloud marketplaces. Say goodbye to manual data entry and hello to automated usage data transmission to cloud platforms. Enjoy accuracy, efficiency, and convenience in managing your billing tasks.

This guide covers Orb setup across AWS, Azure and GCP — connecting Orb, which marketplace events to act on, and which identifier to key your Orb subscription on for each cloud.

⚙️ Onboarding

Establishing the Orb connection

  1. Go to Settings → Integrations → Orb.
  2. Enter the API key generated in your Orb account.
  3. Configure the date (in UTC, time starts at 00:00:00) you want to start submitting metering records through Clazar using Orb.
  4. Click Connect to complete your Orb setup.
  5. Next, select the usage dimension Clazar should meter for each listing, under Configure Listing and Dimension — per cloud, using the AWS / Azure / GCP tabs.
  6. For sellers already using Orb to meter marketplace customers, map your existing Orb subscriptions to Clazar contracts using the API.

📘 The cost per unit of the usage dimension should be as granular as possible. Marketplaces can only bill in multiples of the per-unit cost mentioned.

Per-cloud prerequisites

CloudWhat else is needed
AWS Turn on contract events, once. In the Clazar UI, go to Settings → Integrations → AWS Marketplace, open the Setup tab and complete Clazar Event Rule Access. This provisions an event rule in your own AWS account, so it needs someone with AWS admin rights. Then subscribe to the topics you want.
Azure Price that dimension statically, and keep it consistent across all plans (a small value such as $0.01 works well). Clazar derives quantity as invoice amount due ÷ dimension price, so it needs a known, stable price at metering time — dynamic dimension pricing is not supported.
GCP Select the usage dimension Clazar should meter on the listing, as in step 5 above.

🔔 The events to act on

Each cloud emits its own contract lifecycle topics.

AWS

AWS contract events are sourced from AWS Marketplace EventBridge, are emitted per contract, and are named (EventBridge) in the Clazar dashboard.

TopicWhen it fires
aws.contract.created.v2A contract is accepted — purchase, renewal or replacement alike. provision_reason says which: NEW, RENEW or REPLACE.
aws.contract.activated.v2The contract starts and its licence is live. This is the one to act on.
aws.contract.modified.v2An existing contract is amended in place. Carries old_entitlements and new_entitlements so you can diff them.
aws.contract.ended.v2The contract ended. end_reason says why: CANCELLED, EXPIRED, TERMINATED, RENEWED or REPLACED.

📘 On AWS, a renewal or replacement is not one event but three: created.v2 and activated.v2 on the new contract, and ended.v2 (RENEWED / REPLACED) on the old one. That ended.v2 is a transition, not churn.

Azure

TopicWhen it fires
azure.contract.pendingContract created, pending activation.
azure.contract.registeredBuyer completed SaaS registration.
azure.contract.activatedContract activated. This is the one to act on.
azure.contract.quantity_changedNumber of users on the contract changed.
azure.contract.plan_changedContract plan changed.
azure.contract.renewedContract renewed.
azure.contract.suspended · azure.contract.reinstatedContract suspended, then reinstated.
azure.contract.unsubscribedBuyer unsubscribed — the contract has ended.

GCP

TopicWhen it fires
gcp.contract.pendingBuyer purchased the product; contract pending activation.
gcp.contract.registeredBuyer completed SaaS registration.
gcp.contract.activatedContract activated and billing has started. This is the one to act on.
gcp.contract.plan_change_initiatedA plan change is requested by the buyer, or initiated by acceptance of a new private offer while an existing contract is ongoing.
gcp.contract.plan_changedA plan change becomes effective.
gcp.contract.plan_change_canceledA plan change initiated by the buyer is revoked.
gcp.contract.renewedContract renewed and extended.
gcp.contract.canceledContract canceled — expired or revoked by the buyer.

🔑 The identifiers

Clazar's contract_id is the uuid you PATCH on every cloud. Each marketplace also has its own id for the same contract, which arrives in the event metadata:

CloudThe marketplace's own id, in the eventAlso useful
AWSagreement_id (agmt-…)license_arn, product_code, aws_account_id, previous_agreement_id
Azuresubscription_idoffer_id, plan_id
GCPentitlement_idaccount_id, plan_id

AWS: which id is stable

IdentifierWhat it isChanges when?
product_codeAWS's id for your listingNever
aws_account_idThe buyer's AWS accountNever, for that customer
contract_idClazar's uuid — the id you PATCHOn every renewal and replacement
agreement_idAWS's own id for the same contractOn every renewal and replacement
previous_agreement_idThe agreement_id this contract supersedes — how you find the subscription to reuseSet on RENEW and REPLACE; null on a first purchase
license_arnAWS's id for the entitlementSurvives renewal, replacement and amendment. A cancellation de-provisions the licence, so a later repurchase arrives with a new one

AWS: concurrent vs non-concurrent listings

On AWS, which identifier you key on also depends on whether the listing allows a buyer to hold more than one live agreement at a time. Concurrency is a property of the listing combined with the buyer's enrolment — if you are unsure which applies to yours, ask us. Azure and GCP have no equivalent: each subscription or entitlement is its own contract.

Non-concurrent listingConcurrent listing
Live contracts per buyer, per listingOneSeveral, at the same time
Key your lookups onaws_account_id + product_code — stable for the life of the customer on that listinglicense_arn. aws_account_id + product_code is not unique here — it is exactly what several live agreements share
Orb subscriptions for one customer on this listingOne. The customer holds a single live contract at a time, so one subscription covers themOne per live contract — several at once. A single subscription cannot be split across a customer's concurrent contracts, so each one needs its own
Usage is submitted to AWS withProductCode + CustomerIdentifierLicenseArn + CustomerAWSAccountId, and no ProductCode
After a renewal or replacementprevious_agreement_id names the contract being supersededprevious_agreement_id names the previous holder of that same license_arn — not a sibling concurrent purchase

🔗 Associating the Orb subscription

Metering runs off the link between a Clazar contract and your Orb subscription. You create it with one call — PATCH /contracts/{contract_id}/, taking contract_id from the event:

{
  "external_object_associations": {
    "orb": {
      "mapped_object": {
        "id": "<orb_subscription_id>"
      }
    }
  }
}

🔄 What to do, per scenario

ScenarioAct onWhat we recommend
First purchase AWS activated.v2 (NEW) · Azure activated · GCP activated Create the subscription in Orb and associate it to the contract_id
Plan, quantity or entitlement change AWS modified.v2 · Azure plan_changed, quantity_changed · GCP plan_changed Nothing to relink — same contract, same association. Update the pricing in Orb to match
Renewal AWS activated.v2 (RENEW) · Azure renewed · GCP renewed AWS only: a renewal mints a new contract, so re-associate the same subscription to the new contract_id — find it via previous_agreement_id, or license_arn on a concurrent listing. On Azure and GCP the subscription or entitlement carries over, so no action is required
Replacement / upgrade AWS activated.v2 (REPLACE, Agreement-Based Offer) · GCP plan_change_initiated → plan_changed (new private offer) AWS only: re-associate the same subscription to the new contract_id. On GCP the entitlement carries over — update pricing in Orb only
Cancel, then a new purchase later An activated event with no predecessor — on AWS, NEW with no previous_agreement_id A new subscription. On AWS the licence was de-provisioned, so this is a new entitlement — same account and product code, new license_arn
Cancellation, expiry, termination AWS ended.v2 · Azure unsubscribed · GCP canceled Metering stops. Clazar submits no further usage for this contract once it has ended

🏗️ How metering works, end to end

📘 Clazar fetches the total cost for each marketplace contract from Orb every hour.

💬 Questions on your specific listing or dimension setup? Reach out to us on Slack or support@clazar.io. We would be happy to help.