# Cards

The Card API allows you to create and manage your VeendHQ Cards.

## Create a Card Program

## Create a Card Program

<mark style="color:green;">`POST`</mark> `{{BASE_URL}}/cardprograms?accountId={{ACCOUNT_ID}}`

#### Request Body

| Name                                            | Type  | Description                        |
| ----------------------------------------------- | ----- | ---------------------------------- |
| numberOfCards<mark style="color:red;">\*</mark> | 100   | The number of cards to create      |
| programName<mark style="color:red;">\*</mark>   | FGN28 | A unique name for the Card program |
| location                                        | Lagos |                                    |

## Update a Card Program

## Update a card program

<mark style="color:purple;">`PATCH`</mark> `{{BASE_URL}}/cardprograms/{{CARD_ID}}?accountId={{ACCOUNT_ID}}`

#### Request Body

| Name                                            | Type   | Description                          |
| ----------------------------------------------- | ------ | ------------------------------------ |
| numberOfCards<mark style="color:red;">\*</mark> | String | Number of cards for the card program |
| location<mark style="color:red;">\*</mark>      | String | Location                             |

## Generate Cards

## Generate Card files

<mark style="color:green;">`POST`</mark> `{{BASE_URL}}/cardprograms/generate-card-files?accountId={{ACCOUNT_ID}}`

#### Query Parameters

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| accountId<mark style="color:red;">\*</mark> | String |             |

#### Request Body

| Name                                          | Type   | Description       |
| --------------------------------------------- | ------ | ----------------- |
| programName<mark style="color:red;">\*</mark> | String | Card Program Name |

## Get All Card Programs

## Get all card programs

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/cardfiles/{{CARD_ID}}?accountId={{ACCOUNT_ID}}`

#### Query Parameters

| Name                                        | Type         | Description |
| ------------------------------------------- | ------------ | ----------- |
| accountId<mark style="color:red;">\*</mark> | \_id         |             |
| populate                                    | cardOwnerId, |             |

## Get All Card Request

## Get all card request&#x20;

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/cardfiles?accountId={{ACCOUNT_ID}}`

## Fund a Card

## Fund a Card

<mark style="color:green;">`POST`</mark> `{{BASE_URL}}/cardfiles/{{CARD_ID}}/fund?accountId={{ACCOUNT_ID}}`

#### Request Body

| Name                                     | Type | Description |
| ---------------------------------------- | ---- | ----------- |
| amount<mark style="color:red;">\*</mark> | 2000 | Amount      |

## Withdraw Fund

## Withdraw fund from a Card to account.

<mark style="color:green;">`POST`</mark> `{{BASE_URL}}/cardfiles/{{CARD_ID}}/withdraw-fund?accountId={{ACCOUNT_ID}}`

## Set Card Limit

## Set single transaction limit, daily, weekly and/or monthly limit

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/cardfiles/{{CARD_ID}}/setlimit?accountId={{ACCOUNT_ID}}`

#### Query Parameters

| Name                                        | Type    | Description                       |
| ------------------------------------------- | ------- | --------------------------------- |
| accountId<mark style="color:red;">\*</mark> | String  |                                   |
| dailyLimit                                  | 20000   | Maximum amount daily transactions |
| monthlyLimit                                | 1000000 |                                   |
| singleTransaction                           | 5000    |                                   |

## Block a Card

## Block a Card

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/cardfiles/{{CARD_ID}}/blockcard?accountId={{a}}`

Block a Card

#### Query Parameters

| Name                                        | Type            | Description |
| ------------------------------------------- | --------------- | ----------- |
| accountId<mark style="color:red;">\*</mark> | {{ACCOUNT\_ID}} |             |

## Card Transactions

