---
updatedAt: 2026-11-10T16:42:14.000Z
agentTools:
  projectIndex: https://developers.cleeng.com/llms.txt
---

# Verify a gift

Use this endpoint to verify whether a gift code provided by the user is valid. The gift code has to be verified before a gift is redeemed. It returns the available redemption options for the gift.

# Response description

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Response
      </th>

      <th>
        Type
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `redeemable`
      </td>

      <td>
        boolean
      </td>

      <td>
        Gift status - whether it can be redeemed or not.
      </td>
    </tr>

    <tr>
      <td>
        `redeemMode`
      </td>

      <td>
        string
      </td>

      <td>
        Provides information on a gift redeem mode - whether a new subscription will be created or an existing one will be extended as a result of redeeming a gift.  If `redeemable` = `true`, the possible values are `NEW`, `EXTEND`. If `redeemable` = `false`, `null` will be returned.
      </td>
    </tr>

    <tr>
      <td>
        `redeemRefusalReason`
      </td>

      <td>
        string
      </td>

      <td>
        Provides information why a gift could not be redeemed. Possible refusal reasons: `REDEEMED`, `RECURRING_PROCESS_ALREADY_STARTED`, `INACTIVE OFFER`, `EXTERNALLY_MANAGED_SUBSCRIPTION`, `OFFER_GEO_RESTRICTED`,  `PUBLISHER_GEO_RESTRICTED`, `SEASONAL_SUBSCRIPTION`, `ACTIVE_PASS`,`NO_REDEEM_OPTION_AVAILABLE`.
      </td>
    </tr>

    <tr>
      <td>
        `extendedSubscriptionId`
      </td>

      <td>
        integer
      </td>

      <td>
        The identifier of a subscription that has been extended as a result of redeeming a gift.
      </td>
    </tr>

    <tr>
      <td>
        `offerId`
      </td>

      <td>
        string
      </td>

      <td>
        The identifier of a Cleeng offer. Example: S123123123_US.
      </td>
    </tr>

    <tr>
      <td>
        `gift`
      </td>

      <td>
        object
      </td>

      <td>
        Details of the gift
      </td>
    </tr>

    <tr>
      <td>
        `gift.value`
      </td>

      <td>
        number
      </td>

      <td>
        Monetary value of the gift
      </td>
    </tr>

    <tr>
      <td>
        `gift.currency`
      </td>

      <td>
        string
      </td>

      <td>
        Currency of `value`
      </td>
    </tr>

    <tr>
      <td>
        `gift.duration.days`
      </td>

      <td>
        integer
      </td>

      <td>
        Duration of the gift, in days
      </td>
    </tr>

    <tr>
      <td>
        `redeemOptions[]`
      </td>

      <td>
        array of objects
      </td>

      <td>
        Every redemption option currently available for this gift.
      </td>
    </tr>

    <tr>
      <td>
        Redeem option object:
      </td>

      <td>

      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        - `mode`
      </td>

      <td>
        string
      </td>

      <td>
        `NEW`, `EXTEND`, or `SWITCH`
      </td>
    </tr>

    <tr>
      <td>
        - `subscriptionId`
      </td>

      <td>
        integer
      </td>

      <td>
        Subscription this option applies to (for `EXTENDSWITCH`); null for `NEW`
      </td>
    </tr>

    <tr>
      <td>
        - `currentOfferId`
      </td>

      <td>
        string
      </td>

      <td>
        Offer the customer is currently subscribed to, if any
      </td>
    </tr>

    <tr>
      <td>
        - `giftedOfferId`
      </td>

      <td>
        string
      </td>

      <td>
        Offer the gift grants
      </td>
    </tr>

    <tr>
      <td>
        - `sideEffects[]`
      </td>

      <td>
        array of string
      </td>

      <td>
        Additional effects of choosing this option: `RESUMES_SUBSCRIPTION`, `CANCELS_SCHEDULED_SWITCH`
      </td>
    </tr>

    <tr>
      <td>
        - `preview.endDate`
      </td>

      <td>
        timestamp
      </td>

      <td>
        Resulting subscription end date if this option is redeemed
      </td>
    </tr>

    <tr>
      <td>
        - `preview.timeAdded.days`
      </td>

      <td>
        integer
      </td>

      <td>
        Days added to the subscription
      </td>
    </tr>

    <tr>
      <td>
        - `preview.carriedOver`
      </td>

      <td>
        object
      </td>

      <td>
        Time/value carried over from the current cycle, if applicable
      </td>
    </tr>

    <tr>
      <td>
        - `preview.carriedOver.days`
      </td>

      <td>

      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        - `preview.renewal`
      </td>

      <td>
        object
      </td>

      <td>
        Resulting renewal offer/billing cycle after redemption, if applicable.
      </td>
    </tr>

    <tr>
      <td>
        - `preview.renewal.offerId`
      </td>

      <td>
        string
      </td>

      <td>
        ID of the offer the subscription renews on after the gifted period
      </td>
    </tr>

    <tr>
      <td>
        - `preview.renewal.billingCycle`
      </td>

      <td>
        object
      </td>

      <td>
        How often the customer is charged after the gifted period ends, taken from the gifted offer. Null when the gifted offer has no billing cycle.
      </td>
    </tr>

    <tr>
      <td>
        - `preview.renewal.billingCycle.amount`
      </td>

      <td>
        integer
      </td>

      <td>
        Number of periodUnits in one billing cycle. For example, 3 with month means the customer is charged every 3 months. Example: 1.
      </td>
    </tr>

    <tr>
      <td>
        - `preview.renewal.billingCycle.periodUnit`
      </td>

      <td>
        string
      </td>

      <td>
        Unit of the billing cycle: day, week, month, year or season. Example:month.
      </td>
    </tr>

    <tr>
      <td>
        `unavailableOptions[]`
      </td>

      <td>
        array of objects
      </td>

      <td>
        Redemption options that exist but are currently unavailable, with the reason why.
      </td>
    </tr>

    <tr>
      <td>
        Unavailable option object:
      </td>

      <td>

      </td>

      <td>

      </td>
    </tr>

    <tr>
      <td>
        - `mode`
      </td>

      <td>
        string
      </td>

      <td>
        `NEW`, `EXTEND`, or `SWITCH`
      </td>
    </tr>

    <tr>
      <td>
        - `subscriptionId`
      </td>

      <td>
        integer
      </td>

      <td>
        Subscription this option would have applied to, if any
      </td>
    </tr>

    <tr>
      <td>
        - `currentOfferId`
      </td>

      <td>
        string
      </td>

      <td>
        Offer the customer is currently subscribed to, if any
      </td>
    </tr>

    <tr>
      <td>
        - `reason`
      </td>

      <td>
        string
      </td>

      <td>
        Why the option is unavailable: `PAUSED_SUBSCRIPTION`, `CURRENT_CYCLE_FROM_GIFT`, `SWITCH_PAYMENT_IN_PROGRESS`, `LOWER_TIER_NOT_ALLOWED`, `FREE_OFFER_SUBSCRIPTION`, or              `EXISTING_SUBSCRIPTION`
      </td>
    </tr>
  </tbody>
