Overview
When a buyer subscribes to your offer on Azure Marketplace, Azure creates a SaaS subscription for them. Registering that subscription tells Flexprice which subscription’s usage belongs to which buyer on Azure. Registration links three Flexprice entities to their Azure counterparts:
Flexprice does not call the Azure SaaS fulfillment APIs itself. You resolve the subscription’s identifiers yourself and pass them to Flexprice. Register the subscription once per buyer, at the point they subscribe. After that, usage reporting runs on its own.
Prerequisites
Before registering an agreement, ensure you have:- A published Azure Marketplace connection - See How to Set Up Azure Marketplace
- The buyer’s Azure SaaS subscription, resolved and activated - Through your own backend, using Azure’s SaaS fulfillment APIs. Flexprice is not involved in this step.
- Your dimension ID - The single metered dimension you created on your plan
- A Flexprice customer, plan, and active subscription - For the buyer, see Step 2
Step 1: Get the Values Flexprice Needs
Registering an agreement needs four values, from the subscription you resolved and your own offer setup.offerId is not part of Azure’s usage report payload, so Flexprice does not store it. The plan is identified by planId alone.Step 2: Make Sure the Buyer Exists in Flexprice
Three things must already exist in Flexprice before you can register the agreement. Flexprice does not create any of them for you.1
A Flexprice customer for this buyer
Create one with
POST /v1/customers if it does not already exist. Usage and billing are attributed to this customer.2
The Flexprice plan for this Azure plan
The plan whose usage-based charge corresponds to the Azure plan the buyer subscribed to. See Creating a Plan.
3
An active Flexprice subscription
Create it with
POST /v1/subscriptions on that plan if it does not already exist. The subscription must be active: registration rejects a subscription in any other state.Step 3: Register the Agreement
Using Flexprice Dashboard
You can link a buyer’s Azure subscription to a Flexprice subscription directly from the Flexprice dashboard.API Request
Endpoint:POST /api/v1/marketplace/agreements
Headers:
Response
Validation Rules
Registration rejects the request if any of these do not hold:Registering Multiple Buyers on One Plan
The plan mapping stores your plan-level Azure configuration, so it is created once and reused. Registering a second buyer on the same plan reuses the existing plan mapping rather than creating another one. This meansazure.plan_id and dimension are set by the first agreement registered against a plan. Later registrations for that plan do not change them.
Register every buyer for the same Azure plan against the same Flexprice plan, with the same
azure.plan_id and dimension.planId.
Next Steps
Connection Setup
Set up your Azure offer, Entra app credentials, and Flexprice connection.
Usage Reporting
Understand what gets metered to Azure and when.

