ADO.NET Provider for Square

Build 24.0.9175

Payments

Query the available card Payments in Square. Cash and other tenders payments will not be returned.

Table Specific Information

Select

The following queries show the filters that are processed server side, while other filters are processed client side within the provider.

Retrieve all Payments: Retrieve a single payment by providing a valid Id:

    SELECT * FROM Payments WHERE Id = '5xNDT7Sd6qFHsLyKlugpZIqeV'
   

Filter by the creation date of a Payment:

  SELECT * FROM Payments WHERE CreatedAt > '2015-08-15'
  SELECT * FROM Payments WHERE CreatedAt < '2015-08-15'
  

Insert

To create a Payment, you will need to specify IdempotencyKey, SourceId, MoneyAmount and MoneyCurrency.

INSERT INTO Payments (IdempotencyKey,SourceId, MoneyAmount,MoneyCurrency) VALUES ('390a7d22-49d6-4ff3-ae1e-755455d03b50','cnon:card-nonce-ok',100, 'USD')

UPDATE

A Payment can be updated by providing the Id.

UPDATE payments set IdempotencyKey='b741f5a5-c041-4bd6-9e79-dfefcf69c4b7', MoneyAmount =200 , BuyerEmailAddress= '[email protected]' where Id='390a7d22-49d6-4ff3-ae1e-755455d03b50'

Columns

Name Type ReadOnly Description
Id [KEY] String False

The Id of the payment.

MoneyAmount Int64 False

The amount of money, in the smallest denomination of the currency indicated by currency. For example, when currency is USD, amount is in cents.

MoneyCurrency String False

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

AppFeeMoneyAmount Int64 False

The amount the developer is taking as a fee for facilitating the payment on behalf of the seller.

AppFeeMoneyCurrency String False

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

ApprovedMoneyAmount Int64 False

The initial amount of money approved for this payment. The amount the developer is taking as a fee for facilitating the payment on behalf of the seller.

ApprovedMoneyCurrency String False

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

BankAccountOwnershipType String False

The ownership type of the bank account performing the transfer.

The allowed values are INDIVIDUAL, COMPANY, UNKNOWN.

ACHDetailsAccountNumberSuffix String False

The last few digits of the bank account number.

ACHDetailsAccountType String False

The type of the bank account performing the transfer.

The allowed values are CHECKING, SAVINGS, UNKNOWN.

ACHDetailsRoutingNumber String False

The routing number for the bank account.

BankName String False

The name of the bank associated with the bank account.

BankAccountCountry String False

The two-letter ISO code representing the country the bank account is located in.

BankAccountFingerprint String False

Uniquely identifies the bank account for this seller and can be used to determine if payments are from the same bank account.

BankAccountStatementDescription String False

The statement description as sent to the bank.

BankAccountTransferType String False

The type of the bank transfer.

The allowed values are ACH, UNKNOWN.

BillingAddressLine1 String False

The first line of the address.

BillingAddressLine2 String False

The second line of the address, if any.

BillingAddressLine3 String False

The third line of the address, if any.

BillingAddressAdministrativeDistrictLevel1 String False

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

BillingAddressAdministrativeDistrictLevel2 String False

A civil entity within the address's administrative_district_level_1. In the US, this is the county.

BillingAddressAdministrativeDistrictLevel3 String False

A civil entity within the address's administrative_district_level_2, if any.

BillingAddressCountry String False

The address's country, in ISO 3166-1-alpha-2 format.

BillingAddressFirstName String False

Optional first name when it's representing recipient.

BillingAddressLastName String False

Optional last name when it's representing recipient.

BillingAddressLocality String False

The city or town of the address.

BillingAddressOrganization String False

Optional organization name when it's representing recipient.

BillingAddressPostalCode String False

The address's postal code.

BillingAddressSubLocality String False

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

BillingAddressSubLocality2 String False

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

BillingAddressSubLocality3 String False

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

BuyerEmailAddress String False

The buyer's email address.

Capabilities String False

Actions that can be performed on this payment:EDIT_AMOUNT_UP,EDIT_AMOUNT_DOWN,EDIT_TIP_AMOUNT_UP,EDIT_TIP_AMOUNT_DOWN

CardDetailsApplicationCryptogram String False

For EMV payments, the cryptogram generated for the payment.

CardDetailsApplicationIdentifier String False

For EMV payments, the application ID identifies the EMV application used for the payment.

CardDetailsApplicationName String False

For EMV payments, the human-readable name of the EMV application used for the payment.

CardDetailsAuthResultCode String False

The status code returned by the card issuer that describes the payment's authorization status.

CardDetailsAverageStatus String False

The status code returned from the Address Verification System (AVS) check.

The allowed values are AVS_ACCEPTED, AVS_REJECTED, AVS_NOT_CHECKED.

CardId String False

Unique ID for this card. Generated by Square.

CardBillingAddressLine1 String False

The first line of the address.

CardBillingAddressLine2 String False

The second line of the address, if any.

CardBillingAddressLine3 String False

