Invoices - Get By Billing Subscription
Gets an invoice by subscription ID and invoice ID. The operation is supported for billing accounts with agreement type Microsoft Partner Agreement or Microsoft Customer Agreement.
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 |
---|---|---|---|---|
invoice
|
path | True |
string |
The ID that uniquely identifies an invoice. Regex pattern: |
subscription
|
path | True |
string |
The ID that uniquely identifies a billing subscription. Regex pattern: |
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 |
An invoice. |
|
Other Status Codes |
Error response describing why the operation failed. |
Examples
InvoicesGetByBillingSubscription
Sample request
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. |
Amount |
The amount due as of now. |
Amount |
The amount refunded. |
Amount |
The amount of refund requested. |
Azure |
The amount of Azure prepayment applied to the charges. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement. |
Billed |
The total charges for the invoice billing period. |
created |
The type of identity that created the resource. |
Credit |
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. |
Document |
The source of the document. ENF for Brazil and DRS for rest of the world. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Failed |
A failed payment. |
Failed |
The reason that the payment failed. |
Free |
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. |
Invoice |
The properties of a document. |
Invoice |
The type of the document. |
Invoice |
An invoice. |
Invoice |
The current status of the invoice. |
Invoice |
Invoice type. |
Payment |
An invoice payment. |
Payment |
The family of payment method. |
Rebill |
The rebill details of an invoice. |
Refund |
The details of a refund request. |
Refund |
The reason for refund. |
Refund |
The status of refund request. |
Special |
Identifies the type of tax calculation used for the invoice. The field is applicable only to invoices with special tax calculation logic. |
Sub |
The pre-tax amount due. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement. |
system |
Metadata pertaining to creation and last modification of the resource. |
Tax |
The amount of tax charged for the billing period. This field is applicable to billing accounts with agreement type Microsoft Customer Agreement. |
Total |
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 |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
FailedPayment
A failed payment.
Name | Type | Description |
---|---|---|
date |
string |
The date when the payment was attempted. |
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 |
An invoice. |
|
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 |
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 |
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 |
The amount due as of now. |
|
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. |
|
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 |
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 |
The type of the document. |
|
documents |
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 |
List of failed payments. |
|
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 |
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 |
Rebill details for an invoice. |
|
refundDetails |
The details of a 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. |
|
status |
The current status of the invoice. |
|
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 |
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. |
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 |
The paid amount. |
|
date |
string |
The date when the payment was made. |
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 |
The rebill details of an invoice. |
RefundDetails
The details of a refund request.
Name | Type | Description |
---|---|---|
amountRefunded |
The amount refunded. |
|
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 |
The reason for refund. |
|
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 |
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 |
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. |