curl --request POST \
--url https://api.kemycard.com/v1/wallets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"blockchain": "solana",
"currency": "USDC",
"reference": "order-1001",
"type": "collect",
"destination_address": "YOUR_SOLANA_ADDRESS"
}
'import requests
url = "https://api.kemycard.com/v1/wallets"
payload = {
"customer_code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"blockchain": "solana",
"currency": "USDC",
"reference": "order-1001",
"type": "collect",
"destination_address": "YOUR_SOLANA_ADDRESS"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_code: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
blockchain: 'solana',
currency: 'USDC',
reference: 'order-1001',
type: 'collect',
destination_address: 'YOUR_SOLANA_ADDRESS'
})
};
fetch('https://api.kemycard.com/v1/wallets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kemycard.com/v1/wallets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer_code' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'blockchain' => 'solana',
'currency' => 'USDC',
'reference' => 'order-1001',
'type' => 'collect',
'destination_address' => 'YOUR_SOLANA_ADDRESS'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kemycard.com/v1/wallets"
payload := strings.NewReader("{\n \"customer_code\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"blockchain\": \"solana\",\n \"currency\": \"USDC\",\n \"reference\": \"order-1001\",\n \"type\": \"collect\",\n \"destination_address\": \"YOUR_SOLANA_ADDRESS\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kemycard.com/v1/wallets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_code\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"blockchain\": \"solana\",\n \"currency\": \"USDC\",\n \"reference\": \"order-1001\",\n \"type\": \"collect\",\n \"destination_address\": \"YOUR_SOLANA_ADDRESS\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kemycard.com/v1/wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_code\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"blockchain\": \"solana\",\n \"currency\": \"USDC\",\n \"reference\": \"order-1001\",\n \"type\": \"collect\",\n \"destination_address\": \"YOUR_SOLANA_ADDRESS\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "standard",
"customer_code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference": "order-1001",
"blockchain": "solana",
"currency": "USDC",
"address": "CUSTOMER_DEPOSIT_ADDRESS",
"balance": 98.5,
"destination_address": null,
"forward_threshold": null,
"status": "active",
"created_at": "2023-11-07T05:31:56Z"
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"mode": "test",
"timestamp": "2023-11-07T05:31:56Z"
}
}Create a Wallet
Creates a crypto wallet for a customer and returns its deposit address. Use it to collect funds from your customers, or as the crypto side of a virtual bank account. See the Crypto Wallets guide for the use cases and the full flow.
- Available from KYC Level 1 (
basic). The limits that apply are those of the service the wallet is used with. - Without
reference, a customer has one permanent wallet per blockchain. Calling this endpoint again for the same customer and blockchain returns the existing wallet with a200status, and nothing is charged. - With a
reference(an order, an invoice, a session…), you open an additional address for the same customer on the same blockchain. Use a new reference each time you need a new address; the same reference always returns the same wallet. - The wallet creation fee is debited from your
othersops balance when a new wallet is created (201). It is refunded if the wallet cannot be created. Standard wallet: 1.Collectwallet:0.50.
Two types of wallet (type):
standard(default): the wallet keeps its balance, and you withdraw it withPOST /wallets/{code}/withdrawals. Available on every plan, Découverte included.collect: USDC on Solana or Base only, available on every plan, Découverte included.destination_addressis required. Each deposit is added to the balance of the wallet with no deposit fee, and as soon as the balance reaches $3, the whole balance is forwarded todestination_address, minus the commission of your plan and the network fee. See Collect wallets.
blockchain | currency | standard | collect |
|---|---|---|---|
solana | USDC | Yes | Yes |
base | USDC | Yes | Yes |
ethereum | USDC | Yes | No |
tron | USDT | Yes | No |
curl --request POST \
--url https://api.kemycard.com/v1/wallets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"blockchain": "solana",
"currency": "USDC",
"reference": "order-1001",
"type": "collect",
"destination_address": "YOUR_SOLANA_ADDRESS"
}
'import requests
url = "https://api.kemycard.com/v1/wallets"
payload = {
"customer_code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"blockchain": "solana",
"currency": "USDC",
"reference": "order-1001",
"type": "collect",
"destination_address": "YOUR_SOLANA_ADDRESS"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_code: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
blockchain: 'solana',
currency: 'USDC',
reference: 'order-1001',
type: 'collect',
destination_address: 'YOUR_SOLANA_ADDRESS'
})
};
fetch('https://api.kemycard.com/v1/wallets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kemycard.com/v1/wallets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer_code' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'blockchain' => 'solana',
'currency' => 'USDC',
'reference' => 'order-1001',
'type' => 'collect',
'destination_address' => 'YOUR_SOLANA_ADDRESS'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.kemycard.com/v1/wallets"
payload := strings.NewReader("{\n \"customer_code\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"blockchain\": \"solana\",\n \"currency\": \"USDC\",\n \"reference\": \"order-1001\",\n \"type\": \"collect\",\n \"destination_address\": \"YOUR_SOLANA_ADDRESS\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.kemycard.com/v1/wallets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_code\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"blockchain\": \"solana\",\n \"currency\": \"USDC\",\n \"reference\": \"order-1001\",\n \"type\": \"collect\",\n \"destination_address\": \"YOUR_SOLANA_ADDRESS\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kemycard.com/v1/wallets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_code\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"blockchain\": \"solana\",\n \"currency\": \"USDC\",\n \"reference\": \"order-1001\",\n \"type\": \"collect\",\n \"destination_address\": \"YOUR_SOLANA_ADDRESS\"\n}"
response = http.request(request)
puts response.read_bodystandard wallet keeps its balance until you withdraw it (paid plans). A collect wallet (USDC on Solana or Base, every plan, Découverte included) forwards its whole balance to your destination_address as soon as it reaches $3, with no deposit fee. See Collect wallets.curl -X POST https://api.kemycard.com/v1/wallets \
-H "Authorization: Bearer sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"customer_code": "bf75d143-e2ff-4872-8c93-cc6157f834aa",
"blockchain": "solana",
"type": "collect",
"destination_address": "YOUR_SOLANA_ADDRESS"
}'
destination_address is an address on the blockchain of the wallet. Forwards are blockchain transfers: they cannot be cancelled or reversed.Body
Optional. Your own label for this address: an order number, an invoice number, a session id...
Each new reference opens an additional address for the customer on this blockchain (the creation
fee applies). The same reference returns the same wallet, at no cost. Letters, digits and . _ : -.
64"order-1001"
Required for a collect wallet, refused for a standard wallet. The address that receives the forwards,
on the same blockchain as the wallet. It cannot be the address of a KemyCard collect wallet. You can
change it later with PATCH /wallets/{code}/destination.
"YOUR_SOLANA_ADDRESS"