Manage Customer Cards on File

The Cards API provides a set of endpoints for you to manage cards on file. You can retrieve card information, list cards on file, and disable a card.

Link to section

Get a card

If your application has a card ID, it calls the RetrieveCard endpoint to get information about the associated card.

Retrieve card

The Cards API returns a response like the following example:

Link to section

List cards saved for a customer

Call the ListCards endpoint to get a paginated list of information about the cards on file for the Square account associated with the access token provided in the request.

Your application can get all saved cards in a Square account or it can limit the response to cards for a customer, the state of a card, or both. Regardless of whether you filter by a customer ID, you can set a page size for the response pages.

The following request lists all the enabled cards for a given customer:

List cards

The Cards API returns a response like the following example:

Link to section

Disable a card

If your application has a card ID, it calls the DisableCard endpoint to disable a card on file. After a card is disabled, any request to the CreatePayment endpoint that references the disabled card returns an error.

Disable card

The Cards API returns a response like the following example:

Link to section

See also