Transactions - List By Invoice

Lists the transactions for an invoice. Transactions include purchases, refunds and Azure usage charges.

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/transactions?api-version=2020-05-01

URI Parameters

Name In Required Type Description
billingAccountName
path True

string

The ID that uniquely identifies a billing account.

invoiceName
path True

string

The ID that uniquely identifies an invoice.

api-version
query True

string

The version of the API to be used with the client request. The current version is 2020-05-01.

Responses

Name Type Description
200 OK

TransactionListResult

OK. The request has succeeded.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

TransactionsListByInvoice

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/transactions?api-version=2020-05-01

Sample response

{
  "value": [
    {
      "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/transactions/41000000-0000-0000-0000-000000000000",
      "name": "41000000-0000-0000-0000-000000000000",
      "type": "Microsoft.Billing/billingAccounts/transactions",
      "properties": {
        "kind": "all",
        "date": "2018-05-01T00:00:00Z",
        "invoice": "2344233",
        "invoiceId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/2344233",
        "productFamily": "Storage",
        "productTypeId": "A12345",
        "productType": "VM Instance",
        "productDescription": "Standard D1, US West 3",
        "transactionType": "Purchase",
        "transactionAmount": {
          "currency": "USD",
          "value": 5000
        },
        "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000",
        "invoiceSectionDisplayName": "Contoso operations invoiceSection",
        "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}",
        "billingProfileDisplayName": "Contoso operations billing",
        "azurePlan": "Microsoft Azure Plan for DevTest",
        "azureCreditApplied": {
          "currency": "USD",
          "value": 2000
        },
        "billingCurrency": "USD",
        "discount": 0.1,
        "effectivePrice": {
          "currency": "USD",
          "value": 10
        },
        "exchangeRate": 1,
        "marketPrice": {
          "currency": "USD",
          "value": 20
        },
        "pricingCurrency": "USD",
        "quantity": 1,
        "servicePeriodStartDate": "2018-05-01T00:00:00Z",
        "servicePeriodEndDate": "2018-09-30T00:00:00Z",
        "subTotal": {
          "currency": "USD",
          "value": 4500
        },
        "tax": {
          "currency": "USD",
          "value": 500
        },
        "unitOfMeasure": "1 Minute",
        "units": 11.25,
        "unitType": "1 Runtime Minute"
      }
    },
    {
      "id": "/providers/Microsoft.Billing/BillingAccounts/{billingAccountName}/transactions/51000000-0000-0000-0000-000000000000",
      "name": "51000000-0000-0000-0000-000000000000",
      "type": "Microsoft.Billing/billingAccounts/transactions",
      "properties": {
        "kind": "all",
        "date": "2018-04-01T00:00:00Z",
        "invoice": "pending",
        "productFamily": "Storage",
        "productTypeId": "A12345",
        "productType": "VM Instance",
        "productDescription": "Standard Support",
        "transactionType": "Cancel",
        "transactionAmount": {
          "currency": "USD",
          "value": 50
        },
        "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/22000000-0000-0000-0000-000000000000",
        "invoiceSectionDisplayName": "Contoso operations invoiceSection",
        "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}",
        "billingProfileDisplayName": "Contoso operations billing",
        "azurePlan": "Microsoft Azure Plan for DevTest",
        "azureCreditApplied": {
          "currency": "USD",
          "value": 20
        },
        "billingCurrency": "USD",
        "discount": 0.1,
        "effectivePrice": {
          "currency": "USD",
          "value": 10
        },
        "exchangeRate": 1,
        "marketPrice": {
          "currency": "USD",
          "value": 20
        },
        "pricingCurrency": "USD",
        "quantity": 1,
        "servicePeriodStartDate": "2018-05-01T00:00:00Z",
        "servicePeriodEndDate": "2018-09-30T00:00:00Z",
        "subTotal": {
          "currency": "USD",
          "value": 45
        },
        "tax": {
          "currency": "USD",
          "value": 5
        },
        "unitOfMeasure": "1 Minute",
        "units": 1.25,
        "unitType": "1 Runtime Minute"
      }
    }
  ]
}

Definitions

Name Description
Amount

The amount.

ErrorDetails

The details of the error.

ErrorResponse

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

ErrorSubDetails
ReservationType

