Account

Payment Method View

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

View the details of the specified Payment Method.

Path Parameters

paymentMethodId
Required
integer

The ID of the Payment Method to look up.

Request Samples

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

Response Samples

{
  "created": "2018-01-15T00:01:01",
  "data": "",
  "id": 1234,
  "type": "credit_card",
  "is_default": true
}

Responses

200: Returns a Payment Method Object.

created
string <date-time>

When the Payment Method was added to the Account.

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.

id
integer

The unique ID of this Payment Method.

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.

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 Delete

delete
https://api.linode.com/v4/account/payment-methods/{paymentMethodId}

Deactivate the specified Payment Method.

The default Payment Method can not be deleted. To add a new default Payment Method, access the Payment Method Add (POST /account/payment-methods) endpoint. To designate an existing Payment Method as the default method, access the Payment Method Make Default (POST /account/payment-methods/{paymentMethodId}/make-default) endpoint.

Path Parameters

paymentMethodId
Required
integer

The ID of the Payment Method to look up.

Request Samples

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

Response Samples

{}

Responses

200: Payment Method deactivated.

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.