Skip to main content

payment_methods

Creates, updates, deletes, gets or lists a payment_methods resource.

Overview

Namepayment_methods
TypeResource
Idazure.billing.payment_methods

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
accountHolderNamestringThe account holder name for the payment method. This is only supported for payment methods with family CreditCard.
displayNamestringThe display name of the payment method.
expirationstringThe expiration month and year of the payment method. This is only supported for payment methods with family CreditCard.
familystringThe family of payment method. Known values are: "Other", "None", "CreditCard", "Credits", "CheckWire", "EWallet", "TaskOrder", and "DirectDebit". (Other, None, CreditCard, Credits, CheckWire, EWallet, TaskOrder, DirectDebit)
lastFourDigitsstringLast four digits of payment method.
logosarrayThe list of logos for the payment method.
paymentMethodobjectProjection of a payment method. Will not be returned in this or future versions.
paymentMethodIdstringId of payment method. Example: /providers/Microsoft.Billing/paymentMethods/ABCDABCDABC0.
paymentMethodTypestringThe type of payment method.
statusstringStatus of the payment method. Known values are: "active" and "inactive". (active, inactive)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectDictionary 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 < > % & \ ? /.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_billing_profileselectbilling_account_name, billing_profile_name, payment_method_nameGets a payment method linked with a billing profile. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.
list_by_billing_profileselectbilling_account_name, billing_profile_nameLists payment methods attached to a billing profile. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.
get_by_billing_accountselectbilling_account_name, payment_method_nameGets a payment method available for a billing account. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.
list_by_billing_accountselectbilling_account_nameLists the payment methods available for a billing account. Along with the payment methods owned by the caller, these payment methods can be attached to a billing profile to make payments. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.
get_by_userselectpayment_method_nameGets a payment method owned by the caller.
list_by_userselectLists the payment methods owned by the caller.
delete_by_userdeletepayment_method_nameDeletes a payment method owned by the caller.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
billing_account_namestringThe ID that uniquely identifies a billing account. Required.
billing_profile_namestringThe ID that uniquely identifies a billing profile. Required.
payment_method_namestringThe ID that uniquely identifies a payment method. Required.

SELECT examples

Gets a payment method linked with a billing profile. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

SELECT
id,
name,
accountHolderName,
displayName,
expiration,
family,
lastFourDigits,
logos,
paymentMethod,
paymentMethodId,
paymentMethodType,
status,
systemData,
tags,
type
FROM azure.billing.payment_methods
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND billing_profile_name = '{{ billing_profile_name }}' -- required
AND payment_method_name = '{{ payment_method_name }}' -- required
;

DELETE examples

Deletes a payment method owned by the caller.

DELETE FROM azure.billing.payment_methods
WHERE payment_method_name = '{{ payment_method_name }}' --required
;