payment_methods
Creates, updates, deletes, gets or lists a payment_methods resource.
Overview
| Name | payment_methods |
| Type | Resource |
| Id | linode.account.payment_methods |
Fields
The following fields are returned by SELECT queries:
- get
- list
Returns a Payment Method Object.
| Name | Datatype | Description |
|---|---|---|
id | integer | The unique ID of this Payment Method. |
created | string (date-time) | Read-only When the Payment Method was added to the Account. (example: 2018-01-15T00:01:01) |
data | object | Credit card information. (x-linode-cli-format: json, title: Credit card, x-linode-ref-name: Credit Card) |
is_default | boolean | Whether this Payment Method is the default method for automatically processing service charges. |
type | string | The type of Payment Method. (credit_card, google_pay, paypal) (example: credit_card) |
Returns a paginated list of Payment Method objects.
| Name | Datatype | Description |
|---|---|---|
id | integer | The unique ID of this Payment Method. |
created | string (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_default | boolean | Whether this Payment Method is the default method for automatically processing service charges. |
type | string | The type of Payment Method. (credit_card, google_pay, paypal) (example: credit_card) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | paymentMethodId | View the details of the specified Payment Method. Learn more... Learn more... | |
list | select | page, page_size | Returns a paginated list of Payment Methods for this Account. Learn more... Learn more... | |
create | insert | type, data, is_default | 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... | |
delete | delete | paymentMethodId | 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... | |
make_default | exec | paymentMethodId | 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... |
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 |
|---|---|---|
paymentMethodId | string | The ID of the Payment Method to make default. |
page | integer | The page of a collection to return. |
page_size | integer | The number of items to return per page. |
SELECT examples
- get
- list
View the details of the specified Payment Method.
Learn more...
Learn more...
SELECT
id,
created,
data,
is_default,
type
FROM linode.account.payment_methods
WHERE paymentMethodId = '{{ paymentMethodId }}' -- required
;
Returns a paginated list of Payment Methods for this Account.
Learn more...
Learn more...
SELECT
id,
created,
data,
is_default,
type
FROM linode.account.payment_methods
WHERE page = '{{ page }}'
AND page_size = '{{ page_size }}'
;
INSERT examples
- create
- Manifest
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,
is_default,
type
)
SELECT
'{{ data }}' /* required */,
{{ is_default }} /* required */,
'{{ type }}' /* required */
RETURNING
message
;
# Description fields are for documentation purposes
- name: payment_methods
props:
- name: data
description: |
An object representing the credit card information you have on file with Linode to make Payments against your Account.
value:
card_number: "{{ card_number }}"
cvv: "{{ cvv }}"
expiry_month: {{ expiry_month }}
expiry_year: {{ expiry_year }}
- name: is_default
value: {{ is_default }}
description: |
Whether this Payment Method is the default method for automatically processing service charges.
- name: type
value: "{{ type }}"
description: |
The type of Payment Method.
Alternative Payment Methods including Google Pay and PayPal can be added using the Cloud Manager. See the [Manage Payment Methods](https://www.linode.com/docs/products/platform/billing/guides/payment-methods/) guide
for details and instructions.
valid_values: ['credit_card']
DELETE examples
- delete
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
WHERE paymentMethodId = '{{ paymentMethodId }}' --required
;
Lifecycle Methods
- make_default
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.make_default
@paymentMethodId='{{ paymentMethodId }}' --required
;