Skip to main content

payment_methods

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

Overview

Namepayment_methods
TypeResource
Idlinode.account.payment_methods

Fields

The following fields are returned by SELECT queries:

Returns a Payment Method Object.

NameDatatypeDescription
idintegerThe unique ID of this Payment Method.
createdstring (date-time)Read-only When the Payment Method was added to the Account. (example: 2018-01-15T00:01:01)
data (x-linode-cli-format: json)
is_defaultbooleanWhether this Payment Method is the default method for automatically processing service charges.
typestringThe type of Payment Method. (example: credit_card)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_payment_methodselectView the details of the specified Payment Method.

Learn more...

Learn more...
get_payment_methodsselectpage, page_sizeReturns a paginated list of Payment Methods for this Account.

Learn more...

Learn more...
post_payment_methodinsertdata__type, data__data, data__is_defaultAdds a Payment Method to your Account with the option to set it as the default method.

- Adding a default Payment Method removes the default status from any other Payment Method.

- An Account can have up to 6 active Payment Methods.

- Up to 60 Payment Methods can be added each day.

- Prior to adding a Payment Method, ensure that your billing address information is up-to-date with a valid zip by running the Update your account operation.

- A payment_method_add event is generated when a payment is successfully submitted.

Parent and child accounts

In a parent and child account environment, the following apply:

- Child account users can't run this operation. These users don't have access to billing-related operations.

Learn more...

Learn more...
delete_payment_methoddeleteDeactivate the specified Payment Method.

The default Payment Method can not be deleted. To add a new default Payment Method, run the Add a payment method operation. To designate an existing Payment Method as the default method, run the Set a default payment method operation.

Learn more...

Learn more...
post_make_payment_method_defaultexecMake the specified Payment Method the default method for automatically processing payments. Removes the default status from any other Payment Method.

Parent and child accounts

In a parent and child account environment, the following apply:

- Child account users can't run this operation. These users don't have access to billing-related operations.

Learn more...

Learn more...

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
pageintegerThe page of a collection to return.
page_sizeintegerThe number of items to return per page.

SELECT examples

View the details of the specified Payment Method.

Learn more...

Learn more...

SELECT
id,
created,
data,
is_default,
type
FROM linode.account.payment_methods;

INSERT examples

Adds a Payment Method to your Account with the option to set it as the default method.

- Adding a default Payment Method removes the default status from any other Payment Method.

- An Account can have up to 6 active Payment Methods.

- Up to 60 Payment Methods can be added each day.

- Prior to adding a Payment Method, ensure that your billing address information is up-to-date with a valid zip by running the Update your account operation.

- A payment_method_add event is generated when a payment is successfully submitted.

Parent and child accounts

In a parent and child account environment, the following apply:

- Child account users can't run this operation. These users don't have access to billing-related operations.

Learn more...

Learn more...

INSERT INTO linode.account.payment_methods (
data__data,
data__is_default,
data__type
)
SELECT
'{{ data }}' --required,
{{ is_default }} --required,
'{{ type }}' --required
;

DELETE examples

Deactivate the specified Payment Method.

The default Payment Method can not be deleted. To add a new default Payment Method, run the Add a payment method operation. To designate an existing Payment Method as the default method, run the Set a default payment method operation.

Learn more...

Learn more...

DELETE FROM linode.account.payment_methods;

Lifecycle Methods

Make the specified Payment Method the default method for automatically processing payments. Removes the default status from any other Payment Method.

Parent and child accounts

In a parent and child account environment, the following apply:

- Child account users can't run this operation. These users don't have access to billing-related operations.

Learn more...

Learn more...

EXEC linode.account.payment_methods.post_make_payment_method_default 
;