Share via


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=2024-04-01
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/invoices/{invoiceName}/transactions?api-version=2024-04-01&filter={filter}&orderBy={orderBy}&top={top}&skip={skip}&count={count}&search={search}

URI Parameters

Name In Required Type Description
billingAccountName
path True

string

pattern: ^([0-9]+|([Pp][Cc][Nn]\.[A-Za-z0-9]+)|[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}(:[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}_[0-9]{4}(-[0-9]{2}){2})?)$

The ID that uniquely identifies a billing account.

invoiceName
path True

string

pattern: ^(H[0-9]-[A-Z0-9]+)$|^(?:([GHT]|HT){1}[A-Z0-9]{9})$|^(?:[D]{1}[A-Z0-9]{9})$|^(?:E{1}[B-Z0-9]{1}[A-Z0-9]{8})$|^(?:EA[A-Z0-9]{8})$

The ID that uniquely identifies an invoice.

api-version
query True

string

minLength: 1

The API version to use for this operation.

count
query

boolean

The count query option allows clients to request a count of the matching resources included with the resources in the response.

filter
query

string

The filter query option allows clients to filter a collection of resources that are addressed by a request URL.

orderBy
query

string

The orderby query option allows clients to request resources in a particular order.

search
query

string

The search query option allows clients to request items within a collection matching a free-text search expression. search is only supported for string fields.

skip
query

integer (int64)

The skip query option requests the number of items in the queried collection that are to be skipped and not included in the result.

top
query

integer (int64)

The top query option requests the number of items in the queried collection to be included in the result. The maximum supported value for top is 50.

Responses

Name Type Description
200 OK

TransactionListResult

Azure operation completed successfully.

Other Status Codes

ErrorResponse

An unexpected error response.

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/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/invoices/G123456789/transactions?api-version=2024-04-01

Sample response

{
  "value": [
    {
      "name": "41000000-0000-0000-0000-000000000000",
      "type": "Microsoft.Billing/billingAccounts/billingProfiles/transactions",
      "id": "/providers/Microsoft.Billing/BillingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/BillingProfiles/xxxx-xxxx-xxx-xxx/transactions/41000000-0000-0000-0000-000000000000",
      "properties": {
        "azureCreditApplied": {
          "currency": "USD",
          "value": 2000
        },
        "billingCurrency": "USD",
        "billingProfileDisplayName": "Contoso operations billing",
        "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx",
        "consumptionCommitmentDecremented": {
          "currency": "USD",
          "value": 100
        },
        "date": "2023-05-01T00:00:00Z",
        "discount": 0.1,
        "effectivePrice": {
          "currency": "USD",
          "value": 10
        },
        "exchangeRate": 1,
        "invoice": "G123456789",
        "invoiceId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/invoices/G123456789",
        "invoiceSectionDisplayName": "Contoso operations invoiceSection",
        "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/invoiceSections/22000000-0000-0000-0000-000000000000",
        "marketPrice": {
          "currency": "USD",
          "value": 20
        },
        "partNumber": "0001",
        "pricingCurrency": "USD",
        "productDescription": "Standard D1, US West 3",
        "productFamily": "Storage",
        "productType": "VM Instance",
        "productTypeId": "A12345",
        "quantity": 1,
        "servicePeriodEndDate": "2023-09-30T00:00:00Z",
        "servicePeriodStartDate": "2023-05-01T00:00:00Z",
        "subTotal": {
          "currency": "USD",
          "value": 4500
        },
        "tax": {
          "currency": "USD",
          "value": 500
        },
        "transactionAmount": {
          "currency": "USD",
          "value": 5000
        },
        "transactionType": "Purchase",
        "unitOfMeasure": "1 Minute",
        "unitType": "1 Runtime Minute",
        "units": 11.25
      }
    },
    {
      "name": "51000000-0000-0000-0000-000000000000",
      "type": "Microsoft.Billing/billingAccounts/billingProfiles/transactions",
      "id": "/providers/Microsoft.Billing/BillingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/BillingProfiles/xxxx-xxxx-xxx-xxx/transactions/51000000-0000-0000-0000-000000000000",
      "properties": {
        "azureCreditApplied": {
          "currency": "USD",
          "value": 20
        },
        "billingCurrency": "USD",
        "billingProfileDisplayName": "Contoso operations billing",
        "billingProfileId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx",
        "consumptionCommitmentDecremented": {
          "currency": "USD",
          "value": 50
        },
        "date": "2024-04-01T00:00:00Z",
        "discount": 0.1,
        "effectivePrice": {
          "currency": "USD",
          "value": 10
        },
        "exchangeRate": 1,
        "invoice": "pending",
        "invoiceSectionDisplayName": "Contoso operations invoiceSection",
        "invoiceSectionId": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx/invoiceSections/22000000-0000-0000-0000-000000000000",
        "marketPrice": {
          "currency": "USD",
          "value": 20
        },
        "partNumber": "0002",
        "pricingCurrency": "USD",
        "productDescription": "Standard Support",
        "productFamily": "Storage",
        "productType": "VM Instance",
        "productTypeId": "A12345",
        "quantity": 1,
        "servicePeriodEndDate": "2023-09-30T00:00:00Z",
        "servicePeriodStartDate": "2023-05-01T00:00:00Z",
        "subTotal": {
          "currency": "USD",
          "value": 45
        },
        "tax": {
          "currency": "USD",
          "value": 5
        },
        "transactionAmount": {
          "currency": "USD",
          "value": 50
        },
        "transactionType": "Cancel",
        "unitOfMeasure": "1 Minute",
        "unitType": "1 Runtime Minute",
        "units": 1.25
      }
    }
  ]
}

