v1

latestOpenAPI 3.0.12026-07-26106359429.8 KB
Compliance

Update a card

Beta: This endpoint is in beta and may change before general availability.

Updates mutable attributes of a card. This is a partial update: only the fields present in the request body are changed; omitted fields are left unchanged. Card status is system-managed and changes through the status-transition endpoints, not this endpoint.

Idempotency

The Idempotency-Key header is required. Reusing a key with a different request body will return a 422 error.

patch/v0/cards/{id}

Path parameters

idstring required

The server-generated ID of the Card object.

Example:card_xyz123

The server-generated Card ID (card_*). Unlike retrieve, this endpoint accepts only the server-generated ID, not a client_card_id.

Headers

Idempotency-Keystring required

Unique key to ensure idempotent requests

Request body

metadataMetadata

A set of key-value pairs that can be used to store additional information related to this object.

Response

Card updated successfully.

idstring

The server-generated ID of the Card object.

client_card_idstring

Client-provided identifier for the card. Optional: present only for cards created via file upload, and omitted for cards created through the API, which are identified solely by their server-generated ID.

account_idstring

The ID of the Account object.

entity_idstring

The ID of your entity.

status'active' | 'inactive' | 'closed'

Status is system-managed and cannot be set on create; status changes go through the status-transition endpoints.

status_reasonstring

The reason for the card's current status. Empty when the card is active; otherwise populated. Set via the status-transition endpoints.

created_atstring date-time

Creation timestamp.

updated_atstring date-time

Last update timestamp.

metadataMetadata

A set of key-value pairs that can be used to store additional information related to this object.

Example response

{
  "id": "card_xyz123",
  "account_id": "account_xyz123",
  "entity_id": "entity_xyz123",
  "details": {
    "last_four": "1234",
    "replacement_for": "card_xyz123"
  }
}