Skip to main content

(Beta) Invoicing with Azure Marketplace

Metronome's Azure Marketplace integration combines Azure billing with Metronome's usage aggregation and pricing capabilities. Learn how to set up and configure an integration to automatically bill customers through the Azure Marketplace.

Prerequisites

To invoice through the Azure Marketplace, you will need:

  • An Azure AD account
  • An Azure Partner account
  • Your Azure Partner Partner ID , Tenant ID, Seller ID and Client secret (Available in your Azure partner portal under Settings)
  • Your Azure AD Directory ID (should match Tenant ID above), Application (Client) ID and Subscription ID (Available in your Azure AD portal)
  • Review and accept the known limitations (see below)

How Metronome works with the Azure Marketplace

Pricing is computed on the Metronome side and the total due is reported to Azure Marketplace in the form of a usage-based charge at a cost of $0.01 per unit. Every hour, Metronome calculates the customer's total bill, subtracts the amount they've already been billed, and sends the difference to Azure. For example, if a customer has a total bill of $100 so far this month, and they've already been billed $75, they'll be billed an additional $25 in the next metering request.

Since the Azure Marketplace listing is based on the total amount due, the full range of pricing options is still available in Metronome, such as tiers, free trials, and pre-purchased credits. While Metronome supports complex pricing packages, customers will only see a total amount billed on their Azure Marketplace bill.

Create an Azure Marketplace Offer and Plans

Begin by creating a marketplace offer from your Azure partner portal.

  1. Create a new Software as a Service offer from your partner portal and provide a name and alias.

    create_offer

  2. In the Offer Setup tab, select Yes for Selling through Microsoft and No for using Microsoft’s license management service

    offer_setup

  3. Click on Technical configuration tab to specify SaaS URL redirect for setup, Application ID, Tenant ID and Webhook URL

    technical_config

  4. Click on Plan overview tab to add plans for each plan you defined in Metronome, and specify the plan id and plan name

    create_plan new_plan

  5. Specify the pricing model in the Pricing and Availability tab

    • Select the Flat Rate option with a monthly, yearly or multi-year Billing term with a $0 Price per payment
    • IMPORTANT Add a single metering service dimension with ONLY the following values (deviating from these values will cause the integration to fail):
      • ID set to usage_fee
      • Display name set to Usage Fee
      • Unit of measure set to billing unit
      • Price per unit set to .01
      • Quantity incldued set to 0

    plan_pricing_model

  6. Test your offer using the Preview audience tab

Provision Azure Marketplace customers in Metronome

When a customer agrees to your marketplace offer, you will need to provision their account in Metronome, assign relevant credit grants and assign that customer to the correct Metronome plan. Note: It’s critical that you follow these steps sequentially to avoid mis-calculated invoices.

Before provisioning the customer in Metronome, ensure the customer has completed the marketplace signup flow and has been provisioned in your SaaS system. Additionally, make sure the subscription has been activated in Azure Marketplace via Azure's activate subscription api. When complete, you should have a unique Subscription ID for the customer’s accepted offer and the saasSubscriptionStatus should be Subscribed.

Follow these steps to provision the customer in Metronome.

Follow these steps sequentially to avoid billing errors

It’s critical that you follow these steps sequentially to avoid mis-calculated invoices.

  1. Create a new customer in Metronome via API setting the billing_provider_type to azure_marketplace and the billing_provider_customer_id to the unique Subscription ID associated with your customer's Azure subscription
  2. If relevant, create a credit grant for the customer (Note that this must happen before adding a plan!)
  3. Add the relevant plan to the customer
  4. Start sending usage events for metering

Once the above steps are completed, Metronome will automatically start metering the usage events to either burn down existing credit grants or pass the spend through to the marketplace listing.

Handling marketplace customer lifecycle events in Metronome and your app

Metronome will automatically check for subscription changes due to marketplace lifecycle events and update the customer's status in Metronome. However, you will still need to ensure the customer's status is correctly represented in your application. Most Metronome clients configure the Marketplace listing webhook destination to receive alerts when those lifecycle events occur and manually, or programmatically, make the relevant changes in their app.

While rare, certain lifecycle events in the marketplace will trigger the creation of a new Subscription ID. If this occurs, please reach out to Metronome so we can help you update the Subscription ID in Metronome.

Limitations of Azure Marketplace Offers

Azure Marketplace only supports positive quantities through their metering service

There's no way to decrease a customer's total bill. For example, consider a customer who was meant to receive $1,000 in credits when they started using your product. Due to a typo, they erroneously received only $100. The mistake is noticed one week into their first billing period, when the customer notices a $500 charge on their Azure bill. In Metronome, this mistake is easily rectified by adding an additional $900 credit, but in Azure, there's no way to reduce that bill.

If this situation arises, Metronome stops billing for that customer until their usage catches up to the amount they've already been billed. If this is insufficient to correct the problem, manual refunds may be issued through Azure support. You can reach out to your Metronome representative for help.

End of a customer's Marketplace contract supports a 1 hour grace period for events

To ensure that the end of a customer’s subscription is handled promptly, Metronome will provide a 1 hour grace period of events sent after the completion of the subscription. While Metronome normally supports a grace period of up to 24 hours after the billing period ends, the Azure integration currently is limited to 1 hour. This means usage received after that cannot be billed through Azure. Metronome will automatically disable metering 2 hours after the subscription ends.

In the event of an outage, Metronome catches up when everything comes back online. If Metronome was unable to send usage to Azure for some period of time, the accrued usage is included in the next request to Azure. However, if the customer's contract has already ended and the grace period has elapsed, Metronome is unable to bill for the usage accrued during the down time.

Only USD pricing is currently supported in Marketplace listings

Metronome-powered marketplace listings can only use USD for listing price. Other fiat currencies are not currently supported.

Metronome logoMetronome logo