Create a Card
curl --request POST \
--url https://api.payvessel.com/pms/api/external/request/virtual-cards/ \
--header 'Content-Type: <content-type>' \
--header 'api-key: <api-key>' \
--header 'api-secret: <api-secret>' \
--data '
{
"first_name": "Jane",
"last_name": "Doe",
"email": "jane.doe@example.com",
"phone": "08031234567",
"bvn": "22345678901",
"nin": "12345678901",
"dob": "1990-05-15",
"image": "data:image/jpeg;base64,YOUR_BASE64_IDENTITY_IMAGE",
"state": "Lagos",
"lga": "Ikeja",
"street": "12 Admiralty Way, Lekki Phase 1",
"postal_code": "101233",
"brand": "VISA",
"currency": "USD",
"prefund_amount": "10.00",
"card_name": "Jane Doe"
}
'import requests
url = "https://api.payvessel.com/pms/api/external/request/virtual-cards/"
payload = {
"first_name": "Jane",
"last_name": "Doe",
"email": "jane.doe@example.com",
"phone": "08031234567",
"bvn": "22345678901",
"nin": "12345678901",
"dob": "1990-05-15",
"image": "data:image/jpeg;base64,YOUR_BASE64_IDENTITY_IMAGE",
"state": "Lagos",
"lga": "Ikeja",
"street": "12 Admiralty Way, Lekki Phase 1",
"postal_code": "101233",
"brand": "VISA",
"currency": "USD",
"prefund_amount": "10.00",
"card_name": "Jane Doe"
}
headers = {
"api-key": "<api-key>",
"api-secret": "<api-secret>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'api-key': '<api-key>',
'api-secret': '<api-secret>',
'Content-Type': '<content-type>'
},
body: JSON.stringify({
first_name: 'Jane',
last_name: 'Doe',
email: 'jane.doe@example.com',
phone: '08031234567',
bvn: '22345678901',
nin: '12345678901',
dob: '1990-05-15',
image: 'data:image/jpeg;base64,YOUR_BASE64_IDENTITY_IMAGE',
state: 'Lagos',
lga: 'Ikeja',
street: '12 Admiralty Way, Lekki Phase 1',
postal_code: '101233',
brand: 'VISA',
currency: 'USD',
prefund_amount: '10.00',
card_name: 'Jane Doe'
})
};
fetch('https://api.payvessel.com/pms/api/external/request/virtual-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.payvessel.com/pms/api/external/request/virtual-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([
'first_name' => 'Jane',
'last_name' => 'Doe',
'email' => 'jane.doe@example.com',
'phone' => '08031234567',
'bvn' => '22345678901',
'nin' => '12345678901',
'dob' => '1990-05-15',
'image' => 'data:image/jpeg;base64,YOUR_BASE64_IDENTITY_IMAGE',
'state' => 'Lagos',
'lga' => 'Ikeja',
'street' => '12 Admiralty Way, Lekki Phase 1',
'postal_code' => '101233',
'brand' => 'VISA',
'currency' => 'USD',
'prefund_amount' => '10.00',
'card_name' => 'Jane Doe'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"api-key: <api-key>",
"api-secret: <api-secret>"
],
]);
$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.payvessel.com/pms/api/external/request/virtual-cards/"
payload := strings.NewReader("{\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phone\": \"08031234567\",\n \"bvn\": \"22345678901\",\n \"nin\": \"12345678901\",\n \"dob\": \"1990-05-15\",\n \"image\": \"data:image/jpeg;base64,YOUR_BASE64_IDENTITY_IMAGE\",\n \"state\": \"Lagos\",\n \"lga\": \"Ikeja\",\n \"street\": \"12 Admiralty Way, Lekki Phase 1\",\n \"postal_code\": \"101233\",\n \"brand\": \"VISA\",\n \"currency\": \"USD\",\n \"prefund_amount\": \"10.00\",\n \"card_name\": \"Jane Doe\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("api-secret", "<api-secret>")
req.Header.Add("Content-Type", "<content-type>")
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.payvessel.com/pms/api/external/request/virtual-cards/")
.header("api-key", "<api-key>")
.header("api-secret", "<api-secret>")
.header("Content-Type", "<content-type>")
.body("{\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phone\": \"08031234567\",\n \"bvn\": \"22345678901\",\n \"nin\": \"12345678901\",\n \"dob\": \"1990-05-15\",\n \"image\": \"data:image/jpeg;base64,YOUR_BASE64_IDENTITY_IMAGE\",\n \"state\": \"Lagos\",\n \"lga\": \"Ikeja\",\n \"street\": \"12 Admiralty Way, Lekki Phase 1\",\n \"postal_code\": \"101233\",\n \"brand\": \"VISA\",\n \"currency\": \"USD\",\n \"prefund_amount\": \"10.00\",\n \"card_name\": \"Jane Doe\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payvessel.com/pms/api/external/request/virtual-cards/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["api-secret"] = '<api-secret>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phone\": \"08031234567\",\n \"bvn\": \"22345678901\",\n \"nin\": \"12345678901\",\n \"dob\": \"1990-05-15\",\n \"image\": \"data:image/jpeg;base64,YOUR_BASE64_IDENTITY_IMAGE\",\n \"state\": \"Lagos\",\n \"lga\": \"Ikeja\",\n \"street\": \"12 Admiralty Way, Lekki Phase 1\",\n \"postal_code\": \"101233\",\n \"brand\": \"VISA\",\n \"currency\": \"USD\",\n \"prefund_amount\": \"10.00\",\n \"card_name\": \"Jane Doe\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Virtual card creation started",
"data": {
"id": "7f219a25-d968-4894-9a8b-ba83fa0bf6ec",
"status": "PENDING",
"masked_pan": "",
"balance": "10.00",
"currency": "USD",
"brand": "VISA"
}
}{
"error": 401,
"message": "Unauthorized. Please check your API key."
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Issuing
Create a Card
Virtual card API: create a USD Visa or Mastercard virtual card for a customer with KYC and optional prefund (asynchronous).
POST
/
pms
/
api
/
external
/
request
/
virtual-cards
/
Create a Card
curl --request POST \
--url https://api.payvessel.com/pms/api/external/request/virtual-cards/ \
--header 'Content-Type: <content-type>' \
--header 'api-key: <api-key>' \
--header 'api-secret: <api-secret>' \
--data '
{
"first_name": "Jane",
"last_name": "Doe",
"email": "jane.doe@example.com",
"phone": "08031234567",
"bvn": "22345678901",
"nin": "12345678901",
"dob": "1990-05-15",
"image": "data:image/jpeg;base64,YOUR_BASE64_IDENTITY_IMAGE",
"state": "Lagos",
"lga": "Ikeja",
"street": "12 Admiralty Way, Lekki Phase 1",
"postal_code": "101233",
"brand": "VISA",
"currency": "USD",
"prefund_amount": "10.00",
"card_name": "Jane Doe"
}
'import requests
url = "https://api.payvessel.com/pms/api/external/request/virtual-cards/"
payload = {
"first_name": "Jane",
"last_name": "Doe",
"email": "jane.doe@example.com",
"phone": "08031234567",
"bvn": "22345678901",
"nin": "12345678901",
"dob": "1990-05-15",
"image": "data:image/jpeg;base64,YOUR_BASE64_IDENTITY_IMAGE",
"state": "Lagos",
"lga": "Ikeja",
"street": "12 Admiralty Way, Lekki Phase 1",
"postal_code": "101233",
"brand": "VISA",
"currency": "USD",
"prefund_amount": "10.00",
"card_name": "Jane Doe"
}
headers = {
"api-key": "<api-key>",
"api-secret": "<api-secret>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'api-key': '<api-key>',
'api-secret': '<api-secret>',
'Content-Type': '<content-type>'
},
body: JSON.stringify({
first_name: 'Jane',
last_name: 'Doe',
email: 'jane.doe@example.com',
phone: '08031234567',
bvn: '22345678901',
nin: '12345678901',
dob: '1990-05-15',
image: 'data:image/jpeg;base64,YOUR_BASE64_IDENTITY_IMAGE',
state: 'Lagos',
lga: 'Ikeja',
street: '12 Admiralty Way, Lekki Phase 1',
postal_code: '101233',
brand: 'VISA',
currency: 'USD',
prefund_amount: '10.00',
card_name: 'Jane Doe'
})
};
fetch('https://api.payvessel.com/pms/api/external/request/virtual-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.payvessel.com/pms/api/external/request/virtual-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([
'first_name' => 'Jane',
'last_name' => 'Doe',
'email' => 'jane.doe@example.com',
'phone' => '08031234567',
'bvn' => '22345678901',
'nin' => '12345678901',
'dob' => '1990-05-15',
'image' => 'data:image/jpeg;base64,YOUR_BASE64_IDENTITY_IMAGE',
'state' => 'Lagos',
'lga' => 'Ikeja',
'street' => '12 Admiralty Way, Lekki Phase 1',
'postal_code' => '101233',
'brand' => 'VISA',
'currency' => 'USD',
'prefund_amount' => '10.00',
'card_name' => 'Jane Doe'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"api-key: <api-key>",
"api-secret: <api-secret>"
],
]);
$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.payvessel.com/pms/api/external/request/virtual-cards/"
payload := strings.NewReader("{\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phone\": \"08031234567\",\n \"bvn\": \"22345678901\",\n \"nin\": \"12345678901\",\n \"dob\": \"1990-05-15\",\n \"image\": \"data:image/jpeg;base64,YOUR_BASE64_IDENTITY_IMAGE\",\n \"state\": \"Lagos\",\n \"lga\": \"Ikeja\",\n \"street\": \"12 Admiralty Way, Lekki Phase 1\",\n \"postal_code\": \"101233\",\n \"brand\": \"VISA\",\n \"currency\": \"USD\",\n \"prefund_amount\": \"10.00\",\n \"card_name\": \"Jane Doe\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("api-key", "<api-key>")
req.Header.Add("api-secret", "<api-secret>")
req.Header.Add("Content-Type", "<content-type>")
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.payvessel.com/pms/api/external/request/virtual-cards/")
.header("api-key", "<api-key>")
.header("api-secret", "<api-secret>")
.header("Content-Type", "<content-type>")
.body("{\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phone\": \"08031234567\",\n \"bvn\": \"22345678901\",\n \"nin\": \"12345678901\",\n \"dob\": \"1990-05-15\",\n \"image\": \"data:image/jpeg;base64,YOUR_BASE64_IDENTITY_IMAGE\",\n \"state\": \"Lagos\",\n \"lga\": \"Ikeja\",\n \"street\": \"12 Admiralty Way, Lekki Phase 1\",\n \"postal_code\": \"101233\",\n \"brand\": \"VISA\",\n \"currency\": \"USD\",\n \"prefund_amount\": \"10.00\",\n \"card_name\": \"Jane Doe\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payvessel.com/pms/api/external/request/virtual-cards/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api-key"] = '<api-key>'
request["api-secret"] = '<api-secret>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane.doe@example.com\",\n \"phone\": \"08031234567\",\n \"bvn\": \"22345678901\",\n \"nin\": \"12345678901\",\n \"dob\": \"1990-05-15\",\n \"image\": \"data:image/jpeg;base64,YOUR_BASE64_IDENTITY_IMAGE\",\n \"state\": \"Lagos\",\n \"lga\": \"Ikeja\",\n \"street\": \"12 Admiralty Way, Lekki Phase 1\",\n \"postal_code\": \"101233\",\n \"brand\": \"VISA\",\n \"currency\": \"USD\",\n \"prefund_amount\": \"10.00\",\n \"card_name\": \"Jane Doe\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Virtual card creation started",
"data": {
"id": "7f219a25-d968-4894-9a8b-ba83fa0bf6ec",
"status": "PENDING",
"masked_pan": "",
"balance": "10.00",
"currency": "USD",
"brand": "VISA"
}
}{
"error": 401,
"message": "Unauthorized. Please check your API key."
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}This resource allows you to create a card for a customer. This operation is asynchronous, meaning we notify you via a webhook event on the final status.
Headers
Your Payvessel public API key
Your Payvessel secret
Request content type
Available options:
application/json Body
application/json
Card network
Available options:
VISA, MASTERCARD Must be USD for customer cards
Available options:
USD Customer first name
Customer last name
Email address
Nigerian phone number
11-digit Bank Verification Number
11-digit National Identification Number
Date of birth (YYYY-MM-DD)
Base64-encoded identity document image
State of residence
Local government area
Street address
Postal code
Optional initial card balance in USD (minimum 3.00 when provided)
Example:
"10.00"
Optional label on card (max 255 characters)
⌘I
