Proxy Sale
  • Introduction
  • Getting Started
  • API Reference
    • Balance
      • Get Balance
      • Add Balance
      • Pay Methods
    • Proxies
      • List Proxies
      • Download Proxies
      • Set Proxy Comments
    • Order
      • Reference List
      • Calculate Order
      • Create Order
    • Renewal
      • Calculate Renewal
      • Create Renewal Order
    • Residential Proxies
      • Package Info
      • Download Geo
      • Get IP Lists
      • Create IP List
      • Rename IP List
      • Delete IP List
      • API-TOOL
  • Users Links
    • FAQ
    • Blog
  • Support
    • support@proxy-sale.com
    • Telegram
Powered by GitBook
On this page
  1. API Reference
  2. Balance

Add Balance

POST https://proxy-sale.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

application/json

Path parameters

Name
Type
Description

apiKey*

string

API key to authorize requests

Body parameters

Name
Type
Description

summ*

double

The amount of funds you wish to add to your balance.

paymentId*

integer

Request examples

curl -X POST "https://proxy-sale.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://proxy-sale.com/order-result/pay.php?ORDER_ID={...}"
  },
  "errors": []
}
{
    "status": "error",
    "data": null,
    "errors": [
        {
            "message": "Set existed [paymentId]",
            "code": 0,
            "customData": null
        }
    ]
}
PreviousGet BalanceNextPay Methods

Last updated 1 year ago

The identifier for your chosen .

payment method