Invoices - Get By Billing Subscription

Gets an invoice by subscription ID and invoice ID.

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/{subscriptionId}/invoices/{invoiceName}?api-version=2024-04-01

URI Parameters

Name In Required Type Description
invoiceName
path True

string

The ID that uniquely identifies an invoice.

Regex 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})$

subscriptionId
path True

string

The ID that uniquely identifies a billing subscription.

Regex pattern: ^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$

api-version
query True

string

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

Responses

Name Type Description
200 OK

Invoice

An invoice.

Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Examples

InvoicesGetByBillingSubscription

Sample request

GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/11111111-1111-1111-1111-111111111111/invoices/E123456789?api-version=2024-04-01

Sample response

{
  "id": "/providers/Microsoft.Billing/billingAccounts/default/billingSubscriptions/11111111-1111-1111-1111-111111111111/invoices/E123456789",
  "name": "E123456789",
  "properties": {
    "amountDue": {
      "currency": "USD",
      "value": 8.53
    },
    "billedAmount": {
      "currency": "USD",
      "value": 33.99
    },
    "dueDate": "2023-02-16T17:32:28Z",
    "invoiceDate": "2023-02-01T17:32:28Z",
    "invoicePeriodEndDate": "2023-02-15T17:32:28Z",
    "invoicePeriodStartDate": "2023-02-01T17:32:28Z",
    "invoiceType": "AzureServices",
    "purchaseOrderNumber": "123456",
    "status": "Due",
    "subscriptionDisplayName": "Contoso Operations Billing",
    "subscriptionId": "11111111-1111-1111-1111-111111111111"
  },
  "type": "Microsoft.Billing/billingAccounts/billingSubscriptions/invoices"
}

Definitions

Name Description
Amount

The amount.

AmountDue

The amount due as of now.

AmountRefunded

The amount refunded.

AmountRequested

The amount of refund requested.

AzurePrepaymentApplied

The amount of Azure prepayment applied to the charges. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

BilledAmount

The total charges for the invoice billing period.

createdByType

The type of identity that created the resource.

CreditAmount

The total refund for returns and cancellations during the invoice billing period. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

DocumentSource

The source of the document. ENF for Brazil and DRS for rest of the world.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

FailedPayment

A failed payment.

FailedPaymentReason

The reason that the payment failed.

FreeAzureCreditApplied

The amount of free Azure credits applied to the charges. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

Invoice

An invoice.

InvoiceDocument

The properties of a document.

InvoiceDocumentType

The type of the document.

InvoiceProperties

An invoice.

InvoiceStatus

The current status of the invoice.

InvoiceType

Invoice type.

Payment

An invoice payment.

PaymentMethodFamily

The family of payment method.

RebillDetails

The rebill details of an invoice.

RefundDetails

The details of a refund request.

RefundReasonCode

The reason for refund.

RefundStatus

The status of refund request.

SpecialTaxationType

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

SubTotal

The pre-tax amount due. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

systemData

Metadata pertaining to creation and last modification of the resource.

TaxAmount

The amount of tax charged for the billing period. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

TotalAmount

The amount due when the invoice was generated. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

Amount

The amount.

Name Type Description
currency

string

The currency for the amount value.

value

number

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

AmountDue

The amount due as of now.

Name Type Description
currency

string

The currency for the amount value.

value

number

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

AmountRefunded

The amount refunded.

Name Type Description
currency

string

The currency for the amount value.

value

number

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

AmountRequested

The amount of refund requested.

Name Type Description
currency

string

The currency for the amount value.

value

number

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

AzurePrepaymentApplied

The amount of Azure prepayment applied to the charges. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

Name Type Description
currency

string

The currency for the amount value.

value

number

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

BilledAmount

The total charges for the invoice billing period.

Name Type Description
currency

string

The currency for the amount value.

value

number

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

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

CreditAmount

The total refund for returns and cancellations during the invoice billing period. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

Name Type Description
currency

string

The currency for the amount value.

value

number

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

DocumentSource

The source of the document. ENF for Brazil and DRS for rest of the world.

Name Type Description
DRS

string

ENF

string

Other

string

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.

FailedPayment

A failed payment.

Name Type Description
date

string

The date when the payment was attempted.

failedPaymentReason

FailedPaymentReason

The reason that the payment failed.

FailedPaymentReason

The reason that the payment failed.

Name Type Description
BankDeclined

string

CardExpired

string

IncorrectCardDetails

string

Other

string

FreeAzureCreditApplied

The amount of free Azure credits applied to the charges. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

Name Type Description
currency

string

The currency for the amount value.

value

number

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

Invoice

An invoice.

Name Type Description
id

string

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

InvoiceProperties

An invoice.

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"

InvoiceDocument

The properties of a document.

Name Type Description
documentNumbers

string[]

The document numbers for the invoice document.

externalUrl

string

The URL to download the invoice document if the source is external to Microsoft.Billing.

kind

InvoiceDocumentType

The type of the document.

name

string

The ID that uniquely identifies an invoice document. This ID may be an identifier for an invoice PDF, a credit note, or a tax receipt.

source

DocumentSource

The source of the document. ENF for Brazil and DRS for rest of the world.

