Payments
Create Payout Sweep
Sweeps the available fiat balances of all your users into a single payout to one destination account. One operation is created per source user, grouped under a batchId.
Request
| Field | Type | Required | Description |
|---|---|---|---|
| Authorization | Header | Yes | Bearer <access_token> obtained from POST /api/v1/client/token. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| amount | number | Yes | Total amount to sweep (> 0). |
| currency | string | Yes | Fiat currency (e.g. COP). |
| destinationId | uuid | Yes | Destination account. It must be active and in the same currency. |
| paymentMethod | string | No | ACH (default), PSE, BANK or BREB. |
| idempotencyKey | string | No | Unique value to safely retry; a repeated key returns the existing batch. |
Response (201)
| Field | Description |
|---|---|
| batchId | Identifier of the sweep. |
| status | PENDING. |
| currency / amount | Amount swept. |
| paymentMethod | Rail used. |
| destinationId | Destination account. |
| operationIds | Operations created, one per source user. |
Errors
| Status | When |
|---|---|
| 400 | Invalid request, unsupported rail, currency mismatch or not enough available balance. |
| 403 | The destination account is not active. |
| 404 | The destination account does not exist. |
| 502 | The payout provider returned an error. |
POST
/
api
/
v1
/
admin
/
fiats
/
payout
/
sweep
Create Payout Sweep
curl --request POST \
--url https://test-api-kore.kravata.co/api/v1/admin/fiats/payout/sweep \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 150000,
"currency": "COP",
"destinationId": "{{destination_account_id}}",
"paymentMethod": "ACH"
}
'import requests
url = "https://test-api-kore.kravata.co/api/v1/admin/fiats/payout/sweep"
payload = {
"amount": 150000,
"currency": "COP",
"destinationId": "{{destination_account_id}}",
"paymentMethod": "ACH"
}
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({
amount: 150000,
currency: 'COP',
destinationId: '{{destination_account_id}}',
paymentMethod: 'ACH'
})
};
fetch('https://test-api-kore.kravata.co/api/v1/admin/fiats/payout/sweep', 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://test-api-kore.kravata.co/api/v1/admin/fiats/payout/sweep",
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' => 150000,
'currency' => 'COP',
'destinationId' => '{{destination_account_id}}',
'paymentMethod' => 'ACH'
]),
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://test-api-kore.kravata.co/api/v1/admin/fiats/payout/sweep"
payload := strings.NewReader("{\n \"amount\": 150000,\n \"currency\": \"COP\",\n \"destinationId\": \"{{destination_account_id}}\",\n \"paymentMethod\": \"ACH\"\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://test-api-kore.kravata.co/api/v1/admin/fiats/payout/sweep")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 150000,\n \"currency\": \"COP\",\n \"destinationId\": \"{{destination_account_id}}\",\n \"paymentMethod\": \"ACH\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api-kore.kravata.co/api/v1/admin/fiats/payout/sweep")
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 \"amount\": 150000,\n \"currency\": \"COP\",\n \"destinationId\": \"{{destination_account_id}}\",\n \"paymentMethod\": \"ACH\"\n}"
response = http.request(request)
puts response.read_body{
"batchId": "6cfcbf31-2fb6-464a-bece-6a36dabf63af",
"status": "PENDING",
"currency": "COP",
"amount": 150000,
"paymentMethod": "ACH",
"destinationId": "07587d1d-2df0-4043-b6a0-6f974ea4d533",
"operationIds": [
"e49a5de9-b59e-4018-90b7-68ffc65a3ca4"
]
}Create Payout Sweep
curl --request POST \
--url https://test-api-kore.kravata.co/api/v1/admin/fiats/payout/sweep \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 150000,
"currency": "COP",
"destinationId": "{{destination_account_id}}",
"paymentMethod": "ACH"
}
'import requests
url = "https://test-api-kore.kravata.co/api/v1/admin/fiats/payout/sweep"
payload = {
"amount": 150000,
"currency": "COP",
"destinationId": "{{destination_account_id}}",
"paymentMethod": "ACH"
}
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({
amount: 150000,
currency: 'COP',
destinationId: '{{destination_account_id}}',
paymentMethod: 'ACH'
})
};
fetch('https://test-api-kore.kravata.co/api/v1/admin/fiats/payout/sweep', 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://test-api-kore.kravata.co/api/v1/admin/fiats/payout/sweep",
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' => 150000,
'currency' => 'COP',
'destinationId' => '{{destination_account_id}}',
'paymentMethod' => 'ACH'
]),
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://test-api-kore.kravata.co/api/v1/admin/fiats/payout/sweep"
payload := strings.NewReader("{\n \"amount\": 150000,\n \"currency\": \"COP\",\n \"destinationId\": \"{{destination_account_id}}\",\n \"paymentMethod\": \"ACH\"\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://test-api-kore.kravata.co/api/v1/admin/fiats/payout/sweep")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 150000,\n \"currency\": \"COP\",\n \"destinationId\": \"{{destination_account_id}}\",\n \"paymentMethod\": \"ACH\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://test-api-kore.kravata.co/api/v1/admin/fiats/payout/sweep")
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 \"amount\": 150000,\n \"currency\": \"COP\",\n \"destinationId\": \"{{destination_account_id}}\",\n \"paymentMethod\": \"ACH\"\n}"
response = http.request(request)
puts response.read_body{
"batchId": "6cfcbf31-2fb6-464a-bece-6a36dabf63af",
"status": "PENDING",
"currency": "COP",
"amount": 150000,
"paymentMethod": "ACH",
"destinationId": "07587d1d-2df0-4043-b6a0-6f974ea4d533",
"operationIds": [
"e49a5de9-b59e-4018-90b7-68ffc65a3ca4"
]
}
