Errors

Catch uses conventional HTTP response codes to indicate the success or failure of an API request.

Failure Response (400)

400 Bad Request
{
  "error_type":"INVALID_REQUEST",
  "message":"Gift card in cart."
}

Failure codes in the 4XX range indicate an error that occurred given the information provided.

Error TypeStatus CodeError Message(s)Notes
BAD_REQUEST_BODY_FORMAT400"Request is invalid. Check data for specifics."The data parameter that is also included will have the specifics of what fields are incorrect
CHECKOUT_EXPIRED404N/AThe related checkout has expired.
USER_DEACTIVATED400"Cannot create this order."The attempted purchase/refund cannot be processed due to deactivated Catch account.
GIFT_CARD_IN_CART400N/ACatch cannot be used to purchase gift cards.
INVALID_REQUEST400During checkout creation:
- "Gift card in cart."
- “Currency {currency} is not supported."
- “Order total above limit."
- "Merchant not live."

During purchase creation:
- "Unable to create purchase for checkout_id {checkout_id}. Error code: {description}.”

During refund creation:
- "Unable to create refund for purchase_id {purchase_id}. Error code: {description}” message
This error is possible during POST Checkout, POST Purchase, and POST Refund.
NOT_AUTHORIZED401- "Missing required public-key header."
- "Missing required x-api-key header."
- "Missing secret for public key {public_key}."
- "Invalid secret for public key {public_key}."
Applicable to all external Catch API endpoints
NOT_FOUND404N/AThe resource in the request doesn’t exist or doesn’t match the associated private/public key pair.
ORDER_TOTAL_EXCEEDS_MAXIMUM400N/AThe order total exceeds the maximum allowed by Catch.
UNSUPPORTED_CURRENCY400N/AThe currency of this order is not currently supported by Catch.