post https://api.zenoti.com/v1/invoices//payments/loyalty_points
Use this API to redeem a guest’s applicable loyalty points while taking payment for an invoice.
You must specify appropriate details for the InvoiceId
parameter in the API request. Optionally, you can provide the required value for the expand
parameter.
In addition, you can specify the necessary details for the body parameters.
Request Body Details
Name | Type | Description |
---|---|---|
points | decimal | Number of loyalty points that can be redeemed for the payment of this invoice. |
center_id | guid | Unique 32-character identifier of the center at which the loyalty points redemption is applicable. |
program_id | guid | Unique 32-character identifier of the guest's loyalty program by using which loyalty points can be redeemed. |
cash_register_id | guid | Unique 32-character identifier of the cash register that is used to receive payment for the invoice. |
redeem_across_programs | int | Indicates whether the guest's loyalty points can be redeemed for all loyalty programs or for a particular loyalty program. 0 - Guest's loyalty points can be redeemed for a particular loyalty program. 1 - Guest's loyalty points can be redeemed for all loyalty programs. Default value: 0. Note: If you specify the value of this parameter as 1, the API does not prioritize the value of the lp_program_id parameter. |
otp | string | OTP that the guest receives to redeem the applicable loyalty points. |
Response Details
Name | Type | Description |
---|---|---|
payment | object | Object that contains the invoice payment-related details. |
redemptions | object | Object that contains the loyalty points redemption-related details. |
invoice | object | Object that contains the invoice details-related elements. |
error | object | Object that contains error message and error code details. For more information, refer to the error Object table. |
error Object
code | message |
---|---|
502 | Points to redeem can not be more than the Points Balance. Current balance: 6430. |
502 | Invalid points. |
502 | InvoiceId is not passed. |
502 | Invalid CenterId. |
502 | Please enter a valid OTP. |
502 | Balance Insufficient. |
502 | Redemptions cannot be applied once a payment is made using a pre-paid instrument such as membership, gift card, pre-paid card or loyalty points. To continue with redemption, you must first remove these payments. |
502 | ProgramId is not valid. |
502 | Points to redeem can not be more than the Maximum points allowed for redemption. Max points to redeem: 9.00. |
502 | Can not redeem points to purchase any items as per the organization settings. |
502 | Loyalty points can not be used to redeem any item in the invoice. |
502 | Points to redeem should be in the multiples of 3. |
502 | Can't redeem points as the guest is in non redeemable tier. |