Billing Profiles - Get Eligibility To Detach Payment Method
Validates if the default payment method can be detached from the billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement.
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/validateDetachPaymentMethodEligibility?api-version=2019-10-01-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
billing
|
path | True |
string |
The ID that uniquely identifies a billing account. |
billing
|
path | True |
string |
The ID that uniquely identifies a billing profile. |
api-version
|
query | True |
string |
The version of the API to be used with the client request. The current version is 2019-10-01-preview. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK. The request has succeeded. |
|
Other Status Codes |
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
Validate |
Validate |
ValidateDetachPaymentMethodEligibilityFailure
Sample Request
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/validateDetachPaymentMethodEligibility?api-version=2019-10-01-preview
Sample Response
{
"isEligible": false,
"errorDetails": [
{
"code": "AzureSubscriptions",
"message": "Payment method cannot be detached as there are active or disabled azure subscriptions on this billing profile."
},
{
"code": "RecurringCharges",
"message": "Payment method cannot be detached as there are recurring charges on this billing profile."
},
{
"code": "ReservedInstances",
"message": "Payment method cannot be detached as there are reserved instances on this billing profile."
},
{
"code": "OutstandingCharges",
"message": "Payment method cannot be detached as there are unpaid outstanding charges on this billing profile."
},
{
"code": "PendingCharges",
"message": "Payment method cannot be detached as there are pending charges accumulating on this billing profile."
}
]
}
ValidateDetachPaymentMethodEligibilitySuccess
Sample Request
GET https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/validateDetachPaymentMethodEligibility?api-version=2019-10-01-preview
Sample Response
{
"isEligible": true
}
Definitions
Name | Description |
---|---|
detach |
Error code for the detach payment method eligibility validation. |
Detach |
Result of the detach payment method eligibility validation. |
Detach |
Error details of the detach payment method eligibility validation. |
Error |
The details of the error. |
Error |
Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. |
Error |
detachPaymentMethodEligibilityErrorCode
Error code for the detach payment method eligibility validation.
Name | Type | Description |
---|---|---|
AzureSubscriptions |
string |
|
OutstandingCharges |
string |
|
PendingCharges |
string |
|
RecurringCharges |
string |
|
ReservedInstances |
string |
DetachPaymentMethodEligibilityResult
Result of the detach payment method eligibility validation.
Name | Type | Description |
---|---|---|
errorDetails |
The list of detach payment method eligibility errors. |
|
isEligible |
boolean |
Specifies whether the payment method is eligible to be detached from the billing profile. |
DetachPaymentMethodErrorDetails
Error details of the detach payment method eligibility validation.
Name | Type | Description |
---|---|---|
code |
Error code for the detach payment method eligibility validation. |
|
message |
string |
Error message for the detach payment method eligibility validation. |
ErrorDetails
The details of the error.
Name | Type | Description |
---|---|---|
code |
string |
Error code. |
details |
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 |
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. |