## Get all transactions for a particular Card.

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/cardfiles/{{CARD_ID}}/transactions?accountId={{ACCOUNT_ID}}`

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    "status": "success",
    "data": {
        "transactions": [
            {
                "frontendStatus": "successful",
                "veendFee": 0,
                "otherFees": 200,
                "purchaseReference": "NGN_INTERNAL_DEPOSIT_1673527567316",
                "cost": 200,
                "merchantFee": 0,
                "customerFee": 0,
                "cashback": 0,
                "referralCommission": 0,
                "totalCost": 200,
                "description": "NGN200 - NGN Internal - Deposit - Veend Jim01 - NGN_INTERNAL_DEPOSIT_1673527567316",
                "currency": "NGN",
                "status": "completed",
                "paid": true,
                "delivered": false,
                "settled": true,
                "canRefund": false,
                "product": "63bff3c868f7910013964929",
                "productsDetails": {
                    "owner": "63bff39246f4a20013a783b7",
                    "amount": 200,
                    "currency": "NGN",
                    "description": "Card Funding",
                    "purchaseReference": "NGN_INTERNAL_DEPOSIT_1673527567316"
                },
                "ipAddress": "::ffff:192.168.32.221",
                "account": "63bff39246f4a20013a783b7",
                "deliveryLog": {
                    "error": "service provider currently not supported",
                    "retryReference": "retry0-438",
                    "paymentReference": 438
                },
                "settlementLog": {
                    "adminSettlement": {},
                    "productOwnerSettlement": {}
                },
                "refundLog": null,
                "validationDetails": null,
                "batch": null,
                "payment": 438,
                "feeCalculationData": {
                    "__v": 0,
                    "_id": "63bff3c868f7910013964929",
                    "fee": 0,
                    "code": "5NXKtgJiks",
                    "name": "NGN Internal - Deposit - Veend Jim01",
                    "tags": [
                        "percentage",
                        "flat",
                        "percentage",
                        "percentage",
                        "oneTime",
                        "none",
                        "default",
                        "default",
                        "5NXKtgJiks",
                        "NGN",
                        "Internal",
                        "-",
                        "Deposit",
                        "-",
                        "Veend",
                        "Jim01",
                        "NGN_INTERNAL_DEPOSIT_PROVIDER",
                        "63bff3c868f791001396490e",
                        "NGN",
                        "5e5d34448172fc054a3b8979",
                        "5e5d34448172fc054a3b8979",
                        "2023-01-12T11:49:28.846Z"
                    ],
                    "type": "oneTime",
                    "model": "Products",
                    "owner": "5e5d34448172fc054a3b8979",
                    "amount": 0,
                    "isSync": false,
                    "status": "default",
                    "account": "63bff3c868f791001396490e",
                    "dueDate": "2023-01-12T11:49:28.846Z",
                    "enabled": true,
                    "feeType": "flat",
                    "cashback": 0,
                    "category": "default",
                    "currency": "NGN",
                    "featured": false,
                    "runCount": 0,
                    "canRefund": false,
                    "createdAt": "2023-01-12T11:49:28.846Z",
                    "createdBy": "5e5d34448172fc054a3b8979",
                    "updatedAt": "2023-01-12T11:49:28.906Z",
                    "cashbackType": "percentage",
                    "disableRetry": false,
                    "providerName": "NGN_INTERNAL_DEPOSIT_PROVIDER",
                    "additionalFee": 0,
                    "hasValidation": false,
                    "hasVariations": false,
                    "convinienceFee": 0,
                    "recurringCount": 0,
                    "customerBearsFee": false,
                    "hasSubVariations": false,
                    "recurringInterval": "none",
                    "convinienceFeeType": "percentage",
                    "referralCommission": 10,
                    "recurringIntervalCount": 1,
                    "referralCommissionType": "percentage"
                },
                "retryCount": 0,
                "owner": "63bff39246f4a20013a783b7",
                "createdBy": "63bff39246f4a20013a783b7",
                "client": null,
                "developer": null,
                "tags": null,
                "_id": 363,
                "createdAt": "2023-01-12T12:46:07.000Z",
                "updatedAt": "2023-01-12T12:46:08.000Z"
            },
        ]
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.veendhq.com/cards.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
