XOF Process OTP
curl --request POST \
--url https://api.payaza.africa/live/subsidiary/collections/v1/process-otp \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'X-ProductID: <api-key>' \
--header 'X-TenantID: <api-key>' \
--data '
{
"payment_token": "45c3d124-7831-4f97-8844-581bf497a20b",
"otp_code": "4567",
"payee": "+2251114462945",
"payment_method": "ORANGE_CI",
"transaction_reference": "MOCIV0009383",
"transaction_channel": "MOMCIV",
"country_code": "CI"
}
'import requests
url = "https://api.payaza.africa/live/subsidiary/collections/v1/process-otp"
payload = {
"payment_token": "45c3d124-7831-4f97-8844-581bf497a20b",
"otp_code": "4567",
"payee": "+2251114462945",
"payment_method": "ORANGE_CI",
"transaction_reference": "MOCIV0009383",
"transaction_channel": "MOMCIV",
"country_code": "CI"
}
headers = {
"Authorization": "<api-key>",
"X-TenantID": "<api-key>",
"X-ProductID": "<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>',
'X-TenantID': '<api-key>',
'X-ProductID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
payment_token: '45c3d124-7831-4f97-8844-581bf497a20b',
otp_code: '4567',
payee: '+2251114462945',
payment_method: 'ORANGE_CI',
transaction_reference: 'MOCIV0009383',
transaction_channel: 'MOMCIV',
country_code: 'CI'
})
};
fetch('https://api.payaza.africa/live/subsidiary/collections/v1/process-otp', 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/subsidiary/collections/v1/process-otp",
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([
'payment_token' => '45c3d124-7831-4f97-8844-581bf497a20b',
'otp_code' => '4567',
'payee' => '+2251114462945',
'payment_method' => 'ORANGE_CI',
'transaction_reference' => 'MOCIV0009383',
'transaction_channel' => 'MOMCIV',
'country_code' => 'CI'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"X-ProductID: <api-key>",
"X-TenantID: <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://api.payaza.africa/live/subsidiary/collections/v1/process-otp"
payload := strings.NewReader("{\n \"payment_token\": \"45c3d124-7831-4f97-8844-581bf497a20b\",\n \"otp_code\": \"4567\",\n \"payee\": \"+2251114462945\",\n \"payment_method\": \"ORANGE_CI\",\n \"transaction_reference\": \"MOCIV0009383\",\n \"transaction_channel\": \"MOMCIV\",\n \"country_code\": \"CI\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("X-TenantID", "<api-key>")
req.Header.Add("X-ProductID", "<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/subsidiary/collections/v1/process-otp")
.header("Authorization", "<api-key>")
.header("X-TenantID", "<api-key>")
.header("X-ProductID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"payment_token\": \"45c3d124-7831-4f97-8844-581bf497a20b\",\n \"otp_code\": \"4567\",\n \"payee\": \"+2251114462945\",\n \"payment_method\": \"ORANGE_CI\",\n \"transaction_reference\": \"MOCIV0009383\",\n \"transaction_channel\": \"MOMCIV\",\n \"country_code\": \"CI\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/subsidiary/collections/v1/process-otp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["X-TenantID"] = '<api-key>'
request["X-ProductID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payment_token\": \"45c3d124-7831-4f97-8844-581bf497a20b\",\n \"otp_code\": \"4567\",\n \"payee\": \"+2251114462945\",\n \"payment_method\": \"ORANGE_CI\",\n \"transaction_reference\": \"MOCIV0009383\",\n \"transaction_channel\": \"MOMCIV\",\n \"country_code\": \"CI\"\n}"
response = http.request(request)
puts response.read_body{
"response_code": "09",
"response_message": "PENDING",
"redirect_customer_to_url_processing": false
}Momo, XOF And ZAR Collections
XOF Process OTP
This endpoint processes the One Time Password that was retrieved by the user which would be used to complete the XOF(Orange only) Collection. For testing purposes, please use 2251114462945 for the OTP Required option. Also, use the OTP value 4567 for your tests..
POST
/
subsidiary
/
collections
/
v1
/
process-otp
XOF Process OTP
curl --request POST \
--url https://api.payaza.africa/live/subsidiary/collections/v1/process-otp \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'X-ProductID: <api-key>' \
--header 'X-TenantID: <api-key>' \
--data '
{
"payment_token": "45c3d124-7831-4f97-8844-581bf497a20b",
"otp_code": "4567",
"payee": "+2251114462945",
"payment_method": "ORANGE_CI",
"transaction_reference": "MOCIV0009383",
"transaction_channel": "MOMCIV",
"country_code": "CI"
}
'import requests
url = "https://api.payaza.africa/live/subsidiary/collections/v1/process-otp"
payload = {
"payment_token": "45c3d124-7831-4f97-8844-581bf497a20b",
"otp_code": "4567",
"payee": "+2251114462945",
"payment_method": "ORANGE_CI",
"transaction_reference": "MOCIV0009383",
"transaction_channel": "MOMCIV",
"country_code": "CI"
}
headers = {
"Authorization": "<api-key>",
"X-TenantID": "<api-key>",
"X-ProductID": "<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>',
'X-TenantID': '<api-key>',
'X-ProductID': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
payment_token: '45c3d124-7831-4f97-8844-581bf497a20b',
otp_code: '4567',
payee: '+2251114462945',
payment_method: 'ORANGE_CI',
transaction_reference: 'MOCIV0009383',
transaction_channel: 'MOMCIV',
country_code: 'CI'
})
};
fetch('https://api.payaza.africa/live/subsidiary/collections/v1/process-otp', 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/subsidiary/collections/v1/process-otp",
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([
'payment_token' => '45c3d124-7831-4f97-8844-581bf497a20b',
'otp_code' => '4567',
'payee' => '+2251114462945',
'payment_method' => 'ORANGE_CI',
'transaction_reference' => 'MOCIV0009383',
'transaction_channel' => 'MOMCIV',
'country_code' => 'CI'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"X-ProductID: <api-key>",
"X-TenantID: <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://api.payaza.africa/live/subsidiary/collections/v1/process-otp"
payload := strings.NewReader("{\n \"payment_token\": \"45c3d124-7831-4f97-8844-581bf497a20b\",\n \"otp_code\": \"4567\",\n \"payee\": \"+2251114462945\",\n \"payment_method\": \"ORANGE_CI\",\n \"transaction_reference\": \"MOCIV0009383\",\n \"transaction_channel\": \"MOMCIV\",\n \"country_code\": \"CI\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("X-TenantID", "<api-key>")
req.Header.Add("X-ProductID", "<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/subsidiary/collections/v1/process-otp")
.header("Authorization", "<api-key>")
.header("X-TenantID", "<api-key>")
.header("X-ProductID", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"payment_token\": \"45c3d124-7831-4f97-8844-581bf497a20b\",\n \"otp_code\": \"4567\",\n \"payee\": \"+2251114462945\",\n \"payment_method\": \"ORANGE_CI\",\n \"transaction_reference\": \"MOCIV0009383\",\n \"transaction_channel\": \"MOMCIV\",\n \"country_code\": \"CI\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.payaza.africa/live/subsidiary/collections/v1/process-otp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["X-TenantID"] = '<api-key>'
request["X-ProductID"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"payment_token\": \"45c3d124-7831-4f97-8844-581bf497a20b\",\n \"otp_code\": \"4567\",\n \"payee\": \"+2251114462945\",\n \"payment_method\": \"ORANGE_CI\",\n \"transaction_reference\": \"MOCIV0009383\",\n \"transaction_channel\": \"MOMCIV\",\n \"country_code\": \"CI\"\n}"
response = http.request(request)
puts response.read_body{
"response_code": "09",
"response_message": "PENDING",
"redirect_customer_to_url_processing": false
}Authorizations
Scopes
Body
application/json
Response
Funding Successful