# Card Minting

## Account Management <a href="#account-management" id="account-management"></a>

Account Management consists of Signing In, Changing Password, and Changing PIN.

### Sign In <a href="#sign-in" id="sign-in"></a>

## Sign In

<mark style="color:green;">`POST`</mark> `https://api.klipwallet.com/v2/partner/auth`

After receiving membership approval, signs in to Klip Partners using the email address and password that were used to sign up.

#### Headers

| Name                                           | Type   | Description      |
| ---------------------------------------------- | ------ | ---------------- |
| Content-Type<mark style="color:red;">\*</mark> | string | application/json |

#### Request Body

| Name                                       | Type   | Description                                                                                    |
| ------------------------------------------ | ------ | ---------------------------------------------------------------------------------------------- |
| email<mark style="color:red;">\*</mark>    | string | The email address used to sign up. This will be your account used for signing in.              |
| password<mark style="color:red;">\*</mark> | string | The password used for signing in. It will be sent as a SHA256 of the password used up sign up. |

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

```
{
  "email": "terri.kwak@groundx.xyz",
  "klaytn_address":0xdc6AE5861a73d852bd3cdD84a4BA7f598A5160F3,
  "contract_address": "0xc94770007dda54cF92009BFF0dE90c06F603a09f",
  "name": "Terri Kwak",
  "phone": "01012345678",
  "service_name": "Puppy World Revolution"
  "access_token" : "eyJ0eXAiOiJKV1QiLCJhbGciOiJI...",
  "status" : 1
  "mint_limit": 1000
  "mint_count": 1
}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}

{% tab title="406" %}

```
"not found user info in db": Account data not found.
```

{% endtab %}

{% tab title="426" %}

```
"not yet approved": Not approved for signup yet.
```

{% endtab %}

{% tab title="4004" %}

```
"invalid password": Wrong password.
```

{% endtab %}

{% tab title="Etc." %}

```
Failed to sign in.
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 " %}

```
```

{% endtab %}
{% endtabs %}

