Skip to content

Metering integration guide

For engineering teams reporting metered usage through the WeTransact external API and reconciling it against Microsoft's records. It covers the identifiers you join on, how to report usage so that retries are safe, every verdict Microsoft can give, how to read back usage and revenue, and how to use the sandbox.

Environments

SandboxProduction
Base URLhttps://wetx-api-sandbox.azurewebsites.nethttps://<yoursubdomain>.wetransact.io
Authenticationx-api-key: <sandbox key from WeTransact>x-api-key: <key generated under Settings>
MicrosoftFaked, stateful, fault-injectableReal. Every accepted charge lands on your customer's Azure bill
DataTwo seeded subscriptions, seven days of usage historyYour tenant's subscriptions and reports

A Postman collection with every request in this guide, including the sandbox fault scenarios, is available from WeTransact (External-API-Metering.postman_collection.json plus a sandbox environment file). Every request needs the x-api-key header; a missing key returns 401.

Wire format. Responses are JSON with PascalCase property names (MarketplaceSubscriptionId, Success, Microsoft.Status). Error bodies returned before a usage report exists use lower-case message and retryable.