</Table>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api-31",
    "version": "2.1"
  },
  "servers": [
    {
      "url": "https://api.sandbox.cleeng.com/3.1/"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Publisher-Token"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/gifts/{code}/verification": {
      "get": {
        "summary": "Verify a gift",
        "description": "Use this endpoint to verify whether a gift code provided by the user is valid. The gift code has to be verified before a gift is redeemed. It returns the available redemption options for the gift.",
        "operationId": "31-verify-a-gift",
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "description": "A gift code. Min length: 9, max length: 9. Example: 1A2B-3C4D.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "customerIp",
            "in": "query",
            "description": "Customer IP address.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "redeemerId",
            "in": "query",
            "description": "The identifier of the person redeeming a gift.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Gift Verified": {
                    "value": {
                      "redeemable": true,
                      "redeemMode": null,
                      "redeemRefusalReason": null,
                      "extendedSubscriptionId": null,
                      "gift": {
                        "value": 90,
                        "currency": "EUR",
                        "duration": {
                          "days": 90
                        }
                      },
                      "offerId": "S987654321_PL",
                      "redeemOptions": [
                        {
                          "mode": "EXTEND",
                          "subscriptionId": 123456789,
                          "currentOfferId": "S123123123_PL",
                          "giftedOfferId": "S987654321_PL",
                          "sideEffects": [],
                          "preview": {
                            "endDate": 1814140800,
                            "timeAdded": {
                              "days": 270
                            }
                          }
                        },
                        {
                          "mode": "SWITCH",
                          "subscriptionId": 123456789,
                          "currentOfferId": "S123123123_PL",
                          "giftedOfferId": "S987654321_PL",
                          "sideEffects": [],
                          "preview": {
                            "endDate": 1797465600,
                            "timeAdded": {
                              "days": 90
                            },
                            "carriedOver": {
                              "days": 7
                            },
                            "renewal": {
                              "offerId": "S987654321_PL",
                              "billingCycle": {
                                "amount": 1,
                                "periodUnit": "month"
                              }
                            }
                          }
                        }
                      ],
                      "unavailableOptions": [
                        {
                          "mode": "NEW",
                          "subscriptionId": null,
                          "currentOfferId": null,
                          "reason": "EXISTING_SUBSCRIPTION"
                        }
                      ]
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "redeemable": {
                      "type": "boolean",
                      "example": true,
                      "default": true
                    },
                    "redeemMode": {
                      "type": "string",
                      "example": "EXTEND"
                    },
                    "redeemRefusalReason": {},
                    "extendedSubscriptionId": {
                      "type": "integer",
                      "example": 123456789,
                      "default": 0
                    },
                    "offerId": {
                      "type": "string",
                      "example": "S123123123_PL"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Bad Request": {
                    "value": "{\n    \"message\": \"Parameter 'code' has invalid value 'Z116-C48'\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Parameter 'code' has invalid value 'Z116-C48'"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "examples": {
                  "Not Found": {
                    "value": "{\n    \"message\": \"Gift not found\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Gift not found"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```