List cards
Retrieves a list of cards owned by the account making the request.
A max of 25 cards will be returned.
Name | Description |
---|---|
cursor
|
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_
|
Limit results to cards associated with the customer supplied. By default, all cards owned by the merchant are returned. |
include_
|
Includes disabled cards. By default, all enabled cards owned by the merchant are returned. |
reference_
|
Limit results to cards associated with the reference_id supplied. |
sort_
|
Sorts the returned list by when the card was created with the specified order. This field defaults to ASC. |
Response Fields
Name | Description |
---|---|
errors
|
Information on errors encountered during the request. |
cards
|
The requested list of |
cursor
|
The pagination cursor to be used in a subsequent request. If empty, this is the final response. See Pagination for more information. |
Examples
- cURL
- Ruby
- Python
- C#
- Java
- PHP
- Node.js
curl https://connect.squareup.com/v2/cards \
-H 'Square-Version: 2023-01-19' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/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
}
}
]
}