Redeem a gift

Redeems a gift code for a customer. Depending on the customer's subscriptions and the publisher's gift redemption settings, redeeming a gift can:

  • start a new subscription to the gifted offer (if the publisher did not disable it)
  • extend the customer's subscription to an offer with the same tags as the gifted offer
  • extend the customer's subscription to a different offer, converting the gift's value into time at that subscription's price (if the publisher has enabled it)
  • switch the customer's subscription to the gifted offer (if the publisher has enabled it)

Call Verify a gift first to see which options are available, then send the chosen option in mode and subscriptionId if mode is different than NEW. A gift can be redeemed only once.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Response description

ParameterTypeDescription
messagestringStatus confirmation, "OK" on success
outcomeobjectThe redemption option that was actually applied
outcome.modestringNEW, EXTEND, or SWITCH
outcome.subscriptionIdintegerSubscription the gift was applied to or ID of a new subscription
outcome.offerIdstringOffer now active on the subscription
outcome.previousOfferIdstringOffer that was active before redemption, if any
outcome.giftedOfferIdstringOffer the gift grants
outcome.sideEffects[]array of stringAdditional effects of this redemption, e.g. RESUMES_SUBSCRIPTION, CANCELS_SCHEDULED_SWITCH
outcome.preview.endDateinteger (Unix timestamp)Resulting subscription end date
outcome.preview.timeAdded.daysintegerDays added to the subscription
outcome.preview.carriedOver.daysintegerDays carried over from the current cycle, if applicable
outcome.preview.renewalobjectResulting renewal offer/billing cycle, if applicable
Path Params
string
required

A gift code. Min length: 9, max length: 9. Example: 1A2B-3C4D.

Body Params
string

Customer (redeemer) IP address.

int32

The identifier of the person redeeming a gift.

string

The redemption option to apply: NEW, EXTEND, or SWITCH. Use one of the options returned in redeemOptions by Verify a gift.

  • EXTEND and SWITCH require subscriptionId, the subscription the option applies to.

  • NEW must be sent without subscriptionId.

If you leave mode out, the default option is applied. That's the option named by redeemMode in the Verify a gift response. When redeemMode is null, there is no default, and a request without mode is refused with 422 and REDEEM_OPTION_REQUIRED.

integer

Required alongside mode when mode is EXTEND or SWITCH - identifies which existing subscription the gift should apply to. Must be a positive integer.

(only meaningful when a gift has multiple redemption options )

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json