Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 2.95 KB

card.md

File metadata and controls

44 lines (35 loc) · 2.95 KB

Card

Represents the payment details of a card to be used for payments. These details are determined by the payment token generated by Web Payments SDK.

Structure

Card

Fields

Name Type Tags Description
Id string Optional Unique ID for this card. Generated by Square.
Constraints: Maximum Length: 64
CardBrand string Optional Indicates a card's brand, such as VISA or MASTERCARD.
Last4 string Optional The last 4 digits of the card number.
Constraints: Maximum Length: 4
ExpMonth long? Optional The expiration month of the associated card as an integer between 1 and 12.
ExpYear long? Optional The four-digit year of the card's expiration date.
CardholderName string Optional The name of the cardholder.
Constraints: Maximum Length: 96
BillingAddress Address Optional Represents a postal address in a country.
For more information, see Working with Addresses.
Fingerprint string Optional Intended as a Square-assigned identifier, based
on the card number, to identify the card across multiple locations within a
single application.
Constraints: Maximum Length: 255
CustomerId string Optional Required The ID of a customer created using the Customers API to be associated with the card.
MerchantId string Optional The ID of the merchant associated with the card.
ReferenceId string Optional An 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.
Constraints: Maximum Length: 128
Enabled bool? Optional Indicates whether or not a card can be used for payments.
CardType string Optional Indicates a card's type, such as CREDIT or DEBIT.
PrepaidType string Optional Indicates a card's prepaid type, such as NOT_PREPAID or PREPAID.
Bin string Optional The first six digits of the card number, known as the Bank Identification Number (BIN). Only the Payments API
returns this field.
Constraints: Maximum Length: 6
Version long? Optional Current 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.
CardCoBrand string Optional Indicates the brand for a co-branded card.

Example (as JSON)

{
  "id": "id0",
  "card_brand": "INTERAC",
  "last_4": "last_42",
  "exp_month": 240,
  "exp_year": 56
}