/
Перевірка балансу

Перевірка балансу

Цей функціонал буде активовано після вашого запиту в груповому чаті.


Опис

 

Цей API метод дозволить вам отримувати актуальний баланс.


API параметри

 

HTTP METHOD: POST

API ENDPOINT: https://secure.platononline.com/post-balance/

Параметр

Значення

Опис

Особливості

action
обов'язковий

GET_BALANCE

Код метода

 

account_key
обов'язковий

String

API ключ для балансу

request_id
обов'язковий

String

Унікальний ордер запиту

Унікальний ордер запиту на перевірку балансу

hash
обов'язковий

String

Контрольний підпис

md5( strtoupper( $request_id. $account_key ) )

 

<?php $url = 'https://secure.platononline.com/post-balance/'; $data['account_key'] = '*******'; $data['action'] = 'GET_BALANCE'; $data['request_id'] = Date('Ym-dH-is'); $data['hash'] = md5(strtoupper($data['request_id'] . $data['account_key'])); $post_data = http_build_query($data); $headers = [ "Content-Type: application/x-www-form-urlencoded", "Accept: application/json", "Content-Length: " . strlen($post_data), ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); $response = curl_exec($ch); if (curl_errno($ch)) { $error[] = 'CURL ErrorNo: ' . curl_errno($ch); $error[] = 'CURL Error: ' . curl_error($ch); $error[] = 'Url: ' . $url; $error[] = 'Data: ' . var_export($data, true); echo print_r($error, true); } curl_close($ch); print_r($response);

 

При успішному запиті:

{ "action":"GET_BALANCE", "account_key":"*******", "type":"SUCCESS", "balance":"108.04", "currency":"UAH", "date":"2022-09-08T09:09:08+00:00" }

При помилці запиту:

Related content

Верифікація картки (Server - Server)
Верифікація картки (Server - Server)
Read with this
Перелік транзакцій про рух коштів
Перелік транзакцій про рух коштів
More like this
Перевірка статусу IE оплати по ордеру мерчанта
Перевірка статусу IE оплати по ордеру мерчанта
Read with this
Список транзакцій по API
Список транзакцій по API
More like this
Робота з Callback
Робота з Callback
Read with this
IA регулярний платіж по токену
IA регулярний платіж по токену
More like this