The third line of the address, if any.

CardBillingAddressAdministrativeDistrictLevel1 String False

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

CardBillingAddressAdministrativeDistrictLevel2 String False

A civil entity within the address's administrative_district_level_1. In the US, this is the county.

CardBillingAddressAdministrativeDistrictLevel3 String False

A civil entity within the address's administrative_district_level_2, if any.

CardBillingAddressCountry String False

The address's country, in ISO 3166-1-alpha-2 format.

CardBillingAddressFirstName String False

Optional first name when it's representing recipient.

CardBillingAddressLastName String False

Optional last name when it's representing recipient.

CardBillingAddressLocality String False

The city or town of the address.

CardBillingAddressOrganization String False

Optional organization name when it's representing recipient.

CardBillingAddressPostalCode String False

The address's postal code.

CardBillingAddressSubLocality String False

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

CardBillingAddressSubLocality2 String False

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

CardBillingAddressSubLocality3 String False

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

CardBin String False

The first six digits of the card number, known as the Bank Identification Number (BIN). Only the Payments API returns this field.

CardType String False

The type of the card. The Card object includes this field only in response to Payments API calls.

The allowed values are UNKNOWN_CARD_TYPE, CREDIT, DEBIT.

CardholderName String False

The name of the cardholder.

CardCustomerId String False

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

CardEnabled Boolean False

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

CardExpiryMonth Int64 False

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

CardExpiryYear Int64 False

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

CardFingerprint String False

Intended as a Square-assigned identifier, based on the card number, to identify the card across multiple locations within a single application.

CardLast4 String False

The last 4 digits of the card number.

CardPrepaidType String False

Indicates whether the Card is prepaid or not. The Card object includes this field only in response to Payments API calls

CardReferenceId String False

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

CardVersion Int64 False

Current version number of the card. Increments with each card update.

CardTimelineAuthorizedAt Datetime False

The timestamp when the payment was authorized, in RFC 3339 format.

CardTimelineCapturedAt Datetime False

The timestamp when the payment was captured, in RFC 3339 format.

CardTimelineVoidedAt Datetime False

The timestamp when the payment was voided, in RFC 3339 format.

CardCVVStatus String False

The status code returned from the Card Verification Value (CVV) check.

The allowed values are CVV_ACCEPTED, CVV_REJECTED, CVV_NOT_CHECKED.

CardDeviceId String False

The Square-issued ID of the device.

CardDeviceInstallationId String False

The Square-issued installation ID for the device.

CardDeviceName String False

The name of the device set by the seller.

CardEntryMethod String False

The method used to enter the card's details for the payment.

The allowed values are KEYED, SWIPED, EMV, ON_FILE, CONTACTLESS.

RefundRequiresCardPresence Boolean False

Whether the card must be physically present for the payment to be refunded. If set to true, the card must be present.

CardStatementDescription String False

The statement description sent to the card networks.

CardStatus String False

The card payment's current state.

The allowed values are AUTHORIZED, CAPTURED, VOIDED, FAILED.

CardVerificationMethod String False

For EMV payments, the method used to verify the cardholder's identity.

The allowed values are PIN, SIGNATURE, PIN_AND_SIGNATURE, ON_DEVICE, NONE.

CardVerificationResults String False

For EMV payments, the results of the cardholder verification.

The allowed values are SUCCESS, FAILURE, UNKNOWN.

CashBuyerSupplierMoneyAmount Int64 False

The amount of money, in the smallest denomination of the currency indicated by currency.

CashBuyerSupplierMoneyCurrency String False

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

CashChangeBackMoneyAmount Int64 False

The amount of change due back to the buyer. This read-only field is calculated from the amount_money and buyer_supplied_money fields.

CashChangeBackMoneyCurrency String False

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

CreatedAt Datetime False

The timestamp of when the payment was created, in RFC 3339 format.

CustomerId String False

The Customer ID of the customer associated with the payment.

DelayAction String False

The action to be applied to the payment when the delay_duration has elapsed.

DelayDuration String False

The duration of time after the payment's creation when Square automatically applies the delay_action to the payment.

DelayedUntil Datetime False

The timestamp of when the delay_action is automatically applied, in RFC 3339 format.

EmployeeId String False

An optional ID of the employee associated with taking the payment.

ExternalDetailsSource String False

A description of the external payment source. For example, 'Food Delivery Service'.

ExternalDetailsType String False

The type of external payment the seller received.

The allowed values are CHECK, BANK_TRANSFER, OTHER_GIFT_CARD, CRYPTO, SQUARE_CASH, SOCIAL, EXTERNAL, EMONEY, CARD, STORED_BALANCE, OTHER.

ExternalDetailsSourceFeeMoneyAmount Int64 False

The fees paid to the source. The amount_money minus this field is the net amount seller receives.

ExternalDetailsSourceFeeMoneyCurrency String False

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

ExternalDetailsSourceId String False

An ID to associate the payment to its originating source.

LocationId String False

The ID of the location associated with the payment.

