List payment methods

View as MarkdownOpen in Claude
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](/docs/apis/rest/space/balance/create-top-up) or as `topup_payment_method_id` in [Update low balance settings](/docs/apis/rest/space/balance/update-low-balance-setting). Adding a card is not part of this API. Cards are added in the Dashboard. #### Permissions Authenticate with a [Personal access token](/docs/apis/authorization#personal-access-tokens) 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.

Authentication

AuthorizationBasic
Personal access token authentication for space-wide administration. Send HTTP Basic auth with an empty username and the Personal access token as the password. A Personal access token carries your own authority rather than a project's: it is created from your user menu in the Dashboard, is prefixed `pat_`, and has no scopes. The holder must be an owner or admin of the space named by the subdomain, and the token acts only on that space. Example: ``` Authorization: Basic base64(:pat_...) ```

Response

The request has succeeded.
typeenum

The object type. Always payment_method.

idstringformat: "uuid"

The unique identifier of the payment method. Use it as payment_method_id when topping up or configuring auto top-up.

brandstring
The card brand.
last4string
The last four digits of the card number.
expires_monthinteger
The month the card expires, from 1 to 12.
expires_yearinteger

The four-digit year the card expires.

countrystring

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

auto_topup_sourceboolean

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

Errors

401
Unauthorized Error
500
Internal Server Error