CData Python Connector for Square

Build 24.0.9062

Cards

Create, update, delete, and query the available Cards in Square.

Table Specific Information

Select

The 本製品 uses the Square API to process search criteria , while other filters are processed client side within the 本製品.

Select all Cards:

SELECT * FROM Cards

Select all Cards from a specific customer:

 SELECT * FROM Cards WHERE CustomerId = 'CBASEPlKoFeu4nWm0MX_oHdklAIgAQ'

Insert

To create a card, you will need to specify CustomerId, IdempotencyKey and SourceId.

INSERT INTO Cards (IdempotencyKey, SourceId, CustomerId, BillingAddressAddressLine1, BillingAddressAddressLine2, BillingAddressLocality, BillingAddressPostalCode, BillingAddressCountry, CardholderName) VALUES ('aa8f236c-13a6-42fe-a17e-4edf6caa2035', 'fake-card-nonce-ok', 'CBASEPlKoFeu4nWm0MX_oHdklAIgAQ', '500 Electric Ave', 'Suite 600', 'New York', '94103', 'US', 'CardholderName')

Delete

A card can be removed by providing the Id.

DELETE FROM Cards WHERE Id = 'eKoFeu4nWm0MX_oed'

Columns

Name Type ReadOnly Description
Id [KEY] String True

Unique ID for this card. Generated by Square.

BillingAddressAddressLine1 String False

A civil entity within the address's country. In the US, this is the state.

BillingAddressAddressLine2 String False

The second line of the address, if any.

BillingAddressAddressLine3 String False

The third line of the address, if any

BillingAddressAdministrativeDistrictLevel1 String False

A civil entity within the address's country.

BillingAddressCountry String False

The address's country, in the two-letter format of ISO 3166.

BillingAddressLocality String False

The city or town of the address.

BillingAddressSubLocality String False

A civil region within the address's locality, if any.

BillingAddressPostalCode String False

The address's postal code.

Bin String True

The first six digits of the card number, known as the Bank Identification Number (BIN).

CardBrand String True

The card's brand.

CardType String True

The type of the card.

CardholderName String False

The name of the cardholder.

CustomerId String False

The ID of a customer created using the Customers API to be associated with the card.

MerchantId String True

The ID of the merchant associated with the card.

Enabled Boolean True

Indicates whether or not a card can be used for payments.

ExpMonth Integer False

The expiration month of the associated card as an integer between 1 and 12.

ExpYear Integer False

The four-digit year of the card's expiration date.

Fingerprint String True

The unique string fingerprint for the card. The fingerprint is based on the credit card number and is unique to the merchant. If a card is used at multiple locations for the same merchant, it will have the same fingerprint in each case.

Last4 String True

The last 4 digits of the card number.

PrepaidType String True

Indicates whether the Card is prepaid or not.

ReferenceId String False

An optional user-defined reference ID that associates this card with another entity in an external system.

Version Int64 False

Current version number of the card.

IdempotencyKey String False

A unique string that identifies this CreateCard request.

SourceId String False

The ID of the source which represents the card information to be stored. This can be a card nonce or a payment id.

VerificationToken String False

An identifying token generated by Payments.verifyBuyer().

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9062