### Cryptocurrency Network Configuration Object Schema and Example Source: https://github.com/bainchik228/heleketdocs/blob/main/ru_methods_payments_list-of-services.md Defines the data structure for individual cryptocurrency network and currency configurations, including availability status, transaction limits (minimum and maximum amounts), and commission details (fixed fee and percentage). An example JSON array demonstrating this structure is also provided. ```APIDOC NetworkCurrencyConfig Object: network: string - The blockchain network identifier (e.g., "BSC", "TRON", "ETH", "DOGE", "POLYGON"). currency: string - The cryptocurrency ticker symbol (e.g., "BNB", "DAI", "DOGE", "USDC", "USDT", "TRX", "BUSD", "CGPT"). is_available: boolean - Indicates if the network-currency pair is currently available for transactions. limit: object - Defines the transaction limits for the currency on this network. min_amount: string (decimal) - The minimum transaction amount allowed, as a string to preserve precision. max_amount: string (decimal) - The maximum transaction amount allowed, as a string to preserve precision. commission: object - Defines the commission structure for transactions on this network-currency pair. fee_amount: string (decimal) - A fixed fee amount charged for transactions, as a string. percent: string (decimal) - A percentage-based ``` -------------------------------- ### Example API Response: User Balances (PHP) Source: https://github.com/bainchik228/heleketdocs/blob/main/ru_sdks-and-modules_php-sdk.md Illustrates the typical structure of a successful API response containing user balance information, including multiple currencies and their respective UUIDs and amounts. This output is a PHP `var_dump` representation of the data. ```PHP array(2) { ["balance"]=> array(3) { [0]=> array(3) { ["uuid"]=> string(32) "abcdabcd-abcd-1234-1234-abcdabcd" ["balance"]=> string(10) "5.00000000" ["currency_code"]=> string(4) "USDT" } [1]=> array(3) { ["uuid"]=> string(32) "abcdabcd-abcd-1234-1234-abcdabcd" ["balance"]=> string(11) "10.00120000" ["currency_code"]=> string(4) "DASH" } [2]=> array(3) { ["uuid"]=> string(32) "abcdabcd-abcd-1234-1234-abcdabcd" ["balance"]=> string(10) "0.18500000" ["currency_code"]=> string(3) "LTC" } } ["user"]=> array(6) { [0]=> array(3) { ["uuid"]=> string(32) "abcdabcd-abcd-1234-1234-abcdabcd" ["balance"]=> string(10) "0.40000000" ["currency_code"]=> string(3) "BTC" } [1]=> array(3) { ["uuid"]=> string(32) "abcdabcd-abcd-1234-1234-abcdabcd" ["balance"]=> string(11) "52.00000000" ["currency_code"]=> string(4) "USDT" } [2]=> array(3) { ["uuid"]=> string(32) "abcdabcd-abcd-1234-1234-abcdabcd" ["balance"]=> string(10) "0.00000000" ["currency_code"]=> string(4) "DASH" } [3]=> array(3) { ["uuid"]=> string(32) "abcdabcd-abcd-1234-1234-abcdabcd" ["balance"]=> string(10) "0.30000000" ["currency_code"]=> string(3) "LTC" } [4]=> array(3) { ["uuid"]=> string(32) "abcdabcd-abcd-1234-1234-abcdabcd" ["balance"]=> string(11) "27.00000000" ["currency_code"]=> string(3) "TRX" } [5]=> array(3) { ["uuid"]=> string(32) "abcdabcd-abcd-1234-1234-abcdabcd" ["balance"]=> string(10) "0.19000000" ["currency_code"]=> string(3) "ETH" } } } ``` -------------------------------- ### API Validation Error Response Example Source: https://github.com/bainchik228/heleketdocs/blob/main/ru_methods_payouts_payout-history.md This JSON object illustrates an API error response specifically for validation failures. It indicates a 'state' of 1 (error) and details the specific fields that failed validation, along with the validation rule (e.g., 'validation.regex'). This example shows an error for an incorrectly formatted 'date_from' parameter. ```JSON { "state": 1, "errors": { "date_from": [ "validation.regex" ] } } ``` -------------------------------- ### Cryptocurrency Network and Asset Configuration Source: https://github.com/bainchik228/heleketdocs/blob/main/ru_methods_payouts_list-of-services.md Defines the available cryptocurrency assets on various networks, specifying their transaction limits and commission structures. Each entry includes network, currency, availability status, minimum/maximum transaction limits, and commission details (fee amount and percentage). This structure is typically returned by an API endpoint providing asset and network information. ```JSON [ { "network": "BSC", "currency": "BNB", "is_available": true, "limit": { "min_amount": "0.00500000", "max_amount": "1000000.00000000" }, "commission": { "fee_amount": "0.00020000", "percent": "0.00" } }, { "network": "ETH", "currency": "USDT", "is_available": true, "limit": { "min_amount": "50.00000000", "max_amount": "1000000.00000000" }, "commission": { "fee_amount": "10.00000000", "percent": "0.00" } }, { "network": "BTC", "currency": "BTC", "is_available": true, "limit": { "min_amount": "0.00010000", "max_amount": "100.00000000" }, "commission": { "fee_amount": "0.00050000", "percent": "0.00" } }, { "network": "ETH", "currency": "DAI", "is_available": true, "limit": { "min_amount": "50.00000000", "max_amount": "10000000.00000000" }, "commission": { "fee_amount": "10.00000000", "percent": "0.00" } }, { "network": "ETH", "currency": "USDC", "is_available": true, "limit": { "min_amount": "50.00000000", "max_amount": "10000000.00000000" }, "commission": { "fee_amount": "10.00000000", "percent": "0.00" } }, { "network": "ETH", "currency": "ETH", "is_available": true, "limit": { "min_amount": "0.01000000", "max_amount": "10000.00000000" }, "commission": { "fee_amount": "0.00200000", "percent": "0.00" } }, { "network": "TRON", "currency": "USDC", "is_available": true, "limit": { "min_amount": "1.00000000", "max_amount": "10000000.00000000" }, "commission": { "fee_amount": "1.70000000", "percent": "0.00" } } ] ``` -------------------------------- ### Cryptocurrency Network and Commission Configuration JSON Source: https://github.com/bainchik228/heleketdocs/blob/main/ru_methods_payments_list-of-services.md This JSON array defines the operational parameters for different cryptocurrency networks and their supported assets. Each object specifies the network, currency, availability status, minimum and maximum transaction limits, and commission details including a fixed fee and a percentage. ```JSON [ { "network": "POLYGON", "currency": "MATIC", "is_available": true, "limit": { "min_amount": "0.50000000", "max_amount": "1000000.00000000" }, "commission": { "fee_amount": "0.00", "percent": "2.00" } }, { "network": "POLYGON", "currency": "DAI", "is_available": true, "limit": { "min_amount": "1.00000000", "max_amount": "10000000.00000000" }, "commission": { "fee_amount": "0.00", "percent": "2.00" } }, { "network": "BTC", "currency": "BTC", "is_available": true, "limit": { "min_amount": "0.00002000", "max_amount": "100.00000000" }, "commission": { "fee_amount": "0.00", "percent": "2.00" } }, { "network": "LTC", "currency": "LTC", "is_available": true, "limit": { "min_amount": "0.02000000", "max_amount": "1000000.00000000" }, "commission": { "fee_amount": "0.00", "percent": "1.00" } }, { "network": "ETH", "currency": "ETH", "is_available": true, "limit": { "min_amount": "0.01000000", "max_amount": "1000.00000000" }, "commission": { "fee_amount": "0.00", "percent": "2.00" } }, { "network": "POLYGON", "currency": "USDT", "is_available": true, "limit": { "min_amount": "0.50000000", "max_amount": "1000000.00000000" }, "commission": { "fee_amount": "0.00", "percent": "2.00" } }, { "network": "ETH", "currency": "BUSD", "is_available": true, "limit": { "min_amount": "1.00000000", "max_amount": "10000000.00000000" }, "commission": { "fee_amount": "0.00", "percent": "2.00" } } ] ``` -------------------------------- ### Resend Notification using Hekeket Payment API (PHP) Source: https://github.com/bainchik228/heleketdocs/blob/main/ru_sdks-and-modules_php-sdk.md Demonstrates how to resend notifications for a specific transaction -------------------------------- ### Successful API Response for Transaction List with Pagination Source: https://github.com/bainchik228/heleketdocs/blob/main/ru_methods_payouts_payout-history.md This JSON object represents a successful API response containing a list of transaction records and pagination information. Each transaction includes details such as UUID, amount, currency, network, address, transaction ID, status, and timestamps. The 'paginate' object provides metadata for navigating through results, including total count, page presence, and cursors for next/previous pages. ```JSON { "txid": null, "status": "process", "is_final": false, "balance": "129.00000000", "created_at": "2023-06-21T17:25:55+03:00", "updated_at": "2023-06-21T17:34:38+03:00" }, { "uuid": "92c39264-d180-4503-9c16-ee16f083bbb8", "amount": "5.40000000", "currency": "DOGE", "network": "doge", "address": "DEw8CJLfxg9fhumeXP1zvVNjZicsqtDv7V", "txid": "5e5810946152ea569d2a2aa9aa32a45c0e4223a4f9aad8e31d2fc660d2cdedb8", "order_id": null, "payment_status": null, "status": "paid", "is_final": true, "balance": "26.77966652", "created_at": "2023-07-21T17:25:55+03:00", "updated_at": "2023-07-21T17:34:38+03:00" }, ... ], "paginate": { "count": 15, "hasPages": true, "nextCursor": "eyJpZCI6MjkxNTU0MywiX3BvaW50c1RvTmV4dEl0ZW1zIjp0cnVlfQ", "previousCursor": null, "perPage": 15 } } ``` -------------------------------- ### JavaScript JSON Stringification for Webhook Data Source: https://github.com/bainchik228/heleketdocs/blob/main/ru_methods_payments_webhook.md Illustrates how JavaScript's `JSON.stringify` serializes data. It shows that `JSON.stringify` does not escape forward slashes by default, which can cause signature verification failures for webhooks. A workaround using `replace` is provided to manually escape slashes if required by the webhook receiver. ```JavaScript const data = { amount: '20' , currency: 'USDT' , network: 'tron' , txid: 'someTxidWith/Slash' }; const jsonData = JSON.stringify(data); console.log(jsonData); // {"amount":"20","currency":"USDT","network":"tron","txid":"someTxidWith/Slash"} // slash in txid is not escaped and you will get error checking sign. // Instead, you should do it like this: // const jsonData = JSON.stringify(data).replace(/\//mg, "\/"); ``` -------------------------------- ### PHP JSON Encoding for Webhook Data Source: https://github.com/bainchik228/heleketdocs/blob/main/ru_methods_payments_webhook.md Demonstrates how PHP's `json_encode` function serializes data for webhooks. It highlights that PHP automatically escapes forward slashes in string values (e.g., `txid`), which can lead to issues when verifying webhook signatures if the receiving end expects unescaped slashes. ```PHP $data = json_encode( $data , true ); echo $data ; // Outputs a string, slash in txid is escaped, pay attention to this. // we send a webhook data with all escaped slashes // {"amount":"20","currency":"USD","network":"btc","txid":"someTxidWith\/Slash"} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.