Confirm Direct Charge Customer Input
curl --request POST \
--url https://sandbox-api.payfonte.com/payments/v1/payments/confirm \
--header 'Content-Type: application/json' \
--header 'client-id: <api-key>' \
--header 'client-secret: <api-key>' \
--data '
{
"reference": "DDC20260702112401ZIWGF",
"customerInput": {
"otp": "445985"
}
}
'import requests
url = "https://sandbox-api.payfonte.com/payments/v1/payments/confirm"
payload = {
"reference": "DDC20260702112401ZIWGF",
"customerInput": { "otp": "445985" }
}
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({reference: 'DDC20260702112401ZIWGF', customerInput: {otp: '445985'}})
};
fetch('https://sandbox-api.payfonte.com/payments/v1/payments/confirm', 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/payments/confirm",
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([
'reference' => 'DDC20260702112401ZIWGF',
'customerInput' => [
'otp' => '445985'
]
]),
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/payments/confirm"
payload := strings.NewReader("{\n \"reference\": \"DDC20260702112401ZIWGF\",\n \"customerInput\": {\n \"otp\": \"445985\"\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/payments/confirm")
.header("client-id", "<api-key>")
.header("client-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reference\": \"DDC20260702112401ZIWGF\",\n \"customerInput\": {\n \"otp\": \"445985\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.payfonte.com/payments/v1/payments/confirm")
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 \"reference\": \"DDC20260702112401ZIWGF\",\n \"customerInput\": {\n \"otp\": \"445985\"\n }\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 201,
"data": {
"action": "processing",
"sessionId": "cos-1z3x983b01300",
"provider": "qmoney-gambia",
"reference": "DDC20260702115234PTIFG",
"providersReference": "PIX_44241170102532681668",
"amount": 1000,
"totalAmount": 1000,
"charge": 0,
"status": "pending",
"data": {
"message": "OTP submitted successfully. Payment confirmation is processing."
},
"statusDescription": "Awaiting Provider's Feedback"
}
}Collections
Confirm Direct Charge Customer Input
Submit customer input, such as an OTP, when a Direct Charge response returns action as otp.
POST
/
payments
/
v1
/
payments
/
confirm
Confirm Direct Charge Customer Input
curl --request POST \
--url https://sandbox-api.payfonte.com/payments/v1/payments/confirm \
--header 'Content-Type: application/json' \
--header 'client-id: <api-key>' \
--header 'client-secret: <api-key>' \
--data '
{
"reference": "DDC20260702112401ZIWGF",
"customerInput": {
"otp": "445985"
}
}
'import requests
url = "https://sandbox-api.payfonte.com/payments/v1/payments/confirm"
payload = {
"reference": "DDC20260702112401ZIWGF",
"customerInput": { "otp": "445985" }
}
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({reference: 'DDC20260702112401ZIWGF', customerInput: {otp: '445985'}})
};
fetch('https://sandbox-api.payfonte.com/payments/v1/payments/confirm', 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/payments/confirm",
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([
'reference' => 'DDC20260702112401ZIWGF',
'customerInput' => [
'otp' => '445985'
]
]),
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/payments/confirm"
payload := strings.NewReader("{\n \"reference\": \"DDC20260702112401ZIWGF\",\n \"customerInput\": {\n \"otp\": \"445985\"\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/payments/confirm")
.header("client-id", "<api-key>")
.header("client-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reference\": \"DDC20260702112401ZIWGF\",\n \"customerInput\": {\n \"otp\": \"445985\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-api.payfonte.com/payments/v1/payments/confirm")
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 \"reference\": \"DDC20260702112401ZIWGF\",\n \"customerInput\": {\n \"otp\": \"445985\"\n }\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 201,
"data": {
"action": "processing",
"sessionId": "cos-1z3x983b01300",
"provider": "qmoney-gambia",
"reference": "DDC20260702115234PTIFG",
"providersReference": "PIX_44241170102532681668",
"amount": 1000,
"totalAmount": 1000,
"charge": 0,
"status": "pending",
"data": {
"message": "OTP submitted successfully. Payment confirmation is processing."
},
"statusDescription": "Awaiting Provider's Feedback"
}
}Body
application/json
Direct Charge customer input confirmation request
⌘I