Add balance
POSThttps://geonix.com/personal/api/v1/{apiKey}/balance/add
This endpoint initiates a process to add funds to your account balance. It's designed to provide you with a secure link to a payment page, where you can complete the transaction safely.
Headers
Name | Value |
|---|---|
Content-Type |
|
Path parameters
Name | Type | Description |
|---|---|---|
| string | API key to authorize requests |
Body parameters
Name | Type | Description |
|---|---|---|
| double | The amount of funds you wish to add to your balance. |
| integer | The identifier for your chosen payment method. |
Request examples
curl -X POST "https://geonix.com/personal/api/v1/YOUR_API_KEY_HERE/balance/add" \
-H "Content-Type: application/json" \
-d '{"summ": 100.00, "paymentId": 1}'<?php
$apiKey = 'YOUR_API_KEY_HERE'; // Replace with your actual API key
$url = "https://proxy-sale.com/personal/api/v1/$apiKey/balance/add";
$data = array("summ" => 100.00, "paymentId" => 1);
$data_json = json_encode($data);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_json);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
public class AddBalanceExample {
public static void main(String[] args) {
String apiKey = "YOUR_API_KEY_HERE"; // Replace with your actual API key
String requestUrl = "https://proxy-sale.com/personal/api/v1/" + apiKey + "/balance/add";
String jsonInputString = "{\"summ\": 100.00, \"paymentId\": 1}";
try {
URL url = new URL(requestUrl);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Content-Type", "application/json");
connection.setDoOutput(true);
// Sending the request
try(OutputStream os = connection.getOutputStream()) {
byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
}
// Reading the response
int responseCode = connection.getResponseCode();
System.out.println("Response Code: " + responseCode);
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String line;
StringBuilder response = new StringBuilder();
while ((line = reader.readLine()) != null) {
response.append(line);
response.append(System.lineSeparator());
}
System.out.println("Response: " + response.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
Response examples
{
"status": "success",
"data": {
"url": "https://geonix.com/order-result/pay.php?ORDER_ID={...}"
},
"errors": []
}{
"status": "error",
"data": null,
"errors": [
{
"message": "Set existed [paymentId]",
"code": 0,
"customData": null
}
]
}