ErrorCode enum
The high-level category for the error.
Constructors
- ErrorCode()
-
const
Values
- internalServerError → const ErrorCode
-
A general server error occurred.
-
A general authorization error occurred.
- accessTokenExpired → const ErrorCode
-
The provided access token has expired.
- accessTokenRevoked → const ErrorCode
-
The provided access token has been revoked.
- clientDisabled → const ErrorCode
-
The provided client has been disabled.
- forbidden → const ErrorCode
-
A general access error occurred.
- insufficientScopes → const ErrorCode
-
The provided access token does not have permission to execute the requested action.
- applicationDisabled → const ErrorCode
-
The calling application was disabled.
- v1Application → const ErrorCode
-
The calling application was created prior to 2016-03-30 and is not compatible with v2 Square API calls.
- v1AccessToken → const ErrorCode
-
The calling application is using an access token created prior to 2016-03-30 and is not compatible with v2 Square API calls.
- cardProcessingNotEnabled → const ErrorCode
-
The location provided in the API call is not enabled for credit card processing.
- badRequest → const ErrorCode
-
A general error occurred with the request.
- missingRequiredParameter → const ErrorCode
-
The request is missing a required path, query, or body parameter.
- incorrectType → const ErrorCode
-
The value provided in the request is the wrong type. For example, a string instead of an integer.
- invalidTime → const ErrorCode
-
Formatting for the provided time value is incorrect.
- invalidTimeRange → const ErrorCode
-
The time range provided in the request is invalid. For example, the end time is before the start time.
- invalidValue → const ErrorCode
-
The provided value is invalid. For example, including % in a phone number.
- invalidCursor → const ErrorCode
-
The pagination cursor included in the request is invalid.
- unknownQueryParameter → const ErrorCode
-
The query parameters provided is invalid for the requested endpoint.
- conflictingParameters → const ErrorCode
-
One or more of the request parameters conflict with each other.
- expectedJsonBody → const ErrorCode
-
The request body is not a JSON object.
- invalidSortOrder → const ErrorCode
-
The provided sort order is not a valid key. Currently, sort order must be ASC or DESC.
- valueRegexMismatch → const ErrorCode
-
The provided value does not match an expected regular expression.
- valueTooShort → const ErrorCode
-
The provided string value is shorter than the minimum length allowed.
- valueTooLong → const ErrorCode
-
The provided string value is longer than the maximum length allowed.
- valueTooLow → const ErrorCode
-
The provided value is less than the supported minimum.
- valueTooHigh → const ErrorCode
-
The provided value is greater than the supported maximum.
- valueEmpty → const ErrorCode
-
The provided value has a default (empty) value such as a blank string.
- arrayLengthTooLong → const ErrorCode
-
The provided array has too many elements.
- arrayLengthTooShort → const ErrorCode
-
The provided array has too few elements.
- arrayEmpty → const ErrorCode
-
The provided array is empty.
- expectedBoolean → const ErrorCode
-
The endpoint expected the provided value to be a boolean.
- expectedInteger → const ErrorCode
-
The endpoint expected the provided value to be an integer.
- expectedFloat → const ErrorCode
-
The endpoint expected the provided value to be a float.
- expectedString → const ErrorCode
-
The endpoint expected the provided value to be a string.
- expectedObject → const ErrorCode
-
The endpoint expected the provided value to be a JSON object.
- expectedArray → const ErrorCode
-
The endpoint expected the provided value to be an array or list.
- expectedMap → const ErrorCode
-
The endpoint expected the provided value to be a map or associative array.
- expectedBase64EncodedByteArray → const ErrorCode
-
The endpoint expected the provided value to be an array encoded in base64.
- invalidArrayValue → const ErrorCode
-
One or more objects in the array does not match the array type.
- invalidEnumValue → const ErrorCode
-
The provided static string is not valid for the field.
- invalidContentType → const ErrorCode
-
Invalid content type header.
- invalidFormValue → const ErrorCode
-
Only relevant for applications created prior to 2016-03-30. Indicates there was an error while parsing form values.
- customerNotFound → const ErrorCode
-
The provided customer id can't be found in the merchant's customers list.
- oneInstrumentExpected → const ErrorCode
-
A general error occurred.
- noFieldsSet → const ErrorCode
-
A general error occurred.
- deprecatedFieldSet → const ErrorCode
-
A general error occurred.
- retiredFieldSet → const ErrorCode
-
A general error occurred.
- tooManyMapEntries → const ErrorCode
-
Too many entries in the map field.
- mapKeyLengthTooShort → const ErrorCode
-
The length of one of the provided keys in the map is too short.
- mapKeyLengthTooLong → const ErrorCode
-
The length of one of the provided keys in the map is too long.
- cardExpired → const ErrorCode
-
The card issuer declined the request because the card is expired.
- invalidExpiration → const ErrorCode
-
The expiration date for the payment card is invalid. For example, it indicates a date in the past.
- invalidExpirationYear → const ErrorCode
-
The expiration year for the payment card is invalid. For example, it indicates a year in the past or contains invalid characters.
- invalidExpirationDate → const ErrorCode
-
The expiration date for the payment card is invalid. For example, it contains invalid characters.
- unsupportedCardBrand → const ErrorCode
-
The credit card provided is not from a supported issuer.
- unsupportedEntryMethod → const ErrorCode
-
The entry method for the credit card (swipe, dip, tap) is not supported.
- invalidEncryptedCard → const ErrorCode
-
The encrypted card information is invalid.
- invalidCard → const ErrorCode
-
The credit card cannot be validated based on the provided details.
- genericDecline → const ErrorCode
-
Square received a decline without any additional information. If the payment information seems correct, the buyer can contact their issuer to ask for more information.
- cvvFailure → const ErrorCode
-
The card issuer declined the request because the CVV value is invalid.
- addressVerificationFailure → const ErrorCode
-
The card issuer declined the request because the postal code is invalid.
- invalidAccount → const ErrorCode
-
The issuer was not able to locate the account on record.
- currencyMismatch → const ErrorCode
-
The currency associated with the payment is not valid for the provided funding source. For example, a gift card funded in USD cannot be used to process payments in GBP.
- insufficientFunds → const ErrorCode
-
The funding source has insufficient funds to cover the payment.
- insufficientPermissions → const ErrorCode
-
The Square account does not have the permissions to accept this payment. For example, Square may limit which merchants are allowed to receive gift card payments.
- cardholderInsufficientPermissions → const ErrorCode
-
The card issuer has declined the transaction due to restrictions on where the card can be used. For example, a gift card is limited to a single merchant.
- invalidLocation → const ErrorCode
-
The Square account cannot take payments in the specified region. A Square account can take payments only from the region where the account was created.
- transactionLimit → const ErrorCode
-
The card issuer has determined the payment amount is either too high or too low. The API returns the error code mostly for credit cards (for example, the card reached the credit limit). However, sometimes the issuer bank can indicate the error for debit or prepaid cards (for example, card has insufficient funds).
- voiceFailure → const ErrorCode
-
The card issuer declined the request because the issuer requires voice authorization from the cardholder.
- panFailure → const ErrorCode
-
The specified card number is invalid. For example, it is of incorrect length or is incorrectly formatted.
- expirationFailure → const ErrorCode
-
The card expiration date is either invalid or indicates that the card is expired.
- cardNotSupported → const ErrorCode
-
The card is not supported either in the geographic region or by the merchant category code (MCC).
- invalidPin → const ErrorCode
-
The card issuer declined the request because the PIN is invalid.
- invalidPostalCode → const ErrorCode
-
The postal code is incorrectly formatted.
- invalidFees → const ErrorCode
-
The app_fee_money on a payment is too high.
- manuallyEnteredPaymentNotSupported → const ErrorCode
-
The card must be swiped, tapped, or dipped. Payments attempted by manually entering the card number are declined.
- paymentLimitExceeded → const ErrorCode
-
Square declined the request because the payment amount exceeded the processing limit for this merchant.
- giftCardAvailableAmount → const ErrorCode
-
When a Gift Card is a payment source, you can allow taking a partial payment by adding the accept_partial_authorization parameter in the request. However, taking such a partial payment does not work if your request also includes tip_money, app_fee_money, or both. Square declines such payments and returns the GIFT_CARD_AVAILABLE_AMOUNT error. For more sinformation, see CreatePayment errors (additional information).
- accountUnusable → const ErrorCode
-
The account provided cannot carry out transactions.
- buyerRefusedPayment → const ErrorCode
-
Bank account rejected or was not authorized for the payment.
- delayedTransactionExpired → const ErrorCode
-
The application tried to update a delayed-capture payment that has expired.
- delayedTransactionCanceled → const ErrorCode
-
The application tried to cancel a delayed-capture payment that was already cancelled.
- delayedTransactionCaptured → const ErrorCode
-
The application tried to capture a delayed-capture payment that was already captured.
- delayedTransactionFailed → const ErrorCode
-
The application tried to update a delayed-capture payment that failed.
- cardTokenExpired → const ErrorCode
-
The provided card token (nonce) has expired.
- cardTokenUsed → const ErrorCode
-
The provided card token (nonce) was already used to process payment.
- amountTooHigh → const ErrorCode
-
The requested payment amount is too high for the provided payment source.
- unsupportedInstrumentType → const ErrorCode
-
The API request references an unsupported instrument type/
- refundAmountInvalid → const ErrorCode
-
The requested refund amount exceeds the amount available to refund.
- refundAlreadyPending → const ErrorCode
-
The payment already has a pending refund.
- paymentNotRefundable → const ErrorCode
-
The payment is not refundable. For example, a previous refund has already been rejected and no new refunds can be accepted.
- refundDeclined → const ErrorCode
-
Request failed - The card issuer declined the refund.
- invalidCardData → const ErrorCode
-
Generic error - the provided card data is invalid.
- sourceUsed → const ErrorCode
-
The provided source id was already used to create a card.
- sourceExpired → const ErrorCode
-
The provided source id has expired.
- unsupportedLoyaltyRewardTier → const ErrorCode
-
The referenced loyalty program reward tier is not supported. This could happen if the reward tier created in a first party application is incompatible with the Loyalty API.
- locationMismatch → const ErrorCode
-
Generic error - the given location does not matching what is expected.
- idempotencyKeyReused → const ErrorCode
-
The provided idempotency key has already been used.
- unexpectedValue → const ErrorCode
-
General error - the value provided was unexpected.
- sandboxNotSupported → const ErrorCode
-
The API request is not supported in sandbox.
- invalidEmailAddress → const ErrorCode
-
The provided email address is invalid.
- invalidPhoneNumber → const ErrorCode
-
The provided phone number is invalid.
- checkoutExpired → const ErrorCode
-
The provided checkout URL has expired.
- badCertificate → const ErrorCode
-
Bad certificate.
- invalidSquareVersionFormat → const ErrorCode
-
The provided Square-Version is incorrectly formatted.
- apiVersionIncompatible → const ErrorCode
-
The provided Square-Version is incompatible with the requested action.
- cardDeclined → const ErrorCode
-
The card was declined.
- verifyCvvFailure → const ErrorCode
-
The CVV could not be verified.
- verifyAvsFailure → const ErrorCode
-
The AVS could not be verified.
- cardDeclinedCallIssuer → const ErrorCode
-
The payment card was declined with a request for the card holder to call the issuer.
- cardDeclinedVerificationRequired → const ErrorCode
-
The payment card was declined with a request for additional verification.
- allowablePinTriesExceeded → const ErrorCode
-
The card has exhausted its available pin entry retries set by the card issuer. Resolving the error typically requires the card holder to contact the card issuer.
- reservationDeclined → const ErrorCode
-
The card issuer declined the refund.
- notFound → const ErrorCode
-
Not Found - a general error occurred.
- applePaymentProcessingCertificateHashNotFound → const ErrorCode
-
Square could not find the associated Apple Pay certificate.
- methodNotAllowed → const ErrorCode
-
Method Not Allowed - a general error occurred.
- notAcceptable → const ErrorCode
-
Not Acceptable - a general error occurred.
- conflict → const ErrorCode
-
Conflict - a general error occurred.
- gone → const ErrorCode
-
The target resource is no longer available and this condition is likely to be permanent.
- requestEntityTooLarge → const ErrorCode
-
Request Entity Too Large - a general error occurred.
- unsupportedMediaType → const ErrorCode
-
Unsupported Media Type - a general error occurred.
- unprocessableEntity → const ErrorCode
-
Unprocessable Entity - a general error occurred.
- rateLimited → const ErrorCode
-
Not Implemented - a general error occurred.
- notImplemented → const ErrorCode
-
A general access error occurred.
- badGateway → const ErrorCode
-
Bad Gateway - a general error occurred.
-
Service Unavailable - a general error occurred.
- temporaryError → const ErrorCode
-
A temporary internal error occurred. You can safely retry your call using the same idempotency key.
- gatewayTimeout → const ErrorCode
-
Gateway Timeout - a general error occurred.
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited