• Example searches: “transaction”, “CreateOrder”, “/v2/locations”, “inventory”, “delete customer”

You are viewing an old version of the API
List cards

GET /v2/cards

Retrieves a list of cards owned by the account making the request.

A max of 25 cards will be returned.


Permissions
PAYMENTS_READ
Try in API Explorer
Name Description
cursor
string

A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for your original query.

See Pagination for more information.

customer_id
string

Limit results to cards associated with the customer supplied. By default, all cards owned by the merchant are returned.

include_disabled
boolean

Includes disabled cards. By default, all enabled cards owned by the merchant are returned.

reference_id
string

Limit results to cards associated with the reference_id supplied.

sort_order
string

Sorts the returned list by when the card was created with the specified order. This field defaults to ASC.

Response Fields

Name Description
errors
Error [ ]

Information on errors encountered during the request.

cards
Card [ ]

The requested list of Cards.

cursor
string

The pagination cursor to be used in a subsequent request. If empty, this is the final response.

See Pagination for more information.

Examples

You are viewing an old version of the API
GET /v2/cards
cURL
  • cURL
  • Ruby
  • Python
  • C#
  • Java
  • PHP
  • Node.js
curl https://connect.squareup.com/v2/cards \
  -H 'Square-Version: 2021-11-17' \
  -H 'Authorization: Bearer ACCESS_TOKEN' \
  -H 'Content-Type: application/json'
Response JSON
{
  "cards": [
    {
      "card": {
        "id": "ccof:uIbfJXhXETSP197M3GB",
        "billing_address": {
          "address_line_1": "500 Electric Ave",
          "address_line_2": "Suite 600",
          "locality": "New York",
          "administrative_district_level_1": "NY",
          "postal_code": "10003",
          "country": "US"
        },
        "fingerprint": "ex-p-cs80EK9Flz7LsCMv-szbptQ_ssAGrhemzSTsPFgt9nzyE6t7okiLIQc-qw_quqKX4Q",
        "bin": "411111",
        "card_brand": "VISA",
        "card_type": "CREDIT",
        "cardholder_name": "Amelia Earhart",
        "customer_id": "VDKXEEKPJN48QDG3BGGFAK05P8",
        "enabled": true,
        "exp_month": 11,
        "exp_year": 2022,
        "last_4": "1111",
        "merchant_id": "6SSW7HV8K2ST5",
        "prepaid_type": "NOT_PREPAID",
        "reference_id": "user-id-1",
        "version": 1
      }
    }
  ]
}