Definitions

Name Description
createdByType

The type of identity that created the resource.

CreditType

The credit type of the transaction. Applies only to credited transactions.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

RefundTransactionDetailsAmountRefunded

The amount refunded.

RefundTransactionDetailsAmountRequested

The amount of refund requested.

SpecialTaxationType

Identifies the type of tax calculation used for the invoice. The field is applicable only to invoices with special tax calculation logic.

systemData

Metadata pertaining to creation and last modification of the resource.

Transaction

A transaction.

TransactionKind

Type of the transaction, billed or unbilled.

TransactionListResult

Paged collection of Transaction items

TransactionProperties

A transaction.

TransactionPropertiesAzureCreditApplied

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

TransactionPropertiesConsumptionCommitmentDecremented

The amount of Microsoft Azure Consumption Commitment(MACC) decrement through the transaction.

TransactionPropertiesEffectivePrice

The price of the product after applying any discounts.

TransactionPropertiesMarketPrice

The retail price of the product.

TransactionPropertiesRefundTransactionDetails

The refund details of a transaction.

TransactionPropertiesSubTotal

The pre-tax charged amount for the transaction.

TransactionPropertiesTax

The tax amount applied to the transaction.

TransactionPropertiesTransactionAmount

The charge associated with the transaction.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

CreditType

The credit type of the transaction. Applies only to credited transactions.

Value Description
Other

Other

AzureFreeCredit

AzureFreeCredit

AzureCreditOffer

AzureCreditOffer

ServiceInterruption

ServiceInterruption

Refund

Refund

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

RefundTransactionDetailsAmountRefunded

The amount refunded.

Name Type Description
currency

string

The currency for the amount value.

value

number (float)

The amount value. For example, if the currency is USD, then a value of 600 would be $600.00.

RefundTransactionDetailsAmountRequested

The amount of refund requested.

Name Type Description
currency

string

The currency for the amount value.

value

number (float)

The amount value. For example, if the currency is USD, then a value of 600 would be $600.00.

SpecialTaxationType

Identifies the type of tax calculation used for the invoice. The field is applicable only to invoices with special tax calculation logic.

Value Description
SubtotalLevel

SubtotalLevel

InvoiceLevel

InvoiceLevel

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

Transaction

A transaction.

Name Type Description
id

string (arm-id)

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

The name of the resource

properties

TransactionProperties

A transaction.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Dictionary of metadata associated with the resource. It may not be populated for all resource types. Maximum key/value length supported of 256 characters. Keys/value should not empty value nor null. Keys can not contain < > % & \ ? /

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

TransactionKind

Type of the transaction, billed or unbilled.

Value Description
Other

Other

All

All

Reservation

Reservation

TransactionListResult

Paged collection of Transaction items

Name Type Description
nextLink

string (uri)

The link to the next page of items

value

Transaction[]

The Transaction items on this page

TransactionProperties

A transaction.

