curl --request GET \
--url https://api.example.com/payment-intents/{id}/payment-fees \
--header 'ApiKey: <apikey>' \
--header 'Environment: <environment>' \
--header 'MerchantId: <merchantid>'import requests
url = "https://api.example.com/payment-intents/{id}/payment-fees"
headers = {
"ApiKey": "<apikey>",
"MerchantId": "<merchantid>",
"Environment": "<environment>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {ApiKey: '<apikey>', MerchantId: '<merchantid>', Environment: '<environment>'}
};
fetch('https://api.example.com/payment-intents/{id}/payment-fees', 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.example.com/payment-intents/{id}/payment-fees",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"ApiKey: <apikey>",
"Environment: <environment>",
"MerchantId: <merchantid>"
],
]);
$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.example.com/payment-intents/{id}/payment-fees"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("ApiKey", "<apikey>")
req.Header.Add("MerchantId", "<merchantid>")
req.Header.Add("Environment", "<environment>")
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.example.com/payment-intents/{id}/payment-fees")
.header("ApiKey", "<apikey>")
.header("MerchantId", "<merchantid>")
.header("Environment", "<environment>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/payment-intents/{id}/payment-fees")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["ApiKey"] = '<apikey>'
request["MerchantId"] = '<merchantid>'
request["Environment"] = '<environment>'
response = http.request(request)
puts response.read_body[
{
"id": "fee_lAe5HnFpvOjwdT9vSIgPA",
"rate": 123,
"rateType": "percent",
"amount": 5,
"currency": "XOF",
"label": "<string>",
"taxes": [
{
"id": "tax_lAe5HnFpvOjwdT9vSIgPA",
"feeId": "fee_lAe5HnFpvOjwdT9vSIgPA",
"taxType": "tva",
"type": "percent",
"value": 3.813559322033896
}
]
}
]{
"status": 400,
"code": "wrong_provider",
"message": "Provider 'unknown_provider' does not exist for country 'CI' and method 'mobile_money'.",
"request_id": "<string>"
}{
"status": 401,
"error": {
"type": "authorization_error",
"code": "wrong_credentials",
"message": "L'ID marchand et/ou la clé d'API sont incorrects."
}
}{
"status": 403,
"error": {
"statusCode": 403,
"message": "Forbidden",
"error": "<string>"
}
}{
"httpStatus": 404,
"message": "X not found",
"error": "Not found"
}{
"status": 429,
"error": "ThrottlerException: Too Many Requests"
}{
"type": "internal_error",
"code": [
"internal_error",
"wrong_credentials",
"not_granted",
"live_mode_not_granted"
],
"message": "An error occurred on our system. Please try again later."
}Retrieve fees
This endpoint allows you to retrieve the fees associated with a payment intent. Fees are applied per payment and this endpoints will group all the fees in an array.
curl --request GET \
--url https://api.example.com/payment-intents/{id}/payment-fees \
--header 'ApiKey: <apikey>' \
--header 'Environment: <environment>' \
--header 'MerchantId: <merchantid>'import requests
url = "https://api.example.com/payment-intents/{id}/payment-fees"
headers = {
"ApiKey": "<apikey>",
"MerchantId": "<merchantid>",
"Environment": "<environment>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {ApiKey: '<apikey>', MerchantId: '<merchantid>', Environment: '<environment>'}
};
fetch('https://api.example.com/payment-intents/{id}/payment-fees', 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.example.com/payment-intents/{id}/payment-fees",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"ApiKey: <apikey>",
"Environment: <environment>",
"MerchantId: <merchantid>"
],
]);
$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.example.com/payment-intents/{id}/payment-fees"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("ApiKey", "<apikey>")
req.Header.Add("MerchantId", "<merchantid>")
req.Header.Add("Environment", "<environment>")
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.example.com/payment-intents/{id}/payment-fees")
.header("ApiKey", "<apikey>")
.header("MerchantId", "<merchantid>")
.header("Environment", "<environment>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/payment-intents/{id}/payment-fees")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["ApiKey"] = '<apikey>'
request["MerchantId"] = '<merchantid>'
request["Environment"] = '<environment>'
response = http.request(request)
puts response.read_body[
{
"id": "fee_lAe5HnFpvOjwdT9vSIgPA",
"rate": 123,
"rateType": "percent",
"amount": 5,
"currency": "XOF",
"label": "<string>",
"taxes": [
{
"id": "tax_lAe5HnFpvOjwdT9vSIgPA",
"feeId": "fee_lAe5HnFpvOjwdT9vSIgPA",
"taxType": "tva",
"type": "percent",
"value": 3.813559322033896
}
]
}
]{
"status": 400,
"code": "wrong_provider",
"message": "Provider 'unknown_provider' does not exist for country 'CI' and method 'mobile_money'.",
"request_id": "<string>"
}{
"status": 401,
"error": {
"type": "authorization_error",
"code": "wrong_credentials",
"message": "L'ID marchand et/ou la clé d'API sont incorrects."
}
}{
"status": 403,
"error": {
"statusCode": 403,
"message": "Forbidden",
"error": "<string>"
}
}{
"httpStatus": 404,
"message": "X not found",
"error": "Not found"
}{
"status": 429,
"error": "ThrottlerException: Too Many Requests"
}{
"type": "internal_error",
"code": [
"internal_error",
"wrong_credentials",
"not_granted",
"live_mode_not_granted"
],
"message": "An error occurred on our system. Please try again later."
}Headers
Your api key. To create a key, please get into our dashboard. If you don't have access to it, please reach the Support team.
Your merchant ID. This information is available in our dashboard. If you don't have access to it, please reach the Support team.
Allow you to choose between the sandbox mode to perform some tests or the live mode for real world transactions.
live, sandbox Path Parameters
Identifier of the PaymentIntent on which to retrieve PaymentFees.
Query Parameters
Two-letter ISO country code. Represents the country where the provider selected by the customer is localized.
"CI"
The name of the provider selected by the customer, in lowercase. The list of supported providers can be found at /data/providers. Required for every method except instant_payment, which has a single provider: for that method the parameter is optional and ignored, and any value (for example PI SPI) is accepted.
"orange"
The method selected by the customer to make this Payment.
mobile_money, credit_card, bank_transfer, instant_payment Response
Unique identifier of the applied Fee object.
"fee_lAe5HnFpvOjwdT9vSIgPA"
A rate corresponding to the amount (flat or percentage) applied by the fees.
Fees can either be a flat amount of the transaction amount or percentage of the transaction amount.
percent, flat Amount applied by this Fees. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge €1.00 or 100 to charge FCFA100, a zero-decimal currency).
5
Three-letter ISO currency code.
"XOF"
An optional label giving information on the reason of this fees.
Taxes applied to this fee.
Show child attributes
Show child attributes