Note String False

An optional note to include when creating a payment.

OrderId String False

The ID of the order associated with the payment.

ProcessingFee String False

The processing fees and fee adjustments assessed by Square for this payment.

ReceiptNumber String False

The payment's receipt number. The field is missing if a payment is canceled.

ReceiptURL String False

The URL for the payment's receipt. The field is only populated for COMPLETED payments.

ReferenceId String False

An optional ID that associates the payment with an entity in another system.

RefundIds String False

A list of refund_ids identifying refunds for the payment.

RefundedMoneyAmount Int64 False

The total amount of the payment refunded to date.

RefundedMoneyCurrency String False

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

RiskEvaluationCreatedAt Datetime False

Provides information about the risk associated with the payment, as determined by Square.

RiskEvaluationLevel String False

The risk level associated with the payment.

The allowed values are PENDING, NORMAL, MODERATE, HIGH.

ShippingAddressLine1 String False

The first line of the address.

ShippingAddressLine2 String False

The second line of the address, if any.

ShippingAddressLine3 String False

The third line of the address, if any.

ShippingAddressAdministrativeDistrictLevel1 String False

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

ShippingAddressAdministrativeDistrictLevel2 String False

A civil entity within the address's administrative_district_level_1. In the US, this is the county.

ShippingAddressAdministrativeDistrictLevel3 String False

A civil entity within the address's administrative_district_level_2, if any.

ShippingAddressCountry String False

The address's country, in ISO 3166-1-alpha-2 format.

ShippingAddressFirstName String False

Optional first name when it's representing recipient.

ShippingAddressLastName String False

Optional last name when it's representing recipient.

ShippingAddressLocality String False

The city or town of the address.

ShippingAddressOrganization String False

Optional organization name when it's representing recipient.

ShippingAddressPostalCode String False

The address's postal code.

ShippingAddressSubLocality String False

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

ShippingAddressSubLocality2 String False

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

ShippingAddressSubLocality3 String False

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

SourceType String False

The source type for this payment.

The allowed values are CARD, BANK_ACCOUNT, CASH, EXTERNAL, WALLET, BUY_NOW_PAY_LATER, SQUARE_ACCOUNT.

StatementDescriptionIdentifier String False

Additional payment information that gets added to the customer's card statement as part of the statement description.

Status String False

Indicates whether the payment is APPROVED, PENDING, COMPLETED, CANCELED, or FAILED.

TipMoneyAmount Int64 False

The amount designated as a tip.

TipMoneyCurrency String False

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

TotalMoneyAmount Int64 False

The total amount for the payment, including amount_money and tip_money.

TotalMoneyCurrency String False

The type of currency, in ISO 4217 format. For example, the currency code for US dollars is USD.

UpdatedAt Datetime False

The timestamp of when the payment was last updated, in RFC 3339 format.

VersionToken String False

Used for optimistic concurrency. This opaque token identifies a specific version of the Payment object.

TeamMemberId String False

An optional ID of the TeamMember associated with taking the payment.

ApplicationDetailsApplicationId String False

The Square ID assigned to the application used to take the payment.

ApplicationDetailsSquareProduct String False

The Square product, such as Square Point of Sale (POS), Square Invoices, or Square Virtual Terminal.

BuyNowPayLaterDetailsBrand String False

The brand used for the Buy Now Pay Later payment. The brand can be AFTERPAY, CLEARPAY or UNKNOWN.

BuyNowAfterPayEmailAddress String False

Email address on the buyer's Afterpay account.

BuyNowClearPayEmailAddress String False

Email address on the buyer's Clearpay account.

CardBrand String False

The card's brand.

The allowed values are OTHER_BRAND, VISA, MASTERCARD, AMERICAN_EXPRESS, DISCOVER, DISCOVER_DINERS, JCB, CHINA_UNIONPAY, SQUARE_GIFT_CARD, SQUARE_CAPITAL_CARD, INTERAC, EFTPOS, FELICA, EBT.

SquareAccountPaymentSourceToken String False

Unique identifier for the payment source used for this payment.

SquareAccountErrors String False

Information about errors encountered during the request.

WalletDetailsBrand String False

The brand used for the WALLET payment. The brand can be CASH_APP, PAYPAY, ALIPAY, RAKUTEN_PAY, AU_PAY, D_BARAI, MERPAY, WECHAT_PAY or UNKNOWN.

WalletDetailsBuyerFullName String False

The name of the Cash App account holder.

WalletDetailsBuyerCountryCode String False

The country of the Cash App account holder, in ISO 3166-1-alpha-2 format.

WalletDetailsBuyerCashTag String False

$Cashtag of the Cash App account holder.

WalletDetailsStatus String False

The status of the WALLET payment. The status can be AUTHORIZED, CAPTURED, VOIDED, or FAILED.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
IdempotencyKey String

A unique string that identifies this CreatePayment request. Keys can be any valid string but must be unique for every CreatePayment request.

SourceId String

The ID for the source of funds for this payment.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 24.0.9175