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.
Card
Name | Type | Tags | Description |
---|---|---|---|
id |
string | undefined |
Optional | Unique ID for this card. Generated by Square. Constraints: Maximum Length: 64 |
cardBrand |
string | undefined |
Optional | Indicates a card's brand, such as VISA or MASTERCARD . |
last4 |
string | undefined |
Optional | The last 4 digits of the card number. Constraints: Maximum Length: 4 |
expMonth |
bigint | undefined |
Optional | The expiration month of the associated card as an integer between 1 and 12. |
expYear |
bigint | undefined |
Optional | The four-digit year of the card's expiration date. |
cardholderName |
string | undefined |
Optional | The name of the cardholder. Constraints: Maximum Length: 96 |
billingAddress |
Address | undefined |
Optional | Represents a postal address in a country. For more information, see Working with Addresses. |
fingerprint |
string | undefined |
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 | undefined |
Optional | Required The ID of a customer created using the Customers API to be associated with the card. |
merchantId |
string | undefined |
Optional | The ID of the merchant associated with the card. |
referenceId |
string | undefined |
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 |
boolean | undefined |
Optional | Indicates whether or not a card can be used for payments. |
cardType |
string | undefined |
Optional | Indicates a card's type, such as CREDIT or DEBIT . |
prepaidType |
string | undefined |
Optional | Indicates a card's prepaid type, such as NOT_PREPAID or PREPAID . |
bin |
string | undefined |
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 |
bigint | undefined |
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 | undefined |
Optional | Indicates the brand for a co-branded card. |
{
"card_brand": null,
"exp_month": null,
"exp_year": null,
"cardholder_name": null,
"billing_address": null,
"customer_id": null,
"reference_id": null,
"card_type": null,
"prepaid_type": null,
"version": null,
"card_co_brand": null
}