curl --request POST \
--url https://api.clickpesa.com/third-parties/customers/crdb-direct-debit-mandate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer": {
"fullName": "Ramona Cormier-Hilll",
"email": "Aurore56@yahoo.com",
"phoneNumber": "255799468121"
},
"phoneNumber": "255754712650",
"debitAccount": "0152590146100",
"installmentAmount": 2500,
"startDate": "10-12-2025",
"endDate": "30-12-2025",
"frequencyType": "DAILY",
"frequency": 2,
"billDetails": "Loan No. 233422 from Inc.",
"mandateCallbackUrl": "https://your-system.com/webhooks/crdb-mandate-status"
}
'import requests
url = "https://api.clickpesa.com/third-parties/customers/crdb-direct-debit-mandate"
payload = {
"customer": {
"fullName": "Ramona Cormier-Hilll",
"email": "Aurore56@yahoo.com",
"phoneNumber": "255799468121"
},
"phoneNumber": "255754712650",
"debitAccount": "0152590146100",
"installmentAmount": 2500,
"startDate": "10-12-2025",
"endDate": "30-12-2025",
"frequencyType": "DAILY",
"frequency": 2,
"billDetails": "Loan No. 233422 from Inc.",
"mandateCallbackUrl": "https://your-system.com/webhooks/crdb-mandate-status"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer: {
fullName: 'Ramona Cormier-Hilll',
email: 'Aurore56@yahoo.com',
phoneNumber: '255799468121'
},
phoneNumber: '255754712650',
debitAccount: '0152590146100',
installmentAmount: 2500,
startDate: '10-12-2025',
endDate: '30-12-2025',
frequencyType: 'DAILY',
frequency: 2,
billDetails: 'Loan No. 233422 from Inc.',
mandateCallbackUrl: 'https://your-system.com/webhooks/crdb-mandate-status'
})
};
fetch('https://api.clickpesa.com/third-parties/customers/crdb-direct-debit-mandate', 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.clickpesa.com/third-parties/customers/crdb-direct-debit-mandate",
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([
'customer' => [
'fullName' => 'Ramona Cormier-Hilll',
'email' => 'Aurore56@yahoo.com',
'phoneNumber' => '255799468121'
],
'phoneNumber' => '255754712650',
'debitAccount' => '0152590146100',
'installmentAmount' => 2500,
'startDate' => '10-12-2025',
'endDate' => '30-12-2025',
'frequencyType' => 'DAILY',
'frequency' => 2,
'billDetails' => 'Loan No. 233422 from Inc.',
'mandateCallbackUrl' => 'https://your-system.com/webhooks/crdb-mandate-status'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.clickpesa.com/third-parties/customers/crdb-direct-debit-mandate"
payload := strings.NewReader("{\n \"customer\": {\n \"fullName\": \"Ramona Cormier-Hilll\",\n \"email\": \"Aurore56@yahoo.com\",\n \"phoneNumber\": \"255799468121\"\n },\n \"phoneNumber\": \"255754712650\",\n \"debitAccount\": \"0152590146100\",\n \"installmentAmount\": 2500,\n \"startDate\": \"10-12-2025\",\n \"endDate\": \"30-12-2025\",\n \"frequencyType\": \"DAILY\",\n \"frequency\": 2,\n \"billDetails\": \"Loan No. 233422 from Inc.\",\n \"mandateCallbackUrl\": \"https://your-system.com/webhooks/crdb-mandate-status\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.clickpesa.com/third-parties/customers/crdb-direct-debit-mandate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer\": {\n \"fullName\": \"Ramona Cormier-Hilll\",\n \"email\": \"Aurore56@yahoo.com\",\n \"phoneNumber\": \"255799468121\"\n },\n \"phoneNumber\": \"255754712650\",\n \"debitAccount\": \"0152590146100\",\n \"installmentAmount\": 2500,\n \"startDate\": \"10-12-2025\",\n \"endDate\": \"30-12-2025\",\n \"frequencyType\": \"DAILY\",\n \"frequency\": 2,\n \"billDetails\": \"Loan No. 233422 from Inc.\",\n \"mandateCallbackUrl\": \"https://your-system.com/webhooks/crdb-mandate-status\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clickpesa.com/third-parties/customers/crdb-direct-debit-mandate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer\": {\n \"fullName\": \"Ramona Cormier-Hilll\",\n \"email\": \"Aurore56@yahoo.com\",\n \"phoneNumber\": \"255799468121\"\n },\n \"phoneNumber\": \"255754712650\",\n \"debitAccount\": \"0152590146100\",\n \"installmentAmount\": 2500,\n \"startDate\": \"10-12-2025\",\n \"endDate\": \"30-12-2025\",\n \"frequencyType\": \"DAILY\",\n \"frequency\": 2,\n \"billDetails\": \"Loan No. 233422 from Inc.\",\n \"mandateCallbackUrl\": \"https://your-system.com/webhooks/crdb-mandate-status\"\n}"
response = http.request(request)
puts response.read_body{
"mandateRequestId": "69383ce4f8b5a8e2077df9c7",
"mandateStatus": "REQUESTED",
"paymentsTotalAmount": 27500,
"paymentsInstallments": 11
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123
}{
"statusCode": 401,
"message": "Unauthorized",
"error": "Unauthorized"
}Request Mandate Approval
Request CRDB Direct Debit mandate approval and create the linked payment schedule.
curl --request POST \
--url https://api.clickpesa.com/third-parties/customers/crdb-direct-debit-mandate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer": {
"fullName": "Ramona Cormier-Hilll",
"email": "Aurore56@yahoo.com",
"phoneNumber": "255799468121"
},
"phoneNumber": "255754712650",
"debitAccount": "0152590146100",
"installmentAmount": 2500,
"startDate": "10-12-2025",
"endDate": "30-12-2025",
"frequencyType": "DAILY",
"frequency": 2,
"billDetails": "Loan No. 233422 from Inc.",
"mandateCallbackUrl": "https://your-system.com/webhooks/crdb-mandate-status"
}
'import requests
url = "https://api.clickpesa.com/third-parties/customers/crdb-direct-debit-mandate"
payload = {
"customer": {
"fullName": "Ramona Cormier-Hilll",
"email": "Aurore56@yahoo.com",
"phoneNumber": "255799468121"
},
"phoneNumber": "255754712650",
"debitAccount": "0152590146100",
"installmentAmount": 2500,
"startDate": "10-12-2025",
"endDate": "30-12-2025",
"frequencyType": "DAILY",
"frequency": 2,
"billDetails": "Loan No. 233422 from Inc.",
"mandateCallbackUrl": "https://your-system.com/webhooks/crdb-mandate-status"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer: {
fullName: 'Ramona Cormier-Hilll',
email: 'Aurore56@yahoo.com',
phoneNumber: '255799468121'
},
phoneNumber: '255754712650',
debitAccount: '0152590146100',
installmentAmount: 2500,
startDate: '10-12-2025',
endDate: '30-12-2025',
frequencyType: 'DAILY',
frequency: 2,
billDetails: 'Loan No. 233422 from Inc.',
mandateCallbackUrl: 'https://your-system.com/webhooks/crdb-mandate-status'
})
};
fetch('https://api.clickpesa.com/third-parties/customers/crdb-direct-debit-mandate', 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.clickpesa.com/third-parties/customers/crdb-direct-debit-mandate",
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([
'customer' => [
'fullName' => 'Ramona Cormier-Hilll',
'email' => 'Aurore56@yahoo.com',
'phoneNumber' => '255799468121'
],
'phoneNumber' => '255754712650',
'debitAccount' => '0152590146100',
'installmentAmount' => 2500,
'startDate' => '10-12-2025',
'endDate' => '30-12-2025',
'frequencyType' => 'DAILY',
'frequency' => 2,
'billDetails' => 'Loan No. 233422 from Inc.',
'mandateCallbackUrl' => 'https://your-system.com/webhooks/crdb-mandate-status'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.clickpesa.com/third-parties/customers/crdb-direct-debit-mandate"
payload := strings.NewReader("{\n \"customer\": {\n \"fullName\": \"Ramona Cormier-Hilll\",\n \"email\": \"Aurore56@yahoo.com\",\n \"phoneNumber\": \"255799468121\"\n },\n \"phoneNumber\": \"255754712650\",\n \"debitAccount\": \"0152590146100\",\n \"installmentAmount\": 2500,\n \"startDate\": \"10-12-2025\",\n \"endDate\": \"30-12-2025\",\n \"frequencyType\": \"DAILY\",\n \"frequency\": 2,\n \"billDetails\": \"Loan No. 233422 from Inc.\",\n \"mandateCallbackUrl\": \"https://your-system.com/webhooks/crdb-mandate-status\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.clickpesa.com/third-parties/customers/crdb-direct-debit-mandate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer\": {\n \"fullName\": \"Ramona Cormier-Hilll\",\n \"email\": \"Aurore56@yahoo.com\",\n \"phoneNumber\": \"255799468121\"\n },\n \"phoneNumber\": \"255754712650\",\n \"debitAccount\": \"0152590146100\",\n \"installmentAmount\": 2500,\n \"startDate\": \"10-12-2025\",\n \"endDate\": \"30-12-2025\",\n \"frequencyType\": \"DAILY\",\n \"frequency\": 2,\n \"billDetails\": \"Loan No. 233422 from Inc.\",\n \"mandateCallbackUrl\": \"https://your-system.com/webhooks/crdb-mandate-status\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.clickpesa.com/third-parties/customers/crdb-direct-debit-mandate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer\": {\n \"fullName\": \"Ramona Cormier-Hilll\",\n \"email\": \"Aurore56@yahoo.com\",\n \"phoneNumber\": \"255799468121\"\n },\n \"phoneNumber\": \"255754712650\",\n \"debitAccount\": \"0152590146100\",\n \"installmentAmount\": 2500,\n \"startDate\": \"10-12-2025\",\n \"endDate\": \"30-12-2025\",\n \"frequencyType\": \"DAILY\",\n \"frequency\": 2,\n \"billDetails\": \"Loan No. 233422 from Inc.\",\n \"mandateCallbackUrl\": \"https://your-system.com/webhooks/crdb-mandate-status\"\n}"
response = http.request(request)
puts response.read_body{
"mandateRequestId": "69383ce4f8b5a8e2077df9c7",
"mandateStatus": "REQUESTED",
"paymentsTotalAmount": 27500,
"paymentsInstallments": 11
}{
"error": "<string>",
"message": "<string>",
"statusCode": 123
}{
"statusCode": 401,
"message": "Unauthorized",
"error": "Unauthorized"
}Authorizations
Bearer token from Generate Authorization Token
Body
Show child attributes
Show child attributes
Customer's SimBanking-registered phone number for the debit account. 12 digits, starts with country code, no plus sign.
"255754712650"
CRDB account number to debit
"0152590146100"
Mandate start date (DD-MM-YYYY or YYYY-MM-DD)
"10-12-2025"
Mandate end date (DD-MM-YYYY or YYYY-MM-DD)
"30-12-2025"
Installment frequency type
DAILY, WEEKLY, MONTHLY, YEARLY Amount to debit per installment (must be positive)
2500
URL where mandate status callbacks (ACTIVE, REJECTED, CANCELLED) will be sent
"https://your-system.com/webhooks/crdb-mandate-status"
Frequency multiplier (default: 1). Example: frequencyType=WEEKLY, frequency=2 means every 2 weeks
2
Optional description of the bill or mandate
"Loan No. 233422 from Inc."
Response
Mandate request accepted