Name Type Description
azureCreditApplied

TransactionPropertiesAzureCreditApplied

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

azurePlan

string

Details of the Azure plan.

billingCurrency

string

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

billingProfileDisplayName

The name of the billing profile.

billingProfileId

string

The fully qualified ID that uniquely identifies a billing profile.

consumptionCommitmentDecremented

TransactionPropertiesConsumptionCommitmentDecremented

The amount of Microsoft Azure Consumption Commitment(MACC) decrement through the transaction.

creditType

CreditType

The credit type of the transaction. Applies only to credited transactions.

customerDisplayName

string

The name of the customer.

customerId

string

The fully qualified ID that uniquely identifies a customer.

date

string (date-time)

The date of transaction.

discount

number (float)

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

effectivePrice

TransactionPropertiesEffectivePrice

The price of the product after applying any discounts.

exchangeRate

number (float)

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

invoice

string

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

invoiceId

string

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

invoiceSectionDisplayName

string

The name of the invoice section.

invoiceSectionId

string

The fully qualified ID that uniquely identifies an invoice section.

isThirdParty

boolean

Whether or not the transaction is third party.

kind

TransactionKind

Type of the transaction, billed or unbilled.

marketPrice

TransactionPropertiesMarketPrice

The retail price of the product.

partNumber

string

The part number of the product for which the transaction took place. The field is only applicable for Enterprise Agreement invoices.

pricingCurrency

string

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

productDescription

string

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

productFamily

string

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

productType

string

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

productTypeId

string

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

quantity

integer (int32)

The quantity purchased in the transaction.

reasonCode

string

There reason code for the transaction.

refundTransactionDetails

TransactionPropertiesRefundTransactionDetails

The refund details of a transaction.

servicePeriodEndDate

string (date-time)

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

servicePeriodStartDate

string (date-time)

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

specialTaxationType

SpecialTaxationType

Identifies the type of tax calculation used for the invoice. The field is applicable only to invoices with special tax calculation logic.

subTotal

TransactionPropertiesSubTotal

The pre-tax charged amount for the transaction.

tax

TransactionPropertiesTax

The tax amount applied to the transaction.

transactionAmount

TransactionPropertiesTransactionAmount

The charge associated with the transaction.

transactionType

string

The type of transaction.

unitOfMeasure

string

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

unitType

string

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

units

number (float)

The number of units used for a given product.

TransactionPropertiesAzureCreditApplied

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

Name Type Description
currency

string

The currency for the amount value.

value

number (float)

The amount value. For example, if the currency is USD, then a value of 600 would be $600.00.

TransactionPropertiesConsumptionCommitmentDecremented

The amount of Microsoft Azure Consumption Commitment(MACC) decrement through the transaction.

Name Type Description
currency

string

The currency for the amount value.

value

number (float)

The amount value. For example, if the currency is USD, then a value of 600 would be $600.00.

TransactionPropertiesEffectivePrice

The price of the product after applying any discounts.

Name Type Description
currency

string

The currency for the amount value.

value

number (float)

The amount value. For example, if the currency is USD, then a value of 600 would be $600.00.

TransactionPropertiesMarketPrice

The retail price of the product.

Name Type Description
currency

string

The currency for the amount value.

value

number (float)

The amount value. For example, if the currency is USD, then a value of 600 would be $600.00.

TransactionPropertiesRefundTransactionDetails

The refund details of a transaction.

Name Type Description
amountRefunded

RefundTransactionDetailsAmountRefunded

The amount refunded.

amountRequested

RefundTransactionDetailsAmountRequested

The amount of refund requested.

refundOperationId

string

The ID of refund operation.

TransactionPropertiesSubTotal

The pre-tax charged amount for the transaction.

Name Type Description
currency

string

The currency for the amount value.

value

number (float)

The amount value. For example, if the currency is USD, then a value of 600 would be $600.00.

TransactionPropertiesTax

The tax amount applied to the transaction.

Name Type Description
currency

string

The currency for the amount value.

value

number (float)

The amount value. For example, if the currency is USD, then a value of 600 would be $600.00.

TransactionPropertiesTransactionAmount

The charge associated with the transaction.

Name Type Description
currency

string

The currency for the amount value.

value

number (float)

The amount value. For example, if the currency is USD, then a value of 600 would be $600.00.