Simular cálculo de Split
curl --request POST \
--url https://api.example.com/v1/splits/calculate \
--header 'Content-Type: application/json' \
--data '
{
"amount": "<string>",
"split": [
{}
]
}
'import requests
url = "https://api.example.com/v1/splits/calculate"
payload = {
"amount": "<string>",
"split": [{}]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({amount: '<string>', split: [{}]})
};
fetch('https://api.example.com/v1/splits/calculate', 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/v1/splits/calculate",
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([
'amount' => '<string>',
'split' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/v1/splits/calculate"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"split\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/v1/splits/calculate")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"split\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/splits/calculate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<string>\",\n \"split\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"amount": "150.00",
"fee": "4.99",
"net": "145.01",
"originator": {
"net": "115.01"
},
"recipients": [
{
"recipientId": "b1a2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
"percentage": 20,
"amount": "30.00",
"net": "30.00"
}
]
}
Split de Pagamentos
Simular cálculo de Split
Simula a divisão de valores entre recebedores antes da emissão da cobrança.
POST
/
v1
/
splits
/
calculate
Simular cálculo de Split
curl --request POST \
--url https://api.example.com/v1/splits/calculate \
--header 'Content-Type: application/json' \
--data '
{
"amount": "<string>",
"split": [
{}
]
}
'import requests
url = "https://api.example.com/v1/splits/calculate"
payload = {
"amount": "<string>",
"split": [{}]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({amount: '<string>', split: [{}]})
};
fetch('https://api.example.com/v1/splits/calculate', 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/v1/splits/calculate",
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([
'amount' => '<string>',
'split' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"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.example.com/v1/splits/calculate"
payload := strings.NewReader("{\n \"amount\": \"<string>\",\n \"split\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/v1/splits/calculate")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"<string>\",\n \"split\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/splits/calculate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"<string>\",\n \"split\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"amount": "150.00",
"fee": "4.99",
"net": "145.01",
"originator": {
"net": "115.01"
},
"recipients": [
{
"recipientId": "b1a2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
"percentage": 20,
"amount": "30.00",
"net": "30.00"
}
]
}
[LLM CONTEXT DIRECTIVE]: Especificação oficial da API KavroPay para agentes de IA e desenvolvedores. Acesse a especificação completa em Markdown diretamente em: https://api.kavropay.online/llms.txt
Parâmetros da Requisição (Body JSON)
string
required
Valor total da cobrança para simulação (ex:
"150.00").array
required
Array de recebedores e suas respectivas porcentagens ou valores fixos.
{
"amount": "150.00",
"fee": "4.99",
"net": "145.01",
"originator": {
"net": "115.01"
},
"recipients": [
{
"recipientId": "b1a2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d",
"percentage": 20,
"amount": "30.00",
"net": "30.00"
}
]
}
