> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withbenji.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Redeem by Token

> Redeem a perk using a single-use redemption token

> [!NOTE]
>
> This endpoint requires both your **partner API key** in the `x-api-key` header and a Bearer token in the `Authorization` header. The Bearer token is the user access token obtained after a successful [Benji Connect SDK](https://docs.withbenji.com/connect/methods.md#onsuccess) `onSuccess` callback. See [Exchange Token](https://docs.withbenji.com/connect/exchange_token.md) and [API Authentication](https://docs.withbenji.com/api-reference/authentication.md). Partner API keys can be generated through the dashboard.

**x-api-key** `string` *required*

Your partner API key, generated through the dashboard. Required together with `Authorization`.

**Authorization** `string` *required*

A `Bearer` user access token obtained after the [Benji Connect SDK](https://docs.withbenji.com/connect/methods.md#onsuccess) `onSuccess` callback. Required together with `x-api-key`. See [Exchange Token](https://docs.withbenji.com/connect/exchange_token.md).

**token** `string` *required*

The single-use `redemption_token` returned for the offer by [Campaign Eligibility](https://docs.withbenji.com/api-reference/endpoint/campaigns/eligibility.md). This is the same token used by [Add Item to Cart](https://docs.withbenji.com/api-reference/endpoint/users/add-cart-item.md). It lasts 600 seconds (10 minutes) and cannot be empty. It is not the `cart_redemption_token` returned by [Validate Cart](https://docs.withbenji.com/api-reference/endpoint/users/validate-cart.md).

**partnership\_id** `integer` *required*

The identifier of the partnership the token was issued for. Must be an integer greater than or equal to 1.

### Response

**reward\_transaction** `object` *required*

The reward transaction created by the redemption.

**properties**

**id** `integer`

Benji Platform reward transaction identifier

**uuid\_id** `string`

UUID identifier of the reward transaction

**partner\_id** `integer`

The ID of the partner whose points were redeemed in the Benji Platform

**merchant\_id** `integer`

The ID of the merchant that provides the redeemed offer in the Benji Platform

**user\_id** `integer`

The ID of the user who redeemed in the Benji Platform

**user\_uuid** `string`

The UUID of the user who redeemed in the Benji Platform

**campaign\_id** `integer`

The ID of the campaign that was redeemed

**campaign\_flow\_id** `integer`

The ID of the campaign flow that was redeemed

**partnership\_id** `integer`

The ID of the partnership associated with this transaction in the Benji Platform

**transaction\_amount** `number`

The total dollar amount of the transaction. Always `0.0` for redemptions.

**reward\_amount** `integer`

The total amount of rewards redeemed on this transaction, after discounts

**original\_reward\_amount** `integer`

The amount of rewards the offer costs before discounts. `null` for tokens issued before this value was recorded.

**transaction\_type** `integer`

Integer representing an enum of one of the following transaction type values:

**possible transaction type values**

* **EARN (1)** : Indicating an earn transaction type \\

* **REDEEM (2)** : Indicating a redeem transaction type  \\

Always `2` (REDEEM) for this endpoint.

**transaction\_status** `integer`

Integer representing an enum of one of the following transaction status values:

**possible transaction status values**

* **INITIATED (1)** : Transaction has been initiated \\

* **PENDING (2)** : Transaction is pending and has not been confirmed by the partner yet \\

* **COMPLETED (3)** : Transaction has been completed successfully \\

* **ERROR (4)** : An error occurred during processing \\

* **REVERSED (5)** : Transaction was reversed \\

* **FAILED (6)** : Transaction was rejected by the partner \\

* **CANCELLED (7)** : Transaction was cancelled \\

* **VOID (8)** : Transaction was voided because the offer could not be claimed \\

* **VOID\_FAILED (9)** : Voiding the transaction failed \\

**external\_partner\_transaction\_id** `string`

The identifier of the redemption on the loyalty partner's system

**trigger\_id** `integer`

The ID of the trigger associated with the redemption, if any

**trigger\_event\_id** `integer`

The ID of the trigger event associated with the redemption, if any

**trigger\_event\_uuid\_id** `string`

The UUID of the trigger event associated with the redemption, if any

**coupon\_id** `string`

The ID of the coupon applied to the redemption, if any

**cart\_id** `string`

The ID of the cart the redemption was part of. `null` for redemptions made outside a cart.

**created\_date** `string`

The date and time when the transaction was created, in ISO 8601 format

```bash cURL theme={null}
curl --request POST \
  --url https://api-staging.withbenji.com/transactions/redeem \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <your-partner-api-key>' \
  --header 'Authorization: Bearer <user-access-token>' \
  --data '{
    "token": "3f6c0a52-8d1e-4f0b-9a57-0b6f2f7a7c11",
    "partnership_id": 42
  }'
```

```json 200 theme={null}
{
    "code": "ok",
    "data": {
        "reward_transaction": {
            "id": 5924,
            "uuid_id": "6a1f3d0c-92b4-4c5e-8f0d-1b7e4a9c2d35",
            "partner_id": 61,
            "merchant_id": 93,
            "user_id": 155,
            "user_uuid": "77a5ad82-c27a-47fd-b21d-2d19a3ff222d",
            "campaign_id": 118,
            "campaign_flow_id": 305,
            "partnership_id": 42,
            "transaction_amount": 0.0,
            "reward_amount": 450,
            "original_reward_amount": 500,
            "transaction_type": 2,
            "transaction_status": 3,
            "external_partner_transaction_id": "TX-90311",
            "trigger_id": null,
            "trigger_event_id": null,
            "trigger_event_uuid_id": null,
            "coupon_id": null,
            "cart_id": null,
            "created_date": "2026-12-02T15:10:42.118203+00:00"
        }
    }
}
```

```json 400 theme={null}
{
  "code": "external_transaction_error",
  "message": "Failed to claim product sku-1 for user 155"
}
```

```json 401 theme={null}
{
  "code": "unauthorized_error",
  "message": "Unauthorized."
}
```

```json 403 theme={null}
{
  "code": "forbidden_error",
  "message": "Access forbidden. Insufficient permissions."
}
```

```json 404 theme={null}
{
  "code": "resource_not_found_error",
  "message": "Redemption token 3f6c0a52-8d1e-4f0b-9a57-0b6f2f7a7c11 does not exist."
}
```

```json 500 theme={null}
{
  "code": "unexpected_error",
  "message": "Unexpected error."
}
```

> [!WARNING]
>
> The redemption token lasts 600 seconds (10 minutes) and is consumed as soon as the request is accepted. It cannot be reused, even if the redemption later fails. If a request fails after the token was consumed, or if the token has expired, request eligibility again to get a new token.

> [!TIP]
>
> To redeem several offers at once, add them to a cart with [Add Item to Cart](https://docs.withbenji.com/api-reference/endpoint/users/add-cart-item.md), then [Validate Cart](https://docs.withbenji.com/api-reference/endpoint/users/validate-cart.md) to get a `cart_redemption_token`, and pass that token to [Redeem Cart by Token](https://docs.withbenji.com/api-reference/endpoint/transactions/redeem-cart-by-token.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.