url

string

The URL to download the invoice document if the source is internal to Microsoft.Billing.

InvoiceDocumentType

The type of the document.

Name Type Description
CreditNote

string

Invoice

string

Other

string

Summary

string

TaxReceipt

string

Transactions

string

VoidNote

string

InvoiceProperties

An invoice.

Name Type Description
amountDue

AmountDue

The amount due as of now.

azurePrepaymentApplied

AzurePrepaymentApplied

The amount of Azure prepayment applied to the charges. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

billedAmount

BilledAmount

The total charges for the invoice billing period.

billedDocumentId

string

The Id of the active invoice which is originally billed after this invoice was voided. This field is applicable to the void invoices only.

billingProfileDisplayName

string

The name of the billing profile for which the invoice is generated.

billingProfileId

string

The ID of the billing profile for which the invoice is generated.

creditAmount

CreditAmount

The total refund for returns and cancellations during the invoice billing period. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

creditForDocumentId

string

The Id of the invoice which got voided and this credit note was issued as a result. This field is applicable to the credit notes only.

documentType

InvoiceDocumentType

The type of the document.

documents

InvoiceDocument[]

List of documents available to download and view such as invoice, credit note, or tax receipt.

dueDate

string

The due date for the invoice.

failedPayments

FailedPayment[]

List of failed payments.

freeAzureCreditApplied

FreeAzureCreditApplied

The amount of free Azure credits applied to the charges. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

invoiceDate

string

The date when the invoice was generated.

invoicePeriodEndDate

string

The end date of the billing period for which the invoice is generated. The date is in MM-DD-YYYY format.

invoicePeriodStartDate

string

The start date of the billing period for which the invoice is generated. The date is in MM-DD-YYYY format.

invoiceType

InvoiceType

Invoice type.

isMonthlyInvoice

boolean

Specifies if the invoice is generated as part of monthly invoicing cycle or not. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

payments

Payment[]

List of payments.

purchaseOrderNumber

string

An optional purchase order number for the invoice.

rebillDetails

RebillDetails

Rebill details for an invoice.

refundDetails

RefundDetails

The details of a refund request.

specialTaxationType

SpecialTaxationType

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

status

InvoiceStatus

The current status of the invoice.

subTotal

SubTotal

The pre-tax amount due. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

subscriptionDisplayName

string

The name of the billing subscription for which the invoice is generated.

subscriptionId

string

The ID of the subscription for which the invoice is generated.

taxAmount

TaxAmount

The amount of tax charged for the billing period. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

totalAmount

TotalAmount

The amount due when the invoice was generated. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

InvoiceStatus

The current status of the invoice.

Name Type Description
Due

string

Locked

string

Other

string

OverDue

string

Paid

string

Void

string

InvoiceType

Invoice type.

Name Type Description
AzureMarketplace

string

AzureServices

string

AzureSupport

string

Other

string

Payment

An invoice payment.

Name Type Description
amount

Amount

The paid amount.

date

string

The date when the payment was made.

paymentMethodFamily

PaymentMethodFamily

The family of payment method.

paymentMethodId

string

The ID that uniquely identifies the payment method used for the invoice.

paymentMethodType

string

The type of payment method.

paymentType

string

The type of payment.

PaymentMethodFamily

The family of payment method.

Name Type Description
CheckWire

string

CreditCard

string

Credits

string

DirectDebit

string

EWallet

string

None

string

Other

string

TaskOrder

string

RebillDetails

The rebill details of an invoice.

Name Type Description
creditNoteDocumentId

string

The ID of credit note.

invoiceDocumentId

string

The ID of invoice.

rebillDetails

RebillDetails

The rebill details of an invoice.

RefundDetails

The details of a refund request.

Name Type Description
amountRefunded

AmountRefunded

The amount refunded.

amountRequested

AmountRequested

The amount of refund requested.

approvedOn

string

Date when the refund was approved.

completedOn

string

Date when the refund was completed.

rebillInvoiceId

string

The invoice ID of the rebill invoice for a refund.

refundOperationId

string

The ID of refund operation.

refundReason

RefundReasonCode

The reason for refund.

refundStatus

RefundStatus

The status of refund request.

requestedOn

string

Date when the refund was requested.

transactionCount

integer

The number of transactions refunded.

RefundReasonCode

The reason for refund.

Name Type Description
AccidentalConversion

string

AccidentalPurchase

string

ForgotToCancel

string

Other

string

UnclearDocumentation

string

UnclearPricing

string

RefundStatus

The status of refund request.

Name Type Description
Approved

string

Cancelled

string

Completed

string

Declined

string

Expired

string

Other

string

Pending

string

SpecialTaxationType

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

Name Type Description
InvoiceLevel

string

SubtotalLevel

string

SubTotal

The pre-tax amount due. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

Name Type Description
currency

string

The currency for the amount value.

value

number

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

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

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

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.

TaxAmount

The amount of tax charged for the billing period. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

Name Type Description
currency

string

The currency for the amount value.

value

number

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

TotalAmount

The amount due when the invoice was generated. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement.

Name Type Description
currency

string

The currency for the amount value.

value

number

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