Reference

Cards

Retrieve a list of cards stored in the PCI DSS Level 1 vault

List

List cards that have been stored on the platform through a Checkout Page or Payment Form.

Path

GET /cards?{query parameters}

Query Parameters

FieldRequiredDescription
Example
expire_in_monthsNFilter for card that will expire in x months2
card_statusNCard status ACTIVE, ARCHIVED, DISABLED, EXPIREDACTIVE
customer_idNID of a specific customer to filter for, see customerscus_abc123...

Response Body

{
  "status": true,
  "records": [{
    "id": "crd_abc123...",
    "created_at": "2024-12-28 22:14:47",
    "updated_at": null,
    "card_status": "ACTIVE",
    "customer_id": "cus_abc123...",
    "card_nickname": "Mike's Card",
    "card_ending": "9834",
    "card_expire": "04/29",
    "card_brand": "VISA",
    "card_token": "60d678e2465b5b6c4fd5e847ef39c70c4b0c22d1b826f39eb80a107b3b8433ad",
    "is_expired": false,
    "is_recurring": true,
    "is_default": true,
    "expire_in_months": 5,
  }, ...]
}

Response Parameters

Field
Type
Description
Example
statusBooleantrue - response success, false - response errortrue
recordsArrayArray of card objects...
records.idString(32)Unique ID of this cardcrd_abc123...
records.created_atTimestamp(YYYY-MM-DD HH:mm:ss)When this card was stored2024-12-28 22:14:47
records.updated_atTimestamp(YYYY-MM-DD HH:mm:ss)When this card entry was last changednull
records.card_statusENUMCard status ACTIVE, ARCHIVED, DISABLED, EXPIREDACTIVE
records.customer_idString(32)ID of the customer who owns this card see customerscus_abc123...
records.card_nicknameString(64)A nickname given to the cardMike's Card
records.card_endingString(4)Last 4 digits of the card number9834
records.card_expireString(5)Card expiry date in MM/YY format04/29
records.card_brandENUMCard brand (VISA, MASTERCARD, AMEX, DINERS_CLUB)VISA
records.card_tokenStringCard token used for payments60d678e2465b5b6c4fd5e847ef39c70c4b0c22d1b826f39eb80a107b3b8433ad
records.is_expiredBooleanIndicates if the card has expiredfalse
records.is_recurringBooleanIndicates if the card can be used for recurring paymentstrue
records.is_defaultBooleanIndicates if the card is the default card set for paymentstrue
records.expire_in_monthsBooleanIndicates in how many months the card expires5

Update

API call to update existing card(s) as single or batch records.

Path

POST /cards/update

Request Body

Only include fields you wish to change (besides id used to find the record). Setting a column to null will clear that field's value if allowed

{
  "records": [{
    "id": "crd_abc123...",
    "card_status": "ACTIVE",
    "card_nickname": "Mike's Updated Card",
    "is_default": true
  }, {
    "id": "crd_def456...",
    "card_nickname": "Sarah's Card",
    "is_default": false
  }]
}

Request Parameters

Field
RequiredType
Description
Example
idYString(32)ID of the card to updatecrd_abc123...
card_statusNENUMCard status ACTIVE, ARCHIVED, DISABLED, EXPIREDACTIVE
card_nicknameNString(64)A nickname for the cardMike's Updated Card
is_defaultNBooleanSet as the default card for paymentstrue

Response Body

{
  "status": true,
  "results": [{
    "id": "crd_abc123...",
    "created_at": "2024-12-28 22:14:47",
    "updated_at": "2024-12-28 22:20:15",
    "card_status": "ACTIVE",
    "customer_id": "cus_abc123...",
    "card_nickname": "Mike's Updated Card",
    "card_ending": "9834",
    "card_expire": "04/29",
    "card_brand": "VISA",
    "card_token": "60d678e2465b5b6c4fd5e847ef39c70c4b0c22d1b826f39eb80a107b3b8433ad",
    "is_expired": false,
    "is_recurring": true,
    "is_default": true,
    "expire_in_months": 5
  }, {
    "id": "crd_def456...",
    "created_at": "2024-12-28 21:30:12",
    "updated_at": "2024-12-28 22:20:15",
    "card_status": "ACTIVE",
    "customer_id": "cus_def456...",
    "card_nickname": "Sarah's Card",
    "card_ending": "1234",
    "card_expire": "08/27",
    "card_brand": "VISA",
    "card_token": "70e789f3576c6c7d5ge6f958fg50d81e5c1d33e2c937g50fc91b218c4c9544be",
    "is_expired": false,
    "is_recurring": true,
    "is_default": false,
    "expire_in_months": 35
  }]
}

Response Parameters

Field
RequiredType
Description
Example
idYString(32)Record id to updatecrd_abc123...
card_statusNENUMCard status ACTIVE, ARCHIVED, DISABLED, EXPIREDACTIVE
card_nicknameNString(64)A nickname for the cardMike's Updated Card
is_defaultNBooleanSet as the default card for paymentstrue
customer_idn/aString(32)ID of the customer who owns this card see customerscus_abc123...
card_endingn/aString(4)Last 4 digits of the card number9834
card_expiren/aString(5)Card expiry date in MM/YY format04/29
card_brandn/aENUMCard brand (VISA, MASTERCARD, AMEX, DINERS_CLUB)VISA
card_tokenn/aStringCard token used for payments60d678e2...
is_expiredn/aBooleanIndicates if the card has expiredfalse
is_recurringn/aBooleanIndicates if the card can be used for recurring paymentstrue
expire_in_monthsn/aBooleanIndicates in how many months the card expires5
created_atn/aTimestamp(YYYY-MM-DD HH:mm:ss)Date and time card was stored2024-12-28 22:14:47
updated_atn/aTimestamp(YYYY-MM-DD HH:mm:ss)Date and time record was last updated2024-12-28 22:20:15

Copyright © 2024 Kwik