{"info":{"_postman_id":"4ac9b7f5-83df-48ba-9f94-b114f18f4de8","name":"Singhapay API Docs","description":"<html><head></head><body><p><strong>This document provides technical specs for our Operator to perform integration and integration tests with Singhapay Payment Gateway. This documentation includes functions, parameters, results, and error responses.</strong></p>\n<h1 id=\"terms-definition\"><strong>Terms &amp; Definition</strong></h1>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th><strong>Name</strong></th>\n<th><strong>Description</strong></th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><strong>Operator</strong></td>\n<td><strong>Partners who want to integrate with Singhapay payment gateway</strong></td>\n</tr>\n<tr>\n<td><strong>Payment Provider</strong></td>\n<td><strong>Provider API Payment for Operator</strong></td>\n</tr>\n<tr>\n<td><strong>BO Site</strong></td>\n<td><strong>Backoffice site, used for Operator to verify transaction</strong></td>\n</tr>\n<tr>\n<td><strong>Member Site</strong></td>\n<td><strong>A website for member to log in and create transaction through Singhapay Payment Gateway</strong></td>\n</tr>\n<tr>\n<td><strong>User/Member</strong></td>\n<td><strong>Customer who create transaction through Singhapay Payment Gateway</strong></td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"workflow\"><strong>Workflow</strong></h1>\n<img src=\"https://content.pstmn.io/0869fac4-14b3-4789-a57e-e957e87997aa/U2NyZWVuc2hvdCAyMDI1LTA4LTI3IGF0IDIzLjExLjU2LnBuZw==\">\n\n<h1 id=\"api-features\"><strong>API Features</strong></h1>\n<p><strong>4.1 Pre Requirement Provide by Provider</strong></p>\n<ul>\n<li><p><strong>Server info &amp; API URL</strong></p>\n</li>\n<li><p><strong>Credential api : api key, secret key, merchant code</strong></p>\n</li>\n<li><p><strong>Credential BO : username , password</strong></p>\n</li>\n</ul>\n<p><strong>4.2 Pre Requirement Provide by Operator :</strong></p>\n<ul>\n<li><p><strong>API Callback URL ( mandatory )</strong></p>\n</li>\n<li><p><strong>Call back success url page ( optional )</strong></p>\n</li>\n<li><p><strong>Call back failed url page ( optional )</strong></p>\n</li>\n</ul>\n<p><strong>4.3 Api Security</strong></p>\n<ul>\n<li><p><strong>Token and transaction key ( Need to create token and key for each transaction )</strong></p>\n</li>\n<li><p><strong>IP White list for Back Office login</strong></p>\n</li>\n</ul>\n<h1 id=\"encrypt-decrypt-function\"><strong>Encrypt Decrypt Function</strong></h1>\n<p>This Function provides secure AES-256-CBC encryption and decryption capabilities for sensitive data transmission. It uses industry-standard cryptographic methods with proper key derivation and initialization vector generation for secure data exchange between systems.</p>\n<h2 id=\"encryption-process\">Encryption Process</h2>\n<p>When <code>action = \"encrypt\"</code>:</p>\n<ol>\n<li><p><strong>Authentication</strong>: Validates the provided API key and secret key</p>\n</li>\n<li><p><strong>Key Derivation</strong>: Generates a 256-bit encryption key using SHA-256 hash of the API key</p>\n</li>\n<li><p><strong>IV Generation</strong>: Creates a 128-bit initialization vector using SHA-256 hash of the secret key</p>\n</li>\n<li><p><strong>Encryption</strong>: Encrypts the input data using AES-256-CBC algorithm</p>\n</li>\n<li><p><strong>Encoding</strong>: Applies Base64 encoding followed by URL encoding for safe transmission</p>\n</li>\n<li><p><strong>Response</strong>: Returns the URL-encoded, Base64-encoded encrypted string</p>\n</li>\n</ol>\n<h2 id=\"decryption-process\">Decryption Process</h2>\n<p>When <code>action = \"decrypt\"</code>:</p>\n<ol>\n<li><p><strong>Authentication</strong>: Validates the provided API key and secret key</p>\n</li>\n<li><p><strong>Decoding</strong>: URL decodes then Base64 decodes the input data</p>\n</li>\n<li><p><strong>Key/IV Regeneration</strong>: Uses the same derivation process as encryption</p>\n</li>\n<li><p><strong>Decryption</strong>: Decrypts the data using AES-256-CBC algorithm</p>\n</li>\n<li><p><strong>Response</strong>: Returns the original plaintext data</p>\n</li>\n</ol>\n<h2 id=\"technical-specifications\">Technical Specifications</h2>\n<ul>\n<li><p><strong>Encryption Algorithm</strong>: AES-256-CBC (Advanced Encryption Standard with 256-bit key)</p>\n</li>\n<li><p><strong>Key Size</strong>: 256 bits (32 bytes)</p>\n</li>\n<li><p><strong>IV Size</strong>: 128 bits (16 bytes)</p>\n</li>\n<li><p><strong>Hash Algorithm</strong>: SHA-256 for key and IV derivation</p>\n</li>\n<li><p><strong>Encoding</strong>: Base64 + URL encoding for encrypted output</p>\n</li>\n<li><p><strong>Content-Type</strong>: Supports both <code>application/json</code> and <code>application/x-www-form-urlencoded</code></p>\n</li>\n</ul>\n<h2 id=\"usage-examples\">Usage Examples</h2>\n<ol>\n<li>PHP</li>\n</ol>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">public function encrypt_decrypt($action, $string, $apikey = '{your_api_key}', $secretkey = '{your_secret_key}') {\n    $output = false;\n    $encrypt_method = \"AES-256-CBC\";\n    $secret_key = $apikey;\n    $secret_iv = $secretkey;\n        // hash\n    $key = substr(hash('sha256', $secret_key, true), 0, 32);\n    $iv = substr(hash('sha256', $secret_iv), 0, 16);\n    if ( $action == 'encrypt' ) {\n        $output = openssl_encrypt($string, $encrypt_method, $key, OPENSSL_RAW_DATA, $iv);\n        $output = base64_encode($output);\n        $output = urlencode($output);\n    } else if( $action == 'decrypt' ) {\n     $output = openssl_decrypt(base64_decode(urldecode($string)), $encrypt_method, $key, OPENSSL_RAW_DATA, $iv);\n }\n return $output;\n}\n\n</code></pre>\n<p>2. C#</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-csharp\">using System;\nusing System.Security.Cryptography;                \nusing System.Text;\nusing System.IO;\npublic class EncryptDecrypt\n{\n    public static void Main()\n    {\n        string source = \"currency_code=INR&amp;merchant_code=213213&amp;merchant_api_key=3213212ewfewqfwqf&amp;transaction_code=TEST-DP-163158903432&amp;transaction_timestamp=1631589012&amp;bank_code=1003&amp;transaction_amount=1000\";\n        string apiKey =  \"3213212ewfewqfwqf\";\n        string secretKey =  \"jdo383f1d2021ehd1dj2di32\";\n        string result = encrypt_decrypt(\"encrypt\", source, apiKey, secretKey);\n        Console.WriteLine(\"The key of  \" + source + \" is: \" + result);\n        Console.WriteLine(\"Decoded of key \" + result + \" is: \" +  encrypt_decrypt(\"decrypt\", result, apiKey, secretKey));\n    }\n    public static string encrypt_decrypt(string action, string payload, string apikey, string secretkey){\n        string secret_iv = secretkey;\n        string iv = hashSha256(secret_iv).Substring(0, 16);\n        SHA256 mySHA256 = SHA256Managed.Create();\n        string output = \"\";\n        if ( action == \"encrypt\" ) {\n            output = EncryptString(payload, mySHA256.ComputeHash(Encoding.ASCII.GetBytes(apikey)), Encoding.ASCII.GetBytes(iv));\n        } else if( action == \"decrypt\" ) {\n                output = DecryptString(payload, mySHA256.ComputeHash(Encoding.ASCII.GetBytes(apikey)), Encoding.ASCII.GetBytes(iv));\n        }\n        return output;\n    }\n    public static string hashSha256(string payload){\n        string hash = \"\";\n        using (SHA256 sha256Hash = SHA256.Create()){\n            byte[] sourceBytes = Encoding.UTF8.GetBytes(payload);\n            byte[] hashBytes = sha256Hash.ComputeHash(sourceBytes);\n            hash = BitConverter.ToString(hashBytes).Replace(\"-\", String.Empty).ToLower();\n        }\n        return hash;\n    }\n    public static string EncryptString(string plainText, byte[] key, byte[] iv)\n    {  \n        Aes encryptor = Aes.Create();\n        encryptor.Mode = CipherMode.CBC;\n        encryptor.Key = key;\n        encryptor.IV = iv;\n        MemoryStream memoryStream = new MemoryStream();\n        ICryptoTransform aesEncryptor = encryptor.CreateEncryptor();\n        CryptoStream cryptoStream = new CryptoStream(memoryStream, aesEncryptor, CryptoStreamMode . Write);\n        byte[] plainBytes = Encoding.ASCII.GetBytes(plainText);\n        cryptoStream.Write(plainBytes, 0, plainBytes . Length);\n        cryptoStream.FlushFinalBlock();\n        byte[] cipherBytes = memoryStream.ToArray();\n        memoryStream.Close();\n        cryptoStream.Close();\n        string cipherText = Convert.ToBase64String(cipherBytes, 0, cipherBytes.Length);\n        return Uri.EscapeDataString(cipherText);\n    }\n    public static string DecryptString(string cipherText, byte[] key, byte[] iv)\n    {\n        Aes encryptor = Aes.Create();\n        encryptor.Mode = CipherMode.CBC;\n        encryptor.Key = key;\n        encryptor.IV = iv;\n        MemoryStream memoryStream = new MemoryStream();\n        ICryptoTransform aesDecryptor = encryptor.CreateDecryptor();\n        CryptoStream cryptoStream = new CryptoStream(memoryStream, aesDecryptor, CryptoStreamMode . Write);\n        string plainText = String.Empty;\n        try {\n            byte[] cipherBytes = Convert.FromBase64String(Uri.UnescapeDataString(cipherText));\n            cryptoStream.Write(cipherBytes, 0, cipherBytes . Length);\n            cryptoStream.FlushFinalBlock();\n            byte[] plainBytes = memoryStream.ToArray();\n            plainText = Encoding.ASCII.GetString(plainBytes, 0, plainBytes.Length);\n        } finally {\n            memoryStream.Close();\n            cryptoStream.Close();\n        }\n        return plainText;\n    }\n}\n\n</code></pre>\n<p>3. Java</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-java\">import java.nio.charset.StandardCharsets;\nimport java.security.MessageDigest;\nimport java.util.Arrays;\nimport java.util.Base64;\nimport java.util.Base64.Decoder;\nimport java.net.URLDecoder;\nimport java.net.URLEncoder;\nimport javax.crypto.Cipher;\nimport javax.crypto.spec.IvParameterSpec;\nimport javax.crypto.spec.SecretKeySpec;\nimport java.security.NoSuchAlgorithmException;\nimport java.math.BigInteger;\npublic class Playground {\n    public static void main(String[] args) throws Exception  {\n        String key_api =  \"FjgHGLxnJO1qjlhHcK4KHg==\";\n        String secret_api = \"vqw330bxVfX9TEGMF1BDUKlVDm4DFejA0STb0WDarkU=\";      \n        //For Encrypt Sample Data\n        String data = \"currency_code=INR&amp;merchant_code=SKU20220913051108&amp;merchant_api_key=FjgHGLxnJO1qjlhHcK4KHg==&amp;transaction_code=D996574709141&amp;transaction_timestamp=1663729322&amp;payment_code=P001&amp;bank_code=104&amp;transaction_amount=500.00&amp;user_id=4\";\n        //For Descrypt Sample Data\n        String encryptData = \"6mWOao2m34hP/ZHQ/5skq5kTDuzWkHePH74pJsc4FTgmXqhidXtY4VLq9eW0N7/WDfY4gH2gHEVw8FU5d0LKpqc6mOc1gy8dhxyeT/lAyzaI0gnkXzRWwMm7pXlwNpoNG2v7/SXMCioAJMf3nLWEQji+yRTdBxietyMP8XArnQ2KJ/7IoOwQgxl6rPPGuHHCoi74POTI5lEzHbHCNDgGc4XjF89BQM0ROtlAyTpG+STCtEYjE90crt/GaZwYkwCcaqgtFo8o/BNRZTDs4WcQOQCTyu2AnHtxdJvcPUgXAW+ebPv91vNrwt68AmxcLhic\";\n        //Hash Key 32 Length\n        final MessageDigest md_key = MessageDigest.getInstance(\"SHA-256\");\n        byte[] key_hash = Arrays.copyOfRange(md_key.digest(key_api.getBytes(\"UTF-8\")),0,32);\n        //Hash Secret 16 Length\n        String sha_secret = hashsha256(secret_api).substring(0,16);\n        byte[] iv_hash = sha_secret.getBytes(\"UTF-8\");\n        //Execute Test Scenario\n        // String result = EncryptDecrypt(\"encrypt\",data,key_hash,iv_hash);\n        String result = EncryptDecrypt(\"decrypt\",encryptData,key_hash,iv_hash);\n        System.out.println(result);\n    }\n    static String EncryptDecrypt(String action, String data, byte[] key_hash, byte[] iv_hash) throws Exception {\n        //Process OpenSSL EncryptDecrypt\n        byte[] cipherText;\n        String output;\n        Cipher cipher = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n        final SecretKeySpec key = new SecretKeySpec(key_hash, \"AES\");\n        final IvParameterSpec iv = new IvParameterSpec(iv_hash, 0, cipher.getBlockSize());\n        if(action == \"encrypt\"){\n            //Encrypt condition\n            cipher.init(Cipher.ENCRYPT_MODE, key, iv);\n            cipherText = cipher.doFinal(data.getBytes(\"UTF-8\"));\n            output = Base64.getEncoder().encodeToString(cipherText);\n            String result = URLEncoder.encode(output, StandardCharsets.UTF_8.toString());\n            return result;\n        }else{\n            //Decrypt condition\n            String decodeX = URLDecoder.decode(data, StandardCharsets.UTF_8.toString());\n            byte[] decodeData = Base64.getDecoder().decode(decodeX);\n            cipher.init(Cipher.DECRYPT_MODE, key, iv);\n            cipherText = cipher.doFinal(decodeData);\n            output = new String(cipherText,StandardCharsets.UTF_8);\n            return output;\n        }  \n    }\n    static String hashsha256(String key) throws NoSuchAlgorithmException {\n        MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n        md.update(key.getBytes(StandardCharsets.UTF_8));\n        byte[] digest = md.digest();\n        String key_string = String.format(\"\u00064x\", new BigInteger(1, digest));\n        return key_string;\n    }\n}\n\n</code></pre>\n<p>4. NodeJs</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-javascript\">var crypto = require('crypto')\nconst apikey = \"myapikey\"\nconst secretkey = \"mysecretkey\"\nconst encrypt_decrypt = (action, data) =&gt; {\n   const encryptionMethod = \"AES-256-CBC\"\n   const key = crypto.createHash('sha256').update(apikey).digest()\n   const iv = crypto.createHash('sha256').update(secretkey, 'utf8').digest('hex').substring(0,16)\n   if (action == \"encrypt\") {\n       const cipher = crypto.createCipheriv(encryptionMethod, key, iv)\n       const res = encodeURIComponent(Buffer.from(\n           cipher.update(data, 'utf8', 'base64') + cipher.final('base64')\n       ).toString())\n       console.log(res)\n       return res\n   } else if (action == \"decrypt\") {\n       const buff = decodeURIComponent(Buffer.from(data))\n       const decipher = crypto.createDecipheriv(encryptionMethod, key, iv)\n       const res = (\n         decipher.update(buff.toString('utf8'), 'base64', 'utf8') +\n         decipher.final('utf8')\n       )\n       console.log(res)\n       return res\n   }\n}\n// example to encrypt data\nencrypt_decrypt(\"encrypt\", \"currency_code=INR&amp;merchant_code=SKU20230101012023&amp;merchant_api_key=myapikey&amp;transaction_code=TEST-DP-123&amp;transaction_timestamp=1677495605&amp;payment_code=PAY01D&amp;transaction_amount=1000&amp;user_id=test01\")\n// example to decrypt data\nencrypt_decrypt(\"decrypt\", \"QqqF5QD9NdtM1O5JCpySZXyFT0gmXvEgWUEgoW19xajeviLAAlwzdDJmD7sgE2laIp7iEt/1SzUpquHykjfQP2eTTQGyR3Jw60iVniAayGxBOQRoPW9ln/T4DzQkZL1eqapgcum/yGKLErYJ0v1WedA2nYZ/d64vZISGh3eA2PqDGJdLZWYKbAP7uGHzMGBslmx8CcBCFbjrKvfA5VGam6LHi1ZWTfv8eeHmlBv4CSI6pXzhb43UZ22uBQj/N8rc6oJQd7l14FK2A4sZhpUhZQ==\")\n\n</code></pre>\n<h1 id=\"deposit-transaction-status-reference\">Deposit Transaction Status Reference</h1>\n<h2 id=\"overview\">Overview</h2>\n<p>This reference describes the possible status values for deposit transactions in the system. Each transaction is assigned a status code that indicates its current processing state.</p>\n<h2 id=\"transaction-status-codes\">Transaction Status Codes</h2>\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><code>1</code></td>\n<td>Pending</td>\n<td>The transaction has been initiated and is currently being processed by the system. No further action is required from the user at this time.</td>\n</tr>\n<tr>\n<td><code>2</code></td>\n<td>Completed</td>\n<td>The transaction has been successfully processed and the funds have been credited to the account. The deposit is now available for use.</td>\n</tr>\n<tr>\n<td><code>3</code></td>\n<td>Failed</td>\n<td>The transaction could not be processed successfully due to an error. Common reasons include insufficient funds, invalid payment method, or network issues. The user may retry the transaction or contact support.</td>\n</tr>\n<tr>\n<td><code>4</code></td>\n<td>Manual Process</td>\n<td>The transaction requires manual review and intervention. This typically occurs for large amounts, suspicious activity, or compliance requirements. <strong>Customer support contact is required to proceed with this transaction.</strong></td>\n</tr>\n</tbody>\n</table>\n</div><h1 id=\"payout-transaction-status-reference\">Payout Transaction Status Reference</h1>\n<h2 id=\"overview-1\">Overview</h2>\n<p>This reference describes the possible status values for payout transactions in the system. Each payout transaction is assigned a status code that indicates its current processing state and outcome.</p>\n<h2 id=\"transaction-status-codes-1\">Transaction Status Codes</h2>\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><code>1</code></td>\n<td>Pending</td>\n<td>The payout transaction has been initiated and is currently being processed. The funds are being transferred to the designated recipient account. Processing time may vary depending on the payment method and destination.</td>\n</tr>\n<tr>\n<td><code>2</code></td>\n<td>Completed</td>\n<td>The payout transaction has been successfully processed and funds have been transferred to the recipient's account. The transaction is now finalized and cannot be modified.</td>\n</tr>\n<tr>\n<td><code>3</code></td>\n<td>Failed</td>\n<td>The payout transaction could not be completed due to an error. Common reasons include invalid recipient details, insufficient account balance, blocked accounts, or network connectivity issues. Review the error details and retry if applicable.</td>\n</tr>\n<tr>\n<td><code>7</code></td>\n<td>Refund</td>\n<td>The payout transaction has been reversed and the funds have been returned to the original account. This may occur due to recipient rejection, compliance requirements, or system-initiated reversals.</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":"Terms & Definition","slug":"terms-definition"},{"content":"Workflow","slug":"workflow"},{"content":"API Features","slug":"api-features"},{"content":"Encrypt Decrypt Function","slug":"encrypt-decrypt-function"},{"content":"Deposit Transaction Status Reference","slug":"deposit-transaction-status-reference"},{"content":"Payout Transaction Status Reference","slug":"payout-transaction-status-reference"}],"owner":"42380959","collectionId":"4ac9b7f5-83df-48ba-9f94-b114f18f4de8","publishedId":"2sB3HgNNTi","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"b88a0a"},"publishDate":"2025-08-28T03:12:46.000Z"},"item":[{"name":"Deposit","item":[{"name":"V2 (Redirect Payment Page)","item":[{"name":"Deposit Request v2","id":"0cbe10f4-b2f4-4329-aef8-40c1b0ae6d90","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://api.singhapayapi.com/YOUR_MERCHANT_CODE/v2/dopayment?key=ENCRYPTED_KEY_STRING","description":"<p><strong>Payment Request v2</strong><br />This endpoint is used to initiate a payment request using GET method.</p>\n<p><strong>URL</strong><br /><code>GET https://api.singhapayapi.com/YOUR_MERCHANT_CODE/v2/dopayment?key=ENCRYPTED_KEY_STRING</code></p>\n<p><strong>Parameters</strong></p>\n<ul>\n<li><code>key</code> (required): Encrypted string generated using <code>merchant_code</code>, <code>api_key</code>, <code>secret_key</code>.</li>\n</ul>\n<p><strong>Notes</strong></p>\n<ul>\n<li>Redirect users to the generated URL for payment processing.</li>\n</ul>\n","urlObject":{"path":["YOUR_MERCHANT_CODE","v2","dopayment"],"host":["https://api.singhapayapi.com"],"query":[{"key":"key","value":"ENCRYPTED_KEY_STRING"}],"variable":[]}},"response":[],"_postman_id":"0cbe10f4-b2f4-4329-aef8-40c1b0ae6d90"}],"id":"fbe8870e-9b7c-4ef8-86b4-3ea26b251ea6","description":"<p><strong>This endpoint used to redirect to our payment page directly.</strong></p>\n","_postman_id":"fbe8870e-9b7c-4ef8-86b4-3ea26b251ea6"},{"name":"V3 (H2H for create own Payment Page)","item":[{"name":"Payment Request v3","id":"749c16a4-772a-475c-8870-2e65bab9ed6a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"key\": \"ENCRYPTED_KEY_STRING\"\n}"},"url":"https://api.singhapayapi.com/api/YOUR_MERCHANT_CODE/v3/dopayment","description":"<p><strong>Payment Request v3</strong><br />Used to create a payment request with POST method.</p>\n<p><strong>URL</strong><br /><code>POST https://api.singhapayapi.com/api/YOUR_MERCHANT_CODE/v3/dopayment</code></p>\n<p><strong>Body Parameters</strong></p>\n<ul>\n<li><code>key</code></li>\n</ul>\n<p><strong>Response Example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n \"status\": \"success\",\n \"message\": \"Submit Transaction Success!\",\n \"transaction_no\": \"DP16873387xxxxx\",\n \"transaction_code\": \"TEST-DP-16873xxxxx\",\n \"amount\": \"510.00\",\n \"upi_id\": \"example@upi\",\n \"qr\":\"https://api.singhapayapi.com/imageencoded=true...\",\n \"expired_at\":\"2023-06-22 15:06:04\",\n \"expired_timezone\":\"GMT+05:30\"\n}\n\n</code></pre>\n","urlObject":{"path":["api","YOUR_MERCHANT_CODE","v3","dopayment"],"host":["https://api.singhapayapi.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"749c16a4-772a-475c-8870-2e65bab9ed6a"},{"name":"Submit UTR","id":"abc8f327-ad7d-4a2d-b541-8d68aad4444a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"key\": \"ENCRYPTED_KEY_STRING\"\n}"},"url":"https://api.singhapayapi.com/api/YOUR_MERCHANT_CODE/v3/submit-utr","description":"<p><strong>Submit UTR</strong><br />Submit UTR code to complete an INR payment.</p>\n<p><strong>URL</strong><br /><code>POST https://api.singhapayapi.com/api/YOUR_MERCHANT_CODE/v3/submit-utr</code></p>\n<hr />\n<p><strong>Request Flow</strong></p>\n<ol>\n<li>Raw Parameters Before Encrypt</li>\n</ol>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"transaction_code\": \"xxx\",\n    \"utr\": 112344578899\n}\n\n</code></pre>\n<p>2. Encrypt Raw Parameter</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">$combined_params = \"merchant_code=xxx&amp;merchant_api_key=xxx&amp;...\";\n$encrypted_key = encrypt_decrypt('encrypt', json_encode($raw_params), '{your_api_key}', '{your_secret_key}');\n\n</code></pre>\n<p>3. Put encrypted parameters on body parameters</p>\n<hr />\n<p><strong>Body Parameters</strong></p>\n<ul>\n<li>key (required)</li>\n</ul>\n<p><strong>Response Example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"success\",\n    \"message\": \"Success Submit Utr!\"\n}\n\n</code></pre>\n","urlObject":{"path":["api","YOUR_MERCHANT_CODE","v3","submit-utr"],"host":["https://api.singhapayapi.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"abc8f327-ad7d-4a2d-b541-8d68aad4444a"}],"id":"1b1b4146-bacb-46ae-84e7-92a74d572b40","description":"<p><strong>This endpoint will respond by displaying the data required by the merchant so that you can create your own payment page.</strong></p>\n","_postman_id":"1b1b4146-bacb-46ae-84e7-92a74d572b40"},{"name":"V4 (Response our Payment Page URL)","item":[{"name":"Payment Request v4","id":"8660ea61-a91a-4700-85cd-f4f98832d55d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"key\": \"ENCRYPTED_KEY_STRING\"\n}"},"url":"https://api.singhapayapi.com/api/YOUR_MERCHANT_CODE/v4/dopayment","description":"<p><strong>Payment Request v4</strong><br />Used to create a payment request with POST method.</p>\n<p><strong>URL</strong><br /><code>POST https://api.singhapayapi.com/api/YOUR_MERCHANT_CODE/v4/dopayment</code></p>\n<p><strong>Body Parameters</strong></p>\n<ul>\n<li><code>key</code></li>\n</ul>\n<p><strong>Response Example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"success\",\n  \"message\": \"[DP] Submit Transaction Success!\",\n  \"transaction_no\": \"xxx\",\n  \"transaction_code\": \"xxx\",\n  \"amount\": \"1010.00\",\n  \"pay_url\": \"https://api.singhapayapi.com/v4/deposit?transaction_no=xxx\",\n  \"upi_id\": \"accountone@upidemo\",\n  \"qr\": \"https://api.singhapayapi.com/image?encoded=true&amp;url=xxx\"\n}\n\n</code></pre>\n","urlObject":{"path":["api","YOUR_MERCHANT_CODE","v4","dopayment"],"host":["https://api.singhapayapi.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"8660ea61-a91a-4700-85cd-f4f98832d55d"}],"id":"1149dba6-c1d5-458d-ba7e-dedc0c69ddf4","description":"<p><strong>This endpoint will respond by displaying the data our payment page url, so you can manage how to redirect in your side.</strong></p>\n","_postman_id":"1149dba6-c1d5-458d-ba7e-dedc0c69ddf4"}],"id":"1191cb98-7dff-4728-88c7-4b9312211a1d","description":"<p>This API enables merchants to initiate secure payment transactions through our payment gateway. All sensitive data is transmitted using AES-256-CBC encryption to ensure maximum security and data integrity.</p>\n<h2 id=\"request-flow\">Request Flow</h2>\n<h3 id=\"1-parameter-preparation\">1. Parameter Preparation</h3>\n<p>Prepare the raw parameters according to the specifications below, then combine and encrypt them before transmission.</p>\n<h3 id=\"2-raw-parameters\">2. Raw Parameters</h3>\n<p>These parameters must be prepared and combined into a query string format before encryption.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter Name</th>\n<th><strong>Type</strong></th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>merchant_code</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>Provided by provider</td>\n</tr>\n<tr>\n<td><code>merchant_api_key</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>Provided by provider</td>\n</tr>\n<tr>\n<td><code>transaction_code</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>Generated by the operator, use string data type. It must be unique for each transaction</td>\n</tr>\n<tr>\n<td><code>transaction_timestamp</code></td>\n<td>Integer</td>\n<td>Yes</td>\n<td>Generated by the operator. Integer data type. This parameter describes the transaction request time. The more detailed information regarding timestamps, please visit <a href=\"https://www.epochconverter.com/\">https://www.epochconverter.com/</a>. Please note that we only process the time stamp on these time limits: min: 1 hour before now and max: 5 minutes after now</td>\n</tr>\n<tr>\n<td><code>transaction_amount</code></td>\n<td>Double</td>\n<td>Yes</td>\n<td>Using double data type</td>\n</tr>\n<tr>\n<td><code>payment_code</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>Use string value, for example, P001. Please contact the administrator to get your payment code.</td>\n</tr>\n<tr>\n<td><code>user_id</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>The user ID on the merchant’s side. Use String Value</td>\n</tr>\n<tr>\n<td><code>currency_code</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>Please put \"INR\" as a value</td>\n</tr>\n<tr>\n<td><code>callback_url</code></td>\n<td>String</td>\n<td>No</td>\n<td>URL callback beside URL set from BO</td>\n</tr>\n<tr>\n<td><code>return_url</code></td>\n<td>String</td>\n<td>No</td>\n<td>Dynamic return URL to redirect back to the merchant page after completing transactions</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"3-parameter-combination\">3. Parameter Combination</h3>\n<p>Combine all parameters into a single query string format, separated by \"&amp;\" characters:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>merchant_code=xxx&amp;merchant_api_key=xxx&amp;transaction_code=xxx&amp;transaction_timestamp=xxx&amp;payment_code=xxx&amp;transaction_amount=xxx&amp;user_id=xxx¤cy_code=INR\n\n</code></pre><p><strong>Example:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>merchant_code=MERCH001&amp;merchant_api_key=ak_test_12345&amp;transaction_code=TXN20231201001&amp;transaction_timestamp=1701425400&amp;payment_code=P001&amp;transaction_amount=100.50&amp;user_id=user123¤cy_code=USD&amp;bank_code=BANK001&amp;callback_url=https://merchant.com/callback&amp;return_url=https://merchant.com/return\n\n</code></pre><h3 id=\"4-encryption-process\">4. Encryption Process</h3>\n<p>Encrypt the combined parameter string using the provided encryption function with your API credentials:</p>\n<p>php</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">$combined_params = \"merchant_code=xxx&amp;merchant_api_key=xxx&amp;...\";\n$encrypted_key = encrypt_decrypt('encrypt', $combined_params, '{your_api_key}', '{your_secret_key}');\n\n</code></pre>\n<p><strong>Sample Encrypted Output:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>3eX+f+MoVECXxSkKqV7aBRYIbyWg3DxdPdgZyG+377a7dR1OBBDNnU+/vtn7hUyjP7WWdZ7gCsPF0J+JOiSxb1BFueIyRX3rxbSMa+/AyFvhz4L/2wJmSJKcNQn4whIL1sc1cfj7E1smQFAiYjfLXdY1Ev6Pnoit8Vouex3+upnZjJS8t44XRx5wugB5GuybZWPtlPhiN/P7P4uJW3RlFlo+tYrnHQ6GwqwRkoLrdv3qZXUzaatT8EWdztr973KWFDof2rVD+56SMAVrRHQZcYICU8RcjpyvJUaCtXpOKKg=\n\n</code></pre><p>Refer to point Encrypt Decrypt Function for the encryption/decryption function explanation.</p>\n","_postman_id":"1191cb98-7dff-4728-88c7-4b9312211a1d"},{"name":"Payout","item":[{"name":"Payout Request","id":"5272082c-a5d0-4bf8-8105-aebfceab48db","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"key\": \"ENCRYPTED_KEY_STRING\"\n}"},"url":"https://api.singhapayapi.com/api/v1/payout/YOUR_MERCHANT_CODE","description":"<p><strong>Payout Request</strong><br />Used to submit a payout/withdrawal request.</p>\n<p><strong>URL</strong><br /><code>POST https://api.singhapayapi.com/api/v1/payout/YOUR_MERCHANT_CODE</code></p>\n<p><strong>Body Parameters (JSON)</strong></p>\n<ul>\n<li>key (required)</li>\n</ul>\n<p><strong>Success Response</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": true,\n    \"message\": \"request withdraw successful\"\n}\n\n</code></pre>\n<p><strong>Failure Response</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": false,\n    \"message\": \"Invalid Transaction Code ( not unique )!, error code 111\"\n}\n\n</code></pre>\n","urlObject":{"path":["api","v1","payout","YOUR_MERCHANT_CODE"],"host":["https://api.singhapayapi.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"5272082c-a5d0-4bf8-8105-aebfceab48db"}],"id":"5f032001-bf85-4a44-9bfc-6645b3fdccab","description":"<p>This API enables merchants to initiate secure payment transactions through our payment gateway. All sensitive data is transmitted using AES-256-CBC encryption to ensure maximum security and data integrity.</p>\n<h2 id=\"request-flow\">Request Flow</h2>\n<h3 id=\"1-parameter-preparation\">1. Parameter Preparation</h3>\n<p>Prepare the raw parameters according to the specifications below, then make it Json and encrypt them before transmission.</p>\n<h3 id=\"2-raw-parameters\">2. Raw Parameters</h3>\n<p>These parameters must be prepared as a Json format before encryption.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter Name</th>\n<th><strong>Type</strong></th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>merchant_code</code></td>\n<td>String</td>\n<td><strong>Yes</strong></td>\n<td>Merchant identifier provided by provider</td>\n</tr>\n<tr>\n<td><code>transaction_code</code></td>\n<td>String</td>\n<td><strong>Yes</strong></td>\n<td>Unique transaction identifier (string). Must be unique for each transaction</td>\n</tr>\n<tr>\n<td><code>transaction_timestamp</code></td>\n<td>Integer</td>\n<td><strong>Yes</strong></td>\n<td>UNIX timestamp (integer). Valid range: -1 hour to +5 minutes from current time</td>\n</tr>\n<tr>\n<td><code>payout_code</code></td>\n<td>String</td>\n<td><strong>Yes</strong></td>\n<td>Payout method code (e.g., W001). Contact administrator for available codes</td>\n</tr>\n<tr>\n<td><code>transaction_amount</code></td>\n<td>Double</td>\n<td><strong>Yes</strong></td>\n<td>Transaction amount</td>\n</tr>\n<tr>\n<td><code>user_id</code></td>\n<td>String</td>\n<td><strong>Yes</strong></td>\n<td>The user ID on the merchant’s side. Use String Value</td>\n</tr>\n<tr>\n<td><code>currency_code</code></td>\n<td>String</td>\n<td><strong>Yes</strong></td>\n<td>Please put \"INR\" as a value</td>\n</tr>\n<tr>\n<td><code>bank_account_number</code></td>\n<td>String</td>\n<td><strong>Yes</strong></td>\n<td>Bank account number</td>\n</tr>\n<tr>\n<td><code>ifsc_code</code></td>\n<td>String</td>\n<td><strong>Yes</strong></td>\n<td>IFSC code</td>\n</tr>\n<tr>\n<td><code>bank_name</code></td>\n<td>String</td>\n<td><strong>Yes</strong></td>\n<td>Bank name</td>\n</tr>\n<tr>\n<td><code>account_name</code></td>\n<td>String</td>\n<td><strong>Yes</strong></td>\n<td>Account holder name</td>\n</tr>\n<tr>\n<td><code>callback_url</code></td>\n<td>String</td>\n<td><strong>Optional</strong></td>\n<td>Custom callback URL</td>\n</tr>\n<tr>\n<td><code>phone_number</code></td>\n<td>String</td>\n<td><strong>Optional</strong></td>\n<td>Phone number</td>\n</tr>\n</tbody>\n</table>\n</div><p>Example Raw Parameters</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"merchant_code\": \"SKU20220406065553\",\n  \"transaction_code\": \"WD00008\",\n  \"transaction_timestamp\": \"1652339606\",\n  \"payout_code\": \"WWW\",\n  \"transaction_amount\": \"100\",\n  \"user_id\": \"1\",\n  \"currency_code\": \"INR\",\n  \"bank_account_number\": \"123456\",\n  \"account_name\": \"jhon\",\n  \"bank_name\": \"ICIC Bank\",\n  \"ifsc_code\": \"ICIC0000269\",\n  \"phone_number\": \"9102901920\"\n}\n\n</code></pre>\n<h3 id=\"4-encryption-process\">4. Encryption Process</h3>\n<p>Encrypt the json parameter string using the provided encryption function with your API credentials:</p>\n<p>php</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">$encrypted_key = encrypt_decrypt('encrypt', json_encode($raw_params), '{your_api_key}', '{your_secret_key}');\n\n</code></pre>\n<p><strong>Sample Encrypted Output:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>3eX+f+MoVECXxSkKqV7aBRYIbyWg3DxdPdgZyG+377a7dR1OBBDNnU+/vtn7hUyjP7WWdZ7gCsPF0J+JOiSxb1BFueIyRX3rxbSMa+/AyFvhz4L/2wJmSJKcNQn4whIL1sc1cfj7E1smQFAiYjfLXdY1Ev6Pnoit8Vouex3+upnZjJS8t44XRx5wugB5GuybZWPtlPhiN/P7P4uJW3RlFlo+tYrnHQ6GwqwRkoLrdv3qZXUzaatT8EWdztr973KWFDof2rVD+56SMAVrRHQZcYICU8RcjpyvJUaCtXpOKKg=\n\n</code></pre><p>Refer to point Encrypt Decrypt Function for the encryption/decryption function explanation.</p>\n","_postman_id":"5f032001-bf85-4a44-9bfc-6645b3fdccab"},{"name":"Callback","item":[{"name":"Deposit Callback","id":"e78ccf5b-6fd9-426b-a41e-f9da68212f6a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"description":"<p>This webhook API is called by the payment provider to notify operators about payment transaction status updates. After a payment request is processed through the DoPayment API, the provider will call this callback endpoint to forward the final transaction status (success or failed).</p>\n<h2 id=\"webhook-configuration\">Webhook Configuration</h2>\n<ul>\n<li><p><strong>Callback URL</strong>: Submit with param callback_url at Request Deposit API or Configure via Back Office (BO) settings</p>\n</li>\n<li><p><strong>Method</strong>: POST</p>\n</li>\n<li><p><strong>Content-Type</strong>: application/json or application/x-www-form-urlencoded</p>\n</li>\n<li><p><strong>Authentication</strong>: Encrypted parameters using API key and secret</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"callback-endpoint-implementation\">Callback Endpoint Implementation</h2>\n<h3 id=\"endpoint-operator-side\">Endpoint (Operator Side)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST {operator_callback_url}\n\n</code></pre><p><strong>Note</strong>: This endpoint must be implemented by the operator and configured using parameter callback_url at Deposit API Request or set in the BO settings.</p>\n<h3 id=\"request-parameters\">Request Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th><strong>Required</strong></th>\n<th>Encrypted</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>key</code></td>\n<td>String</td>\n<td>Yes</td>\n<td><strong>Yes</strong></td>\n<td>Encrypted transaction data containing detailed information</td>\n</tr>\n<tr>\n<td><code>transaction_code</code></td>\n<td>String</td>\n<td>Yes</td>\n<td><strong>No</strong></td>\n<td>Original transaction code sent in DoPayment request</td>\n</tr>\n<tr>\n<td><code>transaction_no</code></td>\n<td>String</td>\n<td>Yes</td>\n<td><strong>No</strong></td>\n<td>Provider's internal transaction reference number</td>\n</tr>\n<tr>\n<td>user_id</td>\n<td>String</td>\n<td>Yes</td>\n<td>No</td>\n<td>The user ID on the merchant’s side. Use String Value</td>\n</tr>\n<tr>\n<td>note</td>\n<td>String</td>\n<td>Yes</td>\n<td>No</td>\n<td>Transaction Note. Default value is empty</td>\n</tr>\n<tr>\n<td>utr</td>\n<td>String</td>\n<td>Conditional</td>\n<td>No</td>\n<td>UTR that linked to this Transaction</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-format\">Request Format</h3>\n<h4 id=\"json-request\">JSON Request</h4>\n<p>json</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"key\": \"ENCRYPTED_KEY_STRING\",\n  \"transaction_code\": \"TXN20231201001\",\n  \"transaction_no\": \"PROV123456789\",\n  \"user_id\": \"0\",\n  \"note\": \"\",\n  \"utr\": \"261047559234\"\n}\n\n</code></pre>\n<h4 id=\"decrypt-parameters-key-field\">Decrypt Parameters (Key Field)</h4>\n<p>The <code>key</code> parameter contains encrypted transaction details that must be decrypted using your API key and API secret.</p>\n<h3 id=\"decryption-process\">Decryption Process</h3>\n<p>php</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>$decrypted_data = encrypt_decrypt('decrypt', $key, $your_api_key, $your_api_secret);\n\n</code></pre><h3 id=\"decrypted-parameters\">Decrypted Parameters</h3>\n<p>After decryption, the following parameters are available:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th><strong>Required</strong></th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>transaction_code</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>Original transaction code sent by operator in DoPayment request</td>\n</tr>\n<tr>\n<td><code>transaction_status</code></td>\n<td>Integer</td>\n<td>Yes</td>\n<td>Transaction status code (see status codes section)</td>\n</tr>\n<tr>\n<td><code>transaction_amount</code></td>\n<td>Double</td>\n<td>Yes</td>\n<td>Original transaction amount requested</td>\n</tr>\n<tr>\n<td><code>transaction_fee</code></td>\n<td>Double</td>\n<td>Yes</td>\n<td>Transaction processing fee charged</td>\n</tr>\n<tr>\n<td><code>currency_code</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>Three-letter currency code (ISO 4217)</td>\n</tr>\n<tr>\n<td><code>transaction_no</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>Provider's internal transaction reference</td>\n</tr>\n<tr>\n<td><code>transaction_actual_amount</code></td>\n<td>Double</td>\n<td>Yes</td>\n<td>Actual amount paid by the customer</td>\n</tr>\n<tr>\n<td>transaction_ref</td>\n<td>String</td>\n<td>Yes</td>\n<td>Additional Reference from the transaction</td>\n</tr>\n<tr>\n<td>transaction_ref2</td>\n<td>String</td>\n<td>Yes</td>\n<td>Additional Reference from the transaction</td>\n</tr>\n<tr>\n<td>upi_id</td>\n<td>String</td>\n<td>Yes</td>\n<td>UPI ID that linked to this transaction as Deposit Receiver</td>\n</tr>\n<tr>\n<td>user_id</td>\n<td>String</td>\n<td>Yes</td>\n<td>The user ID on the merchant’s side. Use String Value</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"parameter-format\">Parameter Format</h3>\n<p>The encrypted data follows query string format with \"&amp;\" separators:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>currency_code=INR&amp;transaction_code=xxx&amp;transaction_status=2&amp;transaction_amount=523&amp;transaction_actual_amount=523.00000000&amp;transaction_fee=5.23000000&amp;transaction_ref=&amp;transaction_ref2=xxx&amp;transaction_no=xxx&amp;user_id=0&amp;upi_id=accountfour@upi\n\n</code></pre><hr />\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"e78ccf5b-6fd9-426b-a41e-f9da68212f6a"},{"name":"Payout Callback","id":"74481d79-dddb-4725-80d6-41bc5daee7be","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"description":"<p>This webhook API is called by the payment provider to notify operators about payout transaction status updates. After a payout request is processed through the Payout Request API, the provider will call this callback endpoint to forward the final transaction status (success or failed).</p>\n<h2 id=\"webhook-configuration\">Webhook Configuration</h2>\n<ul>\n<li><p><strong>Callback URL</strong>: Submit with param callback_url at Request Payout API or Configure via Back Office (BO) settings</p>\n</li>\n<li><p><strong>Method</strong>: POST</p>\n</li>\n<li><p><strong>Content-Type</strong>: application/json or application/x-www-form-urlencoded</p>\n</li>\n<li><p><strong>Authentication</strong>: Encrypted parameters using API key and secret</p>\n</li>\n</ul>\n<hr />\n<h2 id=\"callback-endpoint-implementation\">Callback Endpoint Implementation</h2>\n<h3 id=\"endpoint-operator-side\">Endpoint (Operator Side)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST {operator_payout_callback_url}\n\n</code></pre><p><strong>Note</strong>: This endpoint must be implemented by the operator and configured using parameter callback_url at Payout API Request or set in the BO settings.</p>\n<h3 id=\"request-parameters\">Request Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th><strong>Required</strong></th>\n<th>Encrypted</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>key</code></td>\n<td>String</td>\n<td>Yes</td>\n<td><strong>Yes</strong></td>\n<td>Encrypted payout transaction data containing detailed information</td>\n</tr>\n<tr>\n<td><code>transaction_code</code></td>\n<td>String</td>\n<td>Yes</td>\n<td><strong>No</strong></td>\n<td>Original transaction code sent in payout request</td>\n</tr>\n<tr>\n<td><code>transaction_no</code></td>\n<td>String</td>\n<td>Yes</td>\n<td><strong>No</strong></td>\n<td>Provider's internal transaction reference number</td>\n</tr>\n<tr>\n<td>user_id</td>\n<td>String</td>\n<td>Yes</td>\n<td>No</td>\n<td>The user ID on the merchant’s side. Use String Value</td>\n</tr>\n<tr>\n<td>note</td>\n<td>String</td>\n<td>Yes</td>\n<td>No</td>\n<td>Transaction Note. Default value is empty</td>\n</tr>\n<tr>\n<td>utr</td>\n<td>String</td>\n<td>Conditional</td>\n<td>No</td>\n<td>UTR That Lined to this Transaction</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-format\">Request Format</h3>\n<h4 id=\"json-request\">JSON Request</h4>\n<p>json</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"key\": \"encrypted_payout_data\",\n  \"transaction_code\": \"WD00008\",\n  \"transaction_no\": \"PROV_WD_123456789\",\n  \"user_id\": \"838\",\n  \"note\": \"others\",\n  \"utr\": \"\"\n}\n\n</code></pre>\n<hr />\n<h2 id=\"decrypt-parameters-key-field\">Decrypt Parameters (Key Field)</h2>\n<p>The <code>key</code> parameter contains encrypted payout transaction details that must be decrypted using your API key and API secret.</p>\n<h3 id=\"decryption-process\">Decryption Process</h3>\n<p>php</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>$decrypted_data = encrypt_decrypt('decrypt', $key, $your_api_key, $your_api_secret);\n\n</code></pre><h3 id=\"decrypted-parameters\">Decrypted Parameters</h3>\n<p>After decryption, the following parameters are available:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th><strong>Required</strong></th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>transaction_no</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>Provider's internal transaction reference number</td>\n</tr>\n<tr>\n<td><code>transaction_code</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>Original transaction code sent by operator in payout request</td>\n</tr>\n<tr>\n<td><code>transaction_status</code></td>\n<td>Integer</td>\n<td>Yes</td>\n<td>Payout transaction status code (see status codes section)</td>\n</tr>\n<tr>\n<td><code>transaction_amount</code></td>\n<td>Double</td>\n<td>Yes</td>\n<td>Original payout amount requested</td>\n</tr>\n<tr>\n<td><code>transaction_fee</code></td>\n<td>Double</td>\n<td>Yes</td>\n<td>Payout processing fee charged</td>\n</tr>\n<tr>\n<td><code>currency_code</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>Three-letter currency code (ISO 4217)</td>\n</tr>\n<tr>\n<td><code>transaction_ref</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>Transaction reference for payout request tracking</td>\n</tr>\n<tr>\n<td>transaction_ref2</td>\n<td>String</td>\n<td>Yes</td>\n<td>Additional Transaction Reference</td>\n</tr>\n<tr>\n<td>user_id</td>\n<td>String</td>\n<td>Yes</td>\n<td>The user ID on the merchant’s side. Use String Value</td>\n</tr>\n<tr>\n<td>bank_code</td>\n<td>String</td>\n<td>Yes</td>\n<td>Beneficiary Bank Code on Withdraw Transaction</td>\n</tr>\n<tr>\n<td>bank_name</td>\n<td>String</td>\n<td>Yes</td>\n<td>Beneficiary Bank Name on Withdraw Transaction</td>\n</tr>\n<tr>\n<td>bank_account_name</td>\n<td>String</td>\n<td>Yes</td>\n<td>Beneficiary Account Name on Withdraw Transaction</td>\n</tr>\n<tr>\n<td>ifsc_code</td>\n<td>String</td>\n<td>Yes</td>\n<td>Beneficiary IFSC Code on Withdraw Transaction</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"parameter-format\">Parameter Format</h3>\n<p>The decrypted data is in JSON format:</p>\n<p>json</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"transaction_no\": \"xxx\",\n  \"transaction_code\": \"xxxx\",\n  \"transaction_status\": 2,\n  \"transaction_amount\": \"10.00000000\",\n  \"transaction_fee\": \"0.10000000\",\n  \"currency_code\": \"INR\",\n  \"transaction_ref\": null,\n  \"transaction_ref2\": null,\n  \"user_id\": \"0\",\n  \"bank_code\": \"ORCB\",\n  \"bank_name\": \"THE ODISHA STATE CO-OPERATIVE BANK LTD\",\n  \"bank_account\": \"11133322\",\n  \"bank_account_name\": \"Stephen Garcia\",\n  \"ifsc_code\": \"ORCB0ANG001\"\n}\n\n</code></pre>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"74481d79-dddb-4725-80d6-41bc5daee7be"}],"id":"dcf89897-ab86-40b3-b07f-b3a8315b9837","_postman_id":"dcf89897-ab86-40b3-b07f-b3a8315b9837","description":""},{"name":"Transaction","item":[{"name":"Transaction Status","id":"ce09b987-d937-473f-9861-8e182647b1a9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","value":"application/x-www-form-urlencoded"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"key","value":"ENCRYPTED_KEY_STRING","type":"text"}]},"url":"https://api.singhapayapi.com/api/v1/YOUR_MERCHANT_CODE/transactions/status","description":"<p><strong>Transaction Status</strong>\nCheck the status of a specific transaction.</p>\n<p><strong>URL</strong>\n<code>POST https://api.singhapayapi.com/api/v1/YOUR_MERCHANT_CODE/transactions/status</code></p>\n<p><strong>Parameters</strong></p>\n<ul>\n<li><code>key</code> (required, form-urlencoded): Encrypted string containing:<ul>\n<li><code>merchant_api_key</code></li>\n<li><code>transaction_code</code></li>\n</ul>\n</li>\n</ul>\n<p><strong>Response Example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": true,\n    \"data\": [{\n        \"transaction_no\": \"DP1678780607892\",\n        \"transaction_code\": \"TEST-DP-1678780607\",\n        \"amount\": \"500.00\",\n        \"status\": \"pending\",\n        \"currency_code\": \"INR\",\n        \"datetime\": \"2023-03-14 15:56:47\"\n    }],\n    \"message\": \"request transaction list successful\"\n}\n</code></pre>\n","urlObject":{"path":["api","v1","YOUR_MERCHANT_CODE","transactions","status"],"host":["https://api.singhapayapi.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"ce09b987-d937-473f-9861-8e182647b1a9"}],"id":"34b97bf1-386a-45c8-9421-1690cd10d525","description":"<p>This API endpoint allows merchants to check the status of their transactions by providing the transaction code. The request requires encrypted parameters using merchant credentials for secure transaction status retrieval.</p>\n<h2 id=\"authentication\">Authentication</h2>\n<p>All transaction status requests require encrypted parameters containing merchant API key and transaction code for secure authentication and transaction lookup.</p>\n<hr />\n<h2 id=\"transaction-status-api\">Transaction Status API</h2>\n<h3 id=\"endpoint\">Endpoint</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST {base_url}/api/v1/{merchant_code}/transactions/status\n\n</code></pre><h3 id=\"description\">Description</h3>\n<p>Retrieve the current status and details of a specific transaction using the transaction code provided during the original payment or payout request.</p>\n<h3 id=\"request-format\">Request Format</h3>\n<ul>\n<li><p><strong>Method</strong>: POST</p>\n</li>\n<li><p><strong>Content-Type</strong>: application/x-www-form-urlencoded or multipart/form-data</p>\n</li>\n<li><p><strong>Authentication</strong>: Encrypted parameter string</p>\n</li>\n</ul>\n<h3 id=\"url-parameters\">URL Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>merchant_code</code></td>\n<td>String</td>\n<td><strong>Yes</strong></td>\n<td>Merchant identifier in the URL path</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-body-parameters\">Request Body Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>key</code></td>\n<td>String</td>\n<td><strong>Yes</strong></td>\n<td>Encrypted parameter string containing authentication and transaction details</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"raw-parameters-before-encryption\">Raw Parameters (Before Encryption)</h3>\n<p>The parameters that need to be combined and encrypted:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>merchant_api_key</code></td>\n<td>String</td>\n<td><strong>Yes</strong></td>\n<td>Merchant API key provided by the provider</td>\n</tr>\n<tr>\n<td><code>transaction_code</code></td>\n<td>String</td>\n<td><strong>Yes</strong></td>\n<td>Transaction code to check status for</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"parameter-combination-and-encryption-process\">Parameter Combination and Encryption Process</h3>\n<ol>\n<li><p><strong>Combine Parameters</strong>: Join parameters with \"&amp;\" character</p>\n</li>\n<li><p><strong>Encrypt Data</strong>: Use the encryption function with your API credentials</p>\n</li>\n<li><p><strong>Submit Request</strong>: Send as form data parameter</p>\n</li>\n</ol>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">// Step 1: Combine parameters\n$raw_params = \"merchant_api_key=xxxxxxxxby9tUGdNbXI4U2o2Vml3dz09&amp;transaction_code=DP0001\";\n// Step 2: Encrypt\n$encrypted_key = encrypt_decrypt('encrypt', $raw_params, $your_api_key, $your_secret_key);\n\n</code></pre>\n<hr />\n<h2 id=\"request-examples\">Request Examples</h2>\n<h3 id=\"raw-parameters-before-encryption-1\">Raw Parameters (Before Encryption)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>merchant_api_key=xxxxxxxxby9tUGdNbXI4U2o2Vml3dz09&amp;transaction_code=DP0001\n\n</code></pre><h3 id=\"encryption-example\">Encryption Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">$encrypted_key = encrypt_decrypt('encrypt', 'merchant_api_key=xxxxxxxxby9tUGdNbXI4U2o2Vml3dz09&amp;transaction_code=DP0001', '{your_api_key}', '{your_secret_key}');\n\n</code></pre>\n<h3 id=\"complete-request-example\">Complete Request Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>POST https://api.example.com/api/v1/MERCH001/transactions/status\nContent-Type: application/x-www-form-urlencoded\nkey=aHO52zIzSNR6wSQhSlS+9CSrEPWlEdsfKOL5YuWGSdPLny3Rgeo+KhglyFL2wgbO...\n\n</code></pre><h3 id=\"curl-example\">cURL Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl -X POST \"https://api.example.com/api/v1/MERCH001/transactions/status\" \\\n  -H \"Content-Type: application/x-www-form-urlencoded\" \\\n  -d \"key=aHO52zIzSNR6wSQhSlS+9CSrEPWlEdsfKOL5YuWGSdPLny3Rgeo+KhglyFL2wgbO...\"\n\n</code></pre>\n<hr />\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response\">Success Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"success\": true,\n  \"data\": [\n    {\n      \"transaction_no\": \"DP1678780607892\",\n      \"transaction_code\": \"TEST-DP-1678780607\",\n      \"amount\": \"500.00000000\",\n      \"transaction_fee\": \"15.00000000\",\n      \"transaction_ref\": null,\n      \"transaction_ref2\": null,\n      \"status\": \"pending\",\n      \"type\": \"deposit\",\n      \"note\": null,\n      \"method_name\": \"UPI 3\",\n      \"currency_name\": \"Indian Rupee\",\n      \"currency_code\": \"INR\",\n      \"datetime\": \"2023-03-14 15:56:47\"\n    }\n  ],\n  \"message\": \"request transaction list successful\"\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\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>success</code></td>\n<td>Boolean</td>\n<td>Request processing status</td>\n</tr>\n<tr>\n<td><code>data</code></td>\n<td>Array</td>\n<td>Array of transaction objects (typically contains one transaction)</td>\n</tr>\n<tr>\n<td><code>message</code></td>\n<td>String</td>\n<td>Response message describing the result</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"transaction-object-fields\">Transaction Object Fields</h3>\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>transaction_no</code></td>\n<td>String</td>\n<td>Provider's internal transaction reference number</td>\n</tr>\n<tr>\n<td><code>transaction_code</code></td>\n<td>String</td>\n<td>Original transaction code provided by merchant</td>\n</tr>\n<tr>\n<td><code>amount</code></td>\n<td>String</td>\n<td>Transaction amount with high precision</td>\n</tr>\n<tr>\n<td><code>transaction_fee</code></td>\n<td>String</td>\n<td>Processing fee charged for the transaction</td>\n</tr>\n<tr>\n<td><code>transaction_ref</code></td>\n<td>String/Null</td>\n<td>Additional reference information (if available)</td>\n</tr>\n<tr>\n<td><code>transaction_ref2</code></td>\n<td>String/Null</td>\n<td>Secondary reference information (if available)</td>\n</tr>\n<tr>\n<td><code>status</code></td>\n<td>String</td>\n<td>Current transaction status (see status codes)</td>\n</tr>\n<tr>\n<td><code>type</code></td>\n<td>String</td>\n<td>Transaction type: \"deposit\", \"payout\", \"withdrawal\"</td>\n</tr>\n<tr>\n<td><code>note</code></td>\n<td>String/Null</td>\n<td>Additional notes or comments about the transaction</td>\n</tr>\n<tr>\n<td><code>method_name</code></td>\n<td>String</td>\n<td>Payment method used for the transaction</td>\n</tr>\n<tr>\n<td><code>currency_name</code></td>\n<td>String</td>\n<td>Full name of the transaction currency</td>\n</tr>\n<tr>\n<td><code>currency_code</code></td>\n<td>String</td>\n<td>Three-letter ISO currency code</td>\n</tr>\n<tr>\n<td><code>datetime</code></td>\n<td>String</td>\n<td>Transaction creation timestamp (YYYY-MM-DD HH:MM:SS)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"error-response\">Error Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"success\": false,\n  \"error\": \"TRANSACTION_NOT_FOUND\",\n  \"message\": \"Transaction with code 'INVALID001' not found\",\n  \"code\": 404\n}\n\n</code></pre>\n","_postman_id":"34b97bf1-386a-45c8-9421-1690cd10d525"},{"name":"Balance","item":[{"name":"Get Balance","id":"800a77f1-283e-4eba-9676-f5e970bd763f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"key\": \"YOUR_ENCRYPTED_KEY\"\n}","options":{"raw":{"language":"json"}}},"url":"https://api.singhapayapi.com/api/v1/balance/YOUR_MERCHANT_CODE","description":"<p><strong>Get Balance</strong><br />Fetch the merchant balance.</p>\n<p><strong>URL</strong><br /><code>GET https://api.singhapayapi.com/api/v1/balance/YOUR_MERCHANT_CODE</code></p>\n<p><strong>Parameters</strong></p>\n<ul>\n<li><code>key</code> (required): Encrypted string containing <code>merchant_code</code>.</li>\n</ul>\n<p><strong>Response Example</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"currency_name\": \"India Rupee\",\n    \"currency_code\": \"INR\",\n    \"balance\": \"100000\",\n    \"frozen_balance\": \"1000\",\n    \"available_balance\": \"99000\"\n}\n\n</code></pre>\n","urlObject":{"path":["api","v1","balance","YOUR_MERCHANT_CODE"],"host":["https://api.singhapayapi.com"],"query":[],"variable":[]}},"response":[],"_postman_id":"800a77f1-283e-4eba-9676-f5e970bd763f"}],"id":"ccbd6f0c-1c3b-44d2-87ef-ec01e2a71f5f","description":"<p>This API endpoint allows merchants to check their account balance, including total balance, frozen balance, and available balance. The request requires encrypted merchant credentials for secure balance retrieval.</p>\n<h3 id=\"request-format\">Request Format</h3>\n<ul>\n<li><p><strong>Method</strong>: GET</p>\n</li>\n<li><p><strong>Content-Type</strong>: application/json</p>\n</li>\n<li><p><strong>Authentication</strong>: Encrypted merchant code parameter</p>\n</li>\n</ul>\n<h3 id=\"url-parameters\">URL Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>merchant_code</code></td>\n<td>String</td>\n<td><strong>Yes</strong></td>\n<td>Merchant identifier in the URL path</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"request-body-parameters\">Request Body Parameters</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th>Required</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>key</code></td>\n<td>String</td>\n<td><strong>Yes</strong></td>\n<td>Encrypted merchant code for authentication</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"raw-parameter-before-encryption\">Raw Parameter (Before Encryption)</h3>\n<p>The parameter that needs to be encrypted:</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Parameter</th>\n<th>Type</th>\n<th><strong>Required</strong></th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td><code>merchant_code</code></td>\n<td>String</td>\n<td>Yes</td>\n<td>The merchant code for balance inquiry</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"encryption-process\">Encryption Process</h3>\n<ol>\n<li><p><strong>Prepare Parameter</strong>: Create JSON object with merchant code</p>\n</li>\n<li><p><strong>Encrypt Data</strong>: Use the encryption function with your API credentials</p>\n</li>\n<li><p><strong>URL Encode</strong>: Ensure proper encoding for HTTP transmission</p>\n</li>\n</ol>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-php\">// Step 1: Prepare parameter\n$raw_data = json_encode([\"merchant_code\" =&gt; \"SKU211111111\"]);\n// Step 2: Encrypt\n$encrypted_key = encrypt_decrypt('encrypt', $raw_data, $your_api_key, $your_secret_key);\n// Step 3: URL encode\n$encoded_key = urlencode($encrypted_key);\n\n</code></pre>\n<hr />\n<h2 id=\"request-examples\">Request Examples</h2>\n<h3 id=\"raw-parameter-before-encryption-1\">Raw Parameter (Before Encryption)</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"merchant_code\": \"SKU211111111\"\n}\n\n</code></pre>\n<h3 id=\"curl-example\">cURL Example</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-bash\">curl -X GET \"https://api.singhapayapi.com/api/v1/balance/SKU211111111\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"key\": \"ev0FFVerPMdbrFcXYLIwkyuL/Y1v7/3GlKH46MJlNSI=\"\n  }'\n\n</code></pre>\n<hr />\n<h2 id=\"response-format\">Response Format</h2>\n<h3 id=\"success-response\">Success Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"currency_name\": \"India Rupee\",\n  \"currency_code\": \"INR\",\n  \"balance\": \"100000\",\n  \"frozen_balance\": \"1000\",\n  \"available_balance\": \"99000\"\n}\n\n</code></pre>\n<h3 id=\"response-fields\">Response Fields</h3>\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>currency_name</code></td>\n<td>String</td>\n<td>Full name of the account currency</td>\n</tr>\n<tr>\n<td><code>currency_code</code></td>\n<td>String</td>\n<td>Three-letter ISO currency code</td>\n</tr>\n<tr>\n<td><code>balance</code></td>\n<td>String</td>\n<td>Total account balance (including frozen funds)</td>\n</tr>\n<tr>\n<td><code>frozen_balance</code></td>\n<td>String</td>\n<td>Amount of funds currently frozen/reserved</td>\n</tr>\n<tr>\n<td><code>available_balance</code></td>\n<td>String</td>\n<td>Available balance for transactions (balance - frozen_balance)</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"error-response\">Error Response</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"success\": false,\n  \"error\": \"INVALID_MERCHANT_CODE\",\n  \"message\": \"Merchant code not found or invalid\",\n  \"code\": 404\n}\n\n</code></pre>\n","_postman_id":"ccbd6f0c-1c3b-44d2-87ef-ec01e2a71f5f"}],"event":[{"listen":"prerequest","script":{"id":"67d27aab-1590-4a1b-a419-b67c19a32053","type":"text/javascript","packages":{},"exec":[""]}},{"listen":"test","script":{"id":"92732875-8830-492f-8b98-72f239714f78","type":"text/javascript","packages":{},"exec":[""]}}],"variable":[{"key":"base_url","value":"https://api.singhapayapi.com"},{"key":"merchant_code","value":"YOUR_MERCHANT_CODE"},{"key":"api_key","value":"YOUR_API_KEY"},{"key":"secret_key","value":"YOUR_SECRET_KEY"},{"key":"key","value":"ENCRYPTED_KEY_STRING"}]}