square
Square API Error Codes
Error codes returned in the code field of the errors array by the Square API (Payments, Orders, Checkout, and related endpoints). Every error also carries a category field grouping it as an API, authentication, invalid request, rate limit, or payment method error.
51 codes
references developer.squareup.com/reference/square/enums/ErrorCodedeveloper.squareup.com/docs/build-basics/general-considerations/handling-errors
· All codes 51 codes
- ACCESS_TOKEN_EXPIRED Access Token Expired The OAuth access token used to make the request has expired. The application must obtain a new access token before retrying.
- ACCESS_TOKEN_REVOKED Access Token Revoked The access token used to make the request has been revoked, typically because the seller deauthorized the application.
- AMOUNT_TOO_HIGH Amount Too High The payment amount exceeds the maximum Square allows for a single transaction.
- APPLICATION_DISABLED Application Disabled The application making the request has been disabled by Square.
- BAD_REQUEST Bad Request The request was malformed — for example, the JSON body could not be parsed.
- CARD_DECLINED Card Declined The card was declined for an unspecified reason. Ask the buyer to contact their card issuer or try a different payment method.
- CARD_DECLINED_CALL_ISSUER Card Declined - Call Issuer The card issuer declined the payment and requires the buyer to contact them directly before the card can be used again.
- CARD_EXPIRED Card Expired The card used for the payment has expired. Ask the buyer to use a different payment method.
- CARD_PROCESSING_NOT_ENABLED Card Processing Not Enabled The seller's account is not able to process card payments.
- CARD_TOKEN_EXPIRED Card Token Expired The card nonce used to represent the card has expired and can no longer be used to create a payment.
- CARD_TOKEN_USED Card Token Used The card nonce has already been used to create a payment and cannot be reused.
- CHECKOUT_EXPIRED Checkout Expired The Checkout session has expired and can no longer be completed.
- CONFLICT Conflict The request conflicts with the current state of the target resource, for example a version mismatch on an update.
- CONFLICTING_PARAMETERS Conflicting Parameters Two or more parameters in the request conflict with each other and cannot be satisfied together.
- FORBIDDEN Forbidden The caller does not have permission to execute the specified request.
- GATEWAY_TIMEOUT Gateway Timeout Square's servers did not receive a timely response from an upstream service while processing the request.
- IDEMPOTENCY_KEY_REUSED Idempotency Key Reused The idempotency_key was previously used with a different request body, so the new request was rejected to avoid an unintended duplicate operation.
- INCORRECT_TYPE Incorrect Type A provided parameter is of the wrong type.
- INSUFFICIENT_SCOPES Insufficient Scopes The access token does not have the OAuth permission scopes required to perform this request.
- INTERNAL_SERVER_ERROR Internal Server Error An unexpected error occurred on Square's servers while processing the request.
- INVALID_CARD Invalid Card The card information provided is invalid, for example an invalid card number.
- INVALID_CARD_DATA Invalid Card Data The card data provided in the request could not be processed.
- INVALID_CURSOR Invalid Cursor The pagination cursor provided in the request is invalid or has expired.
- INVALID_ENUM_VALUE Invalid Enum Value A provided value is not one of the fixed set of values allowed for that field.
- INVALID_EXPIRATION Invalid Expiration The card's expiration date is invalid.
- INVALID_TIME Invalid Time A provided timestamp value is invalid or could not be parsed.
- INVALID_TIME_RANGE Invalid Time Range The provided start and end times form an invalid range, for example the end time is before the start time.
- INVALID_VALUE Invalid Value A provided parameter has a value that is not valid for that field.
- LOCATION_MISMATCH Location Mismatch The location ID in the request does not match the location associated with the resource being accessed.
- METHOD_NOT_ALLOWED Method Not Allowed The HTTP method used is not supported by this endpoint.
- MISSING_REQUIRED_PARAMETER Missing Required Parameter The request is missing a required path, query, or body parameter.
- NOT_FOUND Not Found The requested resource could not be found.
- NOT_IMPLEMENTED Not Implemented The requested endpoint or feature is not implemented.
- PAYMENT_NOT_REFUNDABLE Payment Not Refundable The payment cannot be refunded, for example because it has already been fully refunded or is too old to refund.
- RATE_LIMITED Rate Limited The application has sent too many requests in a given time period. Retry after backing off.
- REFUND_ALREADY_PENDING Refund Already Pending A refund for this payment is already pending, so a new refund request cannot be created.
- REFUND_AMOUNT_INVALID Refund Amount Invalid The requested refund amount is invalid, for example it exceeds the amount still available to refund.
- REQUEST_ENTITY_TOO_LARGE Request Entity Too Large The request body exceeds the maximum size Square allows.
- REQUEST_TIMEOUT Request Timeout Square's servers timed out waiting for the request to complete.
- SERVICE_UNAVAILABLE Service Unavailable Square's servers are temporarily unable to handle the request. Retry with backoff.
- UNAUTHORIZED Unauthorized The request is not authorized. The access token is missing, malformed, or otherwise invalid.
- UNKNOWN_QUERY_PARAMETER Unknown Query Parameter The request includes a query parameter that is not recognized by the endpoint.
- UNSUPPORTED_CARD_BRAND Unsupported Card Brand The card's brand is not supported by Square.
- VALUE_EMPTY Value Empty A provided value is empty but a non-empty value is required for that field.
- VALUE_REGEX_MISMATCH Value Regex Mismatch A provided string value does not match the format required for that field.
- VALUE_TOO_HIGH Value Too High A provided numeric value is higher than the maximum allowed for that field.
- VALUE_TOO_LONG Value Too Long A provided value is longer than the maximum length allowed for that field.
- VALUE_TOO_LOW Value Too Low A provided numeric value is lower than the minimum allowed for that field.
- VALUE_TOO_SHORT Value Too Short A provided value is shorter than the minimum length allowed for that field.
- VERIFY_AVS_FAILURE AVS Verification Failure The card's billing address could not be verified by the issuing bank (an AVS check failure).
- VERIFY_CVV_FAILURE CVV Verification Failure The card's CVV could not be verified by the issuing bank.