curl --request POST \
--url https://api.kemycard.com/v1/cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_code": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"product_code": "019abc12-3456-7890-abcd-ef0123456789",
"amount": 100
}
'import requests
url = "https://api.kemycard.com/v1/cards"
payload = {
"customer_code": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"product_code": "019abc12-3456-7890-abcd-ef0123456789",
"amount": 100
}
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: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
product_code: '019abc12-3456-7890-abcd-ef0123456789',
amount: 100
})
};
fetch('https://api.kemycard.com/v1/cards', 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/cards",
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' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'product_code' => '019abc12-3456-7890-abcd-ef0123456789',
'amount' => 100
]),
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/cards"
payload := strings.NewReader("{\n \"customer_code\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"product_code\": \"019abc12-3456-7890-abcd-ef0123456789\",\n \"amount\": 100\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/cards")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_code\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"product_code\": \"019abc12-3456-7890-abcd-ef0123456789\",\n \"amount\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kemycard.com/v1/cards")
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\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"product_code\": \"019abc12-3456-7890-abcd-ef0123456789\",\n \"amount\": 100\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand": "MASTERCARD",
"name_on_card": "John Doe",
"cardholder": "customer",
"status": "pending",
"balance": 123,
"currency": "<string>",
"last_four": "<string>",
"expiry": "12/29",
"sensitive_data_display": "direct",
"fees": {
"card_fee": 5,
"service_fee": 2.9,
"total_charged": 107.9
},
"created_at": "2023-11-07T05:31:56Z"
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"mode": "test",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "Insufficient ops balance.",
"details": {
"required": 50,
"available": 10,
"balance_type": "cards_mastercard"
}
}
}{
"success": false,
"error": {
"code": "PLAN_LIMIT_REACHED",
"message": "The Découverte plan includes virtual cards only. Upgrade to a paid plan (Starter, Business or Premium) to issue physical cards.",
"details": {
"plan": "decouverte"
}
}
}{
"success": false,
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found.",
"details": null
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Missing required fields.",
"details": {}
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"mode": "test",
"timestamp": "2023-11-07T05:31:56Z"
}
}Create a Card
Creates a card for a customer from a card product (see GET /cards/products).
Your ops balance (cards_visa or cards_mastercard, depending on the product brand) is debited of the
initial load plus the fees of your plan returned on the product (fees): creation_fee, reload_fee on the
amount loaded and, for the 493 ATM card, the first year of annual_fee.
On the Découverte plan, only virtual cards can be created (a physical card returns 403 PLAN_LIMIT_REACHED),
with no limit on the number of cards or the amount loaded.
A level 1 (basic) customer can receive a card, within limits: at most 5,000 USD loaded per calendar
month across all of the customer’s cards, plus the level 1 limits of the product
(limits.max_card_per_user_kyc_level_1, limits.load_limit_30_days_kyc_level_1). Beyond them, the call returns
422 VALIDATION_ERROR with details.kyc_required: true. These limits are lifted once the customer reaches level 2
(see KYC levels).
The name on the card is not part of the request. For a customer at level 2 or above, it is the customer’s
verified name. For a level 1 customer, the card is issued under your verified identity
(the name on your identity document and your account email), and cardholder is partner; the call is
refused if your own identity or proof of address verification is not approved. Once the customer reaches
level 2 (verified), their new cards are issued in their own name.
The card is returned with status: pending and issued asynchronously. You are notified by webhook:
card.activated when the card is ready, or card.creation_failed if it could not be issued — in that case
the full amount is refunded to the same cards_visa or cards_mastercard balance.
The call is refused when the customer is not active, when its verification level is below the product’s
required_level, when it already holds the maximum number of cards for this product, or when the amount is
outside the product’s initial load range.
curl --request POST \
--url https://api.kemycard.com/v1/cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_code": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"product_code": "019abc12-3456-7890-abcd-ef0123456789",
"amount": 100
}
'import requests
url = "https://api.kemycard.com/v1/cards"
payload = {
"customer_code": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"product_code": "019abc12-3456-7890-abcd-ef0123456789",
"amount": 100
}
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: 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
product_code: '019abc12-3456-7890-abcd-ef0123456789',
amount: 100
})
};
fetch('https://api.kemycard.com/v1/cards', 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/cards",
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' => 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
'product_code' => '019abc12-3456-7890-abcd-ef0123456789',
'amount' => 100
]),
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/cards"
payload := strings.NewReader("{\n \"customer_code\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"product_code\": \"019abc12-3456-7890-abcd-ef0123456789\",\n \"amount\": 100\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/cards")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_code\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"product_code\": \"019abc12-3456-7890-abcd-ef0123456789\",\n \"amount\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kemycard.com/v1/cards")
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\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n \"product_code\": \"019abc12-3456-7890-abcd-ef0123456789\",\n \"amount\": 100\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"product_code": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"brand": "MASTERCARD",
"name_on_card": "John Doe",
"cardholder": "customer",
"status": "pending",
"balance": 123,
"currency": "<string>",
"last_four": "<string>",
"expiry": "12/29",
"sensitive_data_display": "direct",
"fees": {
"card_fee": 5,
"service_fee": 2.9,
"total_charged": 107.9
},
"created_at": "2023-11-07T05:31:56Z"
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"mode": "test",
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"success": false,
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "Insufficient ops balance.",
"details": {
"required": 50,
"available": 10,
"balance_type": "cards_mastercard"
}
}
}{
"success": false,
"error": {
"code": "PLAN_LIMIT_REACHED",
"message": "The Découverte plan includes virtual cards only. Upgrade to a paid plan (Starter, Business or Premium) to issue physical cards.",
"details": {
"plan": "decouverte"
}
}
}{
"success": false,
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found.",
"details": null
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Missing required fields.",
"details": {}
},
"meta": {
"request_id": "a4f8e2c1b3d97056",
"mode": "test",
"timestamp": "2023-11-07T05:31:56Z"
}
}