Share via


Billing Profiles - Create Or Update

Creates or updates a billing profile. The operation is supported for billing accounts with agreement type Microsoft Customer Agreement and Microsoft Partner Agreement. If you are a MCA Individual (Pay-as-you-go) customer, then please use the Azure portal experience to create the billing profile.

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}?api-version=2024-04-01

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.

billingProfileName
path True

string

pattern: ^[a-zA-Z\d-_]{1,128}$

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 2024-04-01.

Request Body

Name Type Description
properties

BillingProfileProperties

A billing profile.

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 < > % & \ ? /

Responses

Name Type Description
200 OK

BillingProfile

A billing profile.

201 Created

BillingProfile

A billing profile.

202 Accepted

An operation accepted result that returns a 'Location' header that the client can poll to view the result of the operation.

Headers

  • Location: string
  • Retry-After: integer
Other Status Codes

ErrorResponse

Error response describing why the operation failed.

Examples

BillingProfilesCreateOrUpdate

Sample request

PUT https://management.azure.com/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx?api-version=2024-04-01

{
  "properties": {
    "billTo": {
      "addressLine1": "Test Address1",
      "addressLine2": "Test Address2",
      "addressLine3": "Test Address3",
      "city": "City",
      "companyName": "Contoso",
      "country": "US",
      "email": "abc@contoso.com",
      "firstName": "Test",
      "lastName": "User",
      "phoneNumber": "000-000-0000",
      "postalCode": "00000",
      "region": "WA",
      "isValidAddress": true
    },
    "displayName": "Billing Profile 1",
    "enabledAzurePlans": [
      {
        "skuId": "0001"
      },
      {
        "skuId": "0002"
      }
    ],
    "invoiceEmailOptIn": true,
    "poNumber": "ABC12345",
    "shipTo": {
      "addressLine1": "Test Address1",
      "addressLine2": "Test Address2",
      "addressLine3": "Test Address3",
      "city": "City",
      "companyName": "Contoso",
      "country": "US",
      "email": "abc@contoso.com",
      "firstName": "Test",
      "lastName": "User",
      "phoneNumber": "000-000-0000",
      "postalCode": "00000",
      "region": "WA",
      "isValidAddress": true
    }
  }
}

Sample response

{
  "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx",
  "name": "xxxx-xxxx-xxx-xxx",
  "properties": {
    "billTo": {
      "addressLine1": "Test Address1",
      "addressLine2": "Test Address2",
      "addressLine3": "Test Address3",
      "city": "City",
      "companyName": "Contoso",
      "country": "US",
      "email": "abc@contoso.com",
      "firstName": "Test",
      "lastName": "User",
      "phoneNumber": "000-000-0000",
      "postalCode": "00000",
      "region": "WA",
      "isValidAddress": true
    },
    "currency": "USD",
    "displayName": "Billing Profile 1",
    "hasReadAccess": true,
    "invoiceDay": 5,
    "invoiceEmailOptIn": true,
    "poNumber": "ABC12345",
    "shipTo": {
      "addressLine1": "Test Address1",
      "addressLine2": "Test Address2",
      "addressLine3": "Test Address3",
      "city": "City",
      "companyName": "Contoso",
      "country": "US",
      "email": "abc@contoso.com",
      "firstName": "Test",
      "lastName": "User",
      "phoneNumber": "000-000-0000",
      "postalCode": "00000",
      "region": "WA",
      "isValidAddress": true
    },
    "status": "Active",
    "systemId": "11111111-1111-1111-1111-111111111111"
  },
  "type": "Microsoft.Billing/billingAccounts/billingProfiles"
}
{
  "id": "/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/billingProfiles/xxxx-xxxx-xxx-xxx",
  "name": "xxxx-xxxx-xxx-xxx",
  "properties": {
    "billTo": {
      "addressLine1": "Test Address1",
      "addressLine2": "Test Address2",
      "addressLine3": "Test Address3",
      "city": "City",
      "companyName": "Contoso",
      "country": "US",
      "email": "abc@contoso.com",
      "firstName": "Test",
      "lastName": "User",
      "phoneNumber": "000-000-0000",
      "postalCode": "00000",
      "region": "WA",
      "isValidAddress": true
    },
    "currency": "USD",
    "displayName": "Billing Profile 1",
    "hasReadAccess": true,
    "invoiceDay": 5,
    "invoiceEmailOptIn": true,
    "poNumber": "ABC12345",
    "shipTo": {
      "addressLine1": "Test Address1",
      "addressLine2": "Test Address2",
      "addressLine3": "Test Address3",
      "city": "City",
      "companyName": "Contoso",
      "country": "US",
      "email": "abc@contoso.com",
      "firstName": "Test",
      "lastName": "User",
      "phoneNumber": "000-000-0000",
      "postalCode": "00000",
      "region": "WA",
      "isValidAddress": true
    },
    "status": "Active",
    "systemId": "11111111-1111-1111-1111-111111111111"
  },
  "type": "Microsoft.Billing/billingAccounts/billingProfiles"
}
location: https://management.azure.com/providers/Microsoft.Billing/billingAccounts/00000000-0000-0000-0000-000000000000:00000000-0000-0000-0000-000000000000_2019-05-31/operationResults/putBillingProfile_00000000-0000-0000-0000-000000000000?api-version=2024-04-01
retry-after: 10

