---
title: "Redeem a partner code on the packages step."
method: POST
path: "/api/v1/billing/redeem-code"
tags: ["Billing"]
---

# Redeem a partner code on the packages step.

`POST /api/v1/billing/redeem-code`

## Request

- Base URL: `https://api.avatarfactory.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.avatarfactory.io/api/v1/billing/redeem-code`
- Auth: one of:
  - API key in cookie `session`
  - HTTP bearer

<br/>A trial code grants the capped trial entitlement, exactly as the MCP<br/>paywall route already did. A plan_grant code creates a real Stripe<br/>subscription discounted to zero, so a design partner ends up with the full<br/>package and every downstream surface treats them as a normal subscriber.<br/><br/>Rate limited on the same backoff bucket as the MCP redeem route, because<br/>this endpoint is the other door into the same guessable secret.

## Request body

- RedeemCodeRequest: A partner code typed on the packages step or arriving as ?code=.
  - `code` string, required

## Response `200`

OK

- RedeemCodeResponse: Whether the code granted anything, and what. ``promo`` is the third answer, alongside granted and rejected: the string is not one of our minted codes but IS a live Stripe promotion code, so the checkout page applies it exactly as the promo field would.
  - `error` string, nullable
  - `granted` boolean, required
  - `kind` string, nullable
  - `plan_slug` string, nullable
  - `promo` RedeemPromoOffer: A Stripe promotion code the partner box found instead of a grant.
    - `code` string, required
    - `fully_discounts` boolean, required
    - `label` string, required

## Other responses

- `400`: Bad Request
- `422`: Unprocessable Entity
- `429`: Too Many Requests

---

[API](https://skmtc.dev/avatarfactory/apis/avatarfactory-api.md) · [All operations](https://skmtc.dev/avatarfactory/apis/avatarfactory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/avatarfactory/apis/avatarfactory-api/revisions/66fc7aa3f296?raw)
