Collect invoice payment by redeeming a guest's gift card

This API helps you to collect payment for the amount of an invoice by redeeming the balance of a guest’s gift card.

You must first verify the balance of a guest’s gift card. If the gift card contains sufficient balance, you can then call this API to collect payment for the specified invoice.

This gift card redemption for an invoice enables you to display the relevant details in your Zenoti UI, and map it to the respective fields in Reports and Analytics.

You must specify appropriate data for the invoice_id parameter.

Request Body Details

NameTypeDescription
card_numberstringNumber of the guest's gift card that is to be redeemed for the payment of the specified invoice.
amountdecimalTotal amount of the invoice, including the tip amount.
tip_amountdecimalTip amount included in the invoice.

Response Details

NameTypeDescription
is_appliedbooleanIndicates whether the guest's gift card balance has been applied for the invoice payment.
paymentobjectObject that contains details about various payment-related elements. For more information, refer to the payment table below.
errorobjectObject that contains error message and error code details. For more information, refer to the error table below.

payment

NameTypeDescriptionn
payment_optionobjectObject that contains details about various payment option-related elements. For more information, refer to the payment_option table below.
total_amount_paiddecimalTotal amount (including the tip amount) redeemed from the guest's gift card.
amount_paiddecimalAmount redeemed from the guest's gift card for the invoice, excluding the tip amount.
tip_amountdecimalTip amount redeemed from the guest's gift card.
ssg_amountdecimalThe service charge amount redeemed from the guest's gift card.
fee_amountdecimalThe environment fee amount redeemed from the guest's gift card.
cash_back_amountdecimalThe amount received by the guest as cashback for the gift card redemption.
transaction_idguidUnique 32-character identifier of the guest's transaction.
payment_datedatetimeDate and time on which the invoice payment was redeemed from the guest's gift card.
cash_regester_idguidUnique 32-character identifier of the cash register to which the guest's gift card redemption amount was added.

payment_option

NameTypeDescription
idguidUnique 32-character identifier of the selected payment option.
payment_modeenumIndicates the mode of invoice payment: NotSpecified = -1, Cash = 0, GiftCard = 1, Membership = 2, Package = 3, Custom = 4, CreditCard = 5, Cheque = 6, LoyaltyPoints = 7, Cashback = 8, and PrepaidCard = 9. If you do not specify payment_mode as 1 or if you do not specify any value for payment_mode, the default payment method saved for the guest is considered.
payment_namestringName of the payment option used by the guest.
card_numberstringNumber of the guest's gift card redeemed to make the invoice payment.
additional_datastringAny additional details on the guest's gift card redemption.

error

NameTypeDescription
codeintStatus code that represents the type of the error.
messagestringMessage that describes the error.

Error Message Details

Error MessageError CodeDescription
Card Number Not found.502If the guest's gift card number is not valid.
Gift Card Not found.436If the guest's gift card details could not be retrieved.
Gift Card Not Supported For Paying Tips.502If gift card redemption is not supported to pay tips.
You cannot add payment here, since this invoice was associated with a group.492If the guest's gift card redemption is to be made for a Group invoice. Currently, you cannot redeem gift cards for Group invoices.
Payment cannot be added for closed invoice.728If the invoice has already been closed, you cannot redeem a guest's gift card to collect payment for that invoice.
Amount has to be greater than 0.4002If the gift card redemption amount for the invoice is zero or fewer than zero.
Invalid Giftcard. This is gift credit which can not be used for payment.491If the guest's gift card balance does not support payment for invoices.
User was not found.405If the guest details could not be retrieved.
Gift Card could not be applied.434If the guest's gift card could not be applied to collect payment for the invoice.
Invoice does not exists.428If the invoice ID is not valid.
Payment is already made in full468If full payment for the invoice has already been completed.
Gift card is not supported for paying gratuity499If the guest's specified guest card does not support the payment of gratuity.
Invalid Giftcard. A card with this number was not sold. Or Cross Center redemption is off and gift card wasn't sold in this center. Gift card number : 1531212If the guest's gift card is not valid. Or, if the cross center redemption for the gift card was turned OFF. Or, if the gift card was not sold at the center.
This Giftcard is already expired. Gift card number : 1531213If the guest's gift card has already expired.
This Giftcard is one time use and is already used. Gift card number : 1531214If the guest's gift card balance can only be redeemed once, and the guest has already redeemed the gift card.
This giftcard can only be used in Hyderabadd center. Gift card number : 1531215If the guest's gift card can only be redeemed at a center in Hyderabad.
There is no sufficient balance in your gift card. Current Balance(0)4008If the guest's gift card does not contain sufficient balance to pay for the invoice.
Error While Adding Payment.716If the guest's gift card could not be redeemed to pay for the invoice.
unable to add payment.4023If the guest's gift card could not be used to pay for the invoice.
Language
Credentials
Header
Click Try It! to start a request and see the response here!