Definitions

Name Description
AzurePlan

Details of the Azure plan.

BillingProfile

A billing profile.

BillingProfileProperties

A billing profile.

BillingProfileStatus

The status of the billing profile.

BillingProfileStatusReasonCode

Reason for the specified billing profile status.

BillingRelationshipType

Identifies the billing relationship represented by the billing profile. The billing relationship may be between Microsoft, the customer, and/or a third-party.

BillTo

Billing address.

createdByType

The type of identity that created the resource.

CurrentPaymentTerm

The current payment term of the billing profile.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

IndirectRelationshipInfo

Identifies the billing profile that is linked to another billing profile in indirect purchase motion.

PaymentTerm

The properties of payment term.

ProvisioningState

The provisioning state of the resource during a long-running operation.

ShipTo

The default address where the products are shipped, or the services are being used. If a ship to is not specified for a product or a subscription, then this address will be used.

SoldTo

The address of the individual or organization that is responsible for the billing account.

SpendingLimit

The billing profile spending limit.

SpendingLimitDetails

The billing profile spending limit.

SpendingLimitStatus

The status of current spending limit.

SpendingLimitType

The type of spending limit.

systemData

Metadata pertaining to creation and last modification of the resource.

AzurePlan

Details of the Azure plan.

Name Type Description
productId

string

The ID that uniquely identifies a product.

skuDescription

string

The sku description.

skuId

string

The ID that uniquely identifies a sku.

BillingProfile

A billing profile.

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

BillingProfileProperties

A billing profile.

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"

BillingProfileProperties

A billing profile.

Name Type Description
billTo

BillTo

Billing address.

billingRelationshipType

BillingRelationshipType

Identifies the billing relationship represented by the billing profile. The billing relationship may be between Microsoft, the customer, and/or a third-party.

currency

string

The currency in which the charges for the billing profile are billed.

currentPaymentTerm

CurrentPaymentTerm

The current payment term of the billing profile.

displayName

string

The name of the billing profile.

enabledAzurePlans

AzurePlan[]

Information about the enabled azure plans.

hasReadAccess

boolean

Indicates whether user has read access to the billing profile.

indirectRelationshipInfo

IndirectRelationshipInfo

Identifies the billing profile that is linked to another billing profile in indirect purchase motion.

invoiceDay

integer (int32)

The day of the month when the invoice for the billing profile is generated.

invoiceEmailOptIn

boolean

Flag controlling whether the invoices for the billing profile are sent through email.

invoiceRecipients

string[]

The list of email addresses to receive invoices by email for the billing profile.

otherPaymentTerms

PaymentTerm[]

The other payment terms of the billing profile.

poNumber

string

The default purchase order number that will appear on the invoices generated for the billing profile.

provisioningState

ProvisioningState

The provisioning state of the resource during a long-running operation.

shipTo

ShipTo

The default address where the products are shipped, or the services are being used. If a ship to is not specified for a product or a subscription, then this address will be used.

soldTo

SoldTo

The address of the individual or organization that is responsible for the billing account.

spendingLimit

SpendingLimit

The billing profile spending limit.

spendingLimitDetails

SpendingLimitDetails[]

The details of billing profile spending limit.

status

BillingProfileStatus

The status of the billing profile.

statusReasonCode

BillingProfileStatusReasonCode

Reason for the specified billing profile status.

systemId

string

The system generated unique identifier for a billing profile.

tags

object

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

targetClouds

string[]

Identifies the cloud environments that are associated with a billing profile. This is a system managed optional field and gets updated as the billing profile gets associated with accounts in various clouds.

BillingProfileStatus

The status of the billing profile.

Value Description
Other
Active
Disabled
Warned
Deleted
UnderReview

BillingProfileStatusReasonCode

Reason for the specified billing profile status.

Value Description
Other
PastDue
UnusualActivity
SpendingLimitReached
SpendingLimitExpired

BillingRelationshipType

Identifies the billing relationship represented by the billing profile. The billing relationship may be between Microsoft, the customer, and/or a third-party.

