> For the complete documentation index, see [llms.txt](https://docs.liquidcommerce.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.liquidcommerce.cloud/events-and-errors/checkout-status-codes.md).

# Checkout Status Codes

Unlike cart events, checkout operations use strict error handling with specific status codes. When an error occurs, the operation fails with a corresponding error code and message: the response body carries the code in `statusCode` and a shopper-safe text in `message`. Checkout errors return HTTP 400, except a coupon rejected at completion (`5600`), which returns HTTP 422.

#### Status Enums <a href="#status-enums" id="status-enums"></a>

```typescript
enum ENUM_CHECKOUT_STATUS_CODE_ERROR {
  REQUEST_DEFAULT_ERROR = 5480,
  REQUEST_LOCATION_OOS_ERROR = 5481,
  REQUEST_LOCATION_MISMATCH_ERROR = 5482,
  REQUEST_BIRTHDATE_ERROR = 5483,
  REQUEST_CART_NOT_AVAILABLE_ERROR = 5484,
  REQUEST_CART_ID_ERROR = 5485,
  REQUEST_CART_ITEM_ERROR = 5486,
  REQUEST_VALIDATION_ERROR = 5487,
  REQUEST_TAX_ERROR = 5488,
  REQUEST_COMPLETE_TOKEN = 5489,
  REQUEST_DEFAULT_COMPLETE_ERROR = 5490,
  REQUEST_CHECKOUT_COMPLETE_UPDATE_ERROR = 5491,
  REQUEST_CHECKOUT_COMPLETE_SAVE_ERROR = 5492,
  REQUEST_CHECKOUT_HAS_COMPLETE_ERROR = 5493,
  REQUEST_NO_CART_ITEM_ERROR = 5494,
  REQUEST_NO_CUSTOMER_FOUND_ERROR = 5495,
  REQUEST_PAYMENT_ATTACHED_ERROR = 5496,
  REQUEST_SHIPPING_ADDRESS_ERROR = 5497,
  REQUEST_BILLING_ADDRESS_ERROR = 5498,
  REQUEST_PAYMENT_NOT_FOUND_ERROR = 5499,
  REQUEST_CART_UPDATED_ERROR = 5501,
  REQUEST_ADDRESS_DEFAULT_ERROR = 5502,
  REQUEST_TIPS_ERROR = 5503,
  REQUEST_COMPLETE_CUSTOMER_MISSING_FIELDS = 5504,
  REQUEST_RETAILER_HOURS_ERROR = 5505,
  REQUEST_ITEM_QUANTITY_CHANGE_ERROR = 5506,
  REQUEST_MAX_QUANTITY_PER_ORDER_ERROR = 5507,
  REQUEST_PRESALE_NOT_STARTED_ERROR = 5508,
  REQUEST_CART_MIN_RETAILER_NOT_MET_ERROR = 5509,
  REQUEST_CHECKOUT_PROCESSING_LOCK_NOT_ACQUIRED_ERROR = 5510,
  REQUEST_BOPIS_PRODUCT_NOT_OPTED_IN_ERROR = 5511,
  REQUEST_PAYMENT_PLATFORM_MISMATCH_ERROR = 5512,
  REQUEST_PAYMENT_VERIFICATION_ERROR = 5513,
  REQUEST_EXPRESS_AUTHORIZATION_MISMATCH_ERROR = 5514,
}
enum ENUM_CHECKOUT_STATUS_CODE_MESSAGE {
  REQUEST_DEFAULT_ERROR = "There's been an error with your checkout request.",
  REQUEST_LOCATION_OOS_ERROR = 'The requested items are out of stock at this location.',
  REQUEST_LOCATION_MISMATCH_ERROR = "The selected location doesn't match your cart items.",
  REQUEST_BIRTHDATE_ERROR = 'Please verify your birthdate and try again.',
  REQUEST_CART_NOT_AVAILABLE_ERROR = 'This cart is no longer available.',
  REQUEST_CART_ID_ERROR = 'The cartId requested is invalid, check and try again.',
  REQUEST_CART_ITEM_ERROR = "There's an issue with one or more items in your cart.",
  REQUEST_VALIDATION_ERROR = "There's been an error with your request parameters, check and try again.",
  REQUEST_TAX_ERROR = 'There was an error calculating tax for your order.',
  REQUEST_COMPLETE_TOKEN = 'The checkout token provided is invalid, check and try again.',
  REQUEST_DEFAULT_COMPLETE_ERROR = 'There was an error completing your checkout, please try again later.',
  REQUEST_CHECKOUT_COMPLETE_UPDATE_ERROR = 'Unable to update your checkout status.',
  REQUEST_CHECKOUT_COMPLETE_SAVE_ERROR = 'Unable to save your completed checkout.',
  REQUEST_CHECKOUT_HAS_COMPLETE_ERROR = 'This checkout has already been processed, create a new cart to process a new checkout.',
  REQUEST_NO_CART_ITEM_ERROR = 'Item(s) in your cart are no longer available.',
  REQUEST_NO_CUSTOMER_FOUND_ERROR = 'The customer account was not found.',
  REQUEST_PAYMENT_ATTACHED_ERROR = 'The payment attached to the checkout is not a valid payment method for this customer.',
  REQUEST_SHIPPING_ADDRESS_ERROR = 'The address in your cart has changed, check and try again.',
  REQUEST_BILLING_ADDRESS_ERROR = 'The billing address in your checkout is not valid, check and try again.',
  REQUEST_PAYMENT_NOT_FOUND_ERROR = 'The payment method provided was not found.',
  REQUEST_CART_UPDATED_ERROR = 'The cart requested was updated during your checkout.',
  REQUEST_ADDRESS_DEFAULT_ERROR = "There's been an error with your address configurations in cart and/or billing address, check and try again.",
  REQUEST_TIPS_ERROR = "There's been an error applying your tips to the checkout.",
  REQUEST_COMPLETE_CUSTOMER_MISSING_FIELDS = 'Customer profile information is incomplete. Please provide all required details.',
  REQUEST_RETAILER_HOURS_ERROR = 'The retailer is currently closed or on-demand hours are not available.',
  REQUEST_ITEM_QUANTITY_CHANGE_ERROR = 'Some items in your cart exceed available stock quantities. Please adjust your cart and try again.',
  REQUEST_MAX_QUANTITY_PER_ORDER_ERROR = 'You have exceeded the maximum quantity allowed per order for one or more items in your cart.',
  REQUEST_PRESALE_NOT_STARTED_ERROR = 'The presale for this item has not started yet. Please check back later.',
  REQUEST_CART_MIN_RETAILER_NOT_MET_ERROR = 'Some items in your cart do not meet the minimum retailer requirements per order quantity. Please adjust your cart and try again.',
  REQUEST_CHECKOUT_PROCESSING_LOCK_NOT_ACQUIRED_ERROR = 'This checkout is currently being processed, please try again later.',
  REQUEST_BOPIS_PRODUCT_NOT_OPTED_IN_ERROR = 'One or more items in your cart are no longer eligible for in-store pickup (BOPIS) and were removed. Please review your cart and try again.',
  REQUEST_PAYMENT_PLATFORM_MISMATCH_ERROR = 'This payment method is not available for this checkout. Please re-enter your card details.',
  REQUEST_PAYMENT_VERIFICATION_ERROR = "We couldn't verify your payment information. Please check your card details and billing address, then try again.",
  REQUEST_EXPRESS_AUTHORIZATION_MISMATCH_ERROR = 'Your order changed since you approved it with your wallet. Please approve the payment again.',
}
```

#### Payment Status Enums <a href="#payment-status-enums" id="payment-status-enums"></a>

When a card fails during `/checkout/complete`, the payment service's code and message are returned in the same `statusCode` and `message` fields.

```typescript
enum ENUM_PAYMENT_STATUS_CODE_ERROR {
  PAYMENT_METHOD_INVALID = 8100,
  PAYMENT_METHOD_NOT_ON_FILE = 8101,
  PAYMENT_METHOD_EXPIRED = 8102,
  PAYMENT_DECLINED = 8103,
  PAYMENT_AUTHENTICATION_REQUIRED = 8104,
  PAYMENT_CARD_ERROR = 8105,
  PAYMENT_INSUFFICIENT_FUNDS = 8106,
  PAYMENT_CURRENCY_MISMATCH = 8107,
  PAYMENT_AMOUNT_TOO_LARGE = 8108,
  PAYMENT_AMOUNT_TOO_SMALL = 8109,
  PAYMENT_INVALID_CVC = 8110,
  PAYMENT_INVALID_EXPIRY = 8111,
  PAYMENT_CARD_DECLINED = 8112,
  PAYMENT_CARD_RESTRICTED = 8113,
  PAYMENT_PROCESSING_ERROR = 8114,
  PAYMENT_CUSTOMER_MAX_PAYMENT_ATTEMPTS = 8115,
  PAYMENT_INVALID_ACCOUNT = 8116,
  PAYMENT_RISK_LEVEL_HIGH = 8117,
  PAYMENT_STRIPE_ACCOUNT_ERROR = 8118,
  PAYMENT_STRIPE_API_ERROR = 8119,
  PAYMENT_STRIPE_RATE_LIMIT = 8120,
  PAYMENT_METHOD_UNSUPPORTED = 8121,
  PAYMENT_METHOD_NOT_FOUND = 40003,
}
enum ENUM_PAYMENT_STATUS_CODE_MESSAGE {
  PAYMENT_METHOD_INVALID = 'Invalid payment method provided',
  PAYMENT_METHOD_NOT_ON_FILE = 'Payment method not found',
  PAYMENT_METHOD_EXPIRED = 'Payment method has expired',
  PAYMENT_DECLINED = 'Payment was declined',
  PAYMENT_AUTHENTICATION_REQUIRED = 'Payment requires authentication',
  PAYMENT_CARD_ERROR = 'There was an error processing the card',
  PAYMENT_INSUFFICIENT_FUNDS = 'Insufficient funds in the account',
  PAYMENT_CURRENCY_MISMATCH = 'Currency mismatch in the payment',
  PAYMENT_AMOUNT_TOO_LARGE = 'Payment amount exceeds the maximum allowed',
  PAYMENT_AMOUNT_TOO_SMALL = 'Payment amount is below the minimum allowed',
  PAYMENT_INVALID_CVC = 'Invalid card CVC provided',
  PAYMENT_INVALID_EXPIRY = 'Invalid card expiry date',
  PAYMENT_CARD_DECLINED = 'The card was declined',
  PAYMENT_CARD_RESTRICTED = 'The card has restrictions preventing this payment',
  PAYMENT_PROCESSING_ERROR = 'An error occurred while processing the payment',
  PAYMENT_CUSTOMER_MAX_PAYMENT_ATTEMPTS = 'Maximum payment attempts reached for this customer',
  PAYMENT_INVALID_ACCOUNT = 'The account provided is invalid',
  PAYMENT_RISK_LEVEL_HIGH = 'The payment was flagged as high risk',
  PAYMENT_STRIPE_ACCOUNT_ERROR = 'There was an error with the Stripe account',
  PAYMENT_STRIPE_API_ERROR = 'An error occurred with the Stripe API',
  PAYMENT_STRIPE_RATE_LIMIT = 'Stripe rate limit exceeded',
  PAYMENT_METHOD_UNSUPPORTED = 'The payment method is not supported for this transaction',
  PAYMENT_METHOD_NOT_FOUND = 'Payment method not found',
}
```

#### Discount Status Enums <a href="#discount-status-enums" id="discount-status-enums"></a>

A coupon that stops qualifying fails completion with HTTP 422. The `message` carries the coupon's reason, for example "This coupon does not meet the required conditions".

```typescript
enum ENUM_DISCOUNT_STATUS_CODE_ERROR {
  REQUEST_COUPON_REJECTED_AT_COMPLETE_ERROR = 5600,
}
```

#### Error Categories <a href="#error-categories" id="error-categories"></a>

**General Errors (548X)**

* `5480`: Default checkout error
* `5487`: Parameter validation error
* `5488`: Tax calculation error

**Inventory & Location (548X-550X)**

* `5481`: Items out of stock at location
* `5482`: Location mismatch error
* `5505`: Retailer closed or on-demand hours unavailable
* `5506`: Item quantity exceeds available stock

**Cart-Related (548X-551X)**

* `5484`: Cart no longer available
* `5485`: Invalid cart ID
* `5486`: Issue with cart items
* `5494`: Empty cart error
* `5501`: Cart updated during checkout
* `5507`: Maximum quantity per order exceeded
* `5508`: Presale not started
* `5509`: Retailer minimum quantity not met
* `5511`: Items no longer eligible for in-store pickup (BOPIS)

**Customer & Verification (548X-550X)**

* `5483`: Age verification error
* `5495`: Customer account not found
* `5504`: Customer profile missing required fields

**Checkout Process (548X-551X)**

* `5489`: Invalid checkout token
* `5490`: Default completion error
* `5491`: Status update error
* `5492`: Unable to save checkout
* `5493`: Checkout already processed
* `5510`: Checkout currently being processed

**Payment & Address (549X-551X)**

* `5496`: Invalid payment method
* `5497`: Shipping address error
* `5498`: Invalid billing address
* `5499`: Payment method not found
* `5502`: Address configuration error
* `5512`: Payment method belongs to a different checkout platform
* `5513`: Payment information could not be verified
* `5514`: Order changed after wallet (express) approval

**Payment Declines (81XX)**

* `8100`: Invalid payment method
* `8101`: Payment method not on file
* `8102`: Card expired
* `8103`: Payment declined
* `8104`: Authentication required
* `8105`: Card processing error
* `8106`: Insufficient funds
* `8107`: Currency mismatch
* `8108`: Amount above maximum
* `8109`: Amount below minimum
* `8110`: Invalid CVC
* `8111`: Invalid expiry date
* `8112`: Card declined
* `8113`: Card restricted
* `8114`: Payment processing error
* `8115`: Too many payment attempts
* `8116`: Invalid account
* `8117`: Payment flagged as high risk
* `8118`: Payment provider account error
* `8119`: Payment provider error
* `8120`: Payment provider rate limit
* `8121`: Payment method not supported
* `40003`: Payment method not found

**Additional Services**

* `5503`: Tips application error
* `5600`: Coupon rejected at completion (HTTP 422)
