# Redeem a gift card

`POST https://api.cryptohopper.com/v1/market/giftcards/activate`

Part of [Marketplace](https://www.cryptohopper.com/api-documentation/api-reference/marketplace.md) in the Cryptohopper API reference.

Redeems a gift card code for your account: a credits gift card adds credits to your balance, a subscription gift card activates the subscription it holds.

Only available to Cryptohopper's own apps; other apps get a 403 error. The code must be exactly 64 characters. Code checks are throttled per user: one attempt per 10 seconds, and further checks fail for an hour after 11 attempts. In the current code the credits path calls an object that is never created in this endpoint, so redeeming a credits gift card ends in a server error.

## Headers

| Name | Type | Required | Description |
|---|---|---|---|
| `access-token` | string | yes | The OAuth access token of the user. |

## Example request

```bash
curl -X POST "https://api.cryptohopper.com/v1/market/giftcards/activate" \
  -H "access-token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"giftcard_code":"Xk3P9qLm2Vr7Tz8Nw4Hs6Jd1Fb5Gc0Ya9Qe2Ru7Io4Pl3Mk8Nj6Bh1Vg5Cf0Dx7S"}'
```

## Response

Example response (illustrative values):

```json
{
    "data": "Your subscription has been activated and added to your account."
}
```

Status codes: 200. Errors return JSON with `status`, `error` and `message`, plus a numeric `code` when the error comes from the API itself rather than the gateway.
