πŸ’³ Cards API: How to Use It

Here is a full guide to card creation, management, and lifecycle

Clara's Cards API lets you manage physical and virtual cards for your users and teams. You can create cards, retrieve details, update names, change statuses, and more β€” all programmatically.

OperationEndpointMethod
Find all cards/v3/cardsGET
Find cards by uuid/v3/cards/{uuid}GET
Create cards/v3/cards/bulk-createPOST
Single create card/v3/cardsPOST
Update cards threshold/v3/cards/{uuid}/thresholdPATCH
Lock/unlock cards/v3/cards/{uuid}/lockPATCH
Delete card/v3/cards/{uuid}DELETE
Delete cards/v3/cards/deletePOST

1️⃣ Find All Cards

List all cards in your account.

πŸ”— Endpoint

GET /v3/cards

πŸ“€ cURL Request

curl -X GET
"https://public-api.mx.clara.com/api/v3/transactions/47f8ed9e-4d7b-450b-ad6a-f1d83e3ce4e1/documents" \ 
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"	

πŸ“₯ Sample JSON Response

[
  {
    "uuid": "5d1e2f83-1c90-4c34-9400-bfef9ac85c6e",
    "lastFour": "3421",
    "type": "virtual",
    "status": "active",
    "name": "Marketing Card",
    "holderUuid": "f3a9cb88-894b-4420-aed3-6178cd41721d"
  }
]

πŸ“‹ Query Parameters

ParameterTypeDescriptionValid Values / Notes
pageintegerZero-based index of the page to retrieve. Used for pagination.0..N
sizeintegerNumber of records to retrieve per page.Max allowed may depend on backend constraints
userUuidstringFilter cards that belong to a specific user by UUID.Cannot be used in combination with userErpId
usernamestringFilter cards by the associated user's username (email/handle).Must be exact match
statusstringFilter by card status.e.g., ACTIVE, BLOCKED, CANCELLED, EXPIRED, etc.
periodicitystringFilter cards by their spending limit periodicity.DAILY, WEEKLY, MONTHLY
typestringFilter by the card’s product and format type.See full list below
userErpIdstringERP-specific user identifier. Applies only if userUuid is not provided.Used for integrations with ERP systems like SAP, NetSuite, etc.

βœ… Valid Values for type

ValueDescription
MASTER_WORLD_ELITEMastercard-branded premium "World Elite" card
MASTER_CORPORATEMastercard corporate-level card
MASTER_VIRTUALVirtual Mastercard
VISA_PHYSICALPhysical Visa card
VISA_VIRTUALVirtual Visa card

⚠️ This field represents a combination of network + format + product line (not just "VIRTUAL" / "PHYSICAL" like in the POST endpoint).

2️⃣ Find Card by UUID

Fetch a single card by its UUID.

πŸ”— Endpoint

GET /v3/cards/{uuid}

πŸ“€ cURL Request

curl -X GET \
"https://public-api.mx.clara.com/api/v3/cards/5d1e2f83-1c90-4c34-9400-bfef9ac85c6e" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

πŸ“₯ Sample JSON Response

{
  "uuid": "5d1e2f83-1c90-4c34-9400-bfef9ac85c6e",
  "lastFour": "3421",
  "type": "virtual",
  "status": "active",
  "name": "Marketing Card",
  "issuedAt": "2024-04-01T12:00:00Z"
}

3️⃣ Create Cards (Bulk)

Create multiple cards asynchronously.

πŸ”— Endpoint

POST /v3/cards/bulk-create

πŸ“€ cURL Request

curl -X POST \
"https://public-api.mx.clara.com/api/v3/cards/bulk-create" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
  "cardsRequests": [
    {
      "type": "virtual",
      "alias": "Ops Team",
      "userUUID": "user-uuid-1",
      "threshold": 500,
      "periodicityType": "DAILY"
    }
  ]
}'

πŸ•‘ Cards are created asyncβ€”monitor via webhook or poll /v3/cards.


4️⃣ Create Single Card

Create one card directly.

πŸ”— Endpoint

POST /v3/cards

πŸ“€ cURL Request

curl -X POST \
"https://public-api.mx.clara.com/api/v3/cards" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
  "type": "physical",
  "alias": "Team Card",
  "userUUID": "user-uuid-2",
  "threshold": 1000,
  "periodicityType": "MONTHLY"
}'

πŸ“‹ Request Body Fields

FieldTypeRequiredDescriptionValid Values / Notes
typestringβœ… YesDefines whether the card is virtual or physicalVIRTUAL, PHYSICAL
aliasstringβœ… YesAlias or nickname to identify the cardFree-text
userUuiduuidβœ… YesUUID of the cardholderMust belong to a valid user in your organization
thresholdnumber❌ NoSpending limit assigned to the cardMust respect credit policies and cannot exceed company limit
businessTypestring❌ NoDefines the business product tier of the cardBUSINESS, WORLD_ELITE
periodicitystring❌ NoFrequency at which the threshold resetsDAILY, WEEKLY, MONTHLY

5️⃣ Update Card Threshold

Adjust the spending limit for a card.

πŸ”— Endpoint

PATCH /v3/cards/{uuid}/threshold

πŸ“€ cURL Request

curl -X PATCH \
"https://public-api.mx.clara.com/api/v3/cards/abc-123/threshold" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"threshold": 800}'

6️⃣ Toggle Card Lock

Lock or unlock a card.

πŸ”— Endpoint

PATCH /v3/cards/{uuid}/lock

πŸ“€ cURL Request

curl -X PATCH \
"https://public-api.mx.clara.com/api/v3/cards/abc-123/lock" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"lock": true}'

7️⃣ Delete a Card

Cancel (soft-delete) a single card.

πŸ”— Endpoint

DELETE /v3/cards/{uuid}

πŸ“€ cURL Request

curl -X DELETE \
"https://public-api.mx.clara.com/api/v3/cards/abc-123" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

8️⃣ Delete Multiple Cards

Cancel multiple cards in one request.

πŸ”— Endpoint

POST /v3/cards/delete

πŸ“€ cURL Request

curl -X POST \
"https://public-api.mx.clara.com/api/v3/cards/delete" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
  "uuids": ["abc-123", "def-456"]
}'

⚠️ Important Notes:

  • Threshold changes and locks are allowed only on active cards.
  • Locking a card prevents usage; unlocking restores access.
  • Deleted cards cannot be recovered.
  • Ensure your threshold doesn’t exceed your company’s credit limit.

πŸ’‘ Tip: Use locking to disable lost/stolen cards and delete to permanently remove unused ones.