payment_methods
Creates, updates, deletes, gets or lists a payment_methods resource.
Overview
| Name | payment_methods |
| Type | Resource |
| Id | azure.billing.payment_methods |
Fields
The following fields are returned by SELECT queries:
- get_by_billing_profile
- list_by_billing_profile
- get_by_billing_account
- list_by_billing_account
- get_by_user
- list_by_user
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
accountHolderName | string | The account holder name for the payment method. This is only supported for payment methods with family CreditCard. |
displayName | string | The display name of the payment method. |
expiration | string | The expiration month and year of the payment method. This is only supported for payment methods with family CreditCard. |
family | string | The family of payment method. Known values are: "Other", "None", "CreditCard", "Credits", "CheckWire", "EWallet", "TaskOrder", and "DirectDebit". (Other, None, CreditCard, Credits, CheckWire, EWallet, TaskOrder, DirectDebit) |
lastFourDigits | string | Last four digits of payment method. |
logos | array | The list of logos for the payment method. |
paymentMethod | object | Projection of a payment method. Will not be returned in this or future versions. |
paymentMethodId | string | Id of payment method. Example: /providers/Microsoft.Billing/paymentMethods/ABCDABCDABC0. |
paymentMethodType | string | The type of payment method. |
status | string | Status of the payment method. Known values are: "active" and "inactive". (active, inactive) |
systemData | object | 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". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
accountHolderName | string | The account holder name for the payment method. This is only supported for payment methods with family CreditCard. |
displayName | string | The display name of the payment method. |
expiration | string | The expiration month and year of the payment method. This is only supported for payment methods with family CreditCard. |
family | string | The family of payment method. Known values are: "Other", "None", "CreditCard", "Credits", "CheckWire", "EWallet", "TaskOrder", and "DirectDebit". (Other, None, CreditCard, Credits, CheckWire, EWallet, TaskOrder, DirectDebit) |
lastFourDigits | string | Last four digits of payment method. |
logos | array | The list of logos for the payment method. |
paymentMethod | object | Projection of a payment method. Will not be returned in this or future versions. |
paymentMethodId | string | Id of payment method. Example: /providers/Microsoft.Billing/paymentMethods/ABCDABCDABC0. |
paymentMethodType | string | The type of payment method. |
status | string | Status of the payment method. Known values are: "active" and "inactive". (active, inactive) |
systemData | object | 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". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
accountHolderName | string | The account holder name for the payment method. This is only supported for payment methods with family CreditCard. |
displayName | string | The display name of the payment method. |
expiration | string | The expiration month and year of the payment method. This is only supported for payment methods with family CreditCard. |
family | string | The family of payment method. Known values are: "Other", "None", "CreditCard", "Credits", "CheckWire", "EWallet", "TaskOrder", and "DirectDebit". (Other, None, CreditCard, Credits, CheckWire, EWallet, TaskOrder, DirectDebit) |
lastFourDigits | string | Last four digits of payment method. |
logos | array | The list of logos for the payment method. |
paymentMethodType | string | The type of payment method. |
status | string | Status of the payment method. Known values are: "active" and "inactive". (active, inactive) |
systemData | object | 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". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
accountHolderName | string | The account holder name for the payment method. This is only supported for payment methods with family CreditCard. |
displayName | string | The display name of the payment method. |
expiration | string | The expiration month and year of the payment method. This is only supported for payment methods with family CreditCard. |
family | string | The family of payment method. Known values are: "Other", "None", "CreditCard", "Credits", "CheckWire", "EWallet", "TaskOrder", and "DirectDebit". (Other, None, CreditCard, Credits, CheckWire, EWallet, TaskOrder, DirectDebit) |
lastFourDigits | string | Last four digits of payment method. |
logos | array | The list of logos for the payment method. |
paymentMethodType | string | The type of payment method. |
status | string | Status of the payment method. Known values are: "active" and "inactive". (active, inactive) |
systemData | object | 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". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
accountHolderName | string | The account holder name for the payment method. This is only supported for payment methods with family CreditCard. |
displayName | string | The display name of the payment method. |
expiration | string | The expiration month and year of the payment method. This is only supported for payment methods with family CreditCard. |
family | string | The family of payment method. Known values are: "Other", "None", "CreditCard", "Credits", "CheckWire", "EWallet", "TaskOrder", and "DirectDebit". (Other, None, CreditCard, Credits, CheckWire, EWallet, TaskOrder, DirectDebit) |
lastFourDigits | string | Last four digits of payment method. |
logos | array | The list of logos for the payment method. |
paymentMethodType | string | The type of payment method. |
status | string | Status of the payment method. Known values are: "active" and "inactive". (active, inactive) |
systemData | object | 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". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
accountHolderName | string | The account holder name for the payment method. This is only supported for payment methods with family CreditCard. |
displayName | string | The display name of the payment method. |
expiration | string | The expiration month and year of the payment method. This is only supported for payment methods with family CreditCard. |
family | string | The family of payment method. Known values are: "Other", "None", "CreditCard", "Credits", "CheckWire", "EWallet", "TaskOrder", and "DirectDebit". (Other, None, CreditCard, Credits, CheckWire, EWallet, TaskOrder, DirectDebit) |
lastFourDigits | string | Last four digits of payment method. |
logos | array | The list of logos for the payment method. |
paymentMethodType | string | The type of payment method. |
status | string | Status of the payment method. Known values are: "active" and "inactive". (active, inactive) |
systemData | object | 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". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_by_billing_profile | select | billing_account_name, billing_profile_name, payment_method_name | Gets 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_profile | select | billing_account_name, billing_profile_name | Lists payment methods attached to a billing profile. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement. | |
get_by_billing_account | select | billing_account_name, payment_method_name | Gets 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_account | select | billing_account_name | Lists 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_user | select | payment_method_name | Gets a payment method owned by the caller. | |
list_by_user | select | Lists the payment methods owned by the caller. | ||
delete_by_user | delete | payment_method_name | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
billing_account_name | string | The ID that uniquely identifies a billing account. Required. |
billing_profile_name | string | The ID that uniquely identifies a billing profile. Required. |
payment_method_name | string | The ID that uniquely identifies a payment method. Required. |
SELECT examples
- get_by_billing_profile
- list_by_billing_profile
- get_by_billing_account
- list_by_billing_account
- get_by_user
- list_by_user
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
;
Lists payment methods attached to 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
;
Gets a payment method available for a billing account. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.
SELECT
id,
name,
accountHolderName,
displayName,
expiration,
family,
lastFourDigits,
logos,
paymentMethodType,
status,
systemData,
tags,
type
FROM azure.billing.payment_methods
WHERE billing_account_name = '{{ billing_account_name }}' -- required
AND payment_method_name = '{{ payment_method_name }}' -- required
;
Lists 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.
SELECT
id,
name,
accountHolderName,
displayName,
expiration,
family,
lastFourDigits,
logos,
paymentMethodType,
status,
systemData,
tags,
type
FROM azure.billing.payment_methods
WHERE billing_account_name = '{{ billing_account_name }}' -- required
;
Gets a payment method owned by the caller.
SELECT
id,
name,
accountHolderName,
displayName,
expiration,
family,
lastFourDigits,
logos,
paymentMethodType,
status,
systemData,
tags,
type
FROM azure.billing.payment_methods
WHERE payment_method_name = '{{ payment_method_name }}' -- required
;
Lists the payment methods owned by the caller.
SELECT
id,
name,
accountHolderName,
displayName,
expiration,
family,
lastFourDigits,
logos,
paymentMethodType,
status,
systemData,
tags,
type
FROM azure.billing.payment_methods
;
DELETE examples
- delete_by_user
Deletes a payment method owned by the caller.
DELETE FROM azure.billing.payment_methods
WHERE payment_method_name = '{{ payment_method_name }}' --required
;