Redeem Voucher

Redeem a voucher for a loyalty program member. The status of the voucher gets updated to redeemed and the use date gets updated to the current date.

51.0

No

POST

Parameter NameTypeDescriptionRequired or OptionalAvailable Version
membershipNumberStringThe loyalty program membership number.Required51.0
programNameStringThe loyalty program name.Required51.0
voucherCodeStringThe voucher code to be redeemed.Required51.0
voucherNumberStringThe auto-generated voucher number.Optional55.0

Note: The voucher definition associated with the voucher code must be active to redeem the voucher.

Note: Use this query parameter if multiple vouchers exist with the same voucher code.

The request body is available in version 53.0 and later.

JSON Example

JSON example to redeem vouchers using contactId or accountID.

Provide contactId to redeem the voucher. If accountID is provided, then the associated contactId is fetched and the voucher is redeemed

Properties

NameTypeDescriptionRequired or OptionalAvailable Version
contactIDStringID of the contact associated with the account.Optional62.0
currencyIsoCodeStringThree-letter ISO 4217 currency code of the monetary currency in which the voucher is redeemed.Optional55.0
redeemAmountDoubleThe value of the voucher to be redeemed. Specify a value when a member hasn’t redeemed the full value of the voucher. This value is only applicable for vouchers issued using Fixed Value voucher definitions. A value isn’t required when the member has redeemed the complete value of the voucher in a single transaction.Optional53.0
actionReservationActionThe action to change the status of a voucher. Valid values are Reserve, Reinstate, or Redeem. If you don’t specify an action, the default behavior changes voucher status from Issued to Redeemed.Required when changing the voucher status from Issued to Reserved, or from Reserved to Issued or Redeemed. Otherwise it is optional.62.0
reservedValueCurrencySpecify the amount reserved for partially redeemable vouchers.Optional62.0
reservationKeyStringSpecify the key used to redeem or reinstate a reserved voucher.Optional62.0

Note: If you don’t specify a value to be redeemed for the fixed-value voucher, the voucher status changes to Redeemed, and the remaining value becomes zero.

Redeem Voucher Output (available in version 53.0 and later)

This table lists HTTP response code descriptions that are unique to this resource.

HTTP Response CodeError CodeDescription
400INVALID_API_INPUTThe voucher is expired. Specify a voucher that hasn’t expired.
400INVALID_API_INPUTThe voucher is canceled. Specify a voucher that hasn’t canceled.
400INVALID_API_INPUTSpecify a valid voucher code and try again.
400INVALID_API_INPUTSpecify a valid loyalty program name and try again.
400INVALID_API_INPUTSpecify a valid loyalty program membership number and try again.
400INVALID_API_INPUTThe voucher definition is inactive. Specify a voucher that’s associated with an active voucher definition.
409ALREADY_REDEEMED_VOUCHERThe voucher is redeemed. Specify a voucher that hasn’t redeemed.
500MULTIPLE_VOUCHERSDuplicate vouchers for this voucher code. Either specify a different voucher code or ask your Salesforce admin for help.
500UNKOWN_EXCEPTIONThe voucher redemption failed. Try again or ask your Salesforce admin for help.

See Also