Account

Payment Methods List

get
https://api.linode.com/v4/account/payment-methods

Returns a paginated list of Payment Methods for this Account.

Query Parameters

page
integer > = 1
Default: 1

The page of a collection to return.

page_size
integer [25 .. 500]
Default: 100

The number of items to return per page.

Request Samples

curl -H "Authorization: Bearer $TOKEN" \
    https://api.linode.com/v4/account/payment-methods

Response Samples

{
  "data": [
    {
      "id": "",
      "created": "2018-01-15T00:01:01",
      "type": "credit_card",
      "is_default": true,
      "data": {
        "card_type": "Discover",
        "last_four": "1234",
        "expiry": "06/2022",
        "email": "example@linode.com",
        "paypal_id": "ABC1234567890"
      }
    }
  ],
  "page": 1,
  "pages": 1,
  "results": 1
}

Responses

200: Returns a paginated list of Payment Method objects.

data
array of objects
id
integer

The unique ID of this Payment Method.

created
string

When the Payment Method was added to the Account.

type
string
Enum: "credit_card""google_pay""paypal"

The type of Payment Method.

is_default
boolean

Whether this Payment Method is the default method for automatically processing service charges.

data
card_type
string

The type of credit card.

last_four
string

The last four digits of the credit card number.

expiry
string

The expiration month and year of the credit card.

card_type
string

The type of credit card.

last_four
string

The last four digits of the credit card number.

expiry
string

The expiration month and year of the credit card.

email
string

The email address associated with your PayPal account.

paypal_id
string

PayPal Merchant ID associated with your PayPal account.

page
integer

The current page.

pages
integer

The total number of pages.

results
integer

The total number of results.

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.

Payment Method Add

post
https://api.linode.com/v4/account/payment-methods

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 using the Account Update (PUT /account) endpoint.

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

Request Body Schema

data
Required
object

An object representing the credit card information you have on file with Linode to make Payments against your Account.

card_number
string

Your credit card number. No spaces or dashes allowed.

expiry_month
integer

A value from 1-12 representing the expiration month of your credit card.

  • 1 = January
  • 2 = February
  • 3 = March
  • Etc.
expiry_year
integer

A four-digit integer representing the expiration year of your credit card.

The combination of expiry_month and expiry_year must result in a month/year combination of the current month or in the future. An expiration date set in the past is invalid.

cvv
string

CVV (Card Verification Value) of the credit card, typically found on the back of the card.

is_default
Required
boolean

Whether this Payment Method is the default method for automatically processing service charges.

type
Required
string
Enum: "credit_card"

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 guide for details and instructions.

Request Samples

curl -H "Content-Type: application/json" \
    -H "Authorization: Bearer $TOKEN" \
    -X POST -d '{
      "type": "credit_card",
      "is_default": true,
      "data": {
        "card_number": "4111111111111111",
        "expiry_month": 11,
        "expiry_year": 2020,
        "cvv": "111"
      }
    }' \
    https://api.linode.com/v4/account/payment-methods

Response Samples

{}

Responses

200: Payment Method added.

default: Error

errors
array of objects
reason
string

What happened to cause this error. In most cases, this can be fixed immediately by changing the data you sent in the request, but in some cases you will be instructed to open a Support Ticket or perform some other action before you can complete the request successfully.

field
string

The field in the request that caused this error. This may be a path, separated by periods in the case of nested fields. In some cases this may come back as "null" if the error is not specific to any single element of the request.