Value Description
Other
Direct
IndirectCustomer
IndirectPartner
CSPPartner
CSPCustomer

BillTo

Billing address.

Name Type Description
addressLine1

string

minLength: 1

Address line 1.

addressLine2

string

Address line 2.

addressLine3

string

Address line 3.

city

string

Address city.

companyName

string

Company name. Optional for MCA Individual (Pay-as-you-go).

country

string

minLength: 1

Country code uses ISO 3166-1 Alpha-2 format.

district

string

Address district.

email

string

Email address.

firstName

string

First name. Optional for MCA Enterprise.

isValidAddress

boolean

Indicates if the address is incomplete.

lastName

string

Last name. Optional for MCA Enterprise.

middleName

string

Middle name.

phoneNumber

string

Phone number.

postalCode

string

Postal code.

region

string

Address region.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

CurrentPaymentTerm

The current payment term of the billing profile.

Name Type Description
endDate

string (date-time)

The date on when the defined 'Payment Term' will end and is always in UTC.

isDefault

boolean

Indicates payment term is the standard payment term.

startDate

string (date-time)

The date on when the defined 'Payment Term' will be effective from and is always in UTC.

term

string

Represents duration in netXX format. Always in days.

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.

IndirectRelationshipInfo

Identifies the billing profile that is linked to another billing profile in indirect purchase motion.

Name Type Description
billingAccountName

string

The billing account name of the partner or the customer for an indirect motion.

billingProfileName

string

The billing profile name of the partner or the customer for an indirect motion.

displayName

string

The display name of the partner or customer for an indirect motion.

PaymentTerm

The properties of payment term.

Name Type Description
endDate

string (date-time)

The date on when the defined 'Payment Term' will end and is always in UTC.

isDefault

boolean

Indicates payment term is the standard payment term.

startDate

string (date-time)

The date on when the defined 'Payment Term' will be effective from and is always in UTC.

term

string

Represents duration in netXX format. Always in days.

ProvisioningState

The provisioning state of the resource during a long-running operation.

Value Description
Succeeded
Canceled
Failed
New
Pending
Provisioning

ShipTo

The default address where the products are shipped, or the services are being used. If a ship to is not specified for a product or a subscription, then this address will be used.

Name Type Description
addressLine1

string

minLength: 1

Address line 1.

addressLine2

string

Address line 2.

addressLine3

string

Address line 3.

city

string

Address city.

companyName

string

Company name. Optional for MCA Individual (Pay-as-you-go).

country

string

minLength: 1

Country code uses ISO 3166-1 Alpha-2 format.

district

string

Address district.

email

string

Email address.

firstName

string

First name. Optional for MCA Enterprise.

isValidAddress

boolean

Indicates if the address is incomplete.

lastName

string

Last name. Optional for MCA Enterprise.

middleName

string

Middle name.

phoneNumber

string

Phone number.

postalCode

string

Postal code.

region

string

Address region.

SoldTo

The address of the individual or organization that is responsible for the billing account.

Name Type Description
addressLine1

string

minLength: 1

Address line 1.

addressLine2

string

Address line 2.

addressLine3

string

Address line 3.

city

string

Address city.

companyName

string

Company name. Optional for MCA Individual (Pay-as-you-go).

country

string

minLength: 1

Country code uses ISO 3166-1 Alpha-2 format.

district

string

Address district.

email

string

Email address.

firstName

string

First name. Optional for MCA Enterprise.

isValidAddress

boolean

Indicates if the address is incomplete.

lastName

string

Last name. Optional for MCA Enterprise.

middleName

string

Middle name.

phoneNumber

string

Phone number.

postalCode

string

Postal code.

region

string

Address region.

SpendingLimit

The billing profile spending limit.

Value Description
Off
On

SpendingLimitDetails

The billing profile spending limit.

Name Type Description
amount

number

The initial amount for the billing profile.

currency

string

The currency in which the charges for the billing profile are billed.

endDate

string (date-time)

The date when this spending limit is no longer in effect.

startDate

string (date-time)

The date when this spending limit goes into effect.

status

SpendingLimitStatus

The status of current spending limit.

type

SpendingLimitType

The type of spending limit.

SpendingLimitStatus

The status of current spending limit.

Value Description
Other
None
Active
Expired
LimitReached
LimitRemoved

SpendingLimitType

The type of spending limit.

Value Description
Other
None
FreeAccount
Sandbox
AzureForStudents
AcademicSponsorship
AzureConsumptionCredit
AzurePassSponsorship
MpnSponsorship
MSDN
NonProfitSponsorship
Sponsorship
StartupSponsorship
AzureForStudentsStarter
VisualStudio

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.