This guide will be removed on April 29, 2022. Please use our new, easier-to-use Toast technical documentation site. All updated content is on the new site.

Response status types

The following table describes the response status types that your gift card provider service can send to the Toast platform. Your gift card integration API implementation returns a transaction status identifier in the transactionStatus value of the GiftCardTransactionResponse object.

Transaction status

Description

ACCEPT

The transaction was handled successfully.

ERROR_TOAST_TRANSACTION_TYPE_NOT_SUPPORTED

Your implementation does not handle the optional transaction type that was supplied in the request.

Return this response status type when the request transaction type is one of the types defined by the gift card integration API specification but you have decided not to support it.

ERROR_INVALID_TOAST_TRANSACTION_TYPE

The transaction type identifier supplied in the Toast-Transaction-Type header parameter of the request is not one of the recognized transaction types.

Return this response status type when the request transaction type is not one of the types defined by the gift card integration API specification.

ERROR_CARD_ALREADY_ACTIVATED

The transaction attempted to activate a gift card that is already active.

ERROR_CARD_NOT_ACTIVATED

The gift card is not active.

Note

In some situations, the Toast platform might make a transaction request to verify that a gift card is not already active. In this situation, the Toast platform expects to receive a ERROR_CARD_NOT_ACTIVATED transaction status. For more information, see Multiple requests for a gift card transaction.

ERROR_CARD_INVALID

The gift card identifier is not in the set of identifiers that correspond to the current restaurant.

For example, if a gift card identifier is entered incorrectly or if the gift card identifier corresponds to a different restaurant location, your implementation returns this status.

ERROR_INVALID_INPUT_PROPERTIES

The values that the Toast platform supplied in the GiftCardTransaction object in the request message body do not match the requirements of the transaction type.

ERROR_TRANSACTION_DOES_NOT_EXIST

The transaction specified by a GIFTCARD_REVERSE type request does not exist.

ERROR_INVALID_TOKEN

The authentication token supplied in the Authorization header parameter is invalid or cannot be validated. For information about request authentication, see Gift card integration authentication.

ERROR_TRANSACTION_CANNOT_BE_REVERSED

The transaction specified by a GIFTCARD_REVERSE type request cannot be reversed. The following transaction types cannot be reversed:

  • GIFTCARD_GET_BALANCE

  • GIFTCARD_REVERSE

  • Transactions that have already been reversed

ERROR_INVALID_RESTAURANT

The restaurant identifier included in the Toast-Restaurant-External-ID header parameter of the request is not recognized by the gift card provider integration implementation.

You receive the identifiers for Toast platform restaurants from the Toast technical partnership team when you implement your gift card integration.