Skip to navigation

Redeem Voucher

Redeem Voucher API endpoint allows the user to redeem a specific voucher. The voucher’s status will be updated in the system marking it as redeemed, and the system returns the details of the redeemed voucher including user and voucher information.

Request Body

  • user_voucher_id (string): The unique identifier of the voucher the user wants to redeem.

  • amount (number): The amount of the voucher to be redeemed.

Response

  • status (number): The status indicates the successful redemption of a voucher (1 means success).

The user field in the response indicates the user who redeemed the voucher:

  • user (object):

    • user_id (string): The unique identifier of the user.

    • name (string): The name of the user.

    • username (string): The username of the user.

    • email (string): The email address of the user.

    • And more fields providing details about the user.

The user_info field in the response provides additional details about the user:

  • user_info (object):

    • user_info_id (string): The unique identifier of the user’s information.

    • user_id (string): The unique identifier of the user.

    • country_id (number): The identifier of the user’s country.

    • currency_id (number): The identifier of the user’s currency.

    • age (number): The age of the user.

    • gender (string): The gender of the user.

    • And more fields providing further details about the user.

The userVoucher field in the response provides details about the redeemed voucher:

  • userVoucher (object):

    • user_voucher_id (string): The unique identifier of the user’s redeemed voucher.

    • voucher_id (string): The identifier of the voucher.

    • barcode_id (string): The identifier of the barcode associated with the voucher.

    • user_receiver_id (string): The identifier of the user who received the voucher.

    • message (string): A message related to the voucher.

    • expiry_date (string): The date when the voucher will expire.

    • And more fields providing further details about the voucher.

Response

Redeem Voucher
messagestringOptional
apibooleanOptional
statusstringOptional
dataobjectOptional