Get Merchant Information
curl --request GET \
--url https://api-empresas.uat.topup.com.co/production/api/v1/merchant/balance \
--header 'Authorization: Basic <encoded-value>' \
--header 'Token-Top: <api-key>'import requests
url = "https://api-empresas.uat.topup.com.co/production/api/v1/merchant/balance"
headers = {
"Token-Top": "<api-key>",
"Authorization": "Basic <encoded-value>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Token-Top': '<api-key>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://api-empresas.uat.topup.com.co/production/api/v1/merchant/balance', 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-empresas.uat.topup.com.co/production/api/v1/merchant/balance",
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>",
"Token-Top: <api-key>"
],
]);
$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-empresas.uat.topup.com.co/production/api/v1/merchant/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Token-Top", "<api-key>")
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-empresas.uat.topup.com.co/production/api/v1/merchant/balance")
.header("Token-Top", "<api-key>")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-empresas.uat.topup.com.co/production/api/v1/merchant/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Token-Top"] = '<api-key>'
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"code": "01",
"status": "SUCCESS",
"message": "",
"data": {
"currency": "COP",
"balance": 138827007.4,
"balance_formatted": "COP 138.827.007,40"
}
}
Merchant API
GET Merchant Balance
Retrieve current merchant information and status
GET
/
merchant
/
balance
Get Merchant Information
curl --request GET \
--url https://api-empresas.uat.topup.com.co/production/api/v1/merchant/balance \
--header 'Authorization: Basic <encoded-value>' \
--header 'Token-Top: <api-key>'import requests
url = "https://api-empresas.uat.topup.com.co/production/api/v1/merchant/balance"
headers = {
"Token-Top": "<api-key>",
"Authorization": "Basic <encoded-value>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Token-Top': '<api-key>', Authorization: 'Basic <encoded-value>'}
};
fetch('https://api-empresas.uat.topup.com.co/production/api/v1/merchant/balance', 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-empresas.uat.topup.com.co/production/api/v1/merchant/balance",
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>",
"Token-Top: <api-key>"
],
]);
$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-empresas.uat.topup.com.co/production/api/v1/merchant/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Token-Top", "<api-key>")
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-empresas.uat.topup.com.co/production/api/v1/merchant/balance")
.header("Token-Top", "<api-key>")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-empresas.uat.topup.com.co/production/api/v1/merchant/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Token-Top"] = '<api-key>'
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"code": "01",
"status": "SUCCESS",
"message": "",
"data": {
"currency": "COP",
"balance": 138827007.4,
"balance_formatted": "COP 138.827.007,40"
}
}
Retrieves the current balance information for the authenticated merchant account. This endpoint provides the merchant’s wallet balance in both raw numeric format and formatted currency display.
cURL
curl --location 'https://api-empresas.uat.topup.com.co/production/api/v1/merchant/balance' \
--header 'Token-Top: your_auth_token' \
--header 'Authorization: Basic your_auth_key'
use reqwest::Client;
use serde_json::json;
async fn get_merchant_balance() -> Result<(), reqwest::Error> {
let client = Client::new();
let response = client.get("https://api-empresas.uat.topup.com.co/production/api/v1/merchant/balance")
.header("Token-Top", "your_auth_token")
.header("Authorization", "Basic your_auth_key")
.send()
.await?;
let response_json: serde_json::Value = response.json().await?;
println!("{:#?}", response_json);
Ok(())
}
import axios from 'axios';
const getMerchantBalance = async () => {
try {
const response = await axios.get('https://api-empresas.uat.topup.com.co/production/api/v1/merchant/balance', {
headers: {
'Token-Top': 'your_auth_token',
'Authorization': 'Basic your_auth_key'
}
});
console.log(response.data);
} catch (error) {
console.error(error);
}
};
getMerchantBalance();
<?php
$url = "https://api-empresas.uat.topup.com.co/production/api/v1/merchant/balance";
$headers = [
'Token-Top: your_auth_token',
'Authorization: Basic your_auth_key'
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws IOException, InterruptedException {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api-empresas.uat.topup.com.co/production/api/v1/merchant/balance"))
.header("Token-Top", "your_auth_token")
.header("Authorization", "Basic your_auth_key")
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api-empresas.uat.topup.com.co/production/api/v1/merchant/balance", nil)
if err != nil {
// handle err
}
req.Header.Set("Token-Top", "your_auth_token")
req.Header.Set("Authorization", "Basic your_auth_key")
resp, err := http.DefaultClient.Do(req)
if err != nil {
// handle err
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"code": "01",
"status": "SUCCESS",
"message": "",
"data": {
"currency": "COP",
"balance": 138827007.4,
"balance_formatted": "COP 138.827.007,40"
}
}
Required Headers
Response
Authorizations
Response
Successful response