Estimate a fee
curl --request GET \
--url https://api.palpluss.com/v1/fees/estimate \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.palpluss.com/v1/fees/estimate"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.palpluss.com/v1/fees/estimate', 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.palpluss.com/v1/fees/estimate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.palpluss.com/v1/fees/estimate"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.palpluss.com/v1/fees/estimate")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.palpluss.com/v1/fees/estimate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"service": "STK",
"amount": 500,
"fee": 3,
"currency": "KES",
"chargedTo": "service_wallet",
"plan": {
"id": "22923f34-0000-0000-0000-000000000000",
"name": "Standard"
},
"rule": {
"feeType": "FLAT",
"feeValue": 3,
"minAmount": 10,
"maxAmount": null
}
},
"requestId": "a1b2c3d4-0000-0000-0000-000000000000"
}{
"success": false,
"error": {
"message": "Invalid phone number format.",
"code": "INVALID_PHONE",
"details": {}
},
"requestId": "a1b2c3d4-0000-0000-0000-000000000000"
}{
"success": false,
"error": {
"message": "Invalid or revoked API key.",
"code": "INVALID_API_KEY",
"details": {}
},
"requestId": "a1b2c3d4-0000-0000-0000-000000000000"
}Account
Estimate a Fee
What PalPluss charges for an STK Push or B2C payout of a given amount.
GET
/
fees
/
estimate
Estimate a fee
curl --request GET \
--url https://api.palpluss.com/v1/fees/estimate \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.palpluss.com/v1/fees/estimate"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.palpluss.com/v1/fees/estimate', 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.palpluss.com/v1/fees/estimate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.palpluss.com/v1/fees/estimate"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.palpluss.com/v1/fees/estimate")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.palpluss.com/v1/fees/estimate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"service": "STK",
"amount": 500,
"fee": 3,
"currency": "KES",
"chargedTo": "service_wallet",
"plan": {
"id": "22923f34-0000-0000-0000-000000000000",
"name": "Standard"
},
"rule": {
"feeType": "FLAT",
"feeValue": 3,
"minAmount": 10,
"maxAmount": null
}
},
"requestId": "a1b2c3d4-0000-0000-0000-000000000000"
}{
"success": false,
"error": {
"message": "Invalid phone number format.",
"code": "INVALID_PHONE",
"details": {}
},
"requestId": "a1b2c3d4-0000-0000-0000-000000000000"
}{
"success": false,
"error": {
"message": "Invalid or revoked API key.",
"code": "INVALID_API_KEY",
"details": {}
},
"requestId": "a1b2c3d4-0000-0000-0000-000000000000"
}Fees come from your account’s pricing plan and are taken from the service wallet. When no rule on your plan covers the amount, the response has
fee: 0 and rule: null, which is also what you’d be charged.
curl "https://api.palpluss.com/v1/fees/estimate?service=B2C&amount=2500" -u "$PALPLUSS_API_KEY:"
Authorizations
Paste your PalPluss API key in the username field and leave the password field empty — it is ignored.
Get your key from console → API Keys. Live keys start with pp_live_,
test keys (simulated money) with pp_test_.
In your own code, send the key directly:
Authorization: Basic YOUR_API_KEY