Card Minting

This page explains how to sign in to Klip Partners to mint, retrieve, send, and delete Cards using Card Minting API.

Account Management

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

Sign In

Sign In

POST 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

Request Body

{
  "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
}

Klip Partners 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

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.

For more details, please refer to our Tuturial. If you need help with this document or with Klip in general, please visit our Developer Forum.

Change Password

Change Password

PUT https://api.klipwallet.com/v2/partner/?opt=password

Changes the password that was used to sign up.

Headers

Request Body

{}

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. If you need help with this document or with Klip in general, please visit our Developer Forum.

Change PIN

Change PIN

PUT https://api.klipwallet.com/v2/partner/pin

Changes the PIN Code.

Headers

Request Body

{}

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. If you need help with this document or with Klip in general, please visit our Developer Forum.

Card Management

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

Upload Image

POST https://api.klipwallet.com/v2/wallet/image

Uploads an image to be used for the Card.

Headers

Request Body

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

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. If you need help with this document or with Klip in general, please visit our Developer Forum.

Upload NFT Resource

Upload NFT resource

POST 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

Request Body

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

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. If you need help with this document or with Klip in general, please visit our Developer Forum.

Mint Card to User

Mint Card To User

POST https://api.klipwallet.com/v2/wallet/mint

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

Headers

Request Body

{
  "hash": "0x2d26f602cfbb4c662931592bf2c4ee18d29f09683be5b9e8d589ff935fca0b97"
}
//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

For more details, please refer to our Card Minting Tutorial. If you need help with this document or with Klip in general, please visit our Developer Forum.

Mint Card to Klip Member

Mint Card To Klip Member

POST 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

Request Body

{
  "hash": "0x2d26f602cfbb4c662931592bf2c4ee18d29f09683be5b9e8d589ff935fca0b97",
  "result": [["Bruce", "010-1111-2222", "success", ""], ["Janet", "010-3333-4444", "fail", "phone number does not exist"], ...]
}
//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

For more details, please refer to our Card Minting Tutorial. If you need help with this document or with Klip in general, please visit our Developer Forum.

Get Mint Count

Get Mint Count

GET 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

{
  "mint_count": 10
}

Request Example

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

Response Details

For more details, please refer to our Card Minting Tutorial. If you need help with this document or with Klip in general, please visit our Developer Forum.

Send Card to User

Send Card To User

POST https://api.klipwallet.com/v2/wallet/nft/:nft_id/:card_id/send

Sends Card to other users' EOAs.

Path Parameters

Headers

Request Body

// 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}

You have to include card_name so that the Card name appears for the recipient.

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. If you need help with this document or with Klip in general, please visit our Developer Forum.

Send Card to Klip Member

Send Card To Klip Member

POST 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

Headers

Request Body

// 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: ""}

You have to include card_name so that the Card name appears for the recipient.

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. If you need help with this document or with Klip in general, please visit our Developer Forum.

Get Card List

Get Card List

GET https://api.klipwallet.com/v2/wallet/bapp?cursor=

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

Query Parameters

Headers

{
    "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": ""
}

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];

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

For more details, please refer to our Card Minting Tutorial-1 and Card Minting Tutorial-2. If you need help with this document or with Klip in general, please visit our Developer Forum.

Get Card Information

Get Card Information

GET https://api.klipwallet.com/v2/wallet/nft/:nft_id?cursor=

Returns detailed information of your Cards.

Path Parameters

Query Parameters

Headers

{
    "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",
}

Request Example

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

Response Details

Response Details for cards[i]

For more details, please refer to our Card Minting Tutorial-1 and Card Minting Tutorial-2. If you need help with this document or with Klip in general, please visit our Developer Forum.

Delete Card

Delete Card

DELETE https://api.klipwallet.com/v2/wallet/nft

Deletes a specified Card.

Headers

Request Body

{
    "hash": "0x2d26f602cfbb4c662931592bf2c4ee18d29f09683be5b9e8d589ff935fca0b97"
}

You cannot delete Cards that you sent to others. Deleting the Cards will not delete the Card image.

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. If you need help with this document or with Klip in general, please visit our Developer Forum.

Approve Escrow

Approve Escrow

POST 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

Request Body

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

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. If you need help with this document or with Klip in general, please visit our Developer Forum.

Get Escrow Approval Status

Get Escrow Approval Status

GET https://api.klipwallet.com/v2/escrow/approve

Shows whether escrow is enabled or not.

Query Parameters

Headers

{
  "approve": true
}

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. If you need help with this document or with Klip in general, please visit our Developer Forum.

Create Escrow

Create Escrow

POST https://api.klipwallet.com/v2/escrow

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

Headers

Request Body

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

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.

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. If you need help with this document or with Klip in general, please visit our Developer Forum.

Get Cards in Escrow

Get Cards in Escrow

GET https://api.klipwallet.com/v2/escrow

Returns a list of Cards in escrow.

Query Parameters

Headers

{
    "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",
        }
    ]
}

For more details on cursor, please refer to Pagination.

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

Response Details for cards[i]

For more details, please refer to our Card Minting Tutorial. If you need help with this document or with Klip in general, please visit our Developer Forum.

Cancel Escrow

Cancel Escrow

DELETE https://api.klipwallet.com/v2/escrow

Cancels the escrow process for Cards that are in escrow.

Headers

Request Body

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

This only works for Cards that are currently in escrow, and not Cards already sent. Cancelled Cards will return to the list.

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. If you need help with this document or with Klip in general, please visit our Developer Forum.

Get Transaction Result

Get Transaction Result

GET https://api.klipwallet.com/v2/wallet/receipt

Returns whether the transaction has been successfully recorded on blockchain.

Query Parameters

Headers

{
  "success": true
}

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

For more details, please refer to our Card Minting Tutorial. If you need help with this document or with Klip in general, please visit our Developer Forum.

Last updated