Submit Card Details
curl --request POST \
--url https://sandbox-api.payfonte.com/payments/v1/cards/process \
--header 'Content-Type: application/json' \
--header 'client-id: <api-key>' \
--header 'client-secret: <api-key>' \
--data '
{
"provider": "card-nigeria",
"amount": 50000,
"card": {
"pan": "5061 4604 1012 1111 102",
"expiry": {
"month": "12",
"year": "2050"
},
"cvv": "558",
"cardHolderName": "Emily Heidenreich-Kohler"
}
}
'import requests
url = "https://sandbox-api.payfonte.com/payments/v1/cards/process"
payload = {
"provider": "card-nigeria",
"amount": 50000,
"card": {
"pan": "5061 4604 1012 1111 102",
"expiry": {
"month": "12",
"year": "2050"
},
"cvv": "558",
"cardHolderName": "Emily Heidenreich-Kohler"
}
}
headers = {
"client-id": "<api-key>",
"client-secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'client-id': '<api-key>',
'client-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
provider: 'card-nigeria',
amount: 50000,
card: {
pan: '5061 4604 1012 1111 102',
expiry: {month: '12', year: '2050'},
cvv: '558',
cardHolderName: 'Emily Heidenreich-Kohler'
}
})
};
fetch('https://sandbox-api.payfonte.com/payments/v1/cards/process', 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://sandbox-api.payfonte.com/payments/v1/cards/process",
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([
'provider' => 'card-nigeria',
'amount' => 50000,
'card' => [
'pan' => '5061 4604 1012 1111 102',
'expiry' => [
'month' => '12',
'year' => '2050'
],
'cvv' => '558',
'cardHolderName' => 'Emily Heidenreich-Kohler'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"client-id: <api-key>",
"client-secret: <api-key>"
],
]);
$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://sandbox-api.payfonte.com/payments/v1/cards/process"
payload := strings.NewReader("{\n \"provider\": \"card-nigeria\",\n \"amount\": 50000,\n \"card\": {\n \"pan\": \"5061 4604 1012 1111 102\",\n \"expiry\": {\n \"month\": \"12\",\n \"year\": \"2050\"\n },\n \"cvv\": \"558\",\n \"cardHolderName\": \"Emily Heidenreich-Kohler\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("client-id", "<api-key>")
req.Header.Add("client-secret", "<api-key>")
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://sandbox-api.payfonte.com/payments/v1/cards/process")
.header("client-id", "<api-key>")
.header("client-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"provider\": \"card-nigeria\",\n \"amount\": 50000,\n \"card\": {\n \"pan\": \"5061 4604 1012 1111 102\",\n \"expiry\": {\n \"month\": \"12\",\n \"year\": \"2050\"\n },\n \"cvv\": \"558\",\n \"cardHolderName\": \"Emily Heidenreich-Kohler\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.payfonte.com/payments/v1/cards/process")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["client-id"] = '<api-key>'
request["client-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"provider\": \"card-nigeria\",\n \"amount\": 50000,\n \"card\": {\n \"pan\": \"5061 4604 1012 1111 102\",\n \"expiry\": {\n \"month\": \"12\",\n \"year\": \"2050\"\n },\n \"cvv\": \"558\",\n \"cardHolderName\": \"Emily Heidenreich-Kohler\"\n }\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"data": {
"reference": "DCD20260701133425EIQWF",
"action": "pin",
"data": {}
}
}
Card Collections
Submit Card Details
Submit customer card details to start a card payment. Sandbox card test data is available in Testing.
POST
/
payments
/
v1
/
cards
/
process
Submit Card Details
curl --request POST \
--url https://sandbox-api.payfonte.com/payments/v1/cards/process \
--header 'Content-Type: application/json' \
--header 'client-id: <api-key>' \
--header 'client-secret: <api-key>' \
--data '
{
"provider": "card-nigeria",
"amount": 50000,
"card": {
"pan": "5061 4604 1012 1111 102",
"expiry": {
"month": "12",
"year": "2050"
},
"cvv": "558",
"cardHolderName": "Emily Heidenreich-Kohler"
}
}
'import requests
url = "https://sandbox-api.payfonte.com/payments/v1/cards/process"
payload = {
"provider": "card-nigeria",
"amount": 50000,
"card": {
"pan": "5061 4604 1012 1111 102",
"expiry": {
"month": "12",
"year": "2050"
},
"cvv": "558",
"cardHolderName": "Emily Heidenreich-Kohler"
}
}
headers = {
"client-id": "<api-key>",
"client-secret": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'client-id': '<api-key>',
'client-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
provider: 'card-nigeria',
amount: 50000,
card: {
pan: '5061 4604 1012 1111 102',
expiry: {month: '12', year: '2050'},
cvv: '558',
cardHolderName: 'Emily Heidenreich-Kohler'
}
})
};
fetch('https://sandbox-api.payfonte.com/payments/v1/cards/process', 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://sandbox-api.payfonte.com/payments/v1/cards/process",
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([
'provider' => 'card-nigeria',
'amount' => 50000,
'card' => [
'pan' => '5061 4604 1012 1111 102',
'expiry' => [
'month' => '12',
'year' => '2050'
],
'cvv' => '558',
'cardHolderName' => 'Emily Heidenreich-Kohler'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"client-id: <api-key>",
"client-secret: <api-key>"
],
]);
$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://sandbox-api.payfonte.com/payments/v1/cards/process"
payload := strings.NewReader("{\n \"provider\": \"card-nigeria\",\n \"amount\": 50000,\n \"card\": {\n \"pan\": \"5061 4604 1012 1111 102\",\n \"expiry\": {\n \"month\": \"12\",\n \"year\": \"2050\"\n },\n \"cvv\": \"558\",\n \"cardHolderName\": \"Emily Heidenreich-Kohler\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("client-id", "<api-key>")
req.Header.Add("client-secret", "<api-key>")
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://sandbox-api.payfonte.com/payments/v1/cards/process")
.header("client-id", "<api-key>")
.header("client-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"provider\": \"card-nigeria\",\n \"amount\": 50000,\n \"card\": {\n \"pan\": \"5061 4604 1012 1111 102\",\n \"expiry\": {\n \"month\": \"12\",\n \"year\": \"2050\"\n },\n \"cvv\": \"558\",\n \"cardHolderName\": \"Emily Heidenreich-Kohler\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.payfonte.com/payments/v1/cards/process")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["client-id"] = '<api-key>'
request["client-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"provider\": \"card-nigeria\",\n \"amount\": 50000,\n \"card\": {\n \"pan\": \"5061 4604 1012 1111 102\",\n \"expiry\": {\n \"month\": \"12\",\n \"year\": \"2050\"\n },\n \"cvv\": \"558\",\n \"cardHolderName\": \"Emily Heidenreich-Kohler\"\n }\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"data": {
"reference": "DCD20260701133425EIQWF",
"action": "pin",
"data": {}
}
}
Body
application/json
Card payment request
⌘I