The type of transaction.

Transaction

A transaction.

TransactionListResult

The list of transactions.

TransactionTypeKind

The kind of transaction. Options are all or reservation.

Amount

The amount.

Name Type Description
currency

string

The currency for the amount value.

value

number

Amount value.

ErrorDetails

The details of the error.

Name Type Description
code

string

Error code.

details

ErrorSubDetails[]

The sub details of the error.

message

string

Error message indicating why the operation failed.

target

string

The target of the particular error.

ErrorResponse

Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.

Name Type Description
error

ErrorDetails

The details of the error.

ErrorSubDetails

Name Type Description
code

string

Error code.

message

string

Error message indicating why the operation failed.

target

string

The target of the particular error.

ReservationType

The type of transaction.

Name Type Description
Purchase

string

Usage Charge

string

Transaction

A transaction.

Name Type Description
id

string

Resource Id.

name

string

Resource name.

properties.azureCreditApplied

Amount

The amount of any Azure credits automatically applied to this transaction.

properties.azurePlan

string

The type of azure plan of the subscription that was used for the transaction.

properties.billingCurrency

string

The ISO 4217 code for the currency in which this transaction is billed.

properties.billingProfileDisplayName

string

The name of the billing profile which will be billed for the transaction.

properties.billingProfileId

string

The ID of the billing profile which will be billed for the transaction.

properties.customerDisplayName

string

The name of the customer for which the transaction took place. The field is applicable only for Microsoft Partner Agreement billing account.

properties.customerId

string

The ID of the customer for which the transaction took place. The field is applicable only for Microsoft Partner Agreement billing account.

properties.date

string

The date of transaction.

properties.discount

number

The percentage discount, if any, applied to this transaction.

properties.effectivePrice

Amount

The price of the product after applying any discounts.

properties.exchangeRate

number

The exchange rate used to convert charged amount to billing currency, if applicable.

properties.invoice

string

Invoice on which the transaction was billed or 'pending' if the transaction is not billed.

properties.invoiceId

string

The ID of the invoice on which the transaction was billed. This field is only applicable for transactions which are billed.

properties.invoiceSectionDisplayName

string

The name of the invoice section which will be billed for the transaction.

properties.invoiceSectionId

string

The ID of the invoice section which will be billed for the transaction.

properties.kind

TransactionTypeKind

The kind of transaction. Options are all or reservation.

properties.marketPrice

Amount

The retail price of the product.

properties.orderId

string

The order ID of the reservation. The field is only applicable for transaction of kind reservation.

properties.orderName

string

The name of the reservation order. The field is only applicable for transactions of kind reservation.

properties.pricingCurrency

string

The ISO 4217 code for the currency in which the product is priced.

properties.productDescription

string

The description of the product for which the transaction took place.

properties.productFamily

string

The family of the product for which the transaction took place.

properties.productType

string

The type of the product for which the transaction took place.

properties.productTypeId

string

The ID of the product type for which the transaction took place.

properties.quantity

integer

The quantity purchased in the transaction.

properties.servicePeriodEndDate

string

The end date of the product term, or the end date of the month in which usage ended.

properties.servicePeriodStartDate

string

The date of the purchase of the product, or the start date of the month in which usage started.

properties.subTotal

Amount

The pre-tax charged amount for the transaction.

properties.subscriptionId

string

The ID of the subscription that was used for the transaction. The field is only applicable for transaction of kind reservation.

properties.subscriptionName

string

The name of the subscription that was used for the transaction. The field is only applicable for transaction of kind reservation.

properties.tax

Amount

The tax amount applied to the transaction.

properties.transactionAmount

Amount

The charge associated with the transaction.

properties.transactionType

ReservationType

The type of transaction.

properties.unitOfMeasure

string

The unit of measure used to bill for the product. For example, compute services are billed per hour.

properties.unitType

string

The description for the unit of measure for a given product.

properties.units

number

The number of units used for a given product.

type

string

Resource type.

TransactionListResult

The list of transactions.

Name Type Description
nextLink

string

The link (url) to the next page of results.

totalCount

number

Total number of records.

value

Transaction[]

The list of transactions.

TransactionTypeKind

The kind of transaction. Options are all or reservation.

Name Type Description
all

string

reservation

string