Список транзакцій по API

Опис

 

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

Мерчант може зробити запит за будь-який період вказавши дату. В т.ч. сьогоднішню. Запит формується за конкретний день. Для вибірки за декілька днів потрібно робити окремі запити за кожен день.


API параметри

 

HTTP METHOD: POST

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

Параметр

Значення

Опис

Особливості

Параметр

Значення

Опис

Особливості

client_key
Обов'язковий

String

АРІ ключ

 

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

GET_TRANSACTION_LIST

 

 

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

String

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

 

date
Обов'язковий

Date

Дата за яку сформувати звіт у форматі YYYY-MM-DD

 

service
Обов'язковий

C2A,IA,A2C

Масив типів сервісів для звітування

 

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

String

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

md5( strrev(client_key). strrev(request_id). strrev(client_pass) )

 

$url = 'https://secure.platononline.com/post/'; $client_pass = '***********'; $data['client_key'] = '******'; $data['action'] = 'GET_TRANSACTION_LIST'; $data['request_id'] = '660bab54ab171'; $data['date'] = '2024-03-13'; $data['service'] = 'C2A,IA,A2C'; $data['hash'] = md5( strrev($data['client_key']). strrev($data['request_id']). strrev($client_pass) ); //var_dump($data); die(); $post_data = http_build_query($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_TRANSACTION_LIST", "result": "SUCCESS", "request_id": "41102-43412-0693", "IA": { "transactions": [ { "order_id": "41085-14540-8403", "client_order_id": "41085-14624-98184", "type": "CAPTURE", "mid": "CyberSource TEST", "status": "SUCCESS", "number": "411111******1111", "amount": "1.00", "currency": "UAH", "transaction_date": "2024-03-19 12:31:06", "description": "Back", "approval_code": "831000", "rrn": "407912163153" }, { "order_id": "41085-15003-3156", "client_order_id": "41085-15092-67454", "type": "CAPTURE", "mid": "CyberSource TEST", "status": "SUCCESS", "number": "411111******1111", "amount": "1.00", "currency": "UAH", "transaction_date": "2024-03-19 12:31:52", "description": "Back", "approval_code": "831000", "rrn": "407912114479" }, { "order_id": "41085-14540-8403", "client_order_id": "41085-14624-98184", "type": "REFUND", "mid": "CyberSource TEST", "status": "SUCCESS", "number": "411111******1111", "amount": "1.00", "currency": "UAH", "transaction_date": "2024-03-19 13:45:39", "description": "Back", "approval_code": "", "rrn": "" }, { "order_id": "41085-15003-3156", "client_order_id": "41085-15092-67454", "type": "REFUND", "mid": "CyberSource TEST", "status": "SUCCESS", "number": "411111******1111", "amount": "0.50", "currency": "UAH", "transaction_date": "2024-03-19 13:45:42", "description": "Back", "approval_code": "831000", "rrn": "407912114479" } ] } } { "action": "GET_TRANSACTION_LIST", "result": "SUCCESS", "request_id": "41102-43412-0693", "IA": { "transactions": [] }, "A2C": { "transactions": [ { "order_id": "20243-121712-33558", "client_order_id": "41025-63543-97153", "type": "CREDIT", "mid": "TEST-CARD UAH", "status": "SUCCESS", "number": "499999******0011", "amount": "1.00", "currency": "UAH", "transaction_date": "2024-03-12 15:12:34", "description": "test POST-P2P CREDIT2CARD_routing", "approval_code": "", "rrn": "" }, { "order_id": "20243-121713-5438", "client_order_id": "41025-64346-26393", "type": "CREDIT", "mid": "TEST-CARD UAH 2", "status": "SUCCESS", "number": "499999******0011", "amount": "1.00", "currency": "UAH", "transaction_date": "2024-03-12 15:13:54", "description": "test POST-P2P CREDIT2CARD_routing", "approval_code": "", "rrn": "" }, { "order_id": "20243-121723-23774", "client_order_id": "41025-70040-14763", "type": "CREDIT", "mid": "TEST-CARD UAH 2", "status": "SUCCESS", "number": "499999******0011", "amount": "1.00", "currency": "UAH", "transaction_date": "2024-03-12 15:23:24", "description": "test POST-P2P CREDIT2CARD_routing", "approval_code": "", "rrn": "" } ] }, "C2A": { "transactions": [] } } { "action": "GET_TRANSACTION_LIST", "result": "SUCCESS", "request_id": "41102-43412-0693", "C2A": { "transactions": [ { "order_id": "20243-41647-53637", "client_order_id": "40956-36738-04634", "type": "DEBIT", "mid": "UPC C2A TEST", "status": "SUCCESS", "number": "499999******0011", "amount": "1.00", "currency": "UAH", "transaction_date": "2024-03-04 14:47:57", "description": "POST-P2P-DEBIT_add", "approval_code": "038037", "rrn": "" }, { "order_id": "20243-41652-29558", "client_order_id": "40956-39568-40844", "type": "DEBIT", "mid": "UPC C2A TEST", "status": "SUCCESS", "number": "499999******0011", "amount": "1.00", "currency": "UAH", "transaction_date": "2024-03-04 14:53:02", "description": "POST-P2P-DEBIT_add", "approval_code": "090896", "rrn": "" }, { "order_id": "40956-58546-9479", "client_order_id": "40956-59416-59834", "type": "DEBIT", "mid": "UPC C2A TEST", "status": "SUCCESS", "number": "499999******0011", "amount": "1.00", "currency": "UAH", "transaction_date": "2024-03-04 15:25:43", "description": "C2A - art_qa test", "approval_code": "065594", "rrn": "" }, { "order_id": "40956-62370-9368", "client_order_id": "40956-62526-40274", "type": "DEBIT", "mid": "UPC C2A TEST", "status": "SUCCESS", "number": "499999******0011", "amount": "1.00", "currency": "UAH", "transaction_date": "2024-03-04 15:30:53", "description": "C2A - art_qa test", "approval_code": "016623", "rrn": "" }, { "order_id": "20243-41735-12435", "client_order_id": "40956-65125-61813", "type": "DEBIT", "mid": "UPC C2A TEST", "status": "SUCCESS", "number": "499999******0011", "amount": "1.00", "currency": "UAH", "transaction_date": "2024-03-04 15:35:17", "description": "POST-P2P-DEBIT_add", "approval_code": "028301", "rrn": "" }, { "order_id": "20243-41754-38574", "client_order_id": "40956-76786-61044", "type": "DEBIT", "mid": "UPC C2A TEST", "status": "SUCCESS", "number": "499999******0011", "amount": "1.00", "currency": "UAH", "transaction_date": "2024-03-04 15:54:43", "description": "POST-P2P-DEBIT_add", "approval_code": "071938", "rrn": "" } ] } }