v1

latestOpenAPI 3.0.1MIT2026-07-263151,3912.3 MB
Redemptions

Redeem Promotion

❗️ Deprecated

This endpoint represents the deprecated version of the API responsible for promotion tier redemption, and we do not recommend using it. The new Stackable Discounts API introduces additional features and improvements while maintaining backward compatibility, including applying a combination of coupon codes and promotion tiers. Developers are encouraged to migrate to the latest version to take advantage of the latest enhancements and bug fixes. No updates will be provided to the deprecated endpoint.

To redeem a promotion, you create a redemption object passing a context.

You can retrieve a list of active promotions through the Validate Promotions endpoint. That validation method will return a list of active​ promotion tiers identified by thier IDs.

📘 Redemption rollback

Do you need to undo a redemption? You can do it with redemption rollback.

post/v1/promotions/tiers/{promotionTierId}/redemption

Request body

metadataobject

A set of key/value pairs that you can send in the request body to check against promotion tiers requiring redemption metadata validation rules to be satisfied. The validation runs against rules that are defined through the Create Validation Rules endpoint or via the Dashboard; in the Advanced Rule BuilderAdvancedRedemption metadata satisfy or Basic BuilderAttributes matchREDEMPTION METADATA. Read more.

Example request

{
  "customer": {
    "id": "cust_Vzck5i8U3OhcEUFY6MKhN9Rv"
  },
  "order": {
    "created_at": "2021-12-22T10:13:06.487Z",
    "referrer_id": "cust_nM4jqPiaXUvQdVSA6vTRUnix"
  }
}

Response

Returns a redemption object if the redeem operation succeeded.

idstring

Unique redemption ID.

objectstring

The type of the object represented by the JSON. This object stores information about the redemption.

datestring date-time

Timestamp in ISO 8601 format indicating when the redemption occured.

customer_idstring

Unique customer ID of the redeeming customer.

tracking_idstring

Hashed customer source ID.

metadataobject

The metadata object stores all custom attributes in the form of key/value pairs assigned to the redemption.

result'SUCCESS' | 'FAILURE'

Redemption result.

related_object_type'promotion_tier'

Defines the related object.

related_object_idstring

Unique related object ID assigned by Voucherify, i.e. promo_NzjTc3ZXTe7md5SziK3uYtei for a promotion tier.

voucherobject nullable

Example response

{
  "id": "r_0bc92f81a6801f9bca",
  "date": "2022-10-03T12:24:58.008Z",
  "customer_id": "cust_i8t5Tt6eiKG5K79KQlJ0Vs64",
  "tracking_id": "track_fxEMFiLowFHg==",
  "order": {
    "id": "ord_OLWs41pBk7VFn6ZTyX9U6keh",
    "created_at": "2022-10-06T11:40:48.705Z",
    "updated_at": "2022-10-06T11:47:20.760Z",
    "items": [
      {
        "product_id": "prod_5h0wc453_1",
        "sku_id": "sku_prod_5h0wc453_1_1",
        "product": {
          "id": "prod_5h0wc453_1",
          "source_id": "illy-arabica",
          "name": "Brewing System"
        },
        "sku": {
          "id": "sku_prod_5h0wc453_1_1",
          "source_id": "illy-arabica-250g"
        }
      }
    ],
    "customer": {
      "id": "cust_7iUa6ICKyU6gH40dBU25kQU1"
    },
    "referrer": {
      "id": "cust_7iUa6ICKyU6gH40dBU25kQU1"
    },
    "customer_id": "cust_7iUa6ICKyU6gH40dBU25kQU1",
    "referrer_id": "cust_nM4jqPiaXUvQdVSA6vTRUnix",
    "redemptions": {
      "redemption_ID": {
        "date": "2022-09-02T17:06:56.649Z"
      }
    }
  },
  "channel": {
    "channel_id": "user_g24UoRO3Caxu7FCT4n5tpYEa3zUG0FrH"
  },
  "customer": {
    "id": "cust_eWgXlBBiY6THFRJwX45Iakv4"
  },
  "promotion_tier": {
    "id": "promo_63fYCt81Aw0h7lzyRkrGZh9p",
    "created_at": "2021-12-15T11:34:01.333Z",
    "updated_at": "2022-02-09T09:20:05.603Z",
    "campaign": {
      "start_date": "2022-09-22T00:00:00.000Z",
      "expiration_date": "2022-09-30T00:00:00.000Z",
      "validity_timeframe": {
        "duration": "PT1H",
        "interval": "P2D"
      },
      "validity_hours": {
        "daily": [
          {
            "start_time": "12:00",
            "expiration_time": "14:00"
          }
        ]
      },
      "category_id": "cat_0b688929a2476386a6"
    },
    "start_date": "2022-09-23T00:00:00.000Z",
    "expiration_date": "2022-09-26T00:00:00.000Z",
    "validity_timeframe": {
      "duration": "PT1H",
      "interval": "P2D"
    },
    "validity_hours": {
      "daily": [
        {
          "start_time": "12:00",
          "expiration_time": "14:00"
        }
      ]
    },
    "validation_rule_assignments": {
      "data": [
        {
          "id": "asgm_74F7QZoYbUoljwQO",
          "rule_id": "val_4j7DCRm2IS59",
          "related_object_id": "v_JtWunK6jUo7X2qOFj0SyRHq4p9tgENlT",
          "created_at": "2022-02-17T08:18:15.085Z"
        }
      ]
    },
    "category_id": "cat_0c9da30e7116ba6bba",
    "categories": [
      {
        "created_at": "2022-07-14T10:45:13.156Z",
        "updated_at": "2022-08-16T10:52:08.094Z"
      }
    ]
  }
}