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

# Record Redemption

> Record a promotion code redemption

Use this endpoint to record when a promotion code is redeemed during checkout. This updates usage counters on both the code and the parent promotion.

<ParamField header="Authorization" type="string" required>
  Bearer token with `marketing:write` scope
</ParamField>

## Request body

<ParamField body="code" type="string" required>
  The promotion code that was redeemed
</ParamField>

<ParamField body="booking_id" type="string">
  The booking ID where the code was applied
</ParamField>

<ParamField body="customer_id" type="string">
  The customer ID who redeemed the code
</ParamField>

<ParamField body="order_total_minor" type="integer" required>
  The order total in minor units before discount
</ParamField>

<ParamField body="discount_applied_minor" type="integer" required>
  The actual discount amount applied in minor units
</ParamField>

<ParamField body="currency" type="string" default="USD">
  3-letter ISO currency code
</ParamField>

## Response

Returns the redemption record.

```bash Request theme={null}
curl -X POST "https://api.voyantcloud.com/v1/promotions/redeem" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "SUMMER20",
    "booking_id": "booking_123",
    "customer_id": "cust_456",
    "order_total_minor": 150000,
    "discount_applied_minor": 30000,
    "currency": "EUR"
  }'
```

```json Response theme={null}
{
  "data": {
    "id": "redemption_abc",
    "workspaceId": "ws_xyz",
    "promotionId": "promo_abc123",
    "promotionCodeId": "code_xyz",
    "bookingId": "booking_123",
    "customerId": "cust_456",
    "orderTotalMinor": 150000,
    "discountAppliedMinor": 30000,
    "currency": "EUR",
    "status": "applied",
    "createdAt": "2024-07-20T14:30:00Z"
  }
}
```

## Errors

| Status | Error          | Description                          |
| ------ | -------------- | ------------------------------------ |
| 404    | Code not found | No code exists with the given string |

<Note>
  Always call the validate endpoint before redeeming to ensure the code is still valid.
</Note>
