# Activate

## Overview

This endpoint is used to activate a prepaid (loyalty/gift) card and associate it with customer information.

## Environments

<table><thead><tr><th width="111">Environment</th><th width="88.79998779296875">Protocol</th><th width="114">HTTP Method</th><th>URL</th></tr></thead><tbody><tr><td>Sandbox</td><td>HTTPS</td><td><code>POST</code></td><td><code>https://uat.paywizard.biz/ovstrade/openLoyaltyPay/giftActivate</code></td></tr><tr><td>Production</td><td>HTTPS</td><td><code>POST</code></td><td><code>https://portal.paywizard.biz/ovstrade/openLoyaltyPay/giftActivate</code></td></tr></tbody></table>



## **Headers**

| Key            | Type   | Required | Description                                                                                                           |
| -------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------- |
| `Content-Type` | String | Yes      | Must be `application/json`.                                                                                           |
| `jwt-token`    | String | Yes      | The transaction token obtained using your developer credentials.                                                      |
| `sign`         | String | Yes      | The request signature. See [Signature Generation Guide](../cloud-api/paywizard-open-platform-api-signature-guide-v3). |

## **Request Body Parameters**

| Parameter        | Type   | Required | Description                                                                                                                                         |
| ---------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `clientId`       | String | Yes      | Your unique developer ID.                                                                                                                           |
| `loyaltyChannel` | String | Yes      | The prepaid channel provider. See [Prepaid Channels](https://oversea.hs1c.cn/showdoc/web/#/671575440/155776425) for valid values.                   |
| `accountId`      | String | Yes      | The unique identifier for the prepaid card.                                                                                                         |
| `entryType`      | String | Yes      | The method used to input the `accountId`. See [Entry Type Codes](https://www.google.com/search?q=%23entry-type-codes) below.                        |
| `activating`     | String | Yes      | Set to `"Y"` to activate the card or `"N"` to not activate.                                                                                         |
| `customerInfo`   | Object | Yes      | A JSON object containing the customer's details. See [CustomerInfo Object](https://www.google.com/search?q=%23customerinfo-object) structure below. |

### **CustomerInfo Object**

| Parameter      | Type   | Required | Description                                                      |
| -------------- | ------ | -------- | ---------------------------------------------------------------- |
| `customerType` | String | Yes      | `1`: Primary account holder, `2`: Alternate, `3`: Giver of card. |
| `firstName`    | String | Yes      | Customer's first name.                                           |
| `middleName`   | String | Yes      | Customer's middle name.                                          |
| `lastName`     | String | Yes      | Customer's last name.                                            |
| `address1`     | String | Yes      | Primary address line.                                            |
| `address2`     | String | Yes      | Secondary address line.                                          |
| `city`         | String | Yes      | City name.                                                       |
| `state`        | String | Yes      | State or province.                                               |
| `postal`       | String | Yes      | Postal code (must be a valid format for the country).            |
| `country`      | String | Yes      | 2-character ISO 3166-1 country code.                             |
| `mailPref`     | String | Yes      | Mail preference. `O`: Opt-out, `I`: Opt-in.                      |
| `phone`        | String | Yes      | Phone number in the format `+CCC AAA LLL LLL xEEEE`.             |
| `isMobile`     | String | Yes      | `Y`: Yes, `N`: No.                                               |
| `phonePref`    | String | Yes      | Phone contact preference. `O`: Opt-out, `I`: Opt-in.             |
| `email`        | String | Yes      | Customer's email address.                                        |
| `emailPref`    | String | Yes      | Email contact preference. `O`: Opt-out, `I`: Opt-in.             |
| `birthday`     | String | Yes      | Customer's birthday in `YYYYMMDD` format.                        |
| `anniversary`  | String | Yes      | Customer's anniversary in `YYYYMMDD` format.                     |
| `gender`       | String | Yes      | `M`: Male, `F`: Female.                                          |

### **Entry Type Codes**

<table><thead><tr><th width="107.60003662109375">Code</th><th>Description</th></tr></thead><tbody><tr><td><code>B</code></td><td>Barcode</td></tr><tr><td><code>K</code></td><td>Keyed (manually entered)</td></tr><tr><td><code>M</code></td><td>Magnetic Stripe</td></tr><tr><td><code>P</code></td><td>Proximity (NFC/Contactless)</td></tr></tbody></table>

## **Request Example**

```json
{
    "clientId": "825429536610058240",
    "loyaltyChannel": "FACTOR4",
    "accountId": "914639258868515",
    "entryType": "K",
    "activating": "Y",
    "customerInfo": {
        "customerType": "1",
        "firstName": "Jon1",
        "middleName": "Mid2",
        "lastName": "Doe3",
        "address1": "295R+VM Settat, Morocco",
        "address2": "Settat,Morocco",
        "city": "Morocco",
        "state": "Settat",
        "postal": "26000",
        "country": "MA",
        "mailPref": "O",
        "phone": "+12125551234",
        "isMobile": "N",
        "phonePref": "O",
        "email": "Jon@gmail.com",
        "emailPref": "O",
        "birthday": "20000101",
        "anniversary": "",
        "gender": "M"
    }
}
```

***

## **Response Body**

The response returns the card's balance information and confirms the customer data that has been stored.

| Parameter           | Type    | Description                                                                                                   |
| ------------------- | ------- | ------------------------------------------------------------------------------------------------------------- |
| `code`              | Integer | The HTTP status code. `200` indicates a successful request.                                                   |
| `msg`               | String  | A human-readable message. `success` on successful requests.                                                   |
| `timestamp`         | String  | The UTC timestamp of the response. Format: `YYYY-MM-DD HH:mm:ss`.                                             |
| `data`              | Object  | A container for the successful response data. Null on error.                                                  |
| `data.accountId`    | String  | The unique identifier for the prepaid card.                                                                   |
| `data.balances`     | Array   | An array of [Balances Object](https://www.google.com/search?q=%23balances-object) detailing the card's value. |
| `data.customerInfo` | Object  | The [CustomerInfo Object](https://www.google.com/search?q=%23customerinfo-object) that was saved.             |

### **Balances Object**

This object represents a single type of value held on the card, such as currency or points.

| Parameter    | Type    | Description                                             |
| ------------ | ------- | ------------------------------------------------------- |
| `valueCode`  | String  | The currency code (e.g., "USD") or "Points".            |
| `amount`     | Decimal | The total amount of the specified `valueCode`.          |
| `difference` | Decimal | The difference in amount from the previous transaction. |

## **Success Response Example**

```json
{
    "code": 200,
    "msg": "success",
    "timestamp": "2025-07-24 15:34:05",
    "data": {
        "accountId": "914639258868515",
        "balances": [
            {
                "valueCode": "USD",
                "amount": 1534.10,
                "difference": 0
            },
            {
                "valueCode": "Points",
                "amount": 53.00,
                "difference": 0
            }
        ],
        "customerInfo": {
            "customerType": "1",
            "firstName": "Jon1",
            "middleName": "Mid2",
            "lastName": "Doe3",
            "address1": "295R+VM Settat, Morocco",
            "address2": "Settat,Morocco",
            "city": "Morocco",
            "state": "Settat",
            "postal": "",
            "country": "US",
            "mailPref": "O",
            "phone": "+8612154154",
            "isMobile": "N",
            "phonePref": "O",
            "email": "Jon@gmail.com",
            "emailPref": "O",
            "birthday": "20000101",
            "anniversary": "",
            "gender": ""
        }
    }
}
```

