Skip to main content
The redeemGiftCard method redeems a gift card represented by the input GiftCard object, and grants the resultant amount of credit to the AutoBill. This method should be called after the statusInquiry() method is called on the GiftCard object provided as input to this method. If the statusInquiry() method indicates that status of the GiftCard object is Active, you may call this method. For more information, see The GiftCard Object. For redemption of a gift card, Subscribe contacts a gift card processor (where supported). If the gift card is redeemable, the processor returns an SKU or a UPC number. This number is unique for each type of gift card, and is defined by a prior agreement between you and the gift card processor. Subscribe uses the number to look up a Product object with the same merchantProductId. Subscribe then grants credit to the AutoBill as defined in the creditGranted attribute of the Product object. For each type of gift card you wish to accept, create (in advance) Product objects with the selected amount of credit specified in their creditGranted attributes. Subscribe currently supports only full redemption of the credit associated with a gift card. See the Credit Subobject for more information on it and related subobjects. See Credit Grants and Gift Cards in the Subscribe Programming Guide, for more information on gift card redemption.

Input

srd: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a method call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call. Some fields are required, either practically or in the WSDL, and will be returned regardless of the srd. A null srd returns the complete response. autobill: an AutoBill object to which you wish to grant credit, if redemption of the gift card is successful. Use the or VID to identify the object. giftcard: a GiftCard object encapsulating information about the gift card you wish to redeem. For more information, see The GiftCard Object. If you called the statusInquiry() method before calling this method, you should have the VID of the GiftCard object. Use the VID to identify the GiftCard. credit: a Credit object specifying the amount and type of credit you wish to redeem. (This parameter is used with partial credit redemption, and is currently not in use.)

Output

return: an object of type Return that indicates the success or failure of the call. giftcard: the GiftCard that was redeemed, with an updated status. autobill: the AutoBill input object to which Subscribe grants credit if redemption of the input gift card is successful. This object contains the updated array of Credit objects.

Returns

In addition to those listed in The Return Object, this call returns:

Example

Parent topic:AutoBill Methods