square_connect library

Classes

AcceptedPaymentMethods
AccumulateLoyaltyPointsRequest
AccumulateLoyaltyPointsResponse
AchDetails
ACH-specific details about BANK_ACCOUNT type payments with the transfer_type of ACH.
AdditionalRecipient
An object representing an additional recipient (other than the merchant) receiving a portion of this tender.
Address
Represents a physical address.
AdjustLoyaltyPointsRequest
AdjustLoyaltyPointsResponse
BankAccountPaymentDetails
Additional details about BANK_ACCOUNT type payments.
BatchRetrieveCatalogObjectsRequest
BatchRetrieveCatalogObjectsResponse
BatchRetrieveOrdersRequest
BatchRetrieveOrdersResponse
Break
BreakType
BusinessHours
An object representing the full business hours for a location.
BusinessHoursPeriod
An object representing a period of business hours.
CalculateLoyaltyPointsRequest
CalculateLoyaltyPointsResponse
CalculateOrderRequest
CalculateOrderResponse
CancelInvoiceRequest
CancelInvoiceResponse
CancelSubscriptionResponse
Card
Reflects the current status of a card payment.
CardAutomaticallyUpdatedEvent
CardAutomaticallyUpdatedWebhookData
CardCreatedEvent
CardCreatedWebhookData
CardDisabledEvent
CardDisabledWebhookData
CardForgottenEvent
CardForgottenWebhookData
CardPaymentDetails
Reflects the current status of a card payment.
CardPaymentTimeline
The timeline for card payments.
CardUpdatedEvent
CardUpdatedWebhookData
CashPaymentDetails
Stores details about a cash payment.
CatalogCategory
CatalogDiscount
CatalogIdMapping
CatalogImage
CatalogInfoResponseLimits
CatalogItem
CatalogItemModifierListInfo
CatalogItemOption
CatalogItemOptionForItem
CatalogItemOptionValue
CatalogItemOptionValueForItemVariation
CatalogItemVariation
CatalogMeasurementUnit
CatalogModifier
CatalogModifierList
CatalogModifierOverride
CatalogObject
CatalogObjectBatch
CatalogObjectReference
CatalogPricingRule
CatalogProductSet
CatalogQuery
CatalogQueryExact
CatalogQueryItemsForItemOptions
CatalogQueryItemsForModifierList
CatalogQueryItemsForTax
CatalogQueryItemVariationsForItemOptionValues
CatalogQueryPrefix
CatalogQueryRange
CatalogQuerySet
CatalogQuerySortedAttribute
CatalogQueryText
CatalogStockConversion
CatalogTax
CatalogVersionUpdatedEvent
CatalogVersionUpdatedWebhookCatalogVersion
CatalogVersionUpdatedWebhookData
CatalogVersionUpdatedWebhookObject
ChargeRequestAdditionalRecipient
Checkout
CheckoutOptions
CloneOrderRequest
CloneOrderResponse
Coordinates
The physical coordinates (latitude and longitude) of the location.
CreateCardRequest
CreateCardResponse
CreateCheckoutRequest
CreateCheckoutRequestOrder
CreateCheckoutResponse
CreateCustomerGroupRequest
CreateCustomerGroupResponse
CreateCustomerRequest
CreateCustomerResponse
CreateGiftCardActivityRequest
CreateGiftCardActivityResponse
CreateGiftCardRequest
CreateGiftCardResponse
CreateInvoiceRequest
CreateInvoiceResponse
CreateLocationRequest
Input object for create location method.
CreateLocationResponse
Response object for create location method.
CreateLoyaltyAccountRequest
CreateLoyaltyAccountResponse
CreateLoyaltyRewardRequest
CreateLoyaltyRewardResponse
CreateOrderRequest
CreateOrderResponse
CreatePaymentLinkRequest
CreatePaymentLinkResponse
CreatePaymentRequest
CreatePaymentResponse
CreateSubscriptionRequest
CreateSubscriptionResponse
Customer
Represents a Square customer profile in the Customer Directory of a Square seller.
CustomerCreatedEvent
CustomerCreatedWebhookData
CustomerCreatedWebhookEventContext
CustomerCreatedWebhookEventContextMerge
CustomerCreatedWebhookObject
CustomerCreationSourceFilter
CustomerDeletedEvent
CustomerDeletedWebhookData
CustomerDeletedWebhookEventContext
CustomerDeletedWebhookEventContextMerge
CustomerDeletedWebhookObject
CustomerFilter
CustomerGroup
CustomerPreferences
Represents communication preferences for the customer profile.
CustomerQuery
CustomerSegment
CustomerSort
CustomerTaxIds
CustomerTextFilter
CustomerUpdatedEvent
CustomerUpdatedWebhookData
CustomerUpdatedWebhookObject
CustomField
DateRange
DeleteCustomerGroupResponse
DeleteCustomerResponse
DeleteInvoiceResponse
DeleteLoyaltyReward
DeleteSubscriptionActionResponse
DeviceDetails
Details about the device that took the payment.
DisableCardResponse
Employee
An Employee created in the Square Dashboard account of a business. Used by the LaborApi.
EmployeeWage
ExternalPaymentDetails
Stores details about an external payment. Contains only non-confidential information. For more information, see Take External Payments.
FilterValue
GetInvoiceResponse
GiftCard
GiftCardActivity
GiftCardActivityActivate
GiftCardActivityAdjustDecrement
GiftCardActivityAdjustIncrement
GiftCardActivityBlock
GiftCardActivityClearBalance
GiftCardActivityCreatedEvent
GiftCardActivityCreatedSquareEventData
GiftCardActivityCreatedSquareEventObject
GiftCardActivityDeactivate
GiftCardActivityImport
GiftCardActivityImportReversal
GiftCardActivityLoad
GiftCardActivityRedeem
GiftCardActivityRefund
GiftCardActivityUnblock
GiftCardActivityUnlinkedActivityRefund
GiftCardActivityUpdatedEvent
GiftCardActivityUpdatedSquareEventData
GiftCardActivityUpdatedSquareEventObject
GiftCardCreatedEvent
GiftCardCreatedSquareEventData
GiftCardCreatedSquareEventObject
GiftCardCustomerLinkedEvent
GiftCardCustomerLinkedSquareEventData
GiftCardCustomerLinkedSquareEventObject
GiftCardCustomerUnlinkedEvent
GiftCardCustomerUnlinkedSquareEventData
GiftCardCustomerUnlinkedSquareEventObject
GiftCardUpdatedEvent
GiftCardUpdatedSquareEventData
GiftCardUpdatedSquareEventObject
InventoryAdjustment
InventoryChange
InventoryCount
InventoryPhysicalCount
InventoryTransfer
Invoice
InvoiceAcceptedPaymentMethods
InvoiceCanceledEvent
InvoiceCanceledSquareEventData
InvoiceCanceledSquareEventObject
InvoiceCreatedEvent
InvoiceCreatedSquareEventData
InvoiceCreatedSquareEventObject
InvoiceCustomField
InvoiceDeletedEvent
InvoiceDeletedSquareEventData
InvoiceFilter
InvoicePaymentMadeEvent
InvoicePaymentMadeSquareEventData
InvoicePaymentMadeSquareEventObject
InvoicePaymentReminder
InvoicePaymentRequest
InvoicePublishedEvent
InvoicePublishedSquareEventData
InvoicePublishedSquareEventObject
InvoiceQuery
InvoiceRecipient
InvoiceRecipientTaxIds
InvoiceRefundedEvent
InvoiceRefundedSquareEventData
InvoiceRefundedSquareEventObject
InvoiceScheduledChargeFailedEvent
InvoiceScheduledChargeFailedSquareEventData
InvoiceScheduledChargeFailedSquareEventObject
InvoiceSort
InvoiceUpdatedEvent
InvoiceUpdatedSquareEventData
InvoiceUpdatedSquareEventObject
ItemVariationLocationOverrides
LinkCustomerToGiftCardRequest
LinkCustomerToGiftCardResponse
ListCardsResponse
ListCatalogResponse
ListCustomerGroupsResponse
ListCustomerSegmentsResponse
ListCustomersResponse
ListGiftCardsResponse
ListInvoicesResponse
ListLocationsResponse
Response to the list locations method.
ListMerchantsResponse
ListPaymentResponse
ListSubscriptionEventsResponse
Location
Represents a business's locations. Can be physical or mobile. They are set up in the Square dashboard. Their id is used in many other endpoints.
LocationCreatedEvent
LocationCreatedEventData
LocationUpdatedEvent
LocationUpdatedEventData
LoyaltyAccount
LoyaltyAccountCreatedEvent
LoyaltyAccountCreatedWebhookData
LoyaltyAccountCreatedWebhookDataObject
LoyaltyAccountDeletedEvent
LoyaltyAccountDeletedWebhookData
LoyaltyAccountDeletedWebhookDataObject
LoyaltyAccountExpiringPointDeadline
LoyaltyAccountMapping
LoyaltyAccountUpdatedEvent
LoyaltyAccountUpdatedWebhookData
LoyaltyAccountUpdatedWebhookDataObject
LoyaltyEvent
LoyaltyEventAccumulatePoints
LoyaltyEventAccumulatePromotionPoints
LoyaltyEventAdjustPoints
LoyaltyEventCreateReward
LoyaltyEventDateTimeFilter
LoyaltyEventDeleteReward
LoyaltyEventExpirePoints
LoyaltyEventFilter
LoyaltyEventLocationFilter
LoyaltyEventLoyaltyAccountFilter
LoyaltyEventOrderFilter
LoyaltyEventOther
LoyaltyEventQuery
LoyaltyEventRedeemReward
LoyaltyEventTypeFilter
LoyaltyProgram
LoyaltyProgramAccrualRule
LoyaltyProgramAccrualRuleCategoryData
LoyaltyProgramAccrualRuleItemVariationData
LoyaltyProgramAccrualRuleSpendData
LoyaltyProgramAccrualRuleVisitData
LoyaltyProgramCreatedEvent
LoyaltyProgramCreatedWebhookData
LoyaltyProgramCreatedWebhookObject
LoyaltyProgramExpirationPolicy
LoyaltyProgramRewardTier
LoyaltyProgramTerminology
LoyaltyProgramUpdatedEvent
LoyaltyProgramUpdatedWebhookData
LoyaltyReward
MeasurementUnit
MeasurementUnitCustom
Merchant
ModifierLocationOverrides
Money
Money fields can be signed or unsigned. Fields that do not explicitly define whether they are signed or unsigned are considered unsigned and can only hold positive amounts. For signed fields, the sign of the value indicates the purpose of the money transfer. See Working with Monetary Amounts for more information.
OauthAuthorizationRevokedEvent
OauthAuthorizationRevokedWebhookData
OauthAuthorizationRevokedWebhookObject
OauthAuthorizationRevokedWebhookRevocationObject
ObtainTokenRequest
ObtainTokenResponse
Order
OrderCreated
OrderCreatedEvent
OrderCreatedObject
OrderCreatedWebhookData
OrderEntry
OrderFulfillment
OrderFulfillmentPickupDetails
OrderFulfillmentPickupDetailsCurbsidePickupDetails
OrderFulfillmentRecipient
OrderFulfillmentShipmentDetails
OrderFulfillmentUpdated
OrderFulfillmentUpdatedEvent
OrderFulfillmentUpdatedObject
OrderFulfillmentUpdatedUpdate
OrderFulfillmentUpdatedWebhookData
OrderLineItem
OrderLineItemAppliedDiscount
OrderLineItemAppliedTax
OrderLineItemDiscount
OrderLineItemModifier
OrderLineItemPricingBlocklists
OrderLineItemPricingBlocklistsBlockedDiscount
OrderLineItemPricingBlocklistsBlockedTax
OrderLineItemTax
OrderMoneyAmounts
OrderPricingOptions
OrderQuantityUnit
OrderReturn
OrderReturnDiscount
OrderReturnLineItem
OrderReturnLineItemModifier
OrderReturnServiceCharge
OrderReturnTax
OrderReward
OrderRoundingAdjustment
OrderServiceCharge
OrderSource
OrderUpdated
OrderUpdatedEvent
OrderUpdatedObject
OrderUpdatedWebhookData
PauseSubscriptionRequest
PauseSubscriptionResponse
Payment
Represents a payment processed by the Square API.
PaymentLinkRelatedResources
PaymentRefund
PayOrderRequest
PayOrderResponse
PrePopulatedData
ProcessingFee
Represents the Square processing fee.
PublishInvoiceRequest
PublishInvoiceResponse
QuickPay
RedeemLoyaltyRewardRequest
RedeemLoyaltyRewardResponse
Refund
An object representing a refund processed for a Square transaction.
ResumeSubscriptionRequest
ResumeSubscriptionResponse
RetrieveCardResponse
RetrieveCatalogObjectResponse
RetrieveCustomerGroupResponse
RetrieveCustomerResponse
RetrieveCustomerSegmentResponse
RetrieveGiftCardFromGanRequest
RetrieveGiftCardFromGanResponse
RetrieveGiftCardFromNonceRequest
RetrieveGiftCardFromNonceResponse
RetrieveGiftCardResponse
RetrieveLocationResponse
Response object for retrieve location method.
RetrieveLoyaltyAccountResponse
RetrieveLoyaltyProgramResponse
RetrieveLoyaltyRewardResponse
RetrieveMerchantResponse
RetrieveOrderResponse
RetrieveSubscriptionResponse
RetrieveTokenStatusResponse
RevokeTokenRequest
RevokeTokenResponse
RiskEvaluation
Represents fraud risk information for the associated payment. When you take a payment through Square's Payments API (using the CreatePayment endpoint), Square evaluates it and assigns a risk level to the payment. Sellers can use this information to determine the course of action (for example, provide the goods/services or refund the payment).
SearchCatalogRequest
SearchCatalogResponse
SearchCustomersRequest
SearchCustomersResponse
SearchInvoicesRequest
SearchInvoicesResponse
SearchLoyaltyAccountsRequest
SearchLoyaltyAccountsRequestLoyaltyAccountQuery
SearchLoyaltyAccountsResponse
SearchLoyaltyEventsRequest
SearchLoyaltyEventsResponse
SearchOrdersCustomerFilter
SearchOrdersDateTimeFilter
SearchOrdersFilter
SearchOrdersFulfillmentFilter
SearchOrdersQuery
SearchOrdersRequest
SearchOrdersResponse
SearchOrdersSort
SearchOrdersSourceFilter
SearchOrdersStateFilter
SearchSubscriptionsFilter
SearchSubscriptionsQuery
SearchSubscriptionsRequest
SearchSubscriptionsResponse
Shift
ShiftWage
ShiftWorkday
SourceApplication
SquareApiClient
SquareDate
An object representing a generic time of day devoid of date.
SquareError
Custom object containing a list of SquareErrors to facilitate throwing a lists of errors.
SquareResponse
Abstract SquareResponse for concrete SquareResponses
SquareTimeOfDay
An object representing a generic time of day devoid of date.
StandardUnitDescription
StandardUnitDescriptionGroup
Subscription
SubscriptionAction
SubscriptionCreatedEvent
SubscriptionCreatedSquareEventObject
SubscriptionCreatedWebhookData
SubscriptionEvent
SubscriptionEventInfo
SubscriptionSource
SubscriptionUpdatedEvent
SubscriptionUpdatedSquareEventObject
SubscriptionUpdatedWebhookData
SwapPlanRequest
SwapPlanResponse
Tender
Represents a tender (i.e., a method of payment) used in a Square transaction.
TenderCardDetails
An object representing additional details of a tender with type CARD or SQUARE_GIFT_CARD.
TenderCashDetails
An object representing the details of a tender with type CASH.
TimeRange
UnlinkCustomerFromGiftCardRequest
UnlinkCustomerFromGiftCardResponse
UpdateCustomerGroupRequest
UpdateCustomerGroupResponse
UpdateCustomerRequest
UpdateCustomerResponse
UpdateInvoiceRequest
UpdateInvoiceResponse
UpdateLocationRequest
Input object for update location method.
UpdateLocationResponse
Response object for update location method.
UpdateOrderRequest
UpdateOrderResponse
UpdateSubscriptionRequest
UpdateSubscriptionResponse
WebhookData
WebhookEvent
WorkweekConfig

