Your Toast POS loyalty integration interface implementation must return the following HTTPS responses to the requests that it receives from the Toast platform.
200 means OK and has predefined success status in the response
-
ACCEPT- The loyalty service provider processed the transaction successfully.
400 has predefined errors in the response status
-
ERROR_INVALID_TOAST_TRANSACTION_TYPE- The requestedToast-Transaction-Typeis not valid. -
ERROR_ACCOUNT_INVALID- The loyalty account is not recognized or is not valid at the current restaurant. -
ERROR_INVALID_INPUT_PROPERTIES- The specified JSON properties in the request body are not valid. -
ERROR_TRANSACTION_DOES_NOT_EXIST- The transaction that is being requested to be reversed does not exist. Only occurs on aLOYALTY_REVERSEtransaction. -
ERROR_INVALID_TOKEN- The token supplied in theAuthorizationheader field is invalid or cannot be validated. -
ERROR_TRANSACTION_CANNOT_BE_REVERSED- The specified transaction cannot be reversed. OnlyLOYALTY_REDEEMandLOYALTY_ACCRUEtransactions can be reversed. -
ERROR_INVALID_RESTAURANT- The restaurant specified by theToast-Restaurant-External-IDis invalid. -
ERROR- The request cannot be processed for a reason that is not described by any of the other error states. You can include amessagevalue in theLoyaltyTransactionResponseobject to display a custom error message string to the restaurant employee. For more information, see Custom error messages.
500 unexpected error
To include a custom error
message, you add a message value to the
LoyaltyTransactionResponse object that you return to the
Toast platform.
|
Note |
|
The error message you submit does not appear on the Toast POS. Submitting a custom message allows your team and the Toast team to understand error trends in logs, but servers and guests will not see this message. |
LoyaltyTransactionResponse object that includes a custom error message
{
"transactionStatus": "ERROR",
"message": "This is my helpful message about the error condition."
}