Skip to content

Square: Cards schemas

7 Square schemas with complete fields and constraints.

← Cards operations · All schemas

Create Card — request body — body

FieldTypePresenceDescription and constraints
$objectRootCreates a card from the source (payment token or payment id). Accessible via
HTTP requests at POST https://connect.squareup.com/v2/cards
cardModelRequired within parentExpand Create Card — request body — body card
Payment details associated with the card to be stored.
idempotency_keystringRequired within parentA unique string that identifies this CreateCard request. Keys can be
any valid string and must be unique for every request.

Max: 45 characters

See [Idempotency keys](https://developer.squareup.com/docs/build-basics/common-api-patterns/idempotency) for more information.
Minimum length: 1
source_idstringRequired within parentThe ID of the source which represents the card information to be stored. This can be a card nonce or a payment id.
Maximum length: 16384
Minimum length: 1
verification_tokenstringOptionalAn identifying token generated by [Payments.verifyBuyer()](https://developer.squareup.com/reference/sdks/web/payments/objects/Payments#Payments.verifyBuyer).
Verification tokens encapsulate customer device information and 3-D Secure
challenge results to indicate that Square has verified the buyer identity.

See the [SCA Overview](https://developer.squareup.com/docs/sca-overview).

Referenced models: Create Card — request body — body card

Create Card — request body — body card

FieldTypePresenceDescription and constraints
$objectRootRepresents the payment details of a card to be used for payments. These
details are determined by the payment token generated by Web Payments SDK.
billing_addressJSONOptional
billing_address (anyOf 1)ModelAlternativeExpand Create Customer — request body — body address
The billing address for this card. `US` postal codes can be provided as a 5-digit zip code
or 9-digit ZIP+4 (example: `12345-6789`). For a full list of field meanings by country, see
[Working with Addresses](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-addresses).
billing_address (anyOf 2)nullAlternative
binstringOptionalThe first six digits of the card number, known as the Bank Identification Number (BIN). Only the Payments API
returns this field.
Maximum length: 6
Read only: true
card_brandstringOptionalIndicates a card's brand, such as `VISA` or `MASTERCARD`.
The card's brand.
See [CardBrand](#type-cardbrand) for possible values
One of: OTHER_BRAND, VISA, MASTERCARD, AMERICAN_EXPRESS, DISCOVER, DISCOVER_DINERS, JCB, CHINA_UNIONPAY, SQUARE_GIFT_CARD, SQUARE_CAPITAL_CARD, INTERAC, EFTPOS, FELICA, EBT, QUICPAY, ID, TRANSPORTATION_IC, CARNET
Read only: true
card_co_brandstringOptionalIndicates the brand for a co-branded card.
The card's co-brand if available. For example, an Afterpay virtual card would have a
co-brand of AFTERPAY.
See [CardCoBrand](#type-cardcobrand) for possible values
One of: UNKNOWN, AFTERPAY, CLEARPAY
Read only: true
card_typestringOptionalIndicates a card's type, such as `CREDIT` or `DEBIT`.
The type of the card.
The Card object includes this field only in response to Payments API calls.
See [CardType](#type-cardtype) for possible values
One of: UNKNOWN_CARD_TYPE, CREDIT, DEBIT
Read only: true
cardholder_nameJSONOptional
cardholder_name (anyOf 1)stringAlternativeThe name of the cardholder.
Maximum length: 96
cardholder_name (anyOf 2)nullAlternative
created_atstringOptionalTimestamp for when the card object was created on Square’s servers. In RFC 3339 format, e.g., "2016-09-04T23:59:33.123Z".
Read only: true
customer_idJSONOptional
customer_id (anyOf 1)stringAlternative**Required** The ID of a [customer](entity:Customer) to be associated with the card.
customer_id (anyOf 2)nullAlternative
disabled_atstringOptionalTimestamp for when the card object was disabled on Square’s servers. In RFC 3339 format, e.g., "2016-09-04T23:59:33.123Z".
Read only: true
enabledbooleanOptionalIndicates whether or not a card can be used for payments.
Read only: true
exp_monthJSONOptional
exp_month (anyOf 1)JSONAlternative
exp_month (anyOf 1) (anyOf 1)integerAlternativeThe expiration month of the associated card as an integer between 1 and 12.
Format: int64
Minimum: -9223372036854775808
Maximum: 9223372036854775807
exp_month (anyOf 1) (anyOf 2)stringAlternativePattern: ^(?:-(?:1[0-9]{18}|[2-8][0-9]{18}|9(?:0[0-9]{17}|1[0-9]{17}|2(?:0[0-9]{16}|1[0-9]{16}|2(?:0[0-9]{15}|[1-2][0-9]{15}|3(?:0[0-9]{14}|[1-2][0-9]{14}|3(?:0[0-9]{13}|[1-6][0-9]{13}|7(?:0[0-9]{12}|1[0-9]{12}|20(?:0[0-9]{10}|[1-2][0-9]{10}|3(?:0[0-9]{9}|[1-5][0-9]{9}|6(?:0[0-9]{8}|[1-7][0-9]{8}|8(?:0[0-9]{7}|[1-4][0-9]{7}|5(?:0[0-9]{6}|[1-3][0-9]{6}|4(?:0[0-9]{5}|[1-6][0-9]{5}|7(?:0[0-9]{4}|[1-6][0-9]{4}|7(?:0[0-9]{3}|[1-4][0-9]{3}|5(?:0[0-9]{2}|[1-7][0-9]{2}|80[0-8]))))))))))))))))|-[1-9][0-9]{0,17}|0|(?:1[0-9]{18}|[2-8][0-9]{18}|9(?:0[0-9]{17}|1[0-9]{17}|2(?:0[0-9]{16}|1[0-9]{16}|2(?:0[0-9]{15}|[1-2][0-9]{15}|3(?:0[0-9]{14}|[1-2][0-9]{14}|3(?:0[0-9]{13}|[1-6][0-9]{13}|7(?:0[0-9]{12}|1[0-9]{12}|20(?:0[0-9]{10}|[1-2][0-9]{10}|3(?:0[0-9]{9}|[1-5][0-9]{9}|6(?:0[0-9]{8}|[1-7][0-9]{8}|8(?:0[0-9]{7}|[1-4][0-9]{7}|5(?:0[0-9]{6}|[1-3][0-9]{6}|4(?:0[0-9]{5}|[1-6][0-9]{5}|7(?:0[0-9]{4}|[1-6][0-9]{4}|7(?:0[0-9]{3}|[1-4][0-9]{3}|5(?:0[0-9]{2}|[1-7][0-9]{2}|80[0-7]))))))))))))))))|[1-9][0-9]{0,17})$(?!\n)
exp_month (anyOf 2)nullAlternative
exp_yearJSONOptional
exp_year (anyOf 1)JSONAlternative
exp_year (anyOf 1) (anyOf 1)integerAlternativeThe four-digit year of the card's expiration date.
Format: int64
Minimum: -9223372036854775808
Maximum: 9223372036854775807
exp_year (anyOf 1) (anyOf 2)stringAlternativePattern: ^(?:-(?:1[0-9]{18}|[2-8][0-9]{18}|9(?:0[0-9]{17}|1[0-9]{17}|2(?:0[0-9]{16}|1[0-9]{16}|2(?:0[0-9]{15}|[1-2][0-9]{15}|3(?:0[0-9]{14}|[1-2][0-9]{14}|3(?:0[0-9]{13}|[1-6][0-9]{13}|7(?:0[0-9]{12}|1[0-9]{12}|20(?:0[0-9]{10}|[1-2][0-9]{10}|3(?:0[0-9]{9}|[1-5][0-9]{9}|6(?:0[0-9]{8}|[1-7][0-9]{8}|8(?:0[0-9]{7}|[1-4][0-9]{7}|5(?:0[0-9]{6}|[1-3][0-9]{6}|4(?:0[0-9]{5}|[1-6][0-9]{5}|7(?:0[0-9]{4}|[1-6][0-9]{4}|7(?:0[0-9]{3}|[1-4][0-9]{3}|5(?:0[0-9]{2}|[1-7][0-9]{2}|80[0-8]))))))))))))))))|-[1-9][0-9]{0,17}|0|(?:1[0-9]{18}|[2-8][0-9]{18}|9(?:0[0-9]{17}|1[0-9]{17}|2(?:0[0-9]{16}|1[0-9]{16}|2(?:0[0-9]{15}|[1-2][0-9]{15}|3(?:0[0-9]{14}|[1-2][0-9]{14}|3(?:0[0-9]{13}|[1-6][0-9]{13}|7(?:0[0-9]{12}|1[0-9]{12}|20(?:0[0-9]{10}|[1-2][0-9]{10}|3(?:0[0-9]{9}|[1-5][0-9]{9}|6(?:0[0-9]{8}|[1-7][0-9]{8}|8(?:0[0-9]{7}|[1-4][0-9]{7}|5(?:0[0-9]{6}|[1-3][0-9]{6}|4(?:0[0-9]{5}|[1-6][0-9]{5}|7(?:0[0-9]{4}|[1-6][0-9]{4}|7(?:0[0-9]{3}|[1-4][0-9]{3}|5(?:0[0-9]{2}|[1-7][0-9]{2}|80[0-7]))))))))))))))))|[1-9][0-9]{0,17})$(?!\n)
exp_year (anyOf 2)nullAlternative
fingerprintstringOptionalIntended as a Square-assigned identifier, based
on the card number, to identify the card across multiple locations within a
single application.
Maximum length: 255
Read only: true
hsa_fsabooleanOptionalIndicates whether the card is linked to a Health Savings Account (HSA) or Flexible
Spending Account (FSA), based on the card BIN.
Read only: true
idstringOptionalUnique ID for this card. Generated by Square.
Maximum length: 64
Read only: true
issuer_alertstringOptionalIndicates the type of issuer alert for a [card on file](entity:Card).
An alert from the issuing bank about the card status. Alerts can indicate whether
future charges to the card are likely to fail. For more information, see
[Manage Card on File Declines](https://developer.squareup.com/docs/cards-api/manage-card-on-file-declines).

This field is present only if there's an active issuer alert.
See [IssuerAlert](#type-issueralert) for possible values
One of: ISSUER_ALERT_CARD_CLOSED
Read only: true
issuer_alert_atstringOptionalThe timestamp of when the current issuer alert was received and processed, in
RFC 3339 format.

This field is present only if there's an active issuer alert.
Read only: true
last_4stringOptionalThe last 4 digits of the card number.
Maximum length: 4
Read only: true
merchant_idstringOptionalThe ID of the merchant associated with the card.
Read only: true
prepaid_typestringOptionalIndicates a card's prepaid type, such as `NOT_PREPAID` or `PREPAID`.
Indicates whether the card is prepaid or not.
See [CardPrepaidType](#type-cardprepaidtype) for possible values
One of: UNKNOWN_PREPAID_TYPE, NOT_PREPAID, PREPAID
Read only: true
reference_idJSONOptional
reference_id (anyOf 1)stringAlternativeAn optional user-defined reference ID that associates this card with
another entity in an external system. For example, a customer ID from an
external customer management system.
Maximum length: 128
reference_id (anyOf 2)nullAlternative
versionJSONOptional
version (anyOf 1)integerAlternativeCurrent version number of the card. Increments with each card update. Requests to update an
existing Card object will be rejected unless the version in the request matches the current
version for the Card.
Format: int64
Minimum: -9223372036854775808
Maximum: 9223372036854775807
version (anyOf 2)stringAlternativePattern: ^(?:-(?:1[0-9]{18}|[2-8][0-9]{18}|9(?:0[0-9]{17}|1[0-9]{17}|2(?:0[0-9]{16}|1[0-9]{16}|2(?:0[0-9]{15}|[1-2][0-9]{15}|3(?:0[0-9]{14}|[1-2][0-9]{14}|3(?:0[0-9]{13}|[1-6][0-9]{13}|7(?:0[0-9]{12}|1[0-9]{12}|20(?:0[0-9]{10}|[1-2][0-9]{10}|3(?:0[0-9]{9}|[1-5][0-9]{9}|6(?:0[0-9]{8}|[1-7][0-9]{8}|8(?:0[0-9]{7}|[1-4][0-9]{7}|5(?:0[0-9]{6}|[1-3][0-9]{6}|4(?:0[0-9]{5}|[1-6][0-9]{5}|7(?:0[0-9]{4}|[1-6][0-9]{4}|7(?:0[0-9]{3}|[1-4][0-9]{3}|5(?:0[0-9]{2}|[1-7][0-9]{2}|80[0-8]))))))))))))))))|-[1-9][0-9]{0,17}|0|(?:1[0-9]{18}|[2-8][0-9]{18}|9(?:0[0-9]{17}|1[0-9]{17}|2(?:0[0-9]{16}|1[0-9]{16}|2(?:0[0-9]{15}|[1-2][0-9]{15}|3(?:0[0-9]{14}|[1-2][0-9]{14}|3(?:0[0-9]{13}|[1-6][0-9]{13}|7(?:0[0-9]{12}|1[0-9]{12}|20(?:0[0-9]{10}|[1-2][0-9]{10}|3(?:0[0-9]{9}|[1-5][0-9]{9}|6(?:0[0-9]{8}|[1-7][0-9]{8}|8(?:0[0-9]{7}|[1-4][0-9]{7}|5(?:0[0-9]{6}|[1-3][0-9]{6}|4(?:0[0-9]{5}|[1-6][0-9]{5}|7(?:0[0-9]{4}|[1-6][0-9]{4}|7(?:0[0-9]{3}|[1-4][0-9]{3}|5(?:0[0-9]{2}|[1-7][0-9]{2}|80[0-7]))))))))))))))))|[1-9][0-9]{0,17})$(?!\n)

Referenced models: Create Customer — request body — body address

Create Card — response body

FieldTypePresenceDescription and constraints
$objectRootDefines the fields that are included in the response body of
a request to the [CreateCard](api-endpoint:Cards-CreateCard) endpoint.

Note: if there are errors processing the request, the card field will not be
present.
cardModelOptionalExpand Create Card — response body — card
The card created by the request.
errorsarrayOptionalErrors resulting from the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Create Card — response body — card, Get Shift — response body — errors item

Create Card — response body — card

FieldTypePresenceDescription and constraints
$objectRootRepresents the payment details of a card to be used for payments. These
details are determined by the payment token generated by Web Payments SDK.
billing_addressJSONOptional
billing_address (anyOf 1)ModelAlternativeExpand Get Payment — response body — payment billing address
The billing address for this card. `US` postal codes can be provided as a 5-digit zip code
or 9-digit ZIP+4 (example: `12345-6789`). For a full list of field meanings by country, see
[Working with Addresses](https://developer.squareup.com/docs/build-basics/common-data-types/working-with-addresses).
billing_address (anyOf 2)nullAlternative
binstringOptionalThe first six digits of the card number, known as the Bank Identification Number (BIN). Only the Payments API
returns this field.
Maximum length: 6
Read only: true
card_brandstringOptionalIndicates a card's brand, such as `VISA` or `MASTERCARD`.
The card's brand.
See [CardBrand](#type-cardbrand) for possible values
Known values: OTHER_BRAND, VISA, MASTERCARD, AMERICAN_EXPRESS, DISCOVER, DISCOVER_DINERS, JCB, CHINA_UNIONPAY, SQUARE_GIFT_CARD, SQUARE_CAPITAL_CARD, INTERAC, EFTPOS, FELICA, EBT, QUICPAY, ID, TRANSPORTATION_IC, CARNET
Read only: true
card_co_brandstringOptionalIndicates the brand for a co-branded card.
The card's co-brand if available. For example, an Afterpay virtual card would have a
co-brand of AFTERPAY.
See [CardCoBrand](#type-cardcobrand) for possible values
Known values: UNKNOWN, AFTERPAY, CLEARPAY
Read only: true
card_typestringOptionalIndicates a card's type, such as `CREDIT` or `DEBIT`.
The type of the card.
The Card object includes this field only in response to Payments API calls.
See [CardType](#type-cardtype) for possible values
Known values: UNKNOWN_CARD_TYPE, CREDIT, DEBIT
Read only: true
cardholder_nameJSONOptional
cardholder_name (anyOf 1)stringAlternativeThe name of the cardholder.
Maximum length: 96
cardholder_name (anyOf 2)nullAlternative
created_atstringOptionalTimestamp for when the card object was created on Square’s servers. In RFC 3339 format, e.g., "2016-09-04T23:59:33.123Z".
Read only: true
customer_idJSONOptional
customer_id (anyOf 1)stringAlternative**Required** The ID of a [customer](entity:Customer) to be associated with the card.
customer_id (anyOf 2)nullAlternative
disabled_atstringOptionalTimestamp for when the card object was disabled on Square’s servers. In RFC 3339 format, e.g., "2016-09-04T23:59:33.123Z".
Read only: true
enabledbooleanOptionalIndicates whether or not a card can be used for payments.
Read only: true
exp_monthJSONOptional
exp_month (anyOf 1)JSONAlternative
exp_month (anyOf 1) (anyOf 1)integerAlternativeThe expiration month of the associated card as an integer between 1 and 12.
Format: int64
exp_month (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
exp_month (anyOf 2)nullAlternative
exp_yearJSONOptional
exp_year (anyOf 1)JSONAlternative
exp_year (anyOf 1) (anyOf 1)integerAlternativeThe four-digit year of the card's expiration date.
Format: int64
exp_year (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
exp_year (anyOf 2)nullAlternative
fingerprintstringOptionalIntended as a Square-assigned identifier, based
on the card number, to identify the card across multiple locations within a
single application.
Maximum length: 255
Read only: true
hsa_fsabooleanOptionalIndicates whether the card is linked to a Health Savings Account (HSA) or Flexible
Spending Account (FSA), based on the card BIN.
Read only: true
idstringOptionalUnique ID for this card. Generated by Square.
Maximum length: 64
Read only: true
issuer_alertstringOptionalIndicates the type of issuer alert for a [card on file](entity:Card).
An alert from the issuing bank about the card status. Alerts can indicate whether
future charges to the card are likely to fail. For more information, see
[Manage Card on File Declines](https://developer.squareup.com/docs/cards-api/manage-card-on-file-declines).

This field is present only if there's an active issuer alert.
See [IssuerAlert](#type-issueralert) for possible values
Known values: ISSUER_ALERT_CARD_CLOSED
Read only: true
issuer_alert_atstringOptionalThe timestamp of when the current issuer alert was received and processed, in
RFC 3339 format.

This field is present only if there's an active issuer alert.
Read only: true
last_4stringOptionalThe last 4 digits of the card number.
Maximum length: 4
Read only: true
merchant_idstringOptionalThe ID of the merchant associated with the card.
Read only: true
prepaid_typestringOptionalIndicates a card's prepaid type, such as `NOT_PREPAID` or `PREPAID`.
Indicates whether the card is prepaid or not.
See [CardPrepaidType](#type-cardprepaidtype) for possible values
Known values: UNKNOWN_PREPAID_TYPE, NOT_PREPAID, PREPAID
Read only: true
reference_idJSONOptional
reference_id (anyOf 1)stringAlternativeAn optional user-defined reference ID that associates this card with
another entity in an external system. For example, a customer ID from an
external customer management system.
Maximum length: 128
reference_id (anyOf 2)nullAlternative
versionJSONOptional
version (anyOf 1)integerAlternativeCurrent version number of the card. Increments with each card update. Requests to update an
existing Card object will be rejected unless the version in the request matches the current
version for the Card.
Format: int64
version (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Get Payment — response body — payment billing address

Disable Card — response body

FieldTypePresenceDescription and constraints
$objectRootDefines the fields that are included in the response body of
a request to the [DisableCard](api-endpoint:Cards-DisableCard) endpoint.

Note: if there are errors processing the request, the card field will not be
present.
cardModelOptionalExpand Create Card — response body — card
The retrieved card.
errorsarrayOptionalInformation on errors encountered during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Create Card — response body — card, Get Shift — response body — errors item

List Cards — response body

FieldTypePresenceDescription and constraints
$objectRootDefines the fields that are included in the response body of
a request to the [ListCards](api-endpoint:Cards-ListCards) endpoint.

Note: if there are errors processing the request, the card field will not be
present.
cardsarrayOptionalThe requested list of `Card`s.
cards[]ModelEach itemExpand Create Card — response body — card
cursorstringOptionalThe pagination cursor to be used in a subsequent request. If empty,
this is the final response.

See [Pagination](https://developer.squareup.com/docs/build-basics/common-api-patterns/pagination) for more information.
errorsarrayOptionalInformation on errors encountered during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Create Card — response body — card, Get Shift — response body — errors item

Retrieve Card — response body

FieldTypePresenceDescription and constraints
$objectRootDefines the fields that are included in the response body of
a request to the [RetrieveCard](api-endpoint:Cards-RetrieveCard) endpoint.

Note: if there are errors processing the request, the card field will not be
present.
cardModelOptionalExpand Create Card — response body — card
The retrieved card.
errorsarrayOptionalInformation on errors encountered during the request.
errors[]ModelEach itemExpand Get Shift — response body — errors item

Referenced models: Create Card — response body — card, Get Shift — response body — errors item

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand how our website, product, and documentation are used.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

Advertising

Shares visits and sign-ups with Meta, Reddit, and X so we can measure which of our ads work.

You can change these choices at any time from Cookie settings.