### Example Success Response for Mutations Source: https://qiospay.id/api_docs.php This JSON structure represents a successful retrieval of transaction mutation data. ```json { "status": "success", "data": [ { "date": "2024-07-03 22:38:07", "amount": "13000", "type": "CR", "brand_name": "93600014", "balance": "1893938" } ] } ``` -------------------------------- ### Example QRIS Callback Payload Source: https://qiospay.id/api_docs.php This is an example of the JSON payload structure sent by Qiospay for a successful QRIS transaction. Your callback endpoint should be prepared to receive and parse this data. ```json { "status": "success", "data": { "name": "JHON", "nmid": "ID20233072912345", "amount": 1000, "type": "CR", "fee": 0, "refid": 295094156, "issuer": "93600002", "balance": "24100", "time": "17/06/2025 18:52" } } ``` -------------------------------- ### Get Transaction Mutations Source: https://qiospay.id/api_docs.php Use this endpoint to retrieve QRIS transaction mutation data directly via URL parameters for data synchronization. ```bash curl --location 'https://qiospay.id/api/mutasi/qris/CP0xx/137c9ddc5e055636ef79dxxx' ``` -------------------------------- ### Get Mutasi QRIS Source: https://qiospay.id/api_docs.php Retrieve transaction mutation data for your QRIS transactions directly via URL parameters. This endpoint is useful for synchronizing mutation data to your system. ```APIDOC ## GET /api/mutasi/qris/{merchant_code}/{api_key} ### Description Endpoint ini digunakan untuk menarik data mutasi transaksi QRIS Anda secara langsung melalui URL parameter. Gunakan endpoint ini untuk sinkronisasi data mutasi ke sistem Anda. ### Method GET ### Endpoint https://qiospay.id/api/mutasi/qris/{merchant_code}/{api_key} ### Parameters #### Path Parameters - **merchant_code** (string) - Required - Merchant Code yang ada pada Dashboard (Integrasi API). - **api_key** (string) - Required - Api Key yang ada pada Dashboard (Integrasi API). ### Response #### Success Response (200) - **status** (string) - Success Get ke url dengan merchant_code dan api_key berhasil. - **date** (string) - Tanggal dalam format YYYY-MM-DD HH:mm:ss. - **amount** (string) - Nominal transaksi. - **type** (string) - CR (Kredit), DB (Debet) format general. - **qris** (string) - static OR dinamic. - **brand_name** (string) - Nama atau ID penyedia pembayaran. - **issuer_reff** (string) - Referensi dari Aquirer. - **buyer_reff** (string) - Referensi dari penyedia pembayaran. - **balance** (string) - Saldo mitra setelah kredit atau debet, format general. #### Response Example ```json { "status": "success", "data": [ { "date": "2024-07-03 22:38:07", "amount": "13000", "type": "CR", "brand_name": "93600014", "balance": "1893938" } ] } ``` #### Error Response - **status** (string) - error , kesalahan merchant_code atau api_key. - **messages** (string) - Keterangan tambahan. ``` -------------------------------- ### Full QRIS Callback Implementation (CodeIgniter 3) Source: https://qiospay.id/api_docs.php This script handles incoming QRIS payment notifications. It validates a secret key, processes the JSON payload, logs the transaction details, and returns a success or failure response. Ensure your server is configured to receive POST requests at the specified callback URL. ```php output ->set_status_header(403) ->set_content_type('application/json') ->set_output(json_encode([ 'status' => 'reject', 'message' => 'Invalid secret key', 'data' => null ])); } $inputRaw = file_get_contents('php://input'); $json = json_decode($inputRaw, true); $responseData = [ 'name' => null, 'nmid' => null, 'amount' => null, 'type' => null, 'fee' => null, 'refid' => null, 'issuer' => null, 'balance' => null, 'time' => null, ]; if (is_array($json) && isset($json['data']) && is_array($json['data'])) { $data = $json['data']; $responseData = [ 'name' => $data['name'] ?? null, 'nmid' => $data['nmid'] ?? null, 'amount' => $data['amount'] ?? null, 'type' => $data['type'] ?? null, 'fee' => $data['fee'] ?? null, 'refid' => $data['refid'] ?? null, 'issuer' => $data['issuer'] ?? null, 'balance' => $data['balance'] ?? null, 'time' => $data['time'] ?? null, ]; } // Log Otomatis ke application/logs/callback_qris/ $logDir = APPPATH . 'logs/callback_qris/'; $nameLog = preg_replace('/[^a-zA-Z0-9_-]/', '', $responseData['name'] ?? 'unknown'); $nmidLog = preg_replace('/[^a-zA-Z0-9_-]/', '', $responseData['nmid'] ?? 'nonmid'); $logFile = $logDir . "data[" . $nameLog . "]-" . $nmidLog . ".json"; if (!is_dir($logDir)) { mkdir($logDir, 0777, true); } $logEntry = [ 'time' => date('Y-m-d H:i:s'), 'ip' => $this->input->ip_address(), 'raw' => $inputRaw, 'json' => $json ]; $logs = []; if (file_exists($logFile)) { $content = file_get_contents($logFile); $logs = json_decode($content, true); if (!is_array($logs)) $logs = []; } $logs[] = $logEntry; if (count($logs) > 50) { $logs = array_slice($logs, -50); } file_put_contents($logFile, json_encode($logs, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); return $this->output ->set_content_type('application/json') ->set_output(json_encode([ 'status' => 'accept', 'message' => 'Data received successfully', 'data' => $responseData ])); } } } ``` -------------------------------- ### POST - Callback QRIS Source: https://qiospay.id/api_docs.php Callback is a real-time notification feature sent by the Qiospay server to your server URL as soon as funds are detected. ```APIDOC ## POST https://domain-anda.com/api/callback/accept/{secret_key} ### Description This endpoint receives real-time notifications from Qiospay when a QRIS payment is successful. It expects a POST request with a JSON payload containing payment details. ### Method POST ### Endpoint https://domain-anda.com/api/callback/accept/{secret_key} ### Parameters #### Path Parameters - **secret_key** (string) - Required - A secret key provided by Qiospay for authentication. ### Request Body #### Request Body Example ```json { "status": "success", "data": { "name": "JHON", "nmid": "ID20233072912345", "amount": 1000, "type": "CR", "fee": 0, "refid": 295094156, "issuer": "93600002", "balance": "24100", "time": "17/06/2025 18:52" } } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the status of the callback processing (e.g., 'accept'). - **message** (string) - A message confirming successful data reception. - **data** (object) - Contains the processed payment details. - **name** (string) - The name associated with the payment. - **nmid** (string) - The merchant's unique identifier. - **amount** (integer) - The payment amount. - **type** (string) - The transaction type. - **fee** (integer) - The transaction fee. - **refid** (integer) - The reference ID of the transaction. - **issuer** (string) - The issuer of the payment. - **balance** (string) - The updated balance. - **time** (string) - The time of the transaction. #### Response Example ```json { "status": "accept", "message": "Data received successfully", "data": { "name": "JHON", "nmid": "ID20233072912345", "amount": 1000, "type": "CR", "fee": 0, "refid": 295094156, "issuer": "93600002", "balance": "24100", "time": "17/06/2025 18:52" } } ``` #### Error Response (403) - **status** (string) - Indicates the status of the callback processing (e.g., 'reject'). - **message** (string) - An error message indicating an invalid secret key. - **data** (null) - Always null in case of an error. #### Error Response Example ```json { "status": "reject", "message": "Invalid secret key", "data": null } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.