Card Minting
This tutorial is a guide to help Klip Partners mint and manage Cards conveniently using APIs.
Last updated
This tutorial is a guide to help Klip Partners mint and manage Cards conveniently using APIs.
Last updated
In order to start minting Cards, you first have to join Klip Partners. Upon requesting membership, you will receive an approval after an individual consultation with the Klip staff. When you receive the approval, you will get a confirmation email and will be eligible to log in to . For more details on membership, please visit . If you need help with this document or with Klip in general, please visit our .
Pass your ID(email
) and password to via .
password
is a 64-digit string and a hash() of the password.
Password is a string consisting of 8-16 alphabet characters, numbers, and special characters.
If the request is successful, it returns the following:
If the request is not successful, it returns the following:
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
If the request is successful, it returns the following:
If the image file is successfully uploaded, it returns the URL address of the uploaded image file.
If the request is not successful, it returns the following:
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
An example of a mint_info.json
file is shown below. This file contains the URL of the Card image and the information necessary to mint Cards.
pin
is used in place of the private key to sign transactions.
PIN Code is a 6-digit string.
If you pass an array with just one element to_address
, it is only sent to one user.
If sendable
TRUE, the recipient of the Card can send that Card to another user on Klip.
The maximum number of elements in the array hashtags
is 10. The maximum number of characters for each element is 100.
If you set external_link
, you can include a URL address that redirects to an external browser outside of Klip. The maximum number of characters is 255.
We recommend the qr_code
image to be at least 400px in width and without margins in any direction.
We recommend the bar_code
image to be at least 400px in width and without margins in any direction.
attributes
is an array of object
s containing the properties of the Cards in the form trait_type/value
.
If the request is successful, it returns the following:
If the request is not successful, it returns the following:
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
If the request is successful, it returns the following:
If the file is uploaded, it returns the URL of the uploaded file.
If the request is not successful, it returns the following:
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
If the request is successful, it returns the following:
If the request is successful, it returns a list of all the BApps and the Cards by BApp.
bapp from bapps
refers to a BApp provided by a Klip Partner.
card from cards
refers to Klip Card used in this BApp. BApp contains one type of Card.
nft_id
refers to the ID of the smart contract from which this card.
nft and bapp always corresponds 1:1.
card_uri
is the URL containing the JSON file of the Card's metadata.
Card metadata contains the basic information of the Card such as name
, description
, image
, background_color
, attributes
defined when minting the Card.
You can get a maximum of 100 elements of BApp information from a single request. If there are over 100 BApps to query, the result will return bapps.next_cursor
, with which you can retrieve the rest of the BApps.
To retrieve the rest of the BApps, set the cursor
parameter with bapps.next_cursor
and make another request to the same endpoint.
From the API response above, you can see that the minter uses 2 BApps. The first BApp has three Cards, and the second BApp has one Card. The bapps[0].cards
array shows you the information including when the Card was created/updated, the address of the Card owner, the address of the Card sender, and the hash of the transaction that minted the Card.
If the number of BApps to query exceeds 100, the reponse will only contain 100 BApps per request along with the bapps.next_cursor
.
To retrieve the rest of the BApps, set the cursor
parameter with bapps.next_cursor
and make another request to the same endpoint.
If the request is not successful, it returns the following:
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
If the request is successful, it returns the following:
If the request is successful, it returns the list of Cards owned by the BApp and their detailed information.
card from cards
refers to Klip Card used in this BApp. BApp contains one type of Card.
You must use either cursor
or isAll
as query parameter (You can use cursor
if isAll
is false
).
If you use cursor
, Pagination will be used.
You can receive information of 100 Cards per one request.
If the number of Cards to query exceeds 100, you can retrieve the rest of the Cardi information using next_cursor
, which is the pointer from which to return the next 100 objects.
To retrive the rest of the Card information, set the cursor
parameter with next_cursor
and make another request to the same endpoint.
From the example above, since the field cards.next_cursor
has a value, this account has over 100 conan Cards.
If the number of Cards to query exceeds 100, the reponse will only contain 100 Cards per request along with the cards.next_cursor
. To retrieve the rest of the Card information, set the cursor
parameter with cards.next_cursor
and make another request to the same endpoint.
For example, if there are a total of 150 Cards from which to retrieve information, the request will return the information of 100 Cards and the cards.next_cursor
.
You can retrieve the information of the remaining 50 Cards, by setting the cursor
parameter with the cards.next_cursor
from the previous step and make another request to the same endpoint.
If the request is not successful, it returns the following:
If the request is successful, it returns the following:
If the request is not successful, it returns the following:
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
If the request is successful, it returns the following:
If the request is not successful, it returns the following:
If the request is successful, it returns the following:
If the request is not successful, it returns the following:
If the request is successful, it returns the following:
If the request is not successful, it returns the following:
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
If the request is successful, it returns the following:
If your request is successful, i will return a list of all Cards used in this BApp and their information.
You must use either cursor
or isAll
as query parameter (You can use cursor
if isAll
is false
).
If the request is not successful, it returns the following:
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
Any user with an EOA can receive Cards.
An example of a send_info.json
file is shown below:
pin
is used in place of the private key to sign transactions.
PIN Code is a 6-digit string.
If the request is successful, it returns the following:
If the request is not successful, it returns the following:
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
In order to use escrow, you first have to enable escrow in the Card minting contract. You do this by using Approve Escrow. You only need to give your approval only once.
An example of the approve.json
is shown below:
pin
is used in place of the private key to sign transactions.
If the request is successful, it returns the following:
If the escrow is successfully initiated, it returns the transaction hash. If the pin
could not be verified, fail_count
returns a number higher than 0.
If the request is not successful, it returns the following:
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
You can find out whether escrow is enabled or not.
If the request is successful, it returns the following:
If the escrow is successfully initiated, the approve
field returns true
.
If the request is not successful, it returns the following:
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
Escrow allows you to send a Card through a link, instead of directly sending it to a Klip Member. In order to use escrow, you first have to send a request to the Create Escrow API to generate a link through which Klip user can receive the Card. You can initiate escrow process for Cards that you hold. Once the escrow process is initiated, the Card will no longer be visible from the Card list.
An example of the escrow_info.json
file is shown below:
pin
is used in place of the private key to sign transactions.
If the request is successful, it returns the following:
If the escrow process is successfully initiated, it returns the transaction hash, the link through which to receive the Card,and the fail_count
reading 0.
If the request is not successful, it returns the following:
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
If the escrow process is initiated successfully, you can retrieve the Cards that are currently in escrow.
If the request is successful, it returns the following:
If the request is not successful, it returns the following:
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
You can the escrow process for Cards that are in escrow. Once cancelled, the Cards become visible in the Card list again.
An example of the cancel_info.json
file is shown below:
pin
is used in place of the private key to sign transactions.
If the request is successful, it returns the following:
If the escrow process is successfully initiated, it returns the transaction hash with fail_count
reading 0.
If the request is not successful, it returns the following:
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
You can find out whether the transaction has been successfully recorded on blockchain. If you attempt to retrieve the result right after sending a transaction request, it may return 4700: no transaction receipt
. It is recommended to wait at least 2 seconds and repeat the request until it succeeds.
If the request is successful, it returns the following:
If the request is not successful, it returns the following:
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
Password is a string consisting of 8-16 alphabet characters, numbers, and special characters.
If the request is successful, it returns the following:
If there is no error, the password should have changed successfully.
If the request is not successful, it returns the following:
old_pin
and new_pin
are used in place of the private key to sign transactions.
The old/new PIN are a 6-digit string of numbers.
If the request is successful, it returns the following:
If there is no error, your PIN should have changed successfully.
If the request is not successful, it returns the following:
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
You can find out the total number of Cards minted using a Partner account. The count is renewed on the 1st day of each month.
If the request is successful, it returns the following:
mint_count
returns the total number of Cards minted.
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
An example of the delete_info.json
file is shown below:
pin
is used in place of the private key to sign transactions.
If the request is successful, it returns the following:
If there is no error, the Card should have been deleted successfully. With successful deletion, it returns the transaction hash.
You can't delete Cards already sent to others. Deleting a Card will not delete the Card image.
If the request is not successful, it returns the following:
If you need help with this document or with Klip in general, please visit our [Developer Forum](https://klipforum.zendesk.com).
When you sign up for , an address and a smart contract is created on the blockchain from which you can mint Cards. klaytn_address
is your address created in the blockchain, and contract_address
is the () from which you can mint Cards.
Card image is what will be visible to Klip users. In order to start minting Cards, you have to upload Card image. Pass the Card image file and the access_token
you received when signing in to via and request image upload.
To mint Cards using , you first have to upload Card images using Upload Image API
Pass the mint_info.json
file, and the access_token
you received when signing in to via . It uses the uploaded Card image. Any user with an EOA can receive the Cards.
pin
is a 64-digit string and hash() of the PIN Code(The 6-digit string that you entered when signing up for Klip Partners).
to_address
is an array of user s that will receive the Cards.
The maximum number of addresses to be included in to_address
is 200 per API request.
If the Card is minted successfully, it returns the the transaction hash of the smart contract. You can track the transaction by entering the hash in to confirm that the transaction has been executed successfully.
If you want to use the animation_url
field when minting Cards, you first have to upload the file of the Card video clip. Pass the file of the clip and the access_token
that you received when signing in via and request Card Video Clip Upload.
After you minted a Card, you can retrieve the Card's information along with the BApp information. Pass the access_token
that you received when siging in to and make the request.
The maximum number of Cards returned for a BApp in a single request is 100. If the number of Cards of a BApp exceeds 100, you can retrieve the rest of the Cards using .
Each BApp has an nft_id
, which is the ID of the smart contract from which the Cards are minted. Pass the path parameter nft_id
and the access_token
which you received when signing up to via .
nft_id
can be found via .
Pass cards.next_cursor
and the access_token
that you received when signing in to via and send a request to retrieve the rest of the Cards.
The details of the cards
array is the same as that of bapps[i].cards
from .
will return the information of up to 100 Cards per request. If the number of Cards by of a BApp exceeds 100, you have to send a request to to retrieve the rest of the Cards. To make a query from the 101st Card, set the cursor
parameter with bapps[i].cards_next_cursor
and send a request to .
For example, say you have 2 BApps. BApp1 has 150 Cards, and BApp2 has 200 Cards. If you send a request to , you will get information of 100 Cards for both BApp1 and BApp2. Pass the access_token
that you received when signing in and and make the request.
To retrieve the information for the rest of the Cards in BApp1, set the cursor
parameter with bapps[0].cards_next_cursor
(gKvkL1lPYv1P93dpE...
) and send a request to .
Pass gKvkL1lPYv1P93dpE...
and the access_token
that you received while signing up to via and send a request to retrieve information for the rest of the 50 Cards in BApp1.
To retrieve the information of the remaining 100 Cards in BApp2, set the cursor
parameter with bapps[1].cards_next_cursor
(Xrzed2Ot9LeEor...
) and send a request to . Pass Xrzed2Ot9LeEor...
and the access_token
that you received when signing in to via and send a request to retrieve the information of the remaining 100 Cards in BApp2.
To get the information of all Cards at once instead of using pagination to get 100 Cards per request, send the Query parameter isAll
, the Path parameter nft_id
and the access_token
that you received when signing in to [Klip Partners](https://global.partners.klipwallet.com via and send a request for all Cards.
The details of the cards
array is the same as that of bapps[i].cards
in .
Pass the access_token
that you received when signing in, the send_info.json
file, nft_id
and card_id
(Path Parameters) of the BApp Cards to send to via , and send a request to send the Card held by the current address to another address.
This file contains the Card name, pin
, and the recipient's address.
pin
is a 64-digit string and hash() of the PIN Code(The 6-digit string that you entered when signing up for Klip Partners).
If the request is successful, it returns the the Card recipient's address, the number of failed attemps, and the hash of the transaction that sent the Card. If the Card is successfully sent, fail_count
returns 0.
This file contains pin
, and the contract_address
, which is the address of the smart contract() that minted the Card.
pin
is a 64-digit string and hash() of the PIN Code(The 6-digit string that you entered when signing up for Klip Partners).
This file contains pin
, and the contract_address
, which is the address of the smart contract() that minted the Card, and the array card_ids
, which will be sent using escrow.
pin
is a 64-digit string and hash() of the PIN Code(The 6-digit string that you entered when signing up for Klip Partners).
For details on the cards
array, please refer to the Response Detail in .
This file contains pin
, the contract_address
, which is the address of the smart contract() that minted the Card, and the array card_ids
, which are Cards for which the escrow process will be cancelled.
pin
is a 64-digit string and hash() of the PIN Code(The 6-digit string that you entered when signing up for Klip Partners).
Send old_password
, new_password
and the access_token
that you received when signing in to via and send a request to change password.
old_password
and new_password
are 64-digit strings and hash() of the old/new passwords.
Pass the old PIN, new PIN, and the access_token
that you received when signing in to via and send a request to change PIN.
old_pin
and new_pin
are 64-digit strings and hash() of the old/new PIN.
Pass the delete_info.json
file, the access_token
that you received when signing in to via and send a request to delete the Card.
This file contains the ID of the Card to delete, the address of the contract that minted the Card, and the PIN.
pin
is a 64-digit string and hash() of the PIN Code(The 6-digit string that you entered when signing up for Klip Partners).