---
title: "Activategiftcard"
method: POST
path: "/v2/giftcards/programs/{programId}/cards/{cardId}/activate"
tags: ["Gift Cards"]
---

# Activategiftcard

`POST /v2/giftcards/programs/{programId}/cards/{cardId}/activate`

### Activate Gift Card

Activates a pending gift card and loads the initial balance. Creates an ACTIVATION transaction
for audit trail.

**Business Rules**:
- Only PENDING cards can be activated
- Card must not be expired
- Balance is set to initialValue upon activation
- Status changes from PENDING to ACTIVE
- Customer information can be updated during activation
- Activation creates a transaction record
- Authenticated customer session is required

**Path Parameters**:
- `programId`: MongoDB ObjectId of the loyalty program
- `cardId`: MongoDB ObjectId of the gift card

**Request Body**:
- `customerEmail`: Customer email (optional, updates card if provided)
- `customerName`: Customer name (optional, updates card if provided)

**Returns**:
- Activated gift card details with updated balance and ACTIVE status
- Includes activatedAt timestamp

**Status Codes**:
- 200: Gift card activated successfully
- 400: Card cannot be activated (already active, expired, or invalid status)
- 404: Gift card not found or doesn't belong to program
- 409: Activation conflicted with concurrent update
- 401: Unauthorized

**Idempotency Scope**:
- Idempotency keys are scoped to `programId + activate + cardId`
- The same key may be reused for different cards or different gift card actions

## Path parameters

- `programId` string, required
- `cardId` string, required

## Headers

- `idempotency-key` string, nullable
- `X-Eposn-Customer-Token` string, nullable
- `X-Eposn-Merchant-Token` string, nullable

## Request body

- ActivateGiftCardRequest
  - `customerEmail` string, email, nullable
  - `customerPhone` string, nullable
  - `customerName` string, nullable
  - `securityCode` string, nullable — Security code required for customer self-activation

## Response `200`

Successful Response

- GiftCardResponse
  - `id` string, required
  - `cardNumber` string, required
  - `balance` string, required
  - `initialValue` string, required
  - `status` 'pending' | 'active' | 'suspended' | 'expired' | 'voided' | 'depleted', required — Gift card status enumeration.
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, nullable, required
  - `activatedAt` string, date-time, nullable, required
  - `expiresAt` string, date-time, required
  - `suspendedReason` string, nullable, required
  - `suspendedUntil` string, date-time, nullable, required
  - `suspendedAt` string, date-time, nullable, required
  - `customerId` string, required
  - `customerEmail` string, nullable, required
  - `customerPhone` string, nullable, required
  - `customerName` string, nullable, required
  - `senderName` string, nullable
  - `merchantId` string, required
  - `merchantName` string, nullable
  - `isPhysical` boolean, required
  - `designTemplate` string, nullable, required
  - `customMessage` string, nullable, required
  - `lastFourDigits` string, required
  - `programId` string, required
  - `deliverAt` string, date-time, nullable
  - `delivered` boolean
  - `card` PassCard, required — The customer card object Attributes: serialNumber (str): The serial number of the customer pass passTypeIdentifier (str): The pass type identifier of the customer pass url (str): The shareable URL of the customer pass
    - `serialNumber` string, required
    - `passTypeIdentifier` string, required
    - `url` string, uri, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/loyalty/apis/loyaltydog.md) · [All operations](https://skmtc.net/loyalty/apis/loyaltydog/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loyalty/loyaltydog/versions/42b7b22af2b6/schema)