Enums

CardBrand
Indicates a card's brand, such as VISA or MASTERCARD.
CardPrepaidType
Indicates a card's prepaid type, such as NOT_PREPAID or PREPAID.
CardType
Indicates a card's type, such as CREDIT or DEBIT.
CatalogDiscountType
Indicates how to apply a CatalogDiscount to a CatalogItem.
CatalogItemProductType
Indicates the type of CatalogItem. Can only create regular and appointmentsService.
CatalogModifierListSelectionType
Indicates whether a CatalogModifierList supports multiple selections.
CatalogObjectType
Indicates the type of CatalogObject.
CatalogPricingType
Indicates whether the price of a CatalogItemVariation should be entered manually at point of sale
CatalogQueryType
Indicates a type of query made on searchCatalog().
Category
The high-level category for the error.
ChangeTiming
Country
Indicates the country associated with another entity, such as a business. NOTE: not all countries included
Currency
Indicates the associated currency for an amount of money.
CustomerCreationSource
Indicates the method used to create the customer profile.
CustomerInclusionExclusion
CustomerSortField
DayOfWeek
Indicates a day of a 7 day week.
DiscountTargetScopeType
Indicates discount scope type for a CatalogPricingRule.
EmployeeStatus
Indicates the status of the Employee.
ErrorCategory
Indicates which high-level category of error has occurred during a request to the Connect API.
ErrorCode
The high-level category for the error.
GiftCardActivityRedeemStatus
GiftCardActivityType
GiftCardGANSource
GiftCardStatus
GiftCardType
Indicates the gift card type.
InventoryAlertType
Indicates whether Square should alert when the inventory quantity of a CatalogItemVariation is low.
InventoryChangeType
Indicates how the inventory change was applied to a tracked quantity of items.
InventoryState
Indicates the state of a tracked item quantity in the lifecycle of goods.
InvoiceAutomaticPaymentSource
InvoiceCustomFieldPlacement
InvoiceDeliveryMethod
InvoicePaymentReminderStatus
InvoiceRequestType
InvoiceSortField
InvoiceStatus
LocationCapability
Indicates payment capabilities that a location might or might not have enabled.
LocationStatus
Indicates if a location is active or inactive.
LocationType
Indicates a type of location (physical or mobile).
LoyaltyRewardStatus
Read only The status of a loyalty reward.
MeasurementUnitArea
Indicates a unit of area used to measure a quantity.
MeasurementUnitLength
Indicates a unit of length used to measure a quantity.
MeasurementUnitVolume
Indicates a unit of volume used to measure a quantity.
MeasurementUnitWeight
Indicates a unit of weight used to measure a quantity.
OauthAuthorizationRevokedWebhookRevokerType
OAuthGrantType
OAuthScope
OrderFulfillmentPickupDetailsScheduleType
The schedule type of the pickup fulfillment.
OrderFulfillmentState
The state of the fulfillment.
OrderFulfillmentType
The type of fulfillment.
OrderLineItemDiscountScope
Indicates whether this is a line item or order level discount.
OrderLineItemDiscountType
Indicates how the discount is applied to the associated line item or order.
OrderLineItemTaxScope
Indicates whether this is a line item or order level tax.
OrderLineItemTaxType
Indicates how the tax is applied to the associated line item or order.
OrderLineItemType
OrderServiceChargeCalculationPhase
Indicates a phase in the process of calculating order totals. Service charges will be applied after the phase indicated.
OrderState
Indicates state of the order.
PaymentRefundStatus
Indicates a refund's current status.
Product
Indicates the Square product used to generate an inventory change.
SearchOrdersSortField
ShiftSortField
Enumerates the Shift fields to sort on.
ShiftStatus
Indicates whether or not a Shift is finished.
ShiftWorkdayMatcher
Defines the logic used to apply a workday filter.
SortOrder
The order (e.g., chronological or alphabetical) in which results from a request are returned.
SubscriptionActionType
SubscriptionEventInfoCode
SubscriptionEventSubscriptionEventType
SubscriptionStatus
TaxCalculationPhase
Indicates when to calculate the taxes due on a cart.
TaxInclusionType
Indicates whether to the tax amount should be additional to or included in to the CatalogItem price.
TenderCardDetailsEntryMethod
Indicates the method used to enter the card's details.
TenderCardDetailsStatus
Indicates the Card Transaction's current status.
TenderType
Indicates the Tender's type.

Functions

webhookIsFromSquare({required String sigKey, required String notificationUrl, required String squareSignature, required String rawBody}) bool
Returns true if webhook is from square

Exceptions / Errors

DioException
DioException describes the exception info when a request failed.
SquareErrors
Custom object containing a list of SquareErrors to facilitate throwing a lists of errors.