Space Billing

List payment methods

Lists the cards on file for the space as a bare array, not a paged envelope. Use a card's id as payment_method_id in Top up the balance or as topup_payment_method_id in Update low balance settings.

Adding a card is not part of this API. Cards are added in the Dashboard.

Permissions

Authenticate with a Personal access token whose holder is an owner or admin of the space. A project API token is not accepted on this endpoint, and a Personal access token has no scopes: the holder's role in the space is the whole authorization decision.

get/api/space/payment_methods

Response

The request has succeeded.

type'payment_method' required

The object type. Always payment_method.

idstring uuid required

Universal Unique Identifier.

brandstring required

The card brand.

last4string required

The last four digits of the card number.

expires_monthinteger required

The month the card expires, from 1 to 12.

expires_yearinteger required

The four-digit year the card expires.

countrystring required

The ISO 3166-1 alpha-2 country code of the card.

auto_topup_sourceboolean required

Whether this card is the one auto top-up charges. The active auto top-up source cannot be deleted.

Example response

[
  {
    "type": "payment_method",
    "brand": "visa",
    "last4": "4242",
    "expires_month": 12,
    "expires_year": 2030,
    "country": "US"
  }
]

Changes

Changed in 1 of the 161 revisions of this API.1

Of the 161 revisions, 3 have a changelog that could not be searched.