curl --request POST \
--url https://prod-api.pcxpay.com/v1/beneficiaries \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"fname": "John",
"lname": "Doe",
"country": "NG",
"currency": "NGN",
"beneficiary_type": "payout_recipient",
"beneficiary_of": "<string>",
"email": "john@example.com",
"phone_number": "+2348012345678",
"bank_details": {
"bank_name": "Zenith Bank",
"account_number": "1234567890",
"account_name": "John Doe",
"bank_code": "057"
},
"momo_details": {
"network": "MTN",
"phone_number": "+2348012345678"
},
"loan_client_details": {},
"external_account_id": "<string>",
"org_id": "<string>"
}
'import requests
url = "https://prod-api.pcxpay.com/v1/beneficiaries"
payload = {
"fname": "John",
"lname": "Doe",
"country": "NG",
"currency": "NGN",
"beneficiary_type": "payout_recipient",
"beneficiary_of": "<string>",
"email": "john@example.com",
"phone_number": "+2348012345678",
"bank_details": {
"bank_name": "Zenith Bank",
"account_number": "1234567890",
"account_name": "John Doe",
"bank_code": "057"
},
"momo_details": {
"network": "MTN",
"phone_number": "+2348012345678"
},
"loan_client_details": {},
"external_account_id": "<string>",
"org_id": "<string>"
}
headers = {
"Authorization": "<authorization>",
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
'X-Api-Key': '<x-api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
fname: 'John',
lname: 'Doe',
country: 'NG',
currency: 'NGN',
beneficiary_type: 'payout_recipient',
beneficiary_of: '<string>',
email: 'john@example.com',
phone_number: '+2348012345678',
bank_details: {
bank_name: 'Zenith Bank',
account_number: '1234567890',
account_name: 'John Doe',
bank_code: '057'
},
momo_details: {network: 'MTN', phone_number: '+2348012345678'},
loan_client_details: {},
external_account_id: '<string>',
org_id: '<string>'
})
};
fetch('https://prod-api.pcxpay.com/v1/beneficiaries', 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://prod-api.pcxpay.com/v1/beneficiaries",
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([
'fname' => 'John',
'lname' => 'Doe',
'country' => 'NG',
'currency' => 'NGN',
'beneficiary_type' => 'payout_recipient',
'beneficiary_of' => '<string>',
'email' => 'john@example.com',
'phone_number' => '+2348012345678',
'bank_details' => [
'bank_name' => 'Zenith Bank',
'account_number' => '1234567890',
'account_name' => 'John Doe',
'bank_code' => '057'
],
'momo_details' => [
'network' => 'MTN',
'phone_number' => '+2348012345678'
],
'loan_client_details' => [
],
'external_account_id' => '<string>',
'org_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"X-Api-Key: <x-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://prod-api.pcxpay.com/v1/beneficiaries"
payload := strings.NewReader("{\n \"fname\": \"John\",\n \"lname\": \"Doe\",\n \"country\": \"NG\",\n \"currency\": \"NGN\",\n \"beneficiary_type\": \"payout_recipient\",\n \"beneficiary_of\": \"<string>\",\n \"email\": \"john@example.com\",\n \"phone_number\": \"+2348012345678\",\n \"bank_details\": {\n \"bank_name\": \"Zenith Bank\",\n \"account_number\": \"1234567890\",\n \"account_name\": \"John Doe\",\n \"bank_code\": \"057\"\n },\n \"momo_details\": {\n \"network\": \"MTN\",\n \"phone_number\": \"+2348012345678\"\n },\n \"loan_client_details\": {},\n \"external_account_id\": \"<string>\",\n \"org_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("X-Api-Key", "<x-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://prod-api.pcxpay.com/v1/beneficiaries")
.header("Authorization", "<authorization>")
.header("X-Api-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"fname\": \"John\",\n \"lname\": \"Doe\",\n \"country\": \"NG\",\n \"currency\": \"NGN\",\n \"beneficiary_type\": \"payout_recipient\",\n \"beneficiary_of\": \"<string>\",\n \"email\": \"john@example.com\",\n \"phone_number\": \"+2348012345678\",\n \"bank_details\": {\n \"bank_name\": \"Zenith Bank\",\n \"account_number\": \"1234567890\",\n \"account_name\": \"John Doe\",\n \"bank_code\": \"057\"\n },\n \"momo_details\": {\n \"network\": \"MTN\",\n \"phone_number\": \"+2348012345678\"\n },\n \"loan_client_details\": {},\n \"external_account_id\": \"<string>\",\n \"org_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod-api.pcxpay.com/v1/beneficiaries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["X-Api-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fname\": \"John\",\n \"lname\": \"Doe\",\n \"country\": \"NG\",\n \"currency\": \"NGN\",\n \"beneficiary_type\": \"payout_recipient\",\n \"beneficiary_of\": \"<string>\",\n \"email\": \"john@example.com\",\n \"phone_number\": \"+2348012345678\",\n \"bank_details\": {\n \"bank_name\": \"Zenith Bank\",\n \"account_number\": \"1234567890\",\n \"account_name\": \"John Doe\",\n \"bank_code\": \"057\"\n },\n \"momo_details\": {\n \"network\": \"MTN\",\n \"phone_number\": \"+2348012345678\"\n },\n \"loan_client_details\": {},\n \"external_account_id\": \"<string>\",\n \"org_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"beneficiary_id": "<string>",
"account_type": "bank",
"beneficiary_of": "<string>",
"beneficiary_type": "payout_recipient",
"fname": "<string>",
"lname": "<string>",
"email": "<string>",
"phone_number": "<string>",
"country": "<string>",
"currency": "<string>",
"bank_details": {
"bank_name": "<string>",
"account_number": "<string>",
"account_name": "<string>",
"bank_code": "<string>"
},
"momo_details": {
"network": "<string>",
"phone_number": "<string>"
},
"loan_client_details": {},
"external_account_id": "<string>",
"org_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"status": "error"
}Create a beneficiary
Creates a new payment beneficiary. The beneficiary_of field is resolved automatically from the authenticated user’s credentials. For loan-client beneficiaries on behalf of an organisation, pass org_id in the body.
curl --request POST \
--url https://prod-api.pcxpay.com/v1/beneficiaries \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"fname": "John",
"lname": "Doe",
"country": "NG",
"currency": "NGN",
"beneficiary_type": "payout_recipient",
"beneficiary_of": "<string>",
"email": "john@example.com",
"phone_number": "+2348012345678",
"bank_details": {
"bank_name": "Zenith Bank",
"account_number": "1234567890",
"account_name": "John Doe",
"bank_code": "057"
},
"momo_details": {
"network": "MTN",
"phone_number": "+2348012345678"
},
"loan_client_details": {},
"external_account_id": "<string>",
"org_id": "<string>"
}
'import requests
url = "https://prod-api.pcxpay.com/v1/beneficiaries"
payload = {
"fname": "John",
"lname": "Doe",
"country": "NG",
"currency": "NGN",
"beneficiary_type": "payout_recipient",
"beneficiary_of": "<string>",
"email": "john@example.com",
"phone_number": "+2348012345678",
"bank_details": {
"bank_name": "Zenith Bank",
"account_number": "1234567890",
"account_name": "John Doe",
"bank_code": "057"
},
"momo_details": {
"network": "MTN",
"phone_number": "+2348012345678"
},
"loan_client_details": {},
"external_account_id": "<string>",
"org_id": "<string>"
}
headers = {
"Authorization": "<authorization>",
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<authorization>',
'X-Api-Key': '<x-api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
fname: 'John',
lname: 'Doe',
country: 'NG',
currency: 'NGN',
beneficiary_type: 'payout_recipient',
beneficiary_of: '<string>',
email: 'john@example.com',
phone_number: '+2348012345678',
bank_details: {
bank_name: 'Zenith Bank',
account_number: '1234567890',
account_name: 'John Doe',
bank_code: '057'
},
momo_details: {network: 'MTN', phone_number: '+2348012345678'},
loan_client_details: {},
external_account_id: '<string>',
org_id: '<string>'
})
};
fetch('https://prod-api.pcxpay.com/v1/beneficiaries', 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://prod-api.pcxpay.com/v1/beneficiaries",
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([
'fname' => 'John',
'lname' => 'Doe',
'country' => 'NG',
'currency' => 'NGN',
'beneficiary_type' => 'payout_recipient',
'beneficiary_of' => '<string>',
'email' => 'john@example.com',
'phone_number' => '+2348012345678',
'bank_details' => [
'bank_name' => 'Zenith Bank',
'account_number' => '1234567890',
'account_name' => 'John Doe',
'bank_code' => '057'
],
'momo_details' => [
'network' => 'MTN',
'phone_number' => '+2348012345678'
],
'loan_client_details' => [
],
'external_account_id' => '<string>',
'org_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json",
"X-Api-Key: <x-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://prod-api.pcxpay.com/v1/beneficiaries"
payload := strings.NewReader("{\n \"fname\": \"John\",\n \"lname\": \"Doe\",\n \"country\": \"NG\",\n \"currency\": \"NGN\",\n \"beneficiary_type\": \"payout_recipient\",\n \"beneficiary_of\": \"<string>\",\n \"email\": \"john@example.com\",\n \"phone_number\": \"+2348012345678\",\n \"bank_details\": {\n \"bank_name\": \"Zenith Bank\",\n \"account_number\": \"1234567890\",\n \"account_name\": \"John Doe\",\n \"bank_code\": \"057\"\n },\n \"momo_details\": {\n \"network\": \"MTN\",\n \"phone_number\": \"+2348012345678\"\n },\n \"loan_client_details\": {},\n \"external_account_id\": \"<string>\",\n \"org_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("X-Api-Key", "<x-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://prod-api.pcxpay.com/v1/beneficiaries")
.header("Authorization", "<authorization>")
.header("X-Api-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"fname\": \"John\",\n \"lname\": \"Doe\",\n \"country\": \"NG\",\n \"currency\": \"NGN\",\n \"beneficiary_type\": \"payout_recipient\",\n \"beneficiary_of\": \"<string>\",\n \"email\": \"john@example.com\",\n \"phone_number\": \"+2348012345678\",\n \"bank_details\": {\n \"bank_name\": \"Zenith Bank\",\n \"account_number\": \"1234567890\",\n \"account_name\": \"John Doe\",\n \"bank_code\": \"057\"\n },\n \"momo_details\": {\n \"network\": \"MTN\",\n \"phone_number\": \"+2348012345678\"\n },\n \"loan_client_details\": {},\n \"external_account_id\": \"<string>\",\n \"org_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod-api.pcxpay.com/v1/beneficiaries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["X-Api-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"fname\": \"John\",\n \"lname\": \"Doe\",\n \"country\": \"NG\",\n \"currency\": \"NGN\",\n \"beneficiary_type\": \"payout_recipient\",\n \"beneficiary_of\": \"<string>\",\n \"email\": \"john@example.com\",\n \"phone_number\": \"+2348012345678\",\n \"bank_details\": {\n \"bank_name\": \"Zenith Bank\",\n \"account_number\": \"1234567890\",\n \"account_name\": \"John Doe\",\n \"bank_code\": \"057\"\n },\n \"momo_details\": {\n \"network\": \"MTN\",\n \"phone_number\": \"+2348012345678\"\n },\n \"loan_client_details\": {},\n \"external_account_id\": \"<string>\",\n \"org_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"beneficiary_id": "<string>",
"account_type": "bank",
"beneficiary_of": "<string>",
"beneficiary_type": "payout_recipient",
"fname": "<string>",
"lname": "<string>",
"email": "<string>",
"phone_number": "<string>",
"country": "<string>",
"currency": "<string>",
"bank_details": {
"bank_name": "<string>",
"account_number": "<string>",
"account_name": "<string>",
"bank_code": "<string>"
},
"momo_details": {
"network": "<string>",
"phone_number": "<string>"
},
"loan_client_details": {},
"external_account_id": "<string>",
"org_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"message": "<string>",
"status": "error"
}Headers
Bearer JWT for user-facing flows (Bearer eyJraWQ...), or the literal string NONE when authenticating via API key.
"Bearer eyJraWQ..."
API key for server-to-server flows, or the literal string NONE when authenticating via JWT.
"pcx_abc123_xxxx"
Body
bank — bank account (details in bank_details). momo — mobile money account (details in momo_details).
bank, momo Beneficiary first name.
"John"
Beneficiary last name.
"Doe"
ISO 3166-1 alpha-2 country code. Supported: NG, GH, GB, US, KE, RW, ZA, AE, DE, FR, NL, ES, IT, BE, AT, IE, PT.
"NG"
ISO 4217 currency code. Must match the expected currency for the given country: NG → NGN, GH → GHS, GB → GBP or EUR, US → USD, KE → KES, RW → RWF, ZA → ZAR, AE → AED, Euro-zone countries → EUR.
"NGN"
loan_client, payout_recipient ID of the user this beneficiary belongs to. Defaults to the authenticated user when not provided.
Beneficiary email address (optional).
"john@example.com"
Beneficiary phone number (optional).
"+2348012345678"
Bank account details. Required when account_type is bank.
Show child attributes
Show child attributes
Mobile money account details. Required when account_type is momo. Shape is provider-specific.
Show child attributes
Show child attributes
Additional metadata for loan_client beneficiary types.
ID of the corresponding account in an external system.
Organisation ID. Required when creating a beneficiary on behalf of an organisation (e.g. for a loan-client disbursement flow).
Response
Beneficiary created
bank — bank account (details in bank_details). momo — mobile money account (details in momo_details).
bank, momo User ID of the beneficiary owner.
loan_client, payout_recipient Show child attributes
Show child attributes
Show child attributes
Show child attributes