[Klip Partners](https://partners.klipwallet.com) is currently accessible only by authorized entities. If your business is considering using the service, please submit via email (1) an introduction of your business, (2) purpose of using Cards, and (3) Card application ideas to <klip-partners@groundx.xyz>.

**Request Example**

```
curl -X POST "https://api.klipwallet.com/v2/partner/auth" \
-d '{"email":"terri.kwak@groundx.xyz", "password":"C01069C9ABB6EA7DA49AE418A24BBEF3AD67170DDCD20AC7C76084A5A85E4057"}' \
-H "Content-Type: application/json"
```

**Response Details**

| Item              | Type   | Description                                                                                                               |
| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------------- |
| email             | string | The email address of the Partner that will be used for signing in.                                                        |
| klaytn\_address   | string | The address of the Partner's Klaytn [EOA](https://docs.klaytn.com/klaytn/design/accounts#externally-owned-accounts-eoas). |
| contract\_address | string | The address of the [SCA](https://docs.klaytn.com/klaytn/design/accounts#smart-contract-accounts-scas) that mints Cards.   |
| name              | string | Legal or registered business name of the Partner.                                                                         |
| phone             | string | The phone number of the Partner.                                                                                          |
| service\_name     | string | The name of the BApp provided by the Partner.                                                                             |
| access\_token     | string | A JWT authentication token issued to enable API requests.                                                                 |
| status            | number | Account status code.                                                                                                      |
| mint\_limit       | number | The maximum number of Cards that can be issued by the account.                                                            |
| mint\_count       | number | The number of Cards actually issued by the account in one month.                                                          |

{% hint style="info" %}
`status` will read 20 before the signup approval, and 1 after the approval.\
`access_token` will expire after 24 hours. `mint_count` and `mint_limit` will be renewed on the 1st day of each month.
{% endhint %}

For more details, please refer to our [Tuturial](/tutorial/tutorial-card-minting.md#sign-in).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

### Change Password <a href="#change-password" id="change-password"></a>

## Change Password

<mark style="color:orange;">`PUT`</mark> `https://api.klipwallet.com/v2/partner/?opt=password`

Changes the password that was used to sign up.

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json            |

#### Request Body

| Name                                            | Type   | Description        |
| ----------------------------------------------- | ------ | ------------------ |
| old\_password<mark style="color:red;">\*</mark> | string | Your old password. |
| new\_password<mark style="color:red;">\*</mark> | string | Your new password. |

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

```
{}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}

{% tab title="4004" %}

```
"invalid password": Wrong password.
```

{% endtab %}

{% tab title="Etc." %}

```
Failed to change password.
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 " %}

```
```

{% endtab %}
{% endtabs %}

**Request Example**

```
curl -X PUT "https://api.klipwallet.com/v2/partner/?opt=password" \
-d '{"old_password":"HASHED_OLD_PASSWORD", "new_password":"HASHED_NEW_PASSWORD"}' \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: application/json"
```

For more details, please refer to our [Card Minting Tutorial](/tutorial/tutorial-card-minting.md#change-password-and-pin).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

### Change PIN <a href="#change-pin" id="change-pin"></a>

## Change PIN

<mark style="color:orange;">`PUT`</mark> `https://api.klipwallet.com/v2/partner/pin`

Changes the PIN Code.

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json            |

#### Request Body

| Name                                       | Type   | Description        |
| ------------------------------------------ | ------ | ------------------ |
| old\_pin<mark style="color:red;">\*</mark> | string | Your old PIN Code. |
| new\_pin<mark style="color:red;">\*</mark> | string | Your new PIN Code. |

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

```
{}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}

{% tab title="403" %}

```
"exceed pin code error count": You exceeded the invalid PIN Code limit.
```

{% endtab %}

{% tab title="4006" %}

```
"invalid pin code": PIN Code doesn't match.
```

{% endtab %}

{% tab title="Etc." %}

```
Failed to change PIN Code.
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 " %}

```
```

{% endtab %}
{% endtabs %}

**Request Example**

```
curl -X PUT "https://api.klipwallet.com/v2/partner/pin" \
-d '{"old_pin":"HASHED_OLD_PIN_NUMBER", "new_pin":"HASHED_NEW_PIN_NUMBER"}' \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: application/json"
```

For more details, please refer to our [Card Minting Tutorial](/tutorial/tutorial-card-minting.md#change-password-and-pin).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

## Card Management <a href="#card-management" id="card-management"></a>

Card Management consists of Uploading Image, Minting Card To Users, Minting Card To Klip Members, Sending Card To Users, Sending Cards To Klip Member, Getting Card Information By Bapp, Getting Card Information, and Deleting Cards.

### Upload Image <a href="#upload-image" id="upload-image"></a>

## Upload Image

<mark style="color:green;">`POST`</mark> `https://api.klipwallet.com/v2/wallet/image`

Uploads an image to be used for the Card.

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | multipart/form-data         |

#### Request Body

| Name                                     | Type   | Description                                                        |
| ---------------------------------------- | ------ | ------------------------------------------------------------------ |
| upload<mark style="color:red;">\*</mark> | string | The file name of the image to be uploaded. Must include file path. |

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

```
{"image": "https://url_path_to_img_file/image.png"}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}

{% tab title="Etc." %}

```
Failed to upload image.
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 " %}

```
```

{% endtab %}
{% endtabs %}

**Request Example**

```
curl -X POST "https://api.klipwallet.com/v2/wallet/image" \
-F upload=@./imagefile.png \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: multipart/form-data"
```

For more details, please refer to our [Card Minting Tutorial](/tutorial/tutorial-card-minting.md#upload-image).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

### Upload NFT Resource <a href="#upload-nftresource" id="upload-nftresource"></a>

## Upload NFT resource

<mark style="color:green;">`POST`</mark> `https://api.klipwallet.com/v2/wallet/nftResource`

Uploads a resource that will be used for the Cards. A video file for the `animation_url` field is limited to 10MiB.

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | multipart/form-data         |

#### Request Body

| Name                                     | Type   | Description                                                        |
| ---------------------------------------- | ------ | ------------------------------------------------------------------ |
| upload<mark style="color:red;">\*</mark> | string | The file name of the image to be uploaded. Must include file path. |

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

```
{"url": "https://url_path_to_file/file.mp4"}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}

{% tab title="4100" %}

```
"upload animation file limit exceeded": The video file exceeds 10MiB. Check the file size again.
```

{% endtab %}

{% tab title="4101" %}

```
"upload animation file extension is not support": This video format is not supported.
```

{% endtab %}

{% tab title="Etc." %}

```
Failed to upload file.
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 " %}

```
```

{% endtab %}
{% endtabs %}

**Request Example**

```
curl -X POST "https://api.klipwallet.com/v2/wallet/nftResource" \
-F upload=@./file.mp4 \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: multipart/form-data"
```

For more details, please refer to our [Card Minting Tutorial](/tutorial/tutorial-card-minting.md#upload-nftresource).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

### Mint Card to User <a href="#mint-card-to-user" id="mint-card-to-user"></a>

## Mint Card To User

<mark style="color:green;">`POST`</mark> `https://api.klipwallet.com/v2/wallet/mint`

Sends user information to Klip Partners and mints Cards. Cards will be minted to EOAs.

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json            |

#### Request Body

| Name                                                | Type    | Description                                                                                                                                                                             |
| --------------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| pin<mark style="color:red;">\*</mark>               | string  | The PIN Code that will be used for signing transactions.                                                                                                                                |
| to\_address<mark style="color:red;">\*</mark>       | array   | An array of `string`s containing the EOA addresses where the Cards will be minted.                                                                                                      |
| contract\_address<mark style="color:red;">\*</mark> | string  | The address of the SCA that will mint the Card.                                                                                                                                         |
| name<mark style="color:red;">\*</mark>              | string  | The name of the Cards.                                                                                                                                                                  |
| description<mark style="color:red;">\*</mark>       | string  | Description of the Cards.                                                                                                                                                               |
| image<mark style="color:red;">\*</mark>             | string  | The URL of the image to be used for the Cards.                                                                                                                                          |
| animation\_url                                      | string  | The URL of the video that will be used for the Cards. Supported file extension is `.mp4`. The video won't play if it doesn't have H.264 codec or if the resolution is over `3840x2160`. |
| background\_color                                   | string  | The RGB color code to be used as the Card's background.                                                                                                                                 |
| sendable                                            | boolean | If TRUE, the Cards can be sent from Klip to another account.                                                                                                                            |
| send\_friend\_only                                  | boolean | If TRUE, the Cards can be sent from Klip only to your friend on KakaoTalk.                                                                                                              |
| group\_name                                         | string  | The name of the Card group.                                                                                                                                                             |
| group\_icon                                         | string  | The URL of the image to be used as the Card group icon.                                                                                                                                 |
| hashtags                                            | array   | An array of `string`s containing hashtags. Hashtags make your Cards searchable by certain keywords.                                                                                     |
| layout                                              | string  | Determines how the Cards will be displayed. Square is `general`, wide rectangle is `horizontal`, and long rectangle is `vertical`. The default value is `general`.                      |
| external\_link                                      | string  | The URL address outside of Klip to which users are redirected. (Max. 255 characters)                                                                                                    |
| qr\_code                                            | string  | The image URL with QR Code. (Max. 255 characters)                                                                                                                                       |
| bar\_code                                           | string  | The image URL with Bar Code. (Max. 255 characters)                                                                                                                                      |
| attributes                                          | array   | An array of `object`s containing the Cards' attributes. (Max. 10 elements)                                                                                                              |
| secure                                              | object  | An `object` containing information only visible to the holder. You can select from the fields `bar_code`, `qr_code` and `attributes`.                                                   |
| status\_url                                         | string  | An external URL with the Card's status. This URL must return a JSON object. You can set the required boolean type field `valid` and the optional array type field `attributes`.         |

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

```
{
  "hash": "0x2d26f602cfbb4c662931592bf2c4ee18d29f09683be5b9e8d589ff935fca0b97"
}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}

{% tab title="Etc." %}

```
Failed to mint Cards.
As some of the Cards may have been minted, send a request to **Get Card List** to see the complete list of tokens.
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 " %}

```
```

{% endtab %}
{% endtabs %}

```
//attributes example
attributes:[
    {
      "trait_type": "Sword", 
      "value": "Iron Short Sword"
    }, 
    {
      "trait_type": "Magic Type", 
      "value": "Fire"
    }, 
    {
      "trait_type": "Sword Level", 
      "value": "5"
    }, 
    {
      "trait_type": "Magic Level", 
      "value": "2"
    }
]
```

```
//secure example (Normally you select one of either bar_code or qr_code)
secure: {
    bar_code: "1234 ABCD 5678 EFGH 90IJ",
    qr_code: "https://your-domain.com?key=1234",
    attributes:[
        {
            "trait_type": "Sword",
            "value": "Iron Short Sword"
        },
        {
            "trait_type": "Magic Type",
            "value": "Fire"
        },
        {
            "trait_type": "Sword Level",
            "value": "5"
        },
        {
            "trait_type": "Magic Level",
            "value": "2"
        }
    ]
}
```

```
//status_url example
status_url: "https://your-domain.com?key=1234"

//Response sample of a status_url request
{
    valid: true,
    attributes:[
        {
            "trait_type": "Sword",
            "value": "Iron Short Sword"
        },
        {
            "trait_type": "Magic Type",
            "value": "Fire"
        },
        {
            "trait_type": "Sword Level",
            "value": "5"
        },
        {
            "trait_type": "Magic Level",
            "value": "2"
        }
    ]
}
```

**Request Example**

```
curl -X POST "https://api.klipwallet.com/v2/wallet/mint" \
-d @./mint_info.json \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: application/json"
```

**Request Details for** `secure`

| Item       | Type   | Description                                                                                                                                             |
| ---------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| bar\_code  | string | The string to be displayed as barcode. It follows the CODE 128 standard. This field is optional. (Max. 20 characters excluding ' '(empty space) or '-') |
| qr\_code   | string | The string to be displayed as QR code. This field is optional. (Max. 255 characters)                                                                    |
| attributes | array  | An array of `object`s containing the Cards' attributes.                                                                                                 |

For more details, please refer to our [Card Minting Tutorial](/tutorial/tutorial-card-minting.md#mint-card-to-user).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

### Mint Card to Klip Member <a href="#mint-card-to-klip-member" id="mint-card-to-klip-member"></a>

## Mint Card To Klip Member

<mark style="color:green;">`POST`</mark> `https://api.klipwallet.com/v2/wallet/mint/person`

Sends Klip user information to Klip Partners and mints Card. Card will be minted to the EOA of Klip Member based on the name and phone number provided in `to_person`.

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json            |

#### Request Body

| Name                                                | Type    | Description                                                                                                                                                                                    |
| --------------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| pin<mark style="color:red;">\*</mark>               | string  | The PIN Code that is used to sign the transaction.                                                                                                                                             |
| to\_person<mark style="color:red;">\*</mark>        | array   | A two-dimensional array containing the name and phone number of the recipient.                                                                                                                 |
| contract\_address<mark style="color:red;">\*</mark> | string  | SCA address from which the Cards will be minted.                                                                                                                                               |
| name<mark style="color:red;">\*</mark>              | string  | The name of the Cards.                                                                                                                                                                         |
| description<mark style="color:red;">\*</mark>       | string  | The description of the Cards.                                                                                                                                                                  |
| image<mark style="color:red;">\*</mark>             | string  | The URL of the image to be used for the Cards.                                                                                                                                                 |
| animation\_url                                      | string  | The URL address of the video that will be used for the Cards. Supported file extension is `.mp4`. The video won't play if it doesn't have H.264 codec or if the resolution is over `3840x2160` |
| background\_color                                   | string  | The RGB color code to be used as the Card's background.                                                                                                                                        |
| sendable                                            | boolean | If TRUE, the Cards can be sent from Klip to another account.                                                                                                                                   |
| send\_friend\_only                                  | boolean | If TRUE, the Cards can be sent from Klip only to your friend on KakaoTalk.                                                                                                                     |
| group\_name                                         | string  | The name of the Card group.                                                                                                                                                                    |
| group\_icon                                         | string  | The URL of the image to be used as the Card group icon.                                                                                                                                        |
| hashtags                                            | array   | An array of `string`s containing hashtags. Hashtags make your Cards searchable by certain keywords.                                                                                            |
| layout                                              | string  | Determines how the Cards will be displayed. Square is `general`, wide rectangle is `horizontal`, and long rectangle is `vertical`. The default value is `general`.                             |
| external\_link                                      | string  | The URL address outside of Klip to which users are redirected. (Max. 255 characters)                                                                                                           |
| qr\_code                                            | string  | The image URL with QR Code. (Max. 255 characters)                                                                                                                                              |
| bar\_code                                           | string  | The image URL with Bar Code. (Max. 255 characters)                                                                                                                                             |
| attributes                                          | array   | An array of `object`s containing the the Cards' attributes. (Max. 10 elements)                                                                                                                 |
| secure                                              | object  | An `object` containing information only visible to the holder. You can select from the fields `bar_code`, `qr_code` amnd `attributes`.                                                         |
| status\_url                                         | string  | An external URL containing the Card status. This URL must return a JSON object. You can set the required boolean type field `valid` and the optional array type field `attributes`.            |

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

```
{
  "hash": "0x2d26f602cfbb4c662931592bf2c4ee18d29f09683be5b9e8d589ff935fca0b97",
  "result": [["Bruce", "010-1111-2222", "success", ""], ["Janet", "010-3333-4444", "fail", "phone number does not exist"], ...]
}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}

{% tab title="Etc." %}

```
Failed to mint Cards.
As some of the Cards may have been minted, send a request to **Get Card List** to see the complete list of tokens.
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 " %}

```
```

{% endtab %}
{% endtabs %}

```
//attributes example
attributes:[
    {
      "trait_type": "Sword", 
      "value": "Iron Short Sword"
    }, 
    {
      "trait_type": "Magic Type", 
      "value": "Fire"
    }, 
    {
      "trait_type": "Sword Level", 
      "value": "5"
    }, 
    {
      "trait_type": "Magic Level", 
      "value": "2"
    }
]
```

```
//secure example (Normally you select one of either bar_code or qr_code)
secure: {
    bar_code: "1234 ABCD 5678 EFGH 90IJ",
    qr_code: "https://your-domain.com?key=1234",
    attributes:[
        {
            "trait_type": "Sword",
            "value": "Iron Short Sword"
        },
        {
            "trait_type": "Magic Type",
            "value": "Fire"
        },
        {
            "trait_type": "Sword Level",
            "value": "5"
        },
        {
            "trait_type": "Magic Level",
            "value": "2"
        }
    ]
}
```

```
//status_url 예시
status_url: "https://your-domain.com?key=1234"

//Response example for a status_url request
{
    valid: true,
    attributes:[
        {
            "trait_type": "Sword",
            "value": "Iron Short Sword"
        },
        {
            "trait_type": "Magic Type",
            "value": "Fire"
        },
        {
            "trait_type": "Sword Level",
            "value": "5"
        },
        {
            "trait_type": "Magic Level",
            "value": "2"
        }
    ]
}
```

**Request Example**

```
curl -X POST "https://api.klipwallet.com/v2/wallet/mint/person" \
-d @./mint_person_info.json \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: application/json"
```

**Request Details for** `secure`

| Item       | Type   | Description                                                                                                                                             |
| ---------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| bar\_code  | string | The string to be displayed as barcode. It follows the CODE 128 standard. This field is optional. (Max. 20 characters excluding ' '(empty space) or '-') |
| qr\_code   | string | The string to be displayed as QR code. This field is optional. (Max. 255 characters)                                                                    |
| attributes | array  | An array of `object`s containing the Cards' attributes. This field is optional.                                                                         |

For more details, please refer to our [Card Minting Tutorial](/tutorial/tutorial-card-minting.md#mint-card-to-klip-member).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

### Get Mint Count <a href="#mint-count" id="mint-count"></a>

## Get Mint Count

<mark style="color:blue;">`GET`</mark> `https://api.klipwallet.com/v2/wallet/mint/count`

Returns the total number of Cards minted using the Partner account. The count is renewed on the 1st day of each month.

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json            |

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

```
{
  "mint_count": 10
}
```

{% endtab %}
{% endtabs %}

**Request Example**

```
curl -X GET "https://api.klipwallet.com/v2/wallet/mint/count" \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: application/json"
```

**Response Details**

| Item        | Type   | Description                                  |
| ----------- | ------ | -------------------------------------------- |
| mint\_count | number | The number of Cards minted during the month. |

For more details, please refer to our [Card Minting Tutorial](/tutorial/tutorial-card-minting.md#mint-count).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

### Send Card to User <a href="#send-card-to-user" id="send-card-to-user"></a>

## Send Card To User

<mark style="color:green;">`POST`</mark> `https://api.klipwallet.com/v2/wallet/nft/:nft_id/:card_id/send`

Sends Card to other users' EOAs.

#### Path Parameters

| Name                                       | Type   | Description                                                    |
| ------------------------------------------ | ------ | -------------------------------------------------------------- |
| nft\_id<mark style="color:red;">\*</mark>  | string | The ID of the smart contract that minted the Card in the BApp. |
| card\_id<mark style="color:red;">\*</mark> | string | The ID of the Card in the BApp.                                |

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json            |

#### Request Body

| Name                                          | Type   | Description                                             |
| --------------------------------------------- | ------ | ------------------------------------------------------- |
| pin<mark style="color:red;">\*</mark>         | string | The PIN Code that will be used to sign the transaction. |
| to\_address<mark style="color:red;">\*</mark> | string | The EOA address of the recipient of the Cards.          |
| card\_name<mark style="color:red;">\*</mark>  | string | The name of the Card to send.                           |

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

```
// Successful response example
{ to_address: "0xb1764B96da889..." , fail_count: 0, tx_hash: "0x7cf09602cebb..."}
// One failed PIN Code attempt
{fail_count: 1}
// Two failed PIN Code attempts
{fail_count: 2}
// The PIN Code attempt limit is 5.
// Even if you get it right on the 6th attempt, it will return this response:
{fail_count: 6}
// The maximum value for fail_count is currently 6. 
// Seven failed PIN Code attempts
{fail_count: 6}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}

{% tab title="Etc." %}

```
Failed to send Card.
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 " %}

```
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
You have to include `card_name` so that the Card name appears for the recipient.
{% endhint %}

**Request Example**

```
curl -X POST "https://api.klipwallet.com/v2/wallet/nft/60/1/send" \
-d @./send_info.json \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: application/json"
```

For more details, please refer to our [Card Minting Tutorial](/tutorial/tutorial-card-minting.md#send-card-to-user).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

### Send Card to Klip Member <a href="#send-card-to-klip-member" id="send-card-to-klip-member"></a>

## Send Card To Klip Member

<mark style="color:green;">`POST`</mark> `https://api.klipwallet.com/v2/wallet/nft/:nft_id/:card_id/send/person`

Sends Card to Klip Member to the EOA of Klip Member based on the name and phone number provided in `to_person`.

#### Path Parameters

| Name                                       | Type   | Description                                     |
| ------------------------------------------ | ------ | ----------------------------------------------- |
| nft\_id<mark style="color:red;">\*</mark>  | string | ID of the smart contract that minted the Cards. |
| card\_id<mark style="color:red;">\*</mark> | string | The ID of the Card.                             |

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json            |

#### Request Body

| Name                                         | Type   | Description                                                                  |
| -------------------------------------------- | ------ | ---------------------------------------------------------------------------- |
| pin<mark style="color:red;">\*</mark>        | string | The PIN Code that was used to sign the transaction.                          |
| to\_person<mark style="color:red;">\*</mark> | array  | An array of `string`s that contains the recipients' names and phone numbers. |
| card\_name<mark style="color:red;">\*</mark> | string | The name of the Card to send.                                                |

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

```
// Successful response example
{ fail_count: 0, tx_hash: "0x2d26f602cfbb4c662931592bf2c4ee18d29f09683be5b9e8d589ff935fca0b97" }
// One failed PIN Code attempt
{fail_count: 1, tx_hash: ""}
// Two failed PIN Code attempts
{fail_count: 2, tx_hash: ""}
// The PIN Code attempt limit is 5.
// Even if you get it right on the 6th attempt, it will return this response:
{fail_count: 6, tx_hash: ""}
// The maximum value for fail_count is currently 6. 
// Seven failed PIN Code attempts
{fail_count: 6, tx_hash: ""}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}

{% tab title="Etc." %}

```
Failed to send Card.
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 " %}

```
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
You have to include `card_name` so that the Card name appears for the recipient.
{% endhint %}

**Request Example**

```
curl -X POST "https://api.klipwallet.com/v2/wallet/nft/60/1/send/person" \
-d @./send_person_info.json \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: application/json"
```

For more details, please refer to our [Card Minting Tutorial](/tutorial/tutorial-card-minting.md#send-card-to-klip-member).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

### Get Card List <a href="#get-card-information-by-bapp" id="get-card-information-by-bapp"></a>

## Get Card List

<mark style="color:blue;">`GET`</mark> `https://api.klipwallet.com/v2/wallet/bapp?cursor=`

Returns a list of all your Cards. Cards will be displayed grouped in BApps.

#### Query Parameters

| Name   | Type   | Description                                                                                                   |
| ------ | ------ | ------------------------------------------------------------------------------------------------------------- |
| cursor | string | The pointer after which the next request will retrieve the next 100 items if the number of BApps exceeds 100. |

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json            |

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

```
{
    "bapps": [
        {
            "id": 2,
            "name": "bapp2",
            "bapp_img": "/img/bapp-icon2.svg",
            "category_id": 2,
            "nft_order_no": 1,
            "summary": "summary",
            "card_count": 10,
            "nft_id": 52,
            "cards": [
                    {
                        "created_at": 1580300503,
                        "updated_at": 1580300503,
                        "owner": "0xa3b7aa3a3c8a08bd22f77932368e2043e7ffe263",
                        "sender": "0x0000000000000000000000000000000000000000",
                        "card_id": 18,
                        "card_uri": "https://.../card_meta.json",
                        "transaction_hash": "0x8754f10f73468ea85e84d9e29c2a864fc574c1e57675bfc70b5459d82477a91f"
                    },
                    ...
                ],
            "cards_next_cursor": ""
        },
        ...
    ],
    "next_cursor": ""
}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}

{% tab title="Etc." %}

```
Failed to retrieve your list of Cards.
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 " %}

```
```

{% endtab %}
{% endtabs %}

**Request Example**

```
curl "https://api.klipwallet.com/v2/wallet/bapp?cursor=mrzedXOE9OeEorkAvwQXB7JdVg4LP1Rzze2kLQFxLU4C8iMOhOVulzIr5iesZoie9uv9h87UNXsWCKdhqYszXFWLsYYI7h125Rx8p56qlMKaZ20YbNW3zDGmNBJKM1wL" \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: application/json"
```

**Response Details for** `bapps[i]`;

| Item                | Type   | Description                                                                                                   |
| ------------------- | ------ | ------------------------------------------------------------------------------------------------------------- |
| id                  | number | The ID of the BApp.                                                                                           |
| name                | string | The name of the BApp.                                                                                         |
| bapp\_img           | string | The address of the BApp image file.                                                                           |
| category\_id        | number | The ID for the BApp categories.                                                                               |
| nft\_order\_no      | number | The order in which the Card groups are displayed on the Klip Card list.                                       |
| summary             | string | A one-liner description about the BApp.                                                                       |
| card\_count         | number | The number of Cards specifically used for this particular BApp.                                               |
| nft\_id             | number | The ID of the NFT. NFT is the smart contract that implements the Card on the blockchain.                      |
| cards               | array  | An array of `object`s containing the information of each Card.                                                |
| cards\_next\_cursor | string | The pointer after which the next request will retrieve the next 100 items if the number of Cards exceeds 100. |
| next\_cursor        | string | The pointer after which the next request will retrieve the next 100 items if the number of BApps exceeds 100. |

**Response Details for** `bapps[i].cards[i]`

| Item              | Type   | Description                                                                                                          |
| ----------------- | ------ | -------------------------------------------------------------------------------------------------------------------- |
| created\_at       | number | The time at which the Card was minted.                                                                               |
| updated\_at       | number | The time at which the Card was updated.                                                                              |
| owner             | string | The [EOA](https://docs.klaytn.com/klaytn/design/accounts#externally-owned-accounts-eoas) address of the Card owner.  |
| sender            | string | The [EOA](https://docs.klaytn.com/klaytn/design/accounts#externally-owned-accounts-eoas) address of the Card sender. |
| card\_id          | number | The ID of the Card.                                                                                                  |
| card\_uri         | string | The URL of the JSON file containing the Card's metadata.                                                             |
| transaction\_hash | string | The transaction hash of the smart contract that minted the Card.                                                     |

For more details, please refer to our [Card Minting Tutorial-1](/tutorial/tutorial-card-minting.md#get-card-information-by-bapp) and [Card Minting Tutorial-2](/tutorial/tutorial-card-minting.md#get-extra-card-information).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

### Get Card Information <a href="#get-card-information" id="get-card-information"></a>

## Get Card Information

<mark style="color:blue;">`GET`</mark> `https://api.klipwallet.com/v2/wallet/nft/:nft_id?cursor=`

Returns detailed information of your Cards.

#### Path Parameters

| Name                                      | Type   | Description                                                                              |
| ----------------------------------------- | ------ | ---------------------------------------------------------------------------------------- |
| nft\_id<mark style="color:red;">\*</mark> | string | The ID of the NFT. NFT is the smart contract that implements the Card on the blockchain. |

#### Query Parameters

| Name   | Type   | Description                                                                                    |
| ------ | ------ | ---------------------------------------------------------------------------------------------- |
| isAll  | bool   | If TRUE, it returns the informatino of all your Cards. Not usable with the `cursor` parameter. |
| cursor | string | The pointer from which to return the next 100 objects. Not usable with the `isAll` parameter.  |

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json            |

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

```
{
    "name": "conan",
    "symbol_img": "",
    "cards": [
      {
          "created_at": 1580300503,
          "updated_at": 1580300503,
          "owner": "0xa3b7aa3a3c8a08bd22f77932368e2043e7ffe263",
          "sender": "0x0000000000000000000000000000000000000000",
          "card_id": 18,
          "card_uri": "https://.../card_meta.json",
          "transaction_hash": "0x8754f10f73468ea85e84d9e29c2a864fc574c1e57675bfc70b5459d82477a91f"
      },
    ],
    "next_cursor": "mrzedXOE9OeEorkAvwQXB7JdVg4LP1Rzze2kLQFxLU4C8iMOhOVulzIr5iesZoie9uv9h87UNXsWCKdhqYszXFWLsYYI7h125Rx8p56qlMKaZ20YbNW3zDGmNBJKM1wL",
}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}

{% tab title="Etc." %}

```
Failed to retrieve Card information.
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 " %}

```
```

{% endtab %}
{% endtabs %}

**Request Example**

```
curl "https://api.klipwallet.com/v2/wallet/nft/52?cursor=mrzedXOE9OeEorkAvwQXB7JdVg4LP1Rzze2kLQFxLU4C8iMOhOVulzIr5iesZoie9uv9h87UNXsWCKdhqYszXFWLsYYI7h125Rx8p56qlMKaZ20YbNW3zDGmNBJKM1wL" \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: application/json"
```

**Response Details**

| Item         | Type   | Description                                                                                                   |
| ------------ | ------ | ------------------------------------------------------------------------------------------------------------- |
| name         | string | The name of the Card.                                                                                         |
| symbol\_img  | string | The URL address of the image to be used for the Card.                                                         |
| cards        | array  | An array of `object`s containing the information of each Card.                                                |
| next\_cursor | string | The pointer after which the next request will retrieve the next 100 items if the number of Cards exceeds 100. |

**Response Details for** `cards[i]`

| Item              | Type   | Description                                                                                                         |
| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------- |
| created\_at       | number | The time at which the Card was minted.                                                                              |
| updated\_at       | number | The time at which the Card was updated.                                                                             |
| owner             | string | The [EOA](https://docs.klaytn.com/klaytn/design/accounts#externally-owned-accounts-eoas) address of the Card owner. |
| sender            | string | The [EOA](https://docs.klaytn.com/klaytn/design/accounts#externally-owned-accounts-eoas) address of the sender.     |
| card\_id          | number | The ID of the Card.                                                                                                 |
| card\_uri         | string | The URL of the JSON file containing Cards' metadata.                                                                |
| transaction\_hash | string | The hash of the smart contract transaction that minted the Card.                                                    |

For more details, please refer to our [Card Minting Tutorial-1](/tutorial/tutorial-card-minting.md#get-card-information) and [Card Minting Tutorial-2](/tutorial/tutorial-card-minting.md#get-extra-card-information).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

### Delete Card <a href="#delete-card" id="delete-card"></a>

## Delete Card

<mark style="color:red;">`DELETE`</mark> `https://api.klipwallet.com/v2/wallet/nft`

Deletes a specified Card.

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json            |

#### Request Body

| Name                                                | Type   | Description                                             |
| --------------------------------------------------- | ------ | ------------------------------------------------------- |
| pin<mark style="color:red;">\*</mark>               | string | The PIN Code that will be used to sign the transaction. |
| card\_id<mark style="color:red;">\*</mark>          | number | The ID of the Card.                                     |
| contract\_address<mark style="color:red;">\*</mark> | string | The address of the SCA that minted the Cards.           |

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

```
{
    "hash": "0x2d26f602cfbb4c662931592bf2c4ee18d29f09683be5b9e8d589ff935fca0b97"
}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}

{% tab title="Etc." %}

```
Failed to delete Card. To check the result, send a request to **Get Card List** to see the complete list of tokens.
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 " %}

```
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
You cannot delete Cards that you sent to others. Deleting the Cards will not delete the Card image.
{% endhint %}

**Request Example**

```
curl -X DELETE "https://api.klipwallet.com/v2/wallet/nft" \
-d @./delete_info.json \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: application/json"
```

For more details, please refer to our [Card Minting Tutorial](/tutorial/tutorial-card-minting.md#delete-card).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

### Approve Escrow <a href="#approve-escrow" id="approve-escrow"></a>

## Approve Escrow

<mark style="color:green;">`POST`</mark> `https://api.klipwallet.com/v2/escrow/approve`

Enables the use of escrow for sending Cards. You have send a request to this API at least once to use escrow.

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json            |

#### Request Body

| Name                                                | Type   | Description                                             |
| --------------------------------------------------- | ------ | ------------------------------------------------------- |
| pin<mark style="color:red;">\*</mark>               | string | The PIN Code that will be used to sign the transaction. |
| contract\_address<mark style="color:red;">\*</mark> | string | The address of the SCA that minted the Card.            |

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

```
{
  "fail_count": 0,
  "tx_hash": "string"
}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 " %}

```
{
  "code": number,
  "err": "string"
}
```

{% endtab %}
{% endtabs %}

**Request Example**

```
curl -X POST "https://api.klipwallet.com/v2/escrow/approve" \
-d @./approve_info.json \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: application/json"
```

For more details, please refer to our [Card Minting Tutorial](/tutorial/tutorial-card-minting.md#approve-escrow).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

### Get Escrow Approval Status <a href="#get-approve-escrow-information" id="get-approve-escrow-information"></a>

## Get Escrow Approval Status

<mark style="color:blue;">`GET`</mark> `https://api.klipwallet.com/v2/escrow/approve`

Shows whether escrow is enabled or not.

#### Query Parameters

| Name                                                | Type   | Description                                  |
| --------------------------------------------------- | ------ | -------------------------------------------- |
| contract\_address<mark style="color:red;">\*</mark> | string | The address of the SCA that minted the Card. |

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json            |

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

```
{
  "approve": true
}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 " %}

```
{
  "code": number,
  "err": "string"
}
```

{% endtab %}
{% endtabs %}

**Request Example**

```
curl -X GET "https://api.klipwallet.com/v2/escrow/approve?contract_address=0xc94770007dda54cF92009BFF0dE90c06F603a09f" \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: application/json"
```

For more details, please refer to our [Card Minting Tutorial](/tutorial/tutorial-card-minting.md#get-approve-escrow).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

### Create Escrow <a href="#create-escrow" id="create-escrow"></a>

## Create Escrow

<mark style="color:green;">`POST`</mark> `https://api.klipwallet.com/v2/escrow`

Initiates escrow process by creating a link through which Klip user can receive the Card.

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json            |

#### Request Body

| Name                                                | Type   | Description                                                                |
| --------------------------------------------------- | ------ | -------------------------------------------------------------------------- |
| pin<mark style="color:red;">\*</mark>               | string | The PIN Code that will be used to sign the transaction.                    |
| card\_ids<mark style="color:red;">\*</mark>         | array  | An array of `number`s containing Card IDs. It can hold up to 100 elements. |
| contract\_address<mark style="color:red;">\*</mark> | string | The address of the SCA that minted the Card.                               |

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

```
{
  "claim_links": [
    "https://klipwallet.com/?target=/claimCard/2/123?claimKey=1234567890123456789012345678901212345678901234567890123456789012"
  ],
  "fail_count": 0,
  "tx_hash": "0x2d26f602cfbb4c662931592bf2c4ee18d29f09683be5b9e8d589ff935fca0b97"
}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 " %}

```
{
  "code": number,
  "err": "string"
}
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
You can only create escrows for Cards you hold, and not the ones sent. The Cards that are in escrow can be listed using **Get Cards in Escrow**.
{% endhint %}

**Request Example**

```
curl -X POST "https://api.klipwallet.com/v2/escrow" \
-d @./escrow_info.json \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: application/json"
```

For more details, please refer to our [Card Minting Tutorial](/tutorial/tutorial-card-minting.md#create-escrow).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

### Get Cards in Escrow <a href="#escrow-information" id="escrow-information"></a>

## Get Cards in Escrow

<mark style="color:blue;">`GET`</mark> `https://api.klipwallet.com/v2/escrow`

Returns a list of Cards in escrow.

#### Query Parameters

| Name                                                | Type   | Description                                                                                                                                                                                                                                                                                              |
| --------------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| contract\_address<mark style="color:red;">\*</mark> | string | The address of the SCA that minted the Card.                                                                                                                                                                                                                                                             |
| cursor                                              | string | The pointer from which to return the next 100 objects. If you make a GET request for over 100 Cards, it will return 100 items in the result *and* a `next_cursor` value. To retrieve the rest of the Cards, set the `cursor` parameter with `next_cursor` and make another request to the same endpoint. |

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json            |

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

```
{
    "cards": [
        {
            "name": "conan",
            "symbol_img": "",
            "cards": [
              {
                  "created_at": 1580300503,
                  "updated_at": 1580300503,
                  "owner": "0xa3b7aa3a3c8a08bd22f77932368e2043e7ffe263",
                  "sender": "0x0000000000000000000000000000000000000000",
                  "card_id": 18,
                  "card_uri": "https://.../card_meta.json",
                  "transaction_hash": "0x8754f10f73468ea85e84d9e29c2a864fc574c1e57675bfc70b5459d82477a91f"
              },
            ],
            "next_cursor": "mrzedXOE9OeEorkAvwQXB7JdVg4LP1Rzze2kLQFxLU4C8iMOhOVulzIr5iesZoie9uv9h87UNXsWCKdhqYszXFWLsYYI7h125Rx8p56qlMKaZ20YbNW3zDGmNBJKM1wL",
        }
    ]
}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 " %}

```
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
For more details on `cursor`, please refer to [Pagination](/basics.md#basic-card-minting).
{% endhint %}

**Request Example**

```
curl -X GET "https://api.klipwallet.com/v2/escrow?contract_address=0xc94770007dda54cF92009BFF0dE90c06F603a09f" \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: application/json"
```

**Response Details**

| Item         | Type   | Description                                                                                                   |
| ------------ | ------ | ------------------------------------------------------------------------------------------------------------- |
| name         | string | The name of the Card.                                                                                         |
| symbol\_img  | string | The URL address of the image to be used for the Card.                                                         |
| cards        | array  | An array of `object`s containing the information of each Card.                                                |
| next\_cursor | string | The pointer after which the next request will retrieve the next 100 items if the number of Cards exceeds 100. |

**Response Details for** `cards[i]`

| Item              | Type   | Description                                                                                                         |
| ----------------- | ------ | ------------------------------------------------------------------------------------------------------------------- |
| created\_at       | number | The time at which the Card was minted.                                                                              |
| updated\_at       | number | The time at which the Card was updated.                                                                             |
| owner             | string | The [EOA](https://docs.klaytn.com/klaytn/design/accounts#externally-owned-accounts-eoas) address of the Card owner. |
| sender            | string | The [EOA](https://docs.klaytn.com/klaytn/design/accounts#externally-owned-accounts-eoas) address of the sender.     |
| card\_id          | number | The ID of the Card.                                                                                                 |
| card\_uri         | string | The URL of the JSON file containing the Card's metadata.                                                            |
| transaction\_hash | string | The hash of the smart contract transaction that minted the Card.                                                    |

For more details, please refer to our [Card Minting Tutorial](/tutorial/tutorial-card-minting.md#get-escrow).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

### Cancel Escrow <a href="#cancel-escrow" id="cancel-escrow"></a>

## Cancel Escrow

<mark style="color:red;">`DELETE`</mark> `https://api.klipwallet.com/v2/escrow`

Cancels the escrow process for Cards that are in escrow.

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json            |

#### Request Body

| Name                                                | Type   | Description                                                             |
| --------------------------------------------------- | ------ | ----------------------------------------------------------------------- |
| pin<mark style="color:red;">\*</mark>               | string | The PIN Code that will be used to sign the transaction.                 |
| card\_ids<mark style="color:red;">\*</mark>         | array  | An array of `number`s containing Card IDs. Can hold up to 100 elements. |
| contract\_address<mark style="color:red;">\*</mark> | string | The address of the SCA that minted the Card.                            |

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

```
{
  "fail_count": 0,
  "tx_hash": "string"
}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}

{% tab title="Etc." %}

```
Failed to cancel escrow process. Use **Get Cards in Escrow** to get a list of Cards in escrow.
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="500 " %}

```
{
  "code": number,
  "err": "string"
}
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
This only works for Cards that are currently in escrow, and not Cards already sent. Cancelled Cards will return to the list.
{% endhint %}

**Request Example**

```
curl -X DELETE "https://api.klipwallet.com/v2/escrow" \
-d @./cancel_info.json \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: application/json"
```

For more details, please refer to our [Card Minting Tutorial](/tutorial/tutorial-card-minting.md#cancel-escrow).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).

### Get Transaction Result <a href="#transasction-result" id="transasction-result"></a>

## Get Transaction Result

<mark style="color:blue;">`GET`</mark> `https://api.klipwallet.com/v2/wallet/receipt`

Returns whether the transaction has been successfully recorded on blockchain.

#### Query Parameters

| Name                                       | Type   | Description                                       |
| ------------------------------------------ | ------ | ------------------------------------------------- |
| tx\_hash<mark style="color:red;">\*</mark> | string | The hash of the transaction to make the query on. |

#### Headers

| Name                                            | Type   | Description                 |
| ----------------------------------------------- | ------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | string | A JWT authentication token. |
| Content-Type<mark style="color:red;">\*</mark>  | string | application/json            |

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

```
{
  "success": true
}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="400" %}

```
"bad request": Incorrect request. Check if you entered the right request parameters.
```

{% endtab %}

{% tab title="4700" %}

```
"no transaction receipt": The transaction hash doesn't exist. The transaction is either not processed or non-existant.
```

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

**Request Example**

```
curl -X GET "https://api.klipwallet.com/v2/wallet/receipt?tx_hash=0x880a45d3c482c7d794c2e7b7dbdc9e933a68f4a1f3d978d582ba9f9ebd1f9e72" \
-H "Authorization: ACCESS_TOKEN" -H "Content-Type: application/json"
```

**Response Details**

| Item    | Type | Description                                     |
| ------- | ---- | ----------------------------------------------- |
| success | bool | Returns whether the transaction was successful. |

For more details, please refer to our [Card Minting Tutorial](/tutorial/tutorial-card-minting.md#get-receipt).\
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://forum.klaytn.com/c/klip-api/28).


---

# 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://en.docs.klipwallet.com/rest-api/rest-api-card-minting.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.
