{"info":{"_postman_id":"da0ba46b-336c-4dd3-88d2-b8adfa5fef73","name":"EkstraPAY V2 Integration Documentation","description":"<html><head></head><body><h2 id=\"📋-overview\">📋 Overview</h2>\n<p>EkstraPAY V2 is a payment gateway integration system that supports both deposit and withdraw operations. This documentation covers the complete integration process using Postman, including payment creation, transaction status checking, and callback handling.</p>\n<h1 id=\"response-handling\">Response Handling</h1>\n<p>The API returns a <code>status</code> field (<code>success</code> or <code>error</code>) and a <code>data.type</code> field that indicates the transaction state. Use both fields together to determine the correct action.</p>\n<hr>\n<h2 id=\"response-types\">Response Types</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>type</th>\n<th>status</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>new</code></td>\n<td><code>success</code></td>\n<td>A new deposit transaction has been created. The response contains bank account details (IBAN, account holder, amount) that should be displayed to the customer to complete the bank transfer.</td>\n</tr>\n<tr>\n<td><code>on_process</code></td>\n<td><code>error</code></td>\n<td>The customer already has a pending transaction. A new transaction cannot be created until the existing one is completed or expires. The existing transaction details are returned.</td>\n</tr>\n<tr>\n<td><code>update</code></td>\n<td><code>error</code></td>\n<td>The customer had a pending transaction but sent a different amount. The existing transaction has been updated with the new amount instead of creating a new one.</td>\n</tr>\n<tr>\n<td><em>(null)</em></td>\n<td><code>error</code></td>\n<td>A validation error occurred before any transaction processing (e.g. amount is out of the allowed range). The <code>data</code> field is not present. Check the <code>message</code> field for the error description.</td>\n</tr>\n</tbody>\n</table>\n</div><hr>\n<h2 id=\"logic-example\">Logic Example</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">$result = json_decode($response, true);\n$type = $result['data']['type'] ?? null;\nif ($result['status'] === 'success' &amp;&amp; $type === 'new') {\n    // New transaction created successfully.\n    // Display bank details to the customer so they can complete the transfer.\n    $iban   = $result['data']['bank']['account_iban'];\n    $holder = $result['data']['bank']['account_holder'];\n    $amount = $result['data']['bank']['amount'];\n    $txId   = $result['data']['customer']['transaction_id'];\n} elseif ($result['status'] === 'error' &amp;&amp; $type === 'on_process') {\n    // Customer already has an active transaction.\n    // Do not create a new request. Wait for the current one to complete or expire.\n    $txId = $result['data']['customer']['transaction_id'];\n} elseif ($result['status'] === 'error' &amp;&amp; $type === 'update') {\n    // Amount changed — the existing transaction has been updated.\n    // No new transaction was created. The same transaction_id is preserved.\n    $txId   = $result['data']['customer']['transaction_id'];\n    $amount = $result['data']['bank']['amount'];\n} elseif ($result['status'] === 'error' &amp;&amp; $type === null) {\n    // Validation error. No transaction was created or modified.\n    // Example: \"Amount must be between 100.00 ₺ and 100,000,000,000.00 ₺\"\n    $errorMessage = $result['message'];\n}\n\n</code></pre>\n<hr>\n<blockquote>\n<p><strong>Note:</strong> When <code>status</code> is <code>error</code> but <code>data</code> is present, it does not indicate a failure — it means the system returned an existing or updated transaction instead of creating a new one. Always check <code>data.type</code> to determine the actual outcome. </p>\n</blockquote>\n<h2 id=\"🔔-please-give-us-a-callback-response-as-follows\"><strong>🔔 Please give us a callback response as follows</strong></h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": true,\n  \"message\": \"Callback Received\"\n}\n\n</code></pre>\n<h2 id=\"🔔-hash-calculation\">🔔 Hash Calculation</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">   $hash = implode(\":\", array_filter([\n            transaction_id,\n            customer_fullname,\n            customer_username,\n            customer_id,\n            customer_description,\n            floatval(request_amount),\n            floatval(request_final_amount)\n        ], function($value) {\n            return $value !== null &amp;&amp; $value !== '';\n        }));\n// Export. hashing encode\nhash = hash = hash(\"sha256\",$hash) \n\n</code></pre>\n<h2 id=\"🔔-hash-validation\"><strong>🔔 Hash Validation</strong></h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">/**\n * Validates transaction hash\n * \n * @param array $transactionDetail Transaction detail array\n * @param string $hashToValidate Hash value to validate\n * @return bool Returns true if hash is valid, false otherwise\n */\nfunction validateTransactionHash(array $transactionDetail, string $hashToValidate): bool\n{\n    // Prepare values for hash generation\n    $hashComponents = array_filter([\n        $transactionDetail['transaction_id'] ?? null,\n        $transactionDetail['customer_fullname'] ?? null,\n        $transactionDetail['customer_username'] ?? null,\n        $transactionDetail['customer_id'] ?? null,\n        $transactionDetail['customer_description'] ?? null,\n        isset($transactionDetail['request_amount']) ? floatval($transactionDetail['request_amount']) : null,\n        isset($transactionDetail['request_final_amount']) ? floatval($transactionDetail['request_final_amount']) : null\n    ], function($value) {\n        return $value !== null &amp;&amp; $value !== '';\n    });\n    // Join values with \":\"\n    $hashString = implode(\":\", $hashComponents);\n    // Generate SHA-256 hash\n    $calculatedHash = hash(\"sha256\", $hashString);\n    // Compare hashes (timing attack safe)\n    return hash_equals($calculatedHash, $hashToValidate);\n}\n// Usage example:\n$transactionData = [\n    'transaction_id' =&gt; 'TRX-2024-001',\n    'customer_fullname' =&gt; 'John Smith',\n    'customer_username' =&gt; 'jsmith',\n    'customer_id' =&gt; 'CUST-789456',\n    'customer_description' =&gt; 'Monthly subscription payment',\n    'request_amount' =&gt; 250.00,\n    'request_final_amount' =&gt; 262.50\n];\n// Hash to validate (received from API or stored in DB)\n$receivedHash = '7f3a2b9c8d4e5f6a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4';\n// Validate the hash\nif (validateTransactionHash($transactionData, $receivedHash)) {\n    echo \"Hash validation successful - Transaction is authentic!\";\n} else {\n    echo \"Hash validation failed - Transaction may be tampered!\";\n}\n\n</code></pre>\n<h2 id=\"🔔-callback-configuration\"><strong>🔔 Callback Configuration</strong></h2>\n<p>After the payment process, you needed to provide us with Deposit and Withdrawal Callback URLs to notify you of the payment status. Additionally, please send us your Whitelist IP addresses for access.</p>\n<h3 id=\"requirements-for-integration\"><strong>Requirements for Integration</strong></h3>\n<p>For a complete integration, you must provide EkstraPAY with your callback URLs to receive real-time transaction updates:</p>\n<ol>\n<li><p><strong>Deposit Callback URL</strong> - Endpoint to receive deposit transaction status updates</p>\n</li>\n<li><p><strong>Withdraw Callback URL</strong> - Endpoint to receive withdrawal transaction status updates</p>\n</li>\n</ol>\n<h4 id=\"please-provide-us-with-the-whitelist-ip-addresses-for-access\"><strong>Please provide us with the whitelist IP addresses for access.</strong></h4>\n<h2 id=\"🔄-transaction-status-lifecycle\">🔄 Transaction Status Lifecycle</h2>\n<p>After creating a payment request, transactions go through the following status stages:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Status Code</th>\n<th>Status Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>PAY_NEW</td>\n<td>New</td>\n<td>Transaction has been created and is awaiting processing</td>\n</tr>\n<tr>\n<td>PAY_PROCESSING</td>\n<td>Processing</td>\n<td>Transaction is currently being processed</td>\n</tr>\n<tr>\n<td>PAY_REJECTED</td>\n<td>Rejected</td>\n<td>Transaction was rejected by the system or payment provider</td>\n</tr>\n<tr>\n<td>PAY_APPROVED</td>\n<td>Approved</td>\n<td>Transaction successfully completed and approved</td>\n</tr>\n<tr>\n<td>PAY_CANCELLED</td>\n<td>Cancelled</td>\n<td>Transaction was cancelled by user or system</td>\n</tr>\n<tr>\n<td>PAY_TIMEOUT</td>\n<td>Timeout</td>\n<td>Transaction expired due to timeout</td>\n</tr>\n<tr>\n<td>NOT_FOUND</td>\n<td>Not Found</td>\n<td>Transaction Not Found</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>📝 Note:</strong> Sample PHP code for this request is included in the request page notes. Please refer to the PHP examples provided in the Postman collection or check the Pre-request Script tab for implementation details.</p>\n<h2 id=\"🔐-authentication-headers\">🔐 Authentication Headers</h2>\n<p>All requests require the following authentication headers:</p>\n<p>http</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">X-API-Key: your_api_key\nX-Timestamp: unix_timestamp\nX-Nonce: random_32_char_hex\nX-Signature: hmac_sha256_signature\nContent-Type: application/json\n\n</code></pre>\n<h2 id=\"📨-pre-request-script-configuration\">📨 Pre-request Script Configuration</h2>\n<p>The Postman collection includes Pre-request Scripts that automatically:</p>\n<ul>\n<li><p>Generate timestamps and nonces</p>\n</li>\n<li><p>Calculate HMAC-SHA256 signatures</p>\n</li>\n<li><p>Set authentication headers</p>\n</li>\n</ul>\n<p><strong>Important:</strong> Review the Pre-request Script tab in Postman for each request to understand the signature generation process. The scripts contain comments explaining each step.</p>\n<h3 id=\"📚-callback-examples-in-postman\">📚 Callback Examples in Postman</h3>\n<p>The Postman collection includes an <strong>\"Example Callbacks\"</strong> folder containing:</p>\n<ul>\n<li><p>Sample deposit callback request</p>\n</li>\n<li><p>Sample withdraw callback request</p>\n</li>\n<li><p>Response validation examples</p>\n</li>\n</ul>\n<h1 id=\"request-structure\"><strong>Request Structure</strong></h1>\n<p>The same endpoint handles both <strong>deposit</strong> and <strong>withdraw</strong> operations. The only difference between them is the JSON body — the URL, headers, and signature logic are identical for both.</p>\n<hr>\n<p><strong>Endpoint</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST https://v2.ekstrapay.com/api/v1/payment/create\n\n</code></pre><hr>\n<p><strong>How the signature is built</strong></p>\n<p>Every request must be signed. The signing process is the same regardless of programming language:</p>\n<ol>\n<li><p>Get the current <strong>Unix timestamp</strong> in seconds (not milliseconds)</p>\n</li>\n<li><p>Generate a <strong>random 32-character hex string</strong> as nonce</p>\n</li>\n<li><p>Take your raw JSON body and <strong>remove all fields that are empty string, null, or undefined</strong></p>\n</li>\n<li><p><strong>Serialize</strong> the cleaned object to a compact JSON string (no extra whitespace)</p>\n</li>\n<li><p><strong>Concatenate</strong> the following four values separated by pipe <code>|</code>:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>                  apiKey|timestamp|nonce|jsonString\n\n</code></pre></li>\n<li><p>Compute <strong>HMAC-SHA256</strong> of that string using your API secret as the key</p>\n</li>\n<li><p>The resulting hex digest is your signature</p>\n</li>\n</ol>\n<hr>\n<p><strong>Required headers</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Header</th>\n<th>Value</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>X-API-Key</code></td>\n<td>Your API key</td>\n</tr>\n<tr>\n<td><code>X-Timestamp</code></td>\n<td>Unix timestamp used in signature</td>\n</tr>\n<tr>\n<td><code>X-Nonce</code></td>\n<td>Random hex nonce used in signature</td>\n</tr>\n<tr>\n<td><code>X-Signature</code></td>\n<td>HMAC-SHA256 hex digest</td>\n</tr>\n<tr>\n<td><code>Content-Type</code></td>\n<td><code>application/json</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr>\n<p><strong>Request body — Deposit</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>operation</code></td>\n<td>string</td>\n<td>✅</td>\n<td><code>\"deposit\"</code></td>\n</tr>\n<tr>\n<td><code>amount</code></td>\n<td>integer</td>\n<td>✅</td>\n<td>Payment amount</td>\n</tr>\n<tr>\n<td><code>customer_fullname</code></td>\n<td>string</td>\n<td>✅</td>\n<td>Customer full name</td>\n</tr>\n<tr>\n<td><code>customer_username</code></td>\n<td>string</td>\n<td>✅</td>\n<td>Customer username</td>\n</tr>\n<tr>\n<td><code>customer_id</code></td>\n<td>string</td>\n<td>✅</td>\n<td>Customer unique ID</td>\n</tr>\n<tr>\n<td><code>customer_email</code></td>\n<td>string</td>\n<td>✅</td>\n<td>Customer email</td>\n</tr>\n<tr>\n<td><code>customer_site</code></td>\n<td>string</td>\n<td>✅</td>\n<td>Site name or domain</td>\n</tr>\n<tr>\n<td><code>customer_phone</code></td>\n<td>string</td>\n<td>➖</td>\n<td>Optional</td>\n</tr>\n<tr>\n<td><code>customer_gender</code></td>\n<td>string</td>\n<td>➖</td>\n<td>Optional</td>\n</tr>\n<tr>\n<td><code>customer_hash</code></td>\n<td>string</td>\n<td>➖</td>\n<td>Optional</td>\n</tr>\n<tr>\n<td><code>customer_description</code></td>\n<td>string</td>\n<td>➖</td>\n<td>Optional</td>\n</tr>\n<tr>\n<td><code>order_id</code></td>\n<td>string</td>\n<td>➖</td>\n<td>Optional</td>\n</tr>\n</tbody>\n</table>\n</div><p><strong>Request body — Withdraw</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>operation</code></td>\n<td>string</td>\n<td>✅</td>\n<td><code>\"withdraw\"</code></td>\n</tr>\n<tr>\n<td><code>amount</code></td>\n<td>integer</td>\n<td>✅</td>\n<td>Payout amount</td>\n</tr>\n<tr>\n<td><code>customer_fullname</code></td>\n<td>string</td>\n<td>✅</td>\n<td>Customer full name</td>\n</tr>\n<tr>\n<td><code>customer_username</code></td>\n<td>string</td>\n<td>✅</td>\n<td>Customer username</td>\n</tr>\n<tr>\n<td><code>customer_id</code></td>\n<td>string</td>\n<td>✅</td>\n<td>Customer unique ID</td>\n</tr>\n<tr>\n<td><code>customer_site</code></td>\n<td>string</td>\n<td>✅</td>\n<td>Site name or domain</td>\n</tr>\n<tr>\n<td><code>account_iban</code></td>\n<td>string</td>\n<td>✅</td>\n<td>Target IBAN</td>\n</tr>\n<tr>\n<td><code>account_holder</code></td>\n<td>string</td>\n<td>✅</td>\n<td>IBAN holder name</td>\n</tr>\n<tr>\n<td><code>customer_phone</code></td>\n<td>string</td>\n<td>➖</td>\n<td>Optional</td>\n</tr>\n<tr>\n<td><code>customer_email</code></td>\n<td>string</td>\n<td>➖</td>\n<td>Optional</td>\n</tr>\n<tr>\n<td><code>customer_hash</code></td>\n<td>string</td>\n<td>➖</td>\n<td>Optional</td>\n</tr>\n<tr>\n<td><code>customer_description</code></td>\n<td>string</td>\n<td>➖</td>\n<td>Optional</td>\n</tr>\n<tr>\n<td><code>order_id</code></td>\n<td>string</td>\n<td>➖</td>\n<td>Optional</td>\n</tr>\n</tbody>\n</table>\n</div><hr>\n<p><strong>Implementation notes — critical</strong></p>\n<p><strong>Empty field stripping</strong> — Before signing, remove every field whose value is an empty string, null, or undefined. The server applies the same logic. If your JSON includes empty fields that the server stripped (or vice versa), the JSON strings won't match and the signature will fail.</p>\n<p><strong>JSON serialization</strong> — Serialize with Unicode characters unescaped. Characters like <code>ş</code>, <code>ğ</code>, <code>ü</code>, <code>ı</code> must appear as-is in the JSON string, not as <code>\\uXXXX</code> escape sequences. Both sides must produce byte-for-byte identical JSON.</p>\n<p><strong>Timestamp unit</strong> — Must be in <strong>seconds</strong>, not milliseconds. Using milliseconds will cause timestamp validation to fail on the server.</p>\n<p><strong>HMAC output format</strong> — The signature must be a <strong>lowercase hex string</strong>. Most HMAC libraries output this by default, but verify this in your language of choice.</p>\n<p><strong>Pipe delimiter order is strict</strong> — The payload must be exactly <code>apiKey|timestamp|nonce|jsonString</code>. Any reordering or extra characters will produce a mismatched signature.</p>\n<p><strong>Replay attack protection</strong> — The combination of timestamp and nonce ensures each request is unique. Even if a valid signed request is intercepted, it cannot be reused because the timestamp will be considered stale and the nonce is single-use on the server side.</p>\n<hr>\n<p><strong>Language-specific HMAC-SHA256 references</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Language</th>\n<th>Method</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>PHP</td>\n<td><code>hash_hmac('sha256', $payload, $secret)</code></td>\n</tr>\n<tr>\n<td>JavaScript</td>\n<td><code>CryptoJS.HmacSHA256(payload, secret).toString()</code></td>\n</tr>\n<tr>\n<td>Python</td>\n<td><code>hmac.new(secret.encode(), payload.encode(), hashlib.sha256).hexdigest()</code></td>\n</tr>\n<tr>\n<td>Java</td>\n<td><code>Mac.getInstance(\"HmacSHA256\")</code></td>\n</tr>\n<tr>\n<td>C#</td>\n<td><code>HMACSHA256.ComputeHash(...)</code></td>\n</tr>\n<tr>\n<td>Go</td>\n<td><code>hmac.New(sha256.New, []byte(secret))</code></td>\n</tr>\n<tr>\n<td>Ruby</td>\n<td><code>OpenSSL::HMAC.hexdigest('sha256', secret, payload)</code></td>\n</tr>\n</tbody>\n</table>\n</div></body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Response Handling","slug":"response-handling"},{"content":"Request Structure","slug":"request-structure"}],"owner":"14352549","collectionId":"da0ba46b-336c-4dd3-88d2-b8adfa5fef73","publishedId":"2sB3QMKUGL","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"303030"},"publishDate":"2025-10-12T16:57:46.000Z"},"item":[{"name":"Create Deposit","event":[{"listen":"prerequest","script":{"id":"73f44db9-da3b-432e-b10c-e96bd1ac1f31","exec":["const apiKey = pm.variables.get(\"apiKey\");","const apiSecret = pm.variables.get(\"apiSecret\");","  ","const timestamp = Math.floor(Date.now() / 1000);","const nonce = CryptoJS.lib.WordArray.random(16).toString();"," ","let requestBody = {};","if (pm.request.body && pm.request.body.raw) {","    try {","        requestBody = JSON.parse(pm.request.body.raw);","    } catch(e) {","        console.error(\"JSON parse error:\", e);","        requestBody = {};","    }","}"," ","const cleanedBody = {};","Object.keys(requestBody).forEach(key => {","    if (requestBody[key] !== \"\" && requestBody[key] !== null && requestBody[key] !== undefined) {","        cleanedBody[key] = requestBody[key];","    }","});"," ","const jsonString = JSON.stringify(cleanedBody);","","const payload = [ apiKey, timestamp, nonce, jsonString ].join('|');","","const signature = CryptoJS.HmacSHA256(payload, apiSecret).toString();","","pm.request.headers.add({key: 'X-API-Key', value: apiKey});","pm.request.headers.add({key: 'X-Timestamp', value: timestamp.toString()});","pm.request.headers.add({key: 'X-Nonce', value: nonce});","pm.request.headers.add({key: 'X-Signature', value: signature});","pm.request.headers.add({key: 'Content-Type', value: 'application/json'});"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"604e7f58-ba2a-4f37-aa98-e21fc20aee01","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-API-Key","value":"","type":"text"},{"key":"X-Timestamp","value":"","type":"text"},{"key":"X-Nonce","value":"","type":"text"},{"key":"X-Signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"operation\": \"deposit\",\n    \"order_id\": \"\",\n    \"amount\": 100,\n    \"customer_fullname\": \"Lorem IPSUM\",\n    \"customer_username\": \"required12\",\n    \"customer_id\": \"required12\",\n    \"customer_email\": \"\",\n    \"customer_description\": \"\",\n    \"customer_hash\": \"\",\n    \"customer_phone\": \"\",\n    \"customer_gender\": \"\",\n    \"customer_site\": \"\"\n}\n"},"url":"/api/v1/payment/create","description":"<h1 id=\"deposit\">DEPOSIT</h1>\n<h3 id=\"automatic-signature-generation-with-pre-request-script\">Automatic Signature Generation with Pre-request Script</h3>\n<p>Following the <strong>Pre-request Script</strong> tab in Postman or check the below the example</p>\n<h2 id=\"📝-field-descriptions-operation\">📝 Field Descriptions Operation</h2>\n<h3 id=\"required-fields\">Required Fields:</h3>\n<ul>\n<li><p><strong><code>operation</code></strong>: Transaction type - must be \"deposit\" for payment collection</p>\n</li>\n<li><p><strong><code>amount</code></strong>: Deposit amount (decimal number)</p>\n</li>\n<li><p><strong><code>customer_id</code></strong>: Unique customer identifier in your system</p>\n</li>\n<li><p><strong><code>customer_fullname</code></strong>: Customer's full name</p>\n</li>\n<li><p><strong><code>customer_username</code></strong>: Customer's username in your platform</p>\n</li>\n</ul>\n<h3 id=\"optional-fields\">Optional Fields:</h3>\n<ul>\n<li><p><strong><code>customer_description</code></strong>: Additional notes about the transaction</p>\n</li>\n<li><p><strong><code>customer_hash</code></strong>: Custom verification hash for extra security</p>\n</li>\n<li><p><strong><code>customer_phone</code></strong>: Customer's phone number</p>\n</li>\n<li><p><strong><code>customer_email</code></strong>: Customer's email address</p>\n</li>\n<li><p><strong><code>customer_gender</code></strong>: Customer gender (M/F)</p>\n</li>\n<li><p><strong><code>customer_site</code></strong>: Platform or site identifier</p>\n</li>\n<li><p><strong><code>order_id</code></strong>: This is custom and optional your transaction or order ID must be string</p>\n</li>\n</ul>\n<p>Please add : <code>api_key</code> and <code>api_secret</code></p>\n<p>EXAMPLE :</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">/**\n * EKSTRAPAY API - DEPOSIT OPERATION\n * \n * Complete PHP implementation for deposit (payment collection) transactions\n * This example shows how to create a deposit request with Ekstrapay API\n * \n * @version 1.0\n * @api https://v2.ekstrapay.com/api/v1/payment/create\n */\n/**\n * Function to send DEPOSIT request to Ekstrapay API\n * \n * This function handles the complete process of creating a deposit request\n * including authentication signature generation and API communication\n * \n * @param string $apiKey The API key provided by Ekstrapay\n * @param string $apiSecret The API secret key for HMAC signature generation\n * @param array $data Deposit data to be sent to the API\n * @return array Returns array with success status and response data or error details\n */\nfunction ekstrapayDepositCreate($apiKey, $apiSecret, $data) {\n    // Define the API endpoint URL for payment creation\n    $url = 'https://v2.ekstrapay.com/api/v1/payment/create';\n    // Generate current timestamp in seconds (Unix timestamp)\n    // This is used for request validation and replay attack prevention\n    $timestamp = time();\n    // Generate a unique nonce (number used once) - 16 bytes converted to hex string\n    // Nonce ensures each request is unique, preventing replay attacks\n    $nonce = bin2hex(random_bytes(16));\n    // Remove empty values from the data array\n    // This ensures we don't send empty or null fields to the API\n    $cleanedData = array_filter($data, function($value) {\n        return $value !== \"\" &amp;&amp; $value !== null;\n    });\n    // Convert the cleaned data array to JSON string format\n    $jsonString = json_encode($cleanedData,JSON_UNESCAPED_UNICODE);\n    // Create the payload for signature generation\n    // The payload consists of: API key | timestamp | nonce | JSON data\n    // Pipe character (|) is used as delimiter between components\n    $payload = implode('|', [\n        $apiKey,\n        $timestamp,\n        $nonce,\n        $jsonString\n    ]);\n    // Generate HMAC-SHA256 signature using the payload and API secret\n    // This signature verifies the authenticity and integrity of the request\n    $signature = hash_hmac('sha256', $payload, $apiSecret);\n    // Prepare HTTP headers for the API request\n    // These headers include authentication credentials and content type\n    $headers = [\n        'X-API-Key: ' . $apiKey,        // API key for identification\n        'X-Timestamp: ' . $timestamp,    // Request timestamp\n        'X-Nonce: ' . $nonce,            // Unique request identifier\n        'X-Signature: ' . $signature,    // HMAC signature for verification\n        'Content-Type: application/json' // Specify JSON content type\n    ];\n    // Initialize cURL session for HTTP communication\n    $ch = curl_init();\n    // Configure cURL options for the API request\n    curl_setopt($ch, CURLOPT_URL, $url);                  // Set target URL\n    curl_setopt($ch, CURLOPT_POST, 1);                    // Enable POST method\n    curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonString);    // Attach JSON payload\n    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);       // Set custom headers\n    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);       // Return response as string\n    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);       // Enable SSL verification for production\n    curl_setopt($ch, CURLOPT_TIMEOUT, 30);                // Set 30 seconds timeout\n    // Execute the API request and capture the response\n    $response = curl_exec($ch);\n    // Check for cURL execution errors\n    if (curl_errno($ch)) {\n        // Get the error message\n        $error = curl_error($ch);\n        // Close the cURL session\n        curl_close($ch);\n        // Return error information in standardized format\n        return [\n            'success' =&gt; false,\n            'error' =&gt; 'cURL Error: ' . $error\n        ];\n    }\n    // Get the HTTP response status code\n    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n    // Close the cURL session to free resources\n    curl_close($ch);\n    // Parse the JSON response into PHP array\n    $decodedResponse = json_decode($response, true);\n    // Check HTTP status code and return appropriate response\n    if ($httpCode == 200) {\n        // Success - HTTP 200 OK\n        return [\n            'success' =&gt; true,\n            'data' =&gt; $decodedResponse\n        ];\n    } else {\n        // Error - Return error details with HTTP code\n        return [\n            'success' =&gt; false,\n            'http_code' =&gt; $httpCode,\n            'response' =&gt; $decodedResponse ?: $response\n        ];\n    }\n}\n// ===========================================================================================\n// USAGE EXAMPLE FOR DEPOSIT\n// ===========================================================================================\n// API credentials (store these securely in environment variables in production)\n$apiKey = \"YOUR_API_KEY_HERE\";     // Replace with your actual Ekstrapay API key\n$apiSecret = \"YOUR_API_SECRET_HERE\";  // Replace with your actual Ekstrapay API secret\n// Prepare deposit data with all required and optional fields\n$depositData = [\n    // REQUIRED FIELDS\n    \"operation\" =&gt; \"deposit\",                     // Transaction type - MUST be \"deposit\"\n    \"amount\" =&gt; 250.00,                          // Deposit amount (decimal number)\n    \"customer_id\" =&gt; \"USR_20251012_001\",         // Unique customer ID in your system\n    \"customer_fullname\" =&gt; \"John Smith\",         // Customer's full name\n    \"customer_username\" =&gt; \"johnsmith123\",       // Customer's username in your platform\n    // OPTIONAL FIELDS\n    \"customer_description\" =&gt; \"Premium account deposit\", // Transaction description\n    \"customer_hash\" =&gt; \"abc123xyz789\",           // Custom verification hash\n    \"customer_phone\" =&gt; \"+1234567890\",           // Customer's phone number\n    \"customer_email\" =&gt; \"john.smith@email.com\",  // Customer's email address\n    \"customer_gender\" =&gt; \"male\",                    // Customer gender (male/female)\n    \"customer_site\" =&gt; \"Main Platform\" ,          // Platform or site identifier\n    \"order_id\" =&gt; \"custom_your_id\"           // Custom Order ID\n];\n// Execute the deposit request\n$result = ekstrapayDepositCreate($apiKey, $apiSecret, $depositData);\n// Handle the response\nprint_r($result);\n\n</code></pre>\n","urlObject":{"path":["api","v1","payment","create"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"74c26352-c148-46cb-ac85-d3e78fdca14c","name":"new","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-API-Key","value":"","type":"text"},{"key":"X-Timestamp","value":"","type":"text"},{"key":"X-Nonce","value":"","type":"text"},{"key":"X-Signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"operation\": \"deposit\",\n    \"order_id\": \"\",\n    \"amount\": 100,\n    \"customer_fullname\": \"Lorem IPSUM\",\n    \"customer_username\": \"required\",\n    \"customer_id\": \"required\",\n    \"customer_email\": \"\",\n    \"customer_description\": \"\",\n    \"customer_hash\": \"\",\n    \"customer_phone\": \"\",\n    \"customer_gender\": \"\",\n    \"customer_site\": \"\"\n}\n"},"url":"/api/v1/payment/create"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 20 May 2026 08:08:37 GMT"},{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Content-Length","value":"267"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"cloudflare"},{"key":"Nel","value":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Ekstrapay","value":"V1"},{"key":"X-Response-Time","value":"63.38ms"},{"key":"Vary","value":"Origin"},{"key":"vary","value":"accept-encoding"},{"key":"Content-Encoding","value":"br"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"X-Permitted-Cross-Domain-Policies","value":"master-only"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=dxKlafoZR67f%2Bx6lB4h2FKfn%2B8b10hKY9uqoqSuuexxd7eCtxYjnWhjjg1G6vyubLX567hx2VTqIe261IrWv9Cjv3NTIjeaZWB4jJl7Dx9P%2BJjSjFteO66PXsJ6EezQ82lLq\"}]}"},{"key":"CF-RAY","value":"9fe9dac299355a0d-MXP"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"title\": \"Başarılı\",\n    \"message\": \"İşlem oluşturuldu\",\n    \"description\": \"İşlem oluşturuldu\",\n    \"data\": {\n        \"customer\": {\n            \"transaction_id\": \"fa2ea3e0-0bc6-4463-a415-d0c1f72f44c9\",\n            \"order_id\": null,\n            \"customer_fullname\": \"Lorem IPSUM\",\n            \"customer_username\": \"required\",\n            \"customer_id\": \"required\",\n            \"amount\": 100\n        },\n        \"bank\": {\n            \"account_iban\": \"TR580006400000143750001552\",\n            \"account_holder\": \"Lorem Ipsum\",\n            \"amount\": 100\n        },\n        \"created_at\": \"2026-05-20 11:08:37\",\n        \"type\": \"new\"\n    }\n}"},{"id":"be235e9c-2a34-4db0-b5c9-47323a5d8f0f","name":"on process","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-API-Key","value":"","type":"text"},{"key":"X-Timestamp","value":"","type":"text"},{"key":"X-Nonce","value":"","type":"text"},{"key":"X-Signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"operation\": \"deposit\",\n    \"order_id\": \"\",\n    \"amount\": 100,\n    \"customer_fullname\": \"Lorem IPSUM\",\n    \"customer_username\": \"required\",\n    \"customer_id\": \"required\",\n    \"customer_email\": \"\",\n    \"customer_description\": \"\",\n    \"customer_hash\": \"\",\n    \"customer_phone\": \"\",\n    \"customer_gender\": \"\",\n    \"customer_site\": \"\"\n}\n"},"url":"/api/v1/payment/create"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 20 May 2026 08:19:26 GMT"},{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Content-Length","value":"320"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"cloudflare"},{"key":"Nel","value":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Ekstrapay","value":"V1"},{"key":"X-Response-Time","value":"12.34ms"},{"key":"Vary","value":"Origin"},{"key":"vary","value":"accept-encoding"},{"key":"Content-Encoding","value":"br"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"X-Permitted-Cross-Domain-Policies","value":"master-only"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=BPNz5LSYAjU61uW4sqX0DRSJEAj0FJqICs%2B%2F3%2FBebFbVCHW5XWWSoumxrO%2Bet3kRfYOAIy2QcU4NFrw4rda%2B4jM%2BcQjCJmoRc6JcEp18RSV37XI8g41H%2FmZ0uHtvvjHlVI6d\"}]}"},{"key":"CF-RAY","value":"9fe9ea9b9e3dedbc-MXP"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"title\": \"Hata\",\n    \"message\": \"İşlem mevcut, işlemin tamamlanmasını bekleyiniz\",\n    \"description\": \"İşlem mevcut, işlemin tamamlanmasını bekleyiniz\",\n    \"data\": {\n        \"pool\": {\n            \"role_type\": \"marjin\",\n            \"role_id\": 1,\n            \"role_user_id\": null\n        },\n        \"customer\": {\n            \"transaction_id\": \"0c96e331-093e-4e24-882b-b3aeaf293a86\",\n            \"order_id\": null,\n            \"customer_fullname\": \"Lorem IPSUM\",\n            \"customer_username\": \"required\",\n            \"customer_id\": \"required\",\n            \"amount\": \"100.00\"\n        },\n        \"bank\": {\n            \"account_iban\": \"TR580006400000143750001552\",\n            \"account_holder\": \"Lorem Ipsum\",\n            \"amount\": \"100.00\"\n        },\n        \"created_at\": \"2026-05-20 11:19:24\",\n        \"type\": \"on_process\"\n    }\n}"},{"id":"55888b4f-8226-42d1-be30-dc4434df7915","name":"update","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-API-Key","value":"","type":"text"},{"key":"X-Timestamp","value":"","type":"text"},{"key":"X-Nonce","value":"","type":"text"},{"key":"X-Signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"operation\": \"deposit\",\n    \"order_id\": \"\",\n    \"amount\": 100,\n    \"customer_fullname\": \"Lorem IPSUM\",\n    \"customer_username\": \"required\",\n    \"customer_id\": \"required\",\n    \"customer_email\": \"\",\n    \"customer_description\": \"\",\n    \"customer_hash\": \"\",\n    \"customer_phone\": \"\",\n    \"customer_gender\": \"\",\n    \"customer_site\": \"\"\n}\n"},"url":"/api/v1/payment/create"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 20 May 2026 08:22:32 GMT"},{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Content-Length","value":"292"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"cloudflare"},{"key":"Nel","value":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Ekstrapay","value":"V1"},{"key":"X-Response-Time","value":"18.32ms"},{"key":"Vary","value":"Origin"},{"key":"vary","value":"accept-encoding"},{"key":"Content-Encoding","value":"br"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"X-Permitted-Cross-Domain-Policies","value":"master-only"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=RAaERGstPH63wyXm%2FFbd5bJfDEnBXxlBqL1qZ1MFku03WFZphAz50pwuc95nbFtwGS1YoLRraeq9eLlNtEzOW6gLxUsaVIVccAAfOskGnzJ2MdHPDnIRvyF4S7o6TdYB6WNj\"}]}"},{"key":"CF-RAY","value":"9fe9ef26ad315a25-MXP"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"title\": \"Hata\",\n    \"message\": \"İşlem güncellendi\",\n    \"description\": \"İşlem güncellendi\",\n    \"data\": {\n        \"pool\": {\n            \"role_type\": \"marjin\",\n            \"role_id\": 1,\n            \"role_user_id\": null\n        },\n        \"customer\": {\n            \"transaction_id\": \"0c96e331-093e-4e24-882b-b3aeaf293a86\",\n            \"order_id\": null,\n            \"customer_fullname\": \"Lorem IPSUM\",\n            \"customer_username\": \"required\",\n            \"customer_id\": \"required\",\n            \"amount\": \"100.00\"\n        },\n        \"bank\": {\n            \"account_iban\": \"TR580006400000143750001552\",\n            \"account_holder\": \"Lorem Ipsum\",\n            \"amount\": \"100.00\"\n        },\n        \"created_at\": \"2026-05-20 11:19:24\",\n        \"type\": \"update\"\n    }\n}"},{"id":"2317131b-469c-42f8-a4c9-e252f9f33962","name":"standart error","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-API-Key","value":"","type":"text"},{"key":"X-Timestamp","value":"","type":"text"},{"key":"X-Nonce","value":"","type":"text"},{"key":"X-Signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"operation\": \"deposit\",\n    \"order_id\": \"\",\n    \"amount\": 1,\n    \"customer_fullname\": \"Lorem IPSUM\",\n    \"customer_username\": \"required\",\n    \"customer_id\": \"required\",\n    \"customer_email\": \"\",\n    \"customer_description\": \"\",\n    \"customer_hash\": \"\",\n    \"customer_phone\": \"\",\n    \"customer_gender\": \"\",\n    \"customer_site\": \"\"\n}\n"},"url":"/api/v1/payment/create"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Wed, 20 May 2026 08:19:51 GMT"},{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Content-Length","value":"135"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"cloudflare"},{"key":"Nel","value":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Ekstrapay","value":"V1"},{"key":"X-Response-Time","value":"11.98ms"},{"key":"Vary","value":"Origin"},{"key":"vary","value":"accept-encoding"},{"key":"Content-Encoding","value":"br"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=L5qaaPKryoq81dauf2VpbqAen4CSyCDe3us8l%2B%2FU0GtHylS6H%2BnCuBy1daL91HoJkHEjAfgpqf6t3%2BOPBRHD4xDoNuk%2Bnmv%2B1z04zk8y1fcfqRGtlLo1Ws23uIihO6KcfmjC\"}]}"},{"key":"CF-RAY","value":"9fe9eb383fccedbc-MXP"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"title\": \"HATA\",\n    \"description\": \"Tutar 100,00 ₺ ve 100.000.000.000,00 ₺ arasında olmalıdır\",\n    \"message\": \"Tutar 100,00 ₺ ve 100.000.000.000,00 ₺ arasında olmalıdır\",\n    \"timestamp\": \"2026-05-20T11:19:51+03:00\"\n}"}],"_postman_id":"604e7f58-ba2a-4f37-aa98-e21fc20aee01"},{"name":"Create Withdraw","event":[{"listen":"prerequest","script":{"id":"73f44db9-da3b-432e-b10c-e96bd1ac1f31","exec":["const apiKey = pm.variables.get(\"apiKey\");","const apiSecret = pm.variables.get(\"apiSecret\");"," ","const timestamp = Math.floor(Date.now() / 1000);","const nonce = CryptoJS.lib.WordArray.random(16).toString();"," ","let requestBody = {};","if (pm.request.body && pm.request.body.raw) {","    try {","        requestBody = JSON.parse(pm.request.body.raw);","    } catch(e) {","        console.error(\"JSON parse error:\", e);","        requestBody = {};","    }","}"," ","const cleanedBody = {};","Object.keys(requestBody).forEach(key => {","    if (requestBody[key] !== \"\" && requestBody[key] !== null && requestBody[key] !== undefined) {","        cleanedBody[key] = requestBody[key];","    }","});"," ","const jsonString = JSON.stringify(cleanedBody);","","const payload = [ apiKey, timestamp, nonce, jsonString ].join('|');","","const signature = CryptoJS.HmacSHA256(payload, apiSecret).toString();","","pm.request.headers.add({key: 'X-API-Key', value: apiKey});","pm.request.headers.add({key: 'X-Timestamp', value: timestamp.toString()});","pm.request.headers.add({key: 'X-Nonce', value: nonce});","pm.request.headers.add({key: 'X-Signature', value: signature});","pm.request.headers.add({key: 'Content-Type', value: 'application/json'});"],"type":"text/javascript","packages":{},"requests":{}}}],"id":"c32198a7-b7ef-4571-929e-af81a5d7f9fb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-API-Key","value":"","type":"text"},{"key":"X-Timestamp","value":"","type":"text"},{"key":"X-Nonce","value":"","type":"text"},{"key":"X-Signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n \n    \"operation\": \"withdraw\",\n    \"amount\": 1000,\n    \"customer_fullname\": \"full_name\",\n    \"customer_username\": \"username\",\n    \"customer_id\": \"user_id\",\n    \"customer_description\": \"\",\n    \"customer_hash\": \"\",\n    \"customer_phone\": \"\",\n    \"customer_email\": \"\",\n    \"customer_gender\": \"\",\n    \"customer_site\": \"site name or title or domain\",\n    \"account_iban\": \"TR580006400000143750001552\",\n    \"account_holder\": \"Lorem Ipsum\",\n    \"order_id\": \"\"\n}"},"url":"/api/v1/payment/create","description":"<h1 id=\"withdraw\">WITHDRAW</h1>\n<h3 id=\"automatic-signature-generation-with-pre-request-script\">Automatic Signature Generation with Pre-request Script</h3>\n<p>Following the <strong>Pre-request Script</strong> tab in Postman or check the below the example</p>\n<h2 id=\"📝-field-descriptions-operation\">📝 Field Descriptions Operation</h2>\n<h3 id=\"required-fields\">Required Fields:</h3>\n<ul>\n<li><p><strong><code>operation</code></strong>: Transaction type - must be \"withdraw\" for payment collection</p>\n</li>\n<li><p><strong><code>amount</code></strong>: Deposit amount (decimal number)</p>\n</li>\n<li><p><strong><code>customer_id</code></strong>: Unique customer identifier in your system</p>\n</li>\n<li><p><strong><code>customer_fullname</code></strong>: Customer's full name</p>\n</li>\n<li><p><strong><code>customer_username</code></strong>: Customer's username in your platform</p>\n</li>\n<li><p><strong><code>account_holder</code></strong>: Receiver iban owner</p>\n</li>\n<li><p><strong><code>account_iban</code></strong>: Receiver iban number</p>\n</li>\n</ul>\n<h3 id=\"optional-fields\">Optional Fields:</h3>\n<ul>\n<li><p><strong><code>customer_description</code></strong>: Additional notes about the transaction</p>\n</li>\n<li><p><strong><code>customer_hash</code></strong>: Custom verification hash for extra security</p>\n</li>\n<li><p><strong><code>customer_phone</code></strong>: Customer's phone number</p>\n</li>\n<li><p><strong><code>customer_email</code></strong>: Customer's email address</p>\n</li>\n<li><p><strong><code>customer_gender</code></strong>: Customer gender (M/F)</p>\n</li>\n<li><p><strong><code>customer_site</code></strong>: Platform or site identifier</p>\n</li>\n<li><p><strong><code>order_id</code></strong>: This is custom and optional your transaction or order ID must be string</p>\n</li>\n</ul>\n<p>Please add : <code>api_key</code> and <code>api_secret</code></p>\n<p>EXAMPLE :</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">/**\n * EKSTRAPAY API - WITHDRAW OPERATION\n * \n * Complete PHP implementation for withdraw (payout) transactions\n * This example shows how to create a withdraw request with Ekstrapay API\n * \n * @version 1.0\n * @api https://v2.ekstrapay.com/api/v1/payment/create\n */\n/**\n * Function to send WITHDRAW request to Ekstrapay API\n * \n * This function handles the complete process of creating a withdraw request\n * including authentication signature generation and API communication\n * \n * @param string $apiKey The API key provided by Ekstrapay\n * @param string $apiSecret The API secret key for HMAC signature generation\n * @param array $data Withdraw data to be sent to the API\n * @return array Returns array with success status and response data or error details\n */\nfunction ekstrapayWithdrawCreate($apiKey, $apiSecret, $data) {\n    // Define the API endpoint URL for payment creation\n    $url = 'https://v2.ekstrapay.com/api/v1/payment/create';\n    // Generate current timestamp in seconds (Unix timestamp)\n    // This is used for request validation and replay attack prevention\n    $timestamp = time();\n    // Generate a unique nonce (number used once) - 16 bytes converted to hex string\n    // Nonce ensures each request is unique, preventing replay attacks\n    $nonce = bin2hex(random_bytes(16));\n    // Remove empty values from the data array\n    // This ensures we don't send empty or null fields to the API\n    $cleanedData = array_filter($data, function($value) {\n        return $value !== \"\" &amp;&amp; $value !== null;\n    });\n    // Convert the cleaned data array to JSON string format\n    $jsonString = json_encode($cleanedData,JSON_UNESCAPED_UNICODE);\n    // Create the payload for signature generation\n    // The payload consists of: API key | timestamp | nonce | JSON data\n    // Pipe character (|) is used as delimiter between components\n    $payload = implode('|', [\n        $apiKey,\n        $timestamp,\n        $nonce,\n        $jsonString\n    ]);\n    // Generate HMAC-SHA256 signature using the payload and API secret\n    // This signature verifies the authenticity and integrity of the request\n    $signature = hash_hmac('sha256', $payload, $apiSecret);\n    // Prepare HTTP headers for the API request\n    // These headers include authentication credentials and content type\n    $headers = [\n        'X-API-Key: ' . $apiKey,        // API key for identification\n        'X-Timestamp: ' . $timestamp,    // Request timestamp\n        'X-Nonce: ' . $nonce,            // Unique request identifier\n        'X-Signature: ' . $signature,    // HMAC signature for verification\n        'Content-Type: application/json' // Specify JSON content type\n    ];\n    // Initialize cURL session for HTTP communication\n    $ch = curl_init();\n    // Configure cURL options for the API request\n    curl_setopt($ch, CURLOPT_URL, $url);                  // Set target URL\n    curl_setopt($ch, CURLOPT_POST, 1);                    // Enable POST method\n    curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonString);    // Attach JSON payload\n    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);       // Set custom headers\n    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);       // Return response as string\n    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);       // Enable SSL verification for production\n    curl_setopt($ch, CURLOPT_TIMEOUT, 30);                // Set 30 seconds timeout\n    // Execute the API request and capture the response\n    $response = curl_exec($ch);\n    // Check for cURL execution errors\n    if (curl_errno($ch)) {\n        // Get the error message\n        $error = curl_error($ch);\n        // Close the cURL session\n        curl_close($ch);\n        // Return error information in standardized format\n        return [\n            'success' =&gt; false,\n            'error' =&gt; 'cURL Error: ' . $error\n        ];\n    }\n    // Get the HTTP response status code\n    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n    // Close the cURL session to free resources\n    curl_close($ch);\n    // Parse the JSON response into PHP array\n    $decodedResponse = json_decode($response, true);\n    // Check HTTP status code and return appropriate response\n    if ($httpCode == 200) {\n        // Success - HTTP 200 OK\n        return [\n            'success' =&gt; true,\n            'data' =&gt; $decodedResponse\n        ];\n    } else {\n        // Error - Return error details with HTTP code\n        return [\n            'success' =&gt; false,\n            'http_code' =&gt; $httpCode,\n            'response' =&gt; $decodedResponse ?: $response\n        ];\n    }\n}\n// ===========================================================================================\n// USAGE EXAMPLE FOR WITHDRAW\n// ===========================================================================================\n// API credentials (store these securely in environment variables in production)\n$apiKey = \"YOUR_API_KEY_HERE\";     // Replace with your actual Ekstrapay API key\n$apiSecret = \"YOUR_API_SECRET_HERE\";  // Replace with your actual Ekstrapay API secret\n// Prepare withdraw data with all required and optional fields\n$withdrawData = [\n    // REQUIRED FIELDS\n    \"operation\" =&gt; \"withdraw\",                    // Transaction type - MUST be \"withdraw\"\n    \"amount\" =&gt; 500.00,                          // Withdraw amount (decimal number)\n    \"customer_id\" =&gt; \"USR_20251012_002\",         // Unique customer ID in your system\n    \"customer_fullname\" =&gt; \"Jane Doe\",           // Customer's full name\n    \"customer_username\" =&gt; \"janedoe456\",         // Customer's username in your platform\n    \"account_holder\" =&gt; \"Jane Elizabeth Doe\",     // IBAN account holder's full name\n    \"account_iban\" =&gt; \"TR330006100519786457841326\", // Receiver's IBAN number\n    // OPTIONAL FIELDS\n    \"customer_description\" =&gt; \"Withdraw request - Earnings payout\", // Transaction description\n    \"customer_hash\" =&gt; \"xyz789abc123\",           // Custom verification hash\n    \"customer_phone\" =&gt; \"+9876543210\",           // Customer's phone number\n    \"customer_email\" =&gt; \"jane.doe@email.com\",    // Customer's email address\n    \"customer_gender\" =&gt; \"male\",                    // Customer gender (male/female)\n    \"customer_site\" =&gt; \"Main Platform\" ,          // Platform or site identifier\n    \"order_id\" =&gt; \"custom_your_id\"           // Custom Order ID\n];\n// Execute the withdraw request\n$result = ekstrapayWithdrawCreate($apiKey, $apiSecret, $withdrawData);\n// Handle the response\nprint_r($result);\n?&gt;\n\n</code></pre>\n","urlObject":{"path":["api","v1","payment","create"],"host":[""],"query":[],"variable":[]}},"response":[{"id":"fdd64931-3508-4540-832d-c188a2317a55","name":"new","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-API-Key","value":"","type":"text"},{"key":"X-Timestamp","value":"","type":"text"},{"key":"X-Nonce","value":"","type":"text"},{"key":"X-Signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n \n    \"operation\": \"withdraw\",\n    \"amount\": 1000,\n    \"customer_fullname\": \"full_name\",\n    \"customer_username\": \"username\",\n    \"customer_id\": \"user_id\",\n    \"customer_description\": \"\",\n    \"customer_hash\": \"\",\n    \"customer_phone\": \"\",\n    \"customer_email\": \"\",\n    \"customer_gender\": \"\",\n    \"customer_site\": \"site name or title or domain\",\n    \"account_iban\": \"TR580006400000143750001552\",\n    \"account_holder\": \"Lorem Ipsum\",\n    \"order_id\": \"\"\n}"},"url":"/api/v1/payment/create"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Thu, 13 Aug 2026 04:07:23 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"214"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"cloudflare"},{"key":"Nel","value":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Ekstrapay","value":"V1"},{"key":"X-Response-Time","value":"49.24ms"},{"key":"Vary","value":"Origin"},{"key":"vary","value":"accept-encoding"},{"key":"Content-Encoding","value":"br"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"X-Permitted-Cross-Domain-Policies","value":"master-only"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=Q8c8Gw3oqWY0CULApYpxdJ29VOg3CKXDCJEfwU8Vtuh3XA%2FuiOoXJJSnwmdJmaYLCJ8fk2uuZ8CVOZ8wqd6kGm8%2BEm2h0LDgl3DeH%2FvmEBF4K29bLEPLfZRaJ5xHmdo405BP\"}]}"},{"key":"CF-RAY","value":"a2a4da417e819fb4-AMS"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"title\": \"Başarılı\",\n    \"message\": \"İşlem oluşturuldu\",\n    \"description\": \"İşlem oluşturuldu\",\n    \"data\": {\n        \"customer\": {\n            \"transaction_id\": \"a14eaf62-20ad-49c0-ba2c-c82b03bb7f30\",\n            \"order_id\": null,\n            \"customer_fullname\": \"full_name\",\n            \"customer_username\": \"username\",\n            \"customer_id\": \"user_id\",\n            \"amount\": 1000\n        },\n        \"created_at\": \"2026-08-13 07:07:23\",\n        \"type\": \"new\"\n    }\n}"},{"id":"0526dfa2-7f9d-41ce-b6bc-47c866eb28b7","name":"error","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-API-Key","value":"","type":"text"},{"key":"X-Timestamp","value":"","type":"text"},{"key":"X-Nonce","value":"","type":"text"},{"key":"X-Signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n \n    \"operation\": \"withdraw\",\n    \"amount\": 1000,\n    \"customer_fullname\": \"full_name\",\n    \"customer_username\": \"username\",\n    \"customer_id\": \"user_id\",\n    \"customer_description\": \"\",\n    \"customer_hash\": \"\",\n    \"customer_phone\": \"\",\n    \"customer_email\": \"\",\n    \"customer_gender\": \"\",\n    \"customer_site\": \"site name or title or domain\",\n    \"account_iban\": \"TR580006400000143750001552\",\n    \"account_holder\": \"Lorem Ipsum\",\n    \"order_id\": \"\"\n}"},"url":"/api/v1/payment/create"},"status":"Bad Request","code":400,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Thu, 13 Aug 2026 10:41:54 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"116"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"cloudflare"},{"key":"Nel","value":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Ekstrapay","value":"V1"},{"key":"X-Response-Time","value":"705.48ms"},{"key":"Vary","value":"Origin"},{"key":"vary","value":"accept-encoding"},{"key":"Content-Encoding","value":"br"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=33qt0xBwgTmHgCvjSxw32M%2FtdOGSVEZ41orzFtzshw8hdcm9ycXOEq%2BiU%2FCo3VigBJkatqf3Nbrj48LXmUsKnq7U0mE7uFTqrifD3hxv7wcTk52kEh8Eo0W1ova5XtudxRFT\"}]}"},{"key":"CF-RAY","value":"a2a71c24ee9295d9-AMS"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"title\": \"HATA\",\n    \"description\": \"Uygun sağlayıcı bulunamadı\",\n    \"message\": \"Uygun sağlayıcı bulunamadı\",\n    \"timestamp\": \"2026-08-13T13:41:54+03:00\"\n}"}],"_postman_id":"c32198a7-b7ef-4571-929e-af81a5d7f9fb"},{"name":"Check Transaction","event":[{"listen":"prerequest","script":{"id":"73f44db9-da3b-432e-b10c-e96bd1ac1f31","exec":["const apiKey = pm.variables.get(\"apiKey\");","const apiSecret = pm.variables.get(\"apiSecret\");"," ","const timestamp = Math.floor(Date.now() / 1000);","const nonce = CryptoJS.lib.WordArray.random(16).toString();"," ","let requestBody = {};","if (pm.request.body && pm.request.body.raw) {","    try {","        requestBody = JSON.parse(pm.request.body.raw);","    } catch(e) {","        console.error(\"JSON parse error:\", e);","        requestBody = {};","    }","}"," ","const cleanedBody = {};","Object.keys(requestBody).forEach(key => {","    if (requestBody[key] !== \"\" && requestBody[key] !== null && requestBody[key] !== undefined) {","        cleanedBody[key] = requestBody[key];","    }","});"," ","const jsonString = JSON.stringify(cleanedBody);","","const payload = [ apiKey, timestamp, nonce, jsonString ].join('|');","","const signature = CryptoJS.HmacSHA256(payload, apiSecret).toString();","console.log('Signature:', signature);"," ","","pm.request.headers.add({key: 'X-API-Key', value: apiKey});","pm.request.headers.add({key: 'X-Timestamp', value: timestamp.toString()});","pm.request.headers.add({key: 'X-Nonce', value: nonce});","pm.request.headers.add({key: 'X-Signature', value: signature});","pm.request.headers.add({key: 'Content-Type', value: 'application/json'});"],"type":"text/javascript","packages":{},"requests":{}}},{"listen":"test","script":{"id":"21ebf275-e5cc-495f-905e-a91ae097e415","exec":[""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"119cfd74-7608-4972-8d89-ca98992d07b7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-API-Key","value":"","type":"text"},{"key":"X-Timestamp","value":"","type":"text"},{"key":"X-Nonce","value":"","type":"text"},{"key":"X-Signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"operation\": \"withdraw\",\n    \"transaction_id\": \"32c0ceb7-37b0-4ab4-8ab5-6e53debecac6\"\n}"},"url":"https://v2.ekstrapay.com/api/v1/payment/check","description":"<h1 id=\"check\">CHECK</h1>\n<h3 id=\"automatic-signature-generation-with-pre-request-script\">Automatic Signature Generation with Pre-request Script</h3>\n<p>Following the <strong>Pre-request Script</strong> tab in Postman or check the below the example</p>\n<h2 id=\"📝-field-descriptions-operation\">📝 Field Descriptions Operation</h2>\n<h3 id=\"required-fields\">Required Fields:</h3>\n<ul>\n<li><p><strong><code>operation</code></strong>: Transaction type - must be \"withdraw/deposit\" for payment collection</p>\n</li>\n<li><p><strong><code>transaction_id</code></strong>: Customer transaction id</p>\n</li>\n</ul>\n<p>Please add : <code>api_key</code> and <code>api_secret</code></p>\n<p>EXAMPLE :</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">/**\n * EKSTRAPAY API - PAYMENT STATUS CHECK\n * \n * Automatic Signature Generation with Pre-request Script\n * Following the Pre-request Script tab in Postman or check the below example\n * \n * 📝 Field Descriptions for Payment Check Operation\n * \n * Required Fields:\n * - operation: Transaction type - \"deposit\" or \"withdraw\" \n * - transaction_id: The transaction ID returned from payment creation\n * \n * Please add: api_key and api_secret\n * \n * @version 1.0\n * @api https://v2.ekstrapay.com/api/v1/payment/check\n */\n/**\n * Function to check payment status from Ekstrapay API\n * \n * This function handles the complete process of checking payment status\n * including authentication signature generation and API communication\n * \n * @param string $apiKey The API key provided by Ekstrapay\n * @param string $apiSecret The API secret key for HMAC signature generation\n * @param array $data Payment check data to be sent to the API\n * @return array Returns array with success status and response data or error details\n */\nfunction ekstrapayPaymentCheck($apiKey, $apiSecret, $data) {\n    // Define the API endpoint URL for payment status check\n    $url = 'https://v2.ekstrapay.com/api/v1/payment/check';\n    // Generate current timestamp in seconds (Unix timestamp)\n    // This is used for request validation and replay attack prevention\n    $timestamp = time();\n    // Generate a unique nonce (number used once) - 16 bytes converted to hex string\n    // Nonce ensures each request is unique, preventing replay attacks\n    $nonce = bin2hex(random_bytes(16));\n    // Remove empty values from the data array\n    // This ensures we don't send empty or null fields to the API\n    $cleanedData = array_filter($data, function($value) {\n        return $value !== \"\" &amp;&amp; $value !== null;\n    });\n    // Convert the cleaned data array to JSON string format\n    $jsonString = json_encode($cleanedData);\n    // Create the payload for signature generation\n    // The payload consists of: API key | timestamp | nonce | JSON data\n    // Pipe character (|) is used as delimiter between components\n    $payload = implode('|', [\n        $apiKey,\n        $timestamp,\n        $nonce,\n        $jsonString\n    ]);\n    // Generate HMAC-SHA256 signature using the payload and API secret\n    // This signature verifies the authenticity and integrity of the request\n    $signature = hash_hmac('sha256', $payload, $apiSecret);\n    // Prepare HTTP headers for the API request\n    // These headers include authentication credentials and content type\n    $headers = [\n        'X-API-Key: ' . $apiKey,        // API key for identification\n        'X-Timestamp: ' . $timestamp,    // Request timestamp\n        'X-Nonce: ' . $nonce,            // Unique request identifier\n        'X-Signature: ' . $signature,    // HMAC signature for verification\n        'Content-Type: application/json' // Specify JSON content type\n    ];\n    // Initialize cURL session for HTTP communication\n    $ch = curl_init();\n    // Configure cURL options for the API request\n    curl_setopt($ch, CURLOPT_URL, $url);                  // Set target URL\n    curl_setopt($ch, CURLOPT_POST, 1);                    // Enable POST method\n    curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonString);    // Attach JSON payload\n    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);       // Set custom headers\n    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);       // Return response as string\n    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);      // Disable SSL verification (use with caution in production)\n    curl_setopt($ch, CURLOPT_TIMEOUT, 30);                // Set 30 seconds timeout\n    // Execute the API request and capture the response\n    $response = curl_exec($ch);\n    // Check for cURL execution errors\n    if (curl_errno($ch)) {\n        // Get the error message\n        $error = curl_error($ch);\n        // Close the cURL session\n        curl_close($ch);\n        // Return error information in standardized format\n        return [\n            'success' =&gt; false,\n            'error' =&gt; 'cURL Error: ' . $error\n        ];\n    }\n    // Get the HTTP response status code\n    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n    // Close the cURL session to free resources\n    curl_close($ch);\n    // Parse the JSON response into PHP array\n    $decodedResponse = json_decode($response, true);\n    // Check HTTP status code and return appropriate response\n    if ($httpCode == 200) {\n        // Success - HTTP 200 OK\n        return [\n            'success' =&gt; true,\n            'data' =&gt; $decodedResponse\n        ];\n    } else {\n        // Error - Return error details with HTTP code\n        return [\n            'success' =&gt; false,\n            'http_code' =&gt; $httpCode,\n            'response' =&gt; $decodedResponse ?: $response // Return decoded JSON or raw response if JSON decode fails\n        ];\n    }\n}\n// Usage example demonstrating how to use the function\n// API credentials (these should be stored securely, not hardcoded)\n$apiKey = \"\";     // Your Ekstrapay API key\n$apiSecret = \"\";  // Your Ekstrapay API secret\n// ===========================================================================================\n// EXAMPLE 1: CHECK DEPOSIT TRANSACTION STATUS\n// ===========================================================================================\n// Prepare payment check data for DEPOSIT transaction\n$depositCheckData = [\n    \"operation\" =&gt; \"deposit\",                                      // Operation type (deposit)\n    \"transaction_id\" =&gt; \"5b35ddae-a492-49d2-8957-47504df22b10\"    // Transaction ID from payment creation\n];\n// Call the payment check function for deposit\n$depositResult = ekstrapayPaymentCheck($apiKey, $apiSecret, $depositCheckData);\n// Output the deposit check result for debugging/verification\necho \"DEPOSIT STATUS CHECK RESULT:\\n\";\necho \"============================\\n\";\nprint_r($depositResult);\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["api","v1","payment","check"],"host":["v2","ekstrapay","com"],"query":[],"variable":[]}},"response":[{"id":"85f60c69-c9b9-400c-80e0-1a743d0d222e","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-API-Key","value":"","type":"text"},{"key":"X-Timestamp","value":"","type":"text"},{"key":"X-Nonce","value":"","type":"text"},{"key":"X-Signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"operation\": \"withdraw\",\n    \"transaction_id\": \"d2d2da82-69ea-48e6-9d42-8160658cbed4\"\n}"},"url":"https://v2.ekstrapay.com/api/v1/payment/check"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Wed, 22 Oct 2025 09:48:51 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Content-Length","value":"208"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"cloudflare"},{"key":"Nel","value":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Ekstrapay","value":"V1"},{"key":"X-Response-Time","value":"12.88ms"},{"key":"Vary","value":"Origin"},{"key":"vary","value":"accept-encoding"},{"key":"Content-Encoding","value":"br"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"X-Permitted-Cross-Domain-Policies","value":"master-only"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=HSXo7tyQ3%2FvC549KWuUvJso6Bmx%2FAF6LJfbP9aCTz86TOdkyfgbydODO%2BftWV7NinsfuM12tNfT7SGmG6OWgAyhl0i3Uc3%2FU%2FeIeWDuRK0k%3D\"}]}"},{"key":"CF-RAY","value":"992814d2af1ee218-MRS"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"title\": \"Başarılı\",\n    \"description\": \"İşlem bulundu\",\n    \"data\": {\n        \"status\": {\n            \"value\": \"PAY_NEW\",\n            \"label\": \"Yeni\"\n        },\n        \"customer_username\": \"customer_username\",\n        \"customer_id\": \"customer_id\",\n        \"amount\": 100,\n        \"final_amount\": 0,\n        \"created_date\": \"2025-10-22 12:21:45\",\n        \"updated_at\": \"2025-10-22 12:21:45\"\n    },\n    \"timestamp\": \"2025-10-22T12:48:51+03:00\"\n}"},{"id":"c6977744-503f-4249-bccd-fc417966f98e","name":"Check Transaction","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-API-Key","value":"","type":"text"},{"key":"X-Timestamp","value":"","type":"text"},{"key":"X-Nonce","value":"","type":"text"},{"key":"X-Signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"operation\": \"withdraw\",\n    \"transaction_id\": \"d2d2da82-69ea-48e6-9d42-8160658cbed4\"\n}"},"url":"https://v2.ekstrapay.com/api/v1/payment/check"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 06 Mar 2026 12:22:46 GMT"},{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Content-Length","value":"143"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"cloudflare"},{"key":"Nel","value":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Ekstrapay","value":"V1"},{"key":"X-Response-Time","value":"13.92ms"},{"key":"Vary","value":"Origin"},{"key":"vary","value":"accept-encoding"},{"key":"Content-Encoding","value":"br"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=Qu4ZEOmnZuoc%2BY3aZkeSp8mhArM20DqX9%2FHTT68kfl0f7ido1x75YNJUqF0Dk2As3qrGhmhO5DRCMvwbz%2FeYWj9GWJPAvUjlWE37ypN0low%3D\"}]}"},{"key":"CF-RAY","value":"9d8153ed0e93e22c-MRS"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"title\": \"HATA\",\n    \"description\": \"İşlem bulunamadı\",\n    \"data\": {\n        \"status\": {\n            \"value\": \"NOT_FOUND\",\n            \"label\": \"İşlem Bulunamadı\"\n        }\n    },\n    \"timestamp\": \"2026-03-06T15:22:46+03:00\"\n}"}],"_postman_id":"119cfd74-7608-4972-8d89-ca98992d07b7"},{"name":"Cancel Transaction","event":[{"listen":"prerequest","script":{"id":"73f44db9-da3b-432e-b10c-e96bd1ac1f31","exec":["const apiKey = pm.variables.get(\"apiKey\");","const apiSecret = pm.variables.get(\"apiSecret\");"," ","const timestamp = Math.floor(Date.now() / 1000);","const nonce = CryptoJS.lib.WordArray.random(16).toString();"," ","let requestBody = {};","if (pm.request.body && pm.request.body.raw) {","    try {","        requestBody = JSON.parse(pm.request.body.raw);","    } catch(e) {","        console.error(\"JSON parse error:\", e);","        requestBody = {};","    }","}"," ","const cleanedBody = {};","Object.keys(requestBody).forEach(key => {","    if (requestBody[key] !== \"\" && requestBody[key] !== null && requestBody[key] !== undefined) {","        cleanedBody[key] = requestBody[key];","    }","});"," ","const jsonString = JSON.stringify(cleanedBody);","","const payload = [ apiKey, timestamp, nonce, jsonString ].join('|');","","const signature = CryptoJS.HmacSHA256(payload, apiSecret).toString();","console.log('Signature:', signature);"," ","","pm.request.headers.add({key: 'X-API-Key', value: apiKey});","pm.request.headers.add({key: 'X-Timestamp', value: timestamp.toString()});","pm.request.headers.add({key: 'X-Nonce', value: nonce});","pm.request.headers.add({key: 'X-Signature', value: signature});","pm.request.headers.add({key: 'Content-Type', value: 'application/json'});"],"type":"text/javascript","packages":{},"requests":{}}},{"listen":"test","script":{"id":"21ebf275-e5cc-495f-905e-a91ae097e415","exec":[""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"1da39c9d-d031-44e9-bf07-5e178cdb3962","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-API-Key","value":"","type":"text"},{"key":"X-Timestamp","value":"","type":"text"},{"key":"X-Nonce","value":"","type":"text"},{"key":"X-Signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"operation\": \"deposit\",\n    \"transaction_id\": \"56f07728-259e-47d5-9c28-3b5e071178ec\"\n}"},"url":"https://v2.ekstrapay.com/api/v1/payment/cancel","description":"<h1 id=\"ekstrapay-api--payment-cancel\">EKSTRAPAY API — PAYMENT CANCEL</h1>\n<p>Cancels an open transaction. Automatic signature generation with a Pre-request Script — follow the Pre-request Script tab in Postman, or use the example below.</p>\n<p><strong>Endpoint</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST https://v2.ekstrapay.com/api/v1/payment/cancel\n\n</code></pre><hr />\n<h2 id=\"field-descriptions\">Field Descriptions</h2>\n<p><strong>Required fields</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>operation</code></td>\n<td>string</td>\n<td>Transaction type — must be <code>\"deposit\"</code></td>\n</tr>\n<tr>\n<td><code>transaction_id</code></td>\n<td>string</td>\n<td>The transaction ID returned from payment creation. Your own <code>order_id</code> is also accepted here.</td>\n</tr>\n</tbody>\n</table>\n</div><p>Add your <code>api_key</code> and <code>api_secret</code> to the example before running it.</p>\n<hr />\n<h2 id=\"cancellation-rules\">Cancellation Rules</h2>\n<p>Only transactions that have not reached a final state can be cancelled.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Current status</th>\n<th>Cancellable</th>\n<th>Result</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>PAY_NEW</code> (Yeni)</td>\n<td>Yes</td>\n<td>Transaction is cancelled, credit is refunded in full</td>\n</tr>\n<tr>\n<td><code>PAY_PROCESSING</code> (İşlemde)</td>\n<td>Yes</td>\n<td>Transaction is cancelled, credit is refunded in full</td>\n</tr>\n<tr>\n<td><code>PAY_APPROVED</code> (Onaylandı)</td>\n<td>No</td>\n<td>Error — <code>not_cancellable</code></td>\n</tr>\n<tr>\n<td><code>PAY_REJECTED</code> (Reddedildi)</td>\n<td>No</td>\n<td>Error — <code>not_cancellable</code></td>\n</tr>\n<tr>\n<td><code>PAY_CANCELLED</code> (İptal Edildi)</td>\n<td>No</td>\n<td>Error — <code>not_cancellable</code></td>\n</tr>\n<tr>\n<td><code>PAY_TIMEOUT</code> (Zaman Aşımı)</td>\n<td>No</td>\n<td>Error — <code>not_cancellable</code></td>\n</tr>\n</tbody>\n</table>\n</div><p>Additional notes:</p>\n<ul>\n<li><p><strong>Withdraw is not supported.</strong> Sending <code>\"operation\": \"withdraw\"</code> returns an error. Withdrawals cannot be cancelled over the API.</p>\n</li>\n<li><p><strong>Transactions under review cannot be cancelled.</strong> If a transaction has been flagged for internal review, the request is rejected and you should contact support.</p>\n</li>\n<li><p><strong>Credit refund.</strong> When your API service runs in credit mode, the full <code>request_amount</code> is returned to your credit balance as part of the cancellation. The refund and the status change happen together — either both apply or neither does.</p>\n</li>\n<li><p><strong>A cancellation callback is dispatched</strong> to your configured callback URL, the same way approvals and rejections are.</p>\n</li>\n<li><p><strong>Concurrency.</strong> A transaction can only be processed by one operation at a time. If the transaction is being acted on at that moment, the request is rejected and can be retried after a few seconds. Cancelling an already-cancelled transaction never refunds credit twice.</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"success-response\">Success Response</h2>\n<p>The response envelope matches <code>/payment/check</code>. The <code>data</code> object contains:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Field</th>\n<th>Type</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>status</code></td>\n<td>object</td>\n<td>New status — <code>{ \"value\": \"PAY_CANCELLED\", \"label\": \"İptal Edildi\" }</code></td>\n</tr>\n<tr>\n<td><code>previous_status</code></td>\n<td>string</td>\n<td>Status before cancellation (<code>PAY_NEW</code> or <code>PAY_PROCESSING</code>)</td>\n</tr>\n<tr>\n<td><code>customer_username</code></td>\n<td>string</td>\n<td>Customer username submitted at creation</td>\n</tr>\n<tr>\n<td><code>order_id</code></td>\n<td>string</td>\n<td>null</td>\n</tr>\n<tr>\n<td><code>customer_id</code></td>\n<td>string</td>\n<td>Customer ID submitted at creation</td>\n</tr>\n<tr>\n<td><code>amount</code></td>\n<td>float</td>\n<td>Requested amount</td>\n</tr>\n<tr>\n<td><code>final_amount</code></td>\n<td>float</td>\n<td>Final amount — equals <code>amount</code> for a cancelled transaction</td>\n</tr>\n<tr>\n<td><code>created_date</code></td>\n<td>string</td>\n<td>Creation time, <code>Y-m-d H:i:s</code></td>\n</tr>\n<tr>\n<td><code>canceled_date</code></td>\n<td>string</td>\n<td>Cancellation time</td>\n</tr>\n<tr>\n<td><code>updated_at</code></td>\n<td>string</td>\n<td>Last update time, <code>Y-m-d H:i:s</code></td>\n</tr>\n</tbody>\n</table>\n</div><hr />\n<h2 id=\"error-responses\">Error Responses</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Situation</th>\n<th>Message</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Transaction not found for your API service</td>\n<td>İşlem bulunamadı</td>\n</tr>\n<tr>\n<td>Status is already final</td>\n<td>Bu işlem iptal edilemez. Mevcut durum:</td>\n</tr>\n<tr>\n<td>Transaction is under review</td>\n<td>Bu işlem incelemeye alınmıştır, iptal edilemez. Lütfen destek birimi ile iletişime geçiniz.</td>\n</tr>\n<tr>\n<td>Another operation is in progress on this transaction</td>\n<td>Bu işlem şu an işleniyor, lütfen birkaç saniye bekleyip tekrar deneyiniz.</td>\n</tr>\n<tr>\n<td><code>operation</code> is <code>withdraw</code></td>\n<td>Çekim işlemleri API üzerinden iptal edilemez</td>\n</tr>\n<tr>\n<td>API service is not active</td>\n<td>Api durumu (HTTP 401)</td>\n</tr>\n<tr>\n<td>Request IP is not whitelisted</td>\n<td>Ip adresi engellendi (HTTP 401)</td>\n</tr>\n</tbody>\n</table>\n</div><p>When the status is final, the error payload also carries the current status and <code>\"type\": \"not_cancellable\"</code>, so you can branch on it without a separate <code>/payment/check</code> call.</p>\n<hr />\n<h2 id=\"php-example\">PHP Example</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">/**\n * EKSTRAPAY API - PAYMENT CANCEL\n *\n * Automatic Signature Generation with Pre-request Script\n * Following the Pre-request Script tab in Postman or check the below example\n *\n * Required Fields:\n * - operation: Transaction type - \"deposit\"\n * - transaction_id: The transaction ID returned from payment creation\n *\n * Please add: api_key and api_secret\n *\n * @version 1.0\n * @api https://v2.ekstrapay.com/api/v1/payment/cancel\n */\n/**\n * Function to cancel an open payment via the Ekstrapay API\n *\n * This function handles the complete process of cancelling a transaction\n * including authentication signature generation and API communication\n *\n * @param string $apiKey    The API key provided by Ekstrapay\n * @param string $apiSecret The API secret key for HMAC signature generation\n * @param array  $data      Cancellation data to be sent to the API\n * @return array Returns array with success status and response data or error details\n */\nfunction ekstrapayPaymentCancel($apiKey, $apiSecret, $data) {\n    // Define the API endpoint URL for payment cancellation\n    $url = 'https://v2.ekstrapay.com/api/v1/payment/cancel';\n    // Generate current timestamp in seconds (Unix timestamp)\n    // This is used for request validation and replay attack prevention\n    $timestamp = time();\n    // Generate a unique nonce (number used once) - 16 bytes converted to hex string\n    // Nonce ensures each request is unique, preventing replay attacks\n    $nonce = bin2hex(random_bytes(16));\n    // Remove empty values from the data array\n    // This ensures we don't send empty or null fields to the API\n    $cleanedData = array_filter($data, function($value) {\n        return $value !== \"\" &amp;&amp; $value !== null;\n    });\n    // Convert the cleaned data array to JSON string format\n    $jsonString = json_encode($cleanedData);\n    // Create the payload for signature generation\n    // The payload consists of: API key | timestamp | nonce | JSON data\n    // Pipe character (|) is used as delimiter between components\n    $payload = implode('|', [\n        $apiKey,\n        $timestamp,\n        $nonce,\n        $jsonString\n    ]);\n    // Generate HMAC-SHA256 signature using the payload and API secret\n    // This signature verifies the authenticity and integrity of the request\n    $signature = hash_hmac('sha256', $payload, $apiSecret);\n    // Prepare HTTP headers for the API request\n    $headers = [\n        'X-API-Key: ' . $apiKey,         // API key for identification\n        'X-Timestamp: ' . $timestamp,    // Request timestamp\n        'X-Nonce: ' . $nonce,            // Unique request identifier\n        'X-Signature: ' . $signature,    // HMAC signature for verification\n        'Content-Type: application/json' // Specify JSON content type\n    ];\n    // Initialize cURL session for HTTP communication\n    $ch = curl_init();\n    // Configure cURL options for the API request\n    curl_setopt($ch, CURLOPT_URL, $url);                  // Set target URL\n    curl_setopt($ch, CURLOPT_POST, 1);                    // Enable POST method\n    curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonString);    // Attach JSON payload\n    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);       // Set custom headers\n    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);       // Return response as string\n    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);       // Keep SSL verification enabled\n    curl_setopt($ch, CURLOPT_TIMEOUT, 30);                // Set 30 seconds timeout\n    // Execute the API request and capture the response\n    $response = curl_exec($ch);\n    // Check for cURL execution errors\n    if (curl_errno($ch)) {\n        $error = curl_error($ch);\n        curl_close($ch);\n        return [\n            'success' =&gt; false,\n            'error'   =&gt; 'cURL Error: ' . $error\n        ];\n    }\n    // Get the HTTP response status code\n    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n    // Close the cURL session to free resources\n    curl_close($ch);\n    // Parse the JSON response into PHP array\n    $decodedResponse = json_decode($response, true);\n    // Check HTTP status code and return appropriate response\n    if ($httpCode == 200) {\n        return [\n            'success' =&gt; true,\n            'data'    =&gt; $decodedResponse\n        ];\n    }\n    return [\n        'success'   =&gt; false,\n        'http_code' =&gt; $httpCode,\n        'response'  =&gt; $decodedResponse ?: $response\n    ];\n}\n// ===========================================================================================\n// Usage example\n// ===========================================================================================\n// API credentials (these should be stored securely, not hardcoded)\n$apiKey    = \"\";  // Your Ekstrapay API key\n$apiSecret = \"\";  // Your Ekstrapay API secret\n// ===========================================================================================\n// EXAMPLE 1: CANCEL A DEPOSIT TRANSACTION\n// ===========================================================================================\n$depositCancelData = [\n    \"operation\"      =&gt; \"deposit\",                                 // Operation type (deposit)\n    \"transaction_id\" =&gt; \"5b35ddae-a492-49d2-8957-47504df22b10\"      // Transaction ID from payment creation\n];\n$depositResult = ekstrapayPaymentCancel($apiKey, $apiSecret, $depositCancelData);\necho \"DEPOSIT CANCEL RESULT:\\n\";\necho \"======================\\n\";\nprint_r($depositResult);\n\n</code></pre>\n<hr />\n<h2 id=\"integration-notes\">Integration Notes</h2>\n<p><strong>Retry behaviour.</strong> If the request times out on your side, do not assume it failed. Retry the cancel call — a transaction already in <code>PAY_CANCELLED</code> returns the <code>not_cancellable</code> error rather than refunding a second time, so a retry is safe. If you need the outcome without triggering an error, call <code>/payment/check</code> instead.</p>\n<p><strong>Cancel vs. abandon.</strong> Cancelling releases the credit reserved for the transaction back to your balance. Leaving a transaction open until it times out does not, so cancel any transaction the customer walks away from.</p>\n<p><strong>Race with approval.</strong> A transaction sitting in <code>PAY_PROCESSING</code> may be approved by an operator at the same moment you cancel it. Whichever arrives first wins; the other receives an error. Always treat the response of the cancel call as authoritative rather than assuming the cancellation succeeded.</p>\n","urlObject":{"protocol":"https","path":["api","v1","payment","cancel"],"host":["v2","ekstrapay","com"],"query":[],"variable":[]}},"response":[{"id":"2742cc1a-587c-40f6-bb43-c2a534086d9d","name":"Success","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-API-Key","value":"","type":"text"},{"key":"X-Timestamp","value":"","type":"text"},{"key":"X-Nonce","value":"","type":"text"},{"key":"X-Signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"operation\": \"deposit\",\n    \"transaction_id\": \"56f07728-259e-47d5-9c28-3b5e071178ec\"\n}"},"url":"https://v2.ekstrapay.com/api/v1/payment/cancel"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 28 Jul 2026 18:42:05 GMT"},{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Content-Length","value":"254"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"cloudflare"},{"key":"Nel","value":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Ekstrapay","value":"V1"},{"key":"X-Response-Time","value":"133.13ms"},{"key":"Vary","value":"Origin"},{"key":"vary","value":"accept-encoding"},{"key":"Content-Encoding","value":"br"},{"key":"X-Frame-Options","value":"SAMEORIGIN"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"X-XSS-Protection","value":"1; mode=block"},{"key":"X-Permitted-Cross-Domain-Policies","value":"master-only"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=uD1HCmuyxFtD35SfkaUFcYUprXdNaPESWiPDjA5%2FhCRiA92OeTVjxJny%2B9G9rRxD1o8%2Fne7tNF4xz95uq2a%2Fy%2Fenys7%2F2cDYN15I0leDUBxxsif8CNs2d2L%2FlxbWt3CDo6Ej\"}]}"},{"key":"CF-RAY","value":"a2260592091dffff-AMS"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"title\": \"Başarılı\",\n    \"description\": \"İşlem iptal edildi\",\n    \"message\": \"İşlem iptal edildi\",\n    \"data\": {\n        \"status\": {\n            \"value\": \"PAY_CANCELLED\",\n            \"label\": \"İptal Edildi\"\n        },\n        \"previous_status\": \"PAY_PROCESSING\",\n        \"customer_username\": \"required12\",\n        \"order_id\": null,\n        \"customer_id\": \"required12\",\n        \"amount\": 100,\n        \"final_amount\": 100,\n        \"created_date\": \"2026-07-28 21:41:39\",\n        \"canceled_date\": \"2026-07-28 21:42:06\",\n        \"updated_at\": \"2026-07-28 21:42:05\"\n    },\n    \"timestamp\": \"2026-07-28T21:42:05+03:00\"\n}"},{"id":"f8266062-8701-4056-a0f3-1ccf984b76c4","name":"Error","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"},{"key":"X-API-Key","value":"","type":"text"},{"key":"X-Timestamp","value":"","type":"text"},{"key":"X-Nonce","value":"","type":"text"},{"key":"X-Signature","value":"","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"operation\": \"deposit\",\n    \"transaction_id\": \"1badbe73-3ed9-4ec9-86c9-4aa516fb82ee\"\n}"},"url":"https://v2.ekstrapay.com/api/v1/payment/cancel"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 28 Jul 2026 18:41:11 GMT"},{"key":"Content-Type","value":"application/json","description":"","type":"text"},{"key":"Content-Length","value":"190"},{"key":"Connection","value":"keep-alive"},{"key":"Server","value":"cloudflare"},{"key":"Nel","value":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}"},{"key":"Cache-Control","value":"no-cache, private"},{"key":"X-Ekstrapay","value":"V1"},{"key":"X-Response-Time","value":"18.82ms"},{"key":"Vary","value":"Origin"},{"key":"vary","value":"accept-encoding"},{"key":"Content-Encoding","value":"br"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=qBiumIdS4enlCLupilywLzyp3UbsWVr%2FH0GKQO4snQChhyoQVdhdm%2F2WWXQOTccIo%2BqxgdTWbsvHgEYOxRyEuRtC%2Fq4F%2F%2FgvE94hTv2WbOn3XpSbLln0Je7B27ZKT0i9zzcj\"}]}"},{"key":"CF-RAY","value":"a226043c2b8dffff-AMS"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"title\": \"HATA\",\n    \"description\": \"Bu işlem iptal edilemez. Mevcut durum: İptal Edildi\",\n    \"message\": \"Bu işlem iptal edilemez. Mevcut durum: İptal Edildi\",\n    \"data\": {\n        \"status\": {\n            \"value\": \"PAY_CANCELLED\",\n            \"label\": \"İptal Edildi\"\n        },\n        \"type\": \"not_cancellable\"\n    },\n    \"timestamp\": \"2026-07-28T21:41:11+03:00\"\n}"}],"_postman_id":"1da39c9d-d031-44e9-bf07-5e178cdb3962"},{"name":"Callback Example","event":[{"listen":"prerequest","script":{"id":"73f44db9-da3b-432e-b10c-e96bd1ac1f31","exec":[""],"type":"text/javascript","packages":{},"requests":{}}},{"listen":"test","script":{"id":"21ebf275-e5cc-495f-905e-a91ae097e415","exec":[""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"a9a460b7-c26c-4cf4-9395-2a7f90b715a5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"id\": 35,\n    \"mode\": \"deposit\", // or withdraw\n    \"transaction_id\": \"b2843154-178f-4163-914e-e9afd1a83708\",\n    \"order_id\": \"order_id_123\",\n    \"customer_fullname\": \"test test\",\n    \"customer_username\": \"test_user_1a\",\n    \"customer_id\": \"a073006f-cd43-4872-a90b-0dbc8e6cd76d\",\n    \"customer_description\": null,\n    \"customer_hash\": null,\n    \"hash\": \"\",\n    \"customer_site\": \"TEST 3\",\n    \"request_amount\": 250,\n    \"request_final_amount\": 250,\n    \"status\": {\n        \"value\": \"PAY_REJECTED\",\n        \"label\": \"Reddedildi\"\n    },\n    \"on_process_date\": null,\n    \"last_confirmed_date\": null,\n    \"last_canceled_date\": \"2025-11-26 14:54:02\",\n    \"created_at\": \"2025-11-26 14:51:30\"\n}"},"url":"PUT YOUR CALLBACK URL","urlObject":{"host":["PUT YOUR CALLBACK URL"],"query":[],"variable":[]}},"response":[],"_postman_id":"a9a460b7-c26c-4cf4-9395-2a7f90b715a5"}],"event":[{"listen":"prerequest","script":{"id":"54b9e855-0207-4778-83a3-5827940cf53d","type":"text/javascript","packages":{},"requests":{},"exec":[""]}},{"listen":"test","script":{"id":"6680718b-e1eb-4c7c-a371-4030a53492d4","type":"text/javascript","packages":{},"requests":{},"exec":[""]}}],"variable":[{"key":"apiKey","value":""},{"key":"apiSecret","value":""},{"key":"baseUrl","value":""}]}