Capture Transaction
curl --request POST \
--url https://api.payaza.africa/live/card/auth_capture/capture \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"authorization_reference": "AUTH-ABCD1234EFGH5678IJKL",
"capture_reference": "CAP-001"
}
'import requests
url = "https://api.payaza.africa/live/card/auth_capture/capture"
payload = {
"authorization_reference": "AUTH-ABCD1234EFGH5678IJKL",
"capture_reference": "CAP-001"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
authorization_reference: 'AUTH-ABCD1234EFGH5678IJKL',
capture_reference: 'CAP-001'
})
};
fetch('https://api.payaza.africa/live/card/auth_capture/capture', 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.payaza.africa/live/card/auth_capture/capture",
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([
'authorization_reference' => 'AUTH-ABCD1234EFGH5678IJKL',
'capture_reference' => 'CAP-001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.payaza.africa/live/card/auth_capture/capture"
payload := strings.NewReader("{\n \"authorization_reference\": \"AUTH-ABCD1234EFGH5678IJKL\",\n \"capture_reference\": \"CAP-001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://api.payaza.africa/live/card/auth_capture/capture")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"authorization_reference\": \"AUTH-ABCD1234EFGH5678IJKL\",\n \"capture_reference\": \"CAP-001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/card/auth_capture/capture")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"authorization_reference\": \"AUTH-ABCD1234EFGH5678IJKL\",\n \"capture_reference\": \"CAP-001\"\n}"
response = http.request(request)
puts response.read_body{
"authorization_reference": "AUTH-1234567890",
"status": "AUTHORIZED",
"authorization_code": "123456",
"authorized_amount": 100,
"currency": "NGN",
"expires_at": "2025-01-19T10:30:00",
"message": "Authorization successful"
}Auth-Capture-Void
Capture Transaction
This endpoint captures a previously authorized transaction.
POST
/
card
/
auth_capture
/
capture
Capture Transaction
curl --request POST \
--url https://api.payaza.africa/live/card/auth_capture/capture \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"authorization_reference": "AUTH-ABCD1234EFGH5678IJKL",
"capture_reference": "CAP-001"
}
'import requests
url = "https://api.payaza.africa/live/card/auth_capture/capture"
payload = {
"authorization_reference": "AUTH-ABCD1234EFGH5678IJKL",
"capture_reference": "CAP-001"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
authorization_reference: 'AUTH-ABCD1234EFGH5678IJKL',
capture_reference: 'CAP-001'
})
};
fetch('https://api.payaza.africa/live/card/auth_capture/capture', 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.payaza.africa/live/card/auth_capture/capture",
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([
'authorization_reference' => 'AUTH-ABCD1234EFGH5678IJKL',
'capture_reference' => 'CAP-001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.payaza.africa/live/card/auth_capture/capture"
payload := strings.NewReader("{\n \"authorization_reference\": \"AUTH-ABCD1234EFGH5678IJKL\",\n \"capture_reference\": \"CAP-001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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://api.payaza.africa/live/card/auth_capture/capture")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"authorization_reference\": \"AUTH-ABCD1234EFGH5678IJKL\",\n \"capture_reference\": \"CAP-001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/card/auth_capture/capture")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"authorization_reference\": \"AUTH-ABCD1234EFGH5678IJKL\",\n \"capture_reference\": \"CAP-001\"\n}"
response = http.request(request)
puts response.read_body{
"authorization_reference": "AUTH-1234567890",
"status": "AUTHORIZED",
"authorization_code": "123456",
"authorized_amount": 100,
"currency": "NGN",
"expires_at": "2025-01-19T10:30:00",
"message": "Authorization successful"
}Authorizations
Payaza {{Public API Key in Base 64}}
Body
application/json
Response
Capture Transaction
Status of the capture operation (e.g., AUTHORIZED, ERROR).
Example:
"AUTHORIZED"
Descriptive message about the operation status.
Example:
"Authorization successful"
The reference of the authorization being captured.
Example:
"AUTH-1234567890"
Authorization code for the captured transaction.
Example:
"123456"
The amount successfully captured.
Example:
100
Currency code.
Example:
"NGN"
Timestamp related to authorization expiration (if relevant).
Example:
"2025-01-19T10:30:00"
Error code if the capture failed.
Example:
"AUTH_EXPIRED"
Detailed error description.
Example:
"Authorization has expired"