{"_id":"556d8bd342dd610d00a3cfb8","user":"5547561a9a48800d00c6e483","version":"554757bb6184460d006fd8b7","createdAt":"2015-06-02T10:56:19.716Z","link_url":"","project":"554757ba6184460d006fd8b4","slug":"introduction","type":"basic","api":{"params":[],"results":{"codes":[]},"settings":"","url":"","auth":"required"},"excerpt":"A brief overview of Eko's services, applications and API stack for developers","hidden":false,"order":0,"link_external":false,"sync_unique":"","title":"Eko for Developers","__v":3,"body":"Welcome to Eko Developer Portal! \n\nEko has developed a varied stack of app, services, and APIs that enable you to:\n1. Process small value financial transactions via IMPS/NEFT\n2. Verify bank account details of a customer instantly\n3. Enable cash collection for third-party application via acceptance of Eko merchant's electronic value\n4. Enable biometric-based cash-out for customers via AePS (Aadhaar enabled Payment System)\n5. Enable third-party lending organizations to leverage Eko's network of merchants and customers to increase their loan portfolio\n6. Verification of PAN card for KYC\n\nThe Eko API is organized around REST.  JSON is returned by all API responses, including errors. We allow you to interact securely with our API from a client-side web application but you should never expose your secret API key in any public website's client-side code.","category":"556d8bab42dd610d00a3cfb6","githubsync":"","updates":[],"isReference":false,"next":{"description":"","pages":[]},"parentDoc":null,"childrenPages":[]}

Eko for Developers

A brief overview of Eko's services, applications and API stack for developers

Welcome to Eko Developer Portal! Eko has developed a varied stack of app, services, and APIs that enable you to: 1. Process small value financial transactions via IMPS/NEFT 2. Verify bank account details of a customer instantly 3. Enable cash collection for third-party application via acceptance of Eko merchant's electronic value 4. Enable biometric-based cash-out for customers via AePS (Aadhaar enabled Payment System) 5. Enable third-party lending organizations to leverage Eko's network of merchants and customers to increase their loan portfolio 6. Verification of PAN card for KYC The Eko API is organized around REST. JSON is returned by all API responses, including errors. We allow you to interact securely with our API from a client-side web application but you should never expose your secret API key in any public website's client-side code.
Welcome to Eko Developer Portal! Eko has developed a varied stack of app, services, and APIs that enable you to: 1. Process small value financial transactions via IMPS/NEFT 2. Verify bank account details of a customer instantly 3. Enable cash collection for third-party application via acceptance of Eko merchant's electronic value 4. Enable biometric-based cash-out for customers via AePS (Aadhaar enabled Payment System) 5. Enable third-party lending organizations to leverage Eko's network of merchants and customers to increase their loan portfolio 6. Verification of PAN card for KYC The Eko API is organized around REST. JSON is returned by all API responses, including errors. We allow you to interact securely with our API from a client-side web application but you should never expose your secret API key in any public website's client-side code.
{"_id":"556d942ae24c5a0d0070345b","excerpt":"API Security Protocol","hidden":false,"body":"All API requests must be authenticated with a *developer_key* in the request. Your API keys carry many privileges, so be sure to keep them secret! \n\nYou authenticate to the Eko API by providing your API key in the header of each request. \n[block:api-header]\n{\n  \"title\": \"How to generate developer_key?\"\n}\n[/block]\nDeveloper key will be shared after the following is done:\n1. Organization's KYC is completed on Eko's platform (visit https://connectalpha.eko.co.in/)\n2. Integration has been completed on UAT with signoff from Eko team\n3. For UAT, a dummy **developer_key** can be used from [platform credentials](https://developers.eko.in/docs/platform-credentials) section\n[block:api-header]\n{\n  \"title\": \"Security 2.0\"\n}\n[/block]\nTo ensure that compromise on one of the authentication i.e your **developer_key** never leads to any fraud, another solution has been provided which requires clients to send 2 more parameters for each API call:  \n1. secret-key\n2. secret-key-timestamp\n[block:api-header]\n{\n  \"title\": \"How to generate the secret-key?\"\n}\n[/block]\n1.   Encode key using base64 encoding technique\n\n2.   Generate current timestamp (in milliseconds since UNIX epoch), i.e. **secret-key-timestamp **(Check [currentmillis.com](https://currentmillis.com/) to understand the timestamp format)\n\n3.   Compute the signature by hashing salt and base64 encoded key using Hash-based message authentication code HMAC and SHA256\n\n4.   Encode the signature using base64 encoding technique and use this as **secret-key** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n\\n// Initializing key in some variable. You will receive this key from Eko via email\\n$key = \\\"...\\\";\\n\\n// Encode it using base64\\n$encodedKey = base64_encode($key);\\n\\n// Get current timestamp in milliseconds since UNIX epoch as STRING\\n// Check out https://currentmillis.com to understand the timestamp format\\n$secret_key_timestamp = \\\"\\\".round(microtime(true) * 1000);\\n\\n// Computes the signature by hashing the salt with the encoded key \\n$signature = hash_hmac('SHA256', $secret_key_timestamp, $encodedKey, true);\\n\\n// Encode it using base64\\n$secret_key = base64_encode($signature);\\n\\necho $secret_key;\\n\\n?>\",\n      \"language\": \"java\",\n      \"name\": \"Code Snippet to generate secret-key (PHP)\"\n    },\n    {\n      \"code\": \"import java.util.Base64;\\nimport java.util.Date;\\nimport javax.crypto.Mac;\\nimport javax.crypto.spec.SecretKeySpec;\\nimport java.security.InvalidKeyException;\\n\\npublic class SecretKeyExample \\n{\\n\\tpublic static void main(String[] args) \\n\\t{\\n\\t\\t// Initializing key in some variable. You will receive this key from Eko via email\\n\\t\\tString key = \\\"...\\\";\\n\\t\\tString secret_key=\\\"\\\",secret_key_timestamp=\\\"\\\";\\n\\t\\t// Encode it using base64\\n\\tString encodedKey = Base64.getEncoder().encodeToString(key.getBytes());\\n\\n\\t\\tDate date = new Date();\\n\\t\\tsecret_key_timestamp = Long.toString(date.getTime());\\n\\n\\t\\tMac sha256_HMAC;\\n\\n\\t\\tsha256_HMAC = Mac.getInstance(HMAC_SHA256);\\n\\n\\t\\tSecretKeySpec signature = new SecretKeySpec(encodedKey.getBytes(), HMAC_SHA256);\\n\\t\\ttry {\\n\\t\\t\\tsha256_HMAC.init(signature);\\n\\t\\t} catch (InvalidKeyException e) {\\n\\t\\t\\t// TODO Auto-generated catch block\\n\\t\\t\\te.printStackTrace();\\n\\t\\t}\\n\\n\\t\\t// Encode it using base64 to get secret-key\\n\\t\\tsecret_key =  Base64.getEncoder().encodeToString(sha256_HMAC.doFinal(secret_key_timestamp.getBytes())).trim();\\n\\t\\t\\n\\t\\tSystem.out.println(\\\"secret_key_timestamp : \\\"+secret_key_timestamp);\\n\\t\\tSystem.out.println(\\\"secret_key : \\\"+secret_key);\\n\\t}\\n}\",\n      \"language\": \"java\"\n    },\n    {\n      \"code\": \"using System;\\nusing System.Collections.Generic;\\nusing System.Linq;\\nusing System.Web;\\nusing System.Security.Cryptography;\\nusing System.Text;\\nusing System.Configuration;\\n\\nnamespace RechargePortal.Models\\n{\\n    public class SequrityKeys\\n    {\\n        public string secret_key { get; set; }\\n        public string secret_key_timestamp { get; set; }\\n    }\\n\\n    public class Eko\\n    {\\n        public string Unique_Order_No { get; set; }\\n        public string Secrect_Key { get; set; }\\n        public string secretKeyTimestamp { get; set; }\\n        public string HashKey { get; set; }\\n\\n        #region Get Security Key\\n        public static SequrityKeys GetSequrityKeys\\n        {\\n            get\\n            {\\n                SequrityKeys objSequrityKeys = new SequrityKeys();\\n\\n                // call GenerateSequrityKeys static mathod\\n                objSequrityKeys = GenerateSequrityKeys();\\n\\n                return objSequrityKeys;\\n            }\\n        }\\n        #endregion\\n\\n        \\n        #region Generate Security Key\\n        private static SequrityKeys GenerateSequrityKeys()\\n        {\\n            SequrityKeys sequrityKey = new SequrityKeys();\\n            sequrityKey.secret_key = \\\"\\\";\\n            sequrityKey.secret_key_timestamp = \\\"\\\";\\n\\n            try\\n            {\\n                string key = \\\"f74c50a1-f705-4634-9cda-30a477df91b7\\\"; // you can keep this in your configuration files\\n                var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(key);\\n                var encodedKey = System.Convert.ToBase64String(plainTextBytes);\\n                DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);\\n                long dateTimeInMilliseconds = (long)(DateTime.UtcNow - epoch).TotalMilliseconds;\\n          sequrityKey.secret_key_timestamp = dateTimeInMilliseconds.ToString();\\n\\n                sequrityKey.secret_key = CalcHMACSHA256Hash(dateTimeInMilliseconds.ToString(), encodedKey);\\n\\n            }\\n            catch (Exception ex)\\n            {\\n                // Write Exception handling code here....   \\n            }\\n\\n\\n            return sequrityKey;\\n        }\\n\\n\\n        public static string GenerateHash(string message,string timespan)\\n        {\\n            SequrityKeys sequrityKey = new SequrityKeys();\\n            sequrityKey.secret_key = \\\"\\\";\\n            sequrityKey.secret_key_timestamp = \\\"\\\";\\n            string hash = \\\"\\\";\\n            try\\n            {\\n                string key = ConfigurationManager.AppSettings[\\\"SecretKey\\\"];\\n                var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(key);\\n                var encodedKey = System.Convert.ToBase64String(plainTextBytes);\\n                hash= CalcHMACSHA256Hash(message, encodedKey);\\n\\n            }\\n            catch (Exception ex)\\n            {\\n                // Write Exception handling code here....   \\n            }\\n\\n\\n            return hash;\\n        }\\n        #endregion\\n\\n        #region Cal hash Mac Eko\\n        public static string CalcHMACSHA256Hash(string message, string secret)\\n        {\\n            try\\n            {\\n                secret = secret ?? \\\"\\\";\\n                var encoding = new System.Text.ASCIIEncoding();\\n                byte[] keyByte = encoding.GetBytes(secret);\\n                byte[] messageBytes = encoding.GetBytes(message);\\n                using (var hmacsha256 = new HMACSHA256(keyByte))\\n                {\\n                    byte[] hashmessage = hmacsha256.ComputeHash(messageBytes);\\n                    return Convert.ToBase64String(hashmessage);\\n                }\\n            }\\n            catch (Exception ex)\\n            {\\n                // write exception handling code here\\n                return \\\"\\\";\\n            }\\n\\n        }\\n\\n        #endregion\\n\\n    }\\n}\\n\\n // CALLING METHOD :\\n\\nEko ek = new Models.Eko();\\n\\n                ek.Unique_Order_No = Uniqurorderno.ToString();\\n\\n                SequrityKeys ks = Eko.GetSequrityKeys;\\n\\n                ek.Secrect_Key = ks.secret_key;\\n\\n                ek.secretKeyTimestamp = ks.secret_key_timestamp;\\n\\n \\n\\n                if (interactiontypeid == 221) // for money transfer\\n\\n                {\\n\\n                    string requsetHsh = ek.secretKeyTimestamp + bankMaster.CustomerID + bankMaster.recipientid + amount;\\n\\n                    ek.HashKey = Eko.GenerateHash(requsetHsh, ek.secretKeyTimestamp);\\n\\n                }\\n\\n                else if (interactiontypeid == 149) // for bank addd\\n\\n                {\\n\\n                    string requsetHsh = ek.secretKeyTimestamp;\\n\\n                    ek.HashKey = Eko.GenerateHash(requsetHsh, ek.secretKeyTimestamp);\\n\\n                }\",\n      \"language\": \"csharp\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"How to generate the request-hash ?\"\n}\n[/block]\n**This is only for the API widget users.**\nSteps are mostly the same as above (for generating secret-key)\n1.   Encode key using base64 encoding technique\n2.   Use the same timestamp (secret-key-timestamp) that you generated in the previous step\n3.   Generate the salt by attaching (concatenating) the important request parameter values to the secret-key-timestamp. The parameters and their order will be defined by us for each type of transaction:\n        * For Money Transfer: secret-key-timestamp + customer_id + recipient_id + amount\n4.   Compute the signature by hashing salt and base64 encoded key using Hash-based message authentication code HMAC and SHA256\n5.   Encode the signature using base64 encoding technique and use this as **request-hash** \n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"The key will be provided to you by Eko via email.\\n\\n**Sample key**\\n\\n***key = f74c50a1-f705-4634-9cda-30a477df91b7***\",\n  \"title\": \"How will you get the key for generating secret-key & request-hash?\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"If you are using .NET, you should not send overly specific time stamps, due to differing interpretations of how extra time precision should be dropped. To avoid overly specific time stamps, manually construct dateTime objects with no more than millisecond precision.\",\n  \"title\": \"Note\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Important Note :\",\n  \"body\": \"Only IP which is in India will be whitelisted while going on the production mode. IP which is present outside India will not be whitelisted.\"\n}\n[/block]","githubsync":"","link_url":"","slug":"authentication","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"createdAt":"2015-06-02T11:31:54.967Z","project":"554757ba6184460d006fd8b4","sync_unique":"","type":"basic","user":"5547561a9a48800d00c6e483","version":"554757bb6184460d006fd8b7","__v":2,"category":"556d8bab42dd610d00a3cfb6","title":"Authentication","updates":[],"link_external":false,"order":1,"isReference":false,"next":{"description":"","pages":[]},"parentDoc":null,"childrenPages":[]}

Authentication

API Security Protocol

All API requests must be authenticated with a *developer_key* in the request. Your API keys carry many privileges, so be sure to keep them secret! You authenticate to the Eko API by providing your API key in the header of each request. [block:api-header] { "title": "How to generate developer_key?" } [/block] Developer key will be shared after the following is done: 1. Organization's KYC is completed on Eko's platform (visit https://connectalpha.eko.co.in/) 2. Integration has been completed on UAT with signoff from Eko team 3. For UAT, a dummy **developer_key** can be used from [platform credentials](https://developers.eko.in/docs/platform-credentials) section [block:api-header] { "title": "Security 2.0" } [/block] To ensure that compromise on one of the authentication i.e your **developer_key** never leads to any fraud, another solution has been provided which requires clients to send 2 more parameters for each API call: 1. secret-key 2. secret-key-timestamp [block:api-header] { "title": "How to generate the secret-key?" } [/block] 1. Encode key using base64 encoding technique 2. Generate current timestamp (in milliseconds since UNIX epoch), i.e. **secret-key-timestamp **(Check [currentmillis.com](https://currentmillis.com/) to understand the timestamp format) 3. Compute the signature by hashing salt and base64 encoded key using Hash-based message authentication code HMAC and SHA256 4. Encode the signature using base64 encoding technique and use this as **secret-key** [block:code] { "codes": [ { "code": "<?php\n\n// Initializing key in some variable. You will receive this key from Eko via email\n$key = \"...\";\n\n// Encode it using base64\n$encodedKey = base64_encode($key);\n\n// Get current timestamp in milliseconds since UNIX epoch as STRING\n// Check out https://currentmillis.com to understand the timestamp format\n$secret_key_timestamp = \"\".round(microtime(true) * 1000);\n\n// Computes the signature by hashing the salt with the encoded key \n$signature = hash_hmac('SHA256', $secret_key_timestamp, $encodedKey, true);\n\n// Encode it using base64\n$secret_key = base64_encode($signature);\n\necho $secret_key;\n\n?>", "language": "java", "name": "Code Snippet to generate secret-key (PHP)" }, { "code": "import java.util.Base64;\nimport java.util.Date;\nimport javax.crypto.Mac;\nimport javax.crypto.spec.SecretKeySpec;\nimport java.security.InvalidKeyException;\n\npublic class SecretKeyExample \n{\n\tpublic static void main(String[] args) \n\t{\n\t\t// Initializing key in some variable. You will receive this key from Eko via email\n\t\tString key = \"...\";\n\t\tString secret_key=\"\",secret_key_timestamp=\"\";\n\t\t// Encode it using base64\n\tString encodedKey = Base64.getEncoder().encodeToString(key.getBytes());\n\n\t\tDate date = new Date();\n\t\tsecret_key_timestamp = Long.toString(date.getTime());\n\n\t\tMac sha256_HMAC;\n\n\t\tsha256_HMAC = Mac.getInstance(HMAC_SHA256);\n\n\t\tSecretKeySpec signature = new SecretKeySpec(encodedKey.getBytes(), HMAC_SHA256);\n\t\ttry {\n\t\t\tsha256_HMAC.init(signature);\n\t\t} catch (InvalidKeyException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Encode it using base64 to get secret-key\n\t\tsecret_key = Base64.getEncoder().encodeToString(sha256_HMAC.doFinal(secret_key_timestamp.getBytes())).trim();\n\t\t\n\t\tSystem.out.println(\"secret_key_timestamp : \"+secret_key_timestamp);\n\t\tSystem.out.println(\"secret_key : \"+secret_key);\n\t}\n}", "language": "java" }, { "code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\nusing System.Security.Cryptography;\nusing System.Text;\nusing System.Configuration;\n\nnamespace RechargePortal.Models\n{\n public class SequrityKeys\n {\n public string secret_key { get; set; }\n public string secret_key_timestamp { get; set; }\n }\n\n public class Eko\n {\n public string Unique_Order_No { get; set; }\n public string Secrect_Key { get; set; }\n public string secretKeyTimestamp { get; set; }\n public string HashKey { get; set; }\n\n #region Get Security Key\n public static SequrityKeys GetSequrityKeys\n {\n get\n {\n SequrityKeys objSequrityKeys = new SequrityKeys();\n\n // call GenerateSequrityKeys static mathod\n objSequrityKeys = GenerateSequrityKeys();\n\n return objSequrityKeys;\n }\n }\n #endregion\n\n \n #region Generate Security Key\n private static SequrityKeys GenerateSequrityKeys()\n {\n SequrityKeys sequrityKey = new SequrityKeys();\n sequrityKey.secret_key = \"\";\n sequrityKey.secret_key_timestamp = \"\";\n\n try\n {\n string key = \"f74c50a1-f705-4634-9cda-30a477df91b7\"; // you can keep this in your configuration files\n var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(key);\n var encodedKey = System.Convert.ToBase64String(plainTextBytes);\n DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);\n long dateTimeInMilliseconds = (long)(DateTime.UtcNow - epoch).TotalMilliseconds;\n sequrityKey.secret_key_timestamp = dateTimeInMilliseconds.ToString();\n\n sequrityKey.secret_key = CalcHMACSHA256Hash(dateTimeInMilliseconds.ToString(), encodedKey);\n\n }\n catch (Exception ex)\n {\n // Write Exception handling code here.... \n }\n\n\n return sequrityKey;\n }\n\n\n public static string GenerateHash(string message,string timespan)\n {\n SequrityKeys sequrityKey = new SequrityKeys();\n sequrityKey.secret_key = \"\";\n sequrityKey.secret_key_timestamp = \"\";\n string hash = \"\";\n try\n {\n string key = ConfigurationManager.AppSettings[\"SecretKey\"];\n var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(key);\n var encodedKey = System.Convert.ToBase64String(plainTextBytes);\n hash= CalcHMACSHA256Hash(message, encodedKey);\n\n }\n catch (Exception ex)\n {\n // Write Exception handling code here.... \n }\n\n\n return hash;\n }\n #endregion\n\n #region Cal hash Mac Eko\n public static string CalcHMACSHA256Hash(string message, string secret)\n {\n try\n {\n secret = secret ?? \"\";\n var encoding = new System.Text.ASCIIEncoding();\n byte[] keyByte = encoding.GetBytes(secret);\n byte[] messageBytes = encoding.GetBytes(message);\n using (var hmacsha256 = new HMACSHA256(keyByte))\n {\n byte[] hashmessage = hmacsha256.ComputeHash(messageBytes);\n return Convert.ToBase64String(hashmessage);\n }\n }\n catch (Exception ex)\n {\n // write exception handling code here\n return \"\";\n }\n\n }\n\n #endregion\n\n }\n}\n\n // CALLING METHOD :\n\nEko ek = new Models.Eko();\n\n ek.Unique_Order_No = Uniqurorderno.ToString();\n\n SequrityKeys ks = Eko.GetSequrityKeys;\n\n ek.Secrect_Key = ks.secret_key;\n\n ek.secretKeyTimestamp = ks.secret_key_timestamp;\n\n \n\n if (interactiontypeid == 221) // for money transfer\n\n {\n\n string requsetHsh = ek.secretKeyTimestamp + bankMaster.CustomerID + bankMaster.recipientid + amount;\n\n ek.HashKey = Eko.GenerateHash(requsetHsh, ek.secretKeyTimestamp);\n\n }\n\n else if (interactiontypeid == 149) // for bank addd\n\n {\n\n string requsetHsh = ek.secretKeyTimestamp;\n\n ek.HashKey = Eko.GenerateHash(requsetHsh, ek.secretKeyTimestamp);\n\n }", "language": "csharp" } ] } [/block] [block:api-header] { "title": "How to generate the request-hash ?" } [/block] **This is only for the API widget users.** Steps are mostly the same as above (for generating secret-key) 1. Encode key using base64 encoding technique 2. Use the same timestamp (secret-key-timestamp) that you generated in the previous step 3. Generate the salt by attaching (concatenating) the important request parameter values to the secret-key-timestamp. The parameters and their order will be defined by us for each type of transaction: * For Money Transfer: secret-key-timestamp + customer_id + recipient_id + amount 4. Compute the signature by hashing salt and base64 encoded key using Hash-based message authentication code HMAC and SHA256 5. Encode the signature using base64 encoding technique and use this as **request-hash** [block:callout] { "type": "info", "body": "The key will be provided to you by Eko via email.\n\n**Sample key**\n\n***key = f74c50a1-f705-4634-9cda-30a477df91b7***", "title": "How will you get the key for generating secret-key & request-hash?" } [/block] [block:callout] { "type": "danger", "body": "If you are using .NET, you should not send overly specific time stamps, due to differing interpretations of how extra time precision should be dropped. To avoid overly specific time stamps, manually construct dateTime objects with no more than millisecond precision.", "title": "Note" } [/block] [block:callout] { "type": "danger", "title": "Important Note :", "body": "Only IP which is in India will be whitelisted while going on the production mode. IP which is present outside India will not be whitelisted." } [/block]
All API requests must be authenticated with a *developer_key* in the request. Your API keys carry many privileges, so be sure to keep them secret! You authenticate to the Eko API by providing your API key in the header of each request. [block:api-header] { "title": "How to generate developer_key?" } [/block] Developer key will be shared after the following is done: 1. Organization's KYC is completed on Eko's platform (visit https://connectalpha.eko.co.in/) 2. Integration has been completed on UAT with signoff from Eko team 3. For UAT, a dummy **developer_key** can be used from [platform credentials](https://developers.eko.in/docs/platform-credentials) section [block:api-header] { "title": "Security 2.0" } [/block] To ensure that compromise on one of the authentication i.e your **developer_key** never leads to any fraud, another solution has been provided which requires clients to send 2 more parameters for each API call: 1. secret-key 2. secret-key-timestamp [block:api-header] { "title": "How to generate the secret-key?" } [/block] 1. Encode key using base64 encoding technique 2. Generate current timestamp (in milliseconds since UNIX epoch), i.e. **secret-key-timestamp **(Check [currentmillis.com](https://currentmillis.com/) to understand the timestamp format) 3. Compute the signature by hashing salt and base64 encoded key using Hash-based message authentication code HMAC and SHA256 4. Encode the signature using base64 encoding technique and use this as **secret-key** [block:code] { "codes": [ { "code": "<?php\n\n// Initializing key in some variable. You will receive this key from Eko via email\n$key = \"...\";\n\n// Encode it using base64\n$encodedKey = base64_encode($key);\n\n// Get current timestamp in milliseconds since UNIX epoch as STRING\n// Check out https://currentmillis.com to understand the timestamp format\n$secret_key_timestamp = \"\".round(microtime(true) * 1000);\n\n// Computes the signature by hashing the salt with the encoded key \n$signature = hash_hmac('SHA256', $secret_key_timestamp, $encodedKey, true);\n\n// Encode it using base64\n$secret_key = base64_encode($signature);\n\necho $secret_key;\n\n?>", "language": "java", "name": "Code Snippet to generate secret-key (PHP)" }, { "code": "import java.util.Base64;\nimport java.util.Date;\nimport javax.crypto.Mac;\nimport javax.crypto.spec.SecretKeySpec;\nimport java.security.InvalidKeyException;\n\npublic class SecretKeyExample \n{\n\tpublic static void main(String[] args) \n\t{\n\t\t// Initializing key in some variable. You will receive this key from Eko via email\n\t\tString key = \"...\";\n\t\tString secret_key=\"\",secret_key_timestamp=\"\";\n\t\t// Encode it using base64\n\tString encodedKey = Base64.getEncoder().encodeToString(key.getBytes());\n\n\t\tDate date = new Date();\n\t\tsecret_key_timestamp = Long.toString(date.getTime());\n\n\t\tMac sha256_HMAC;\n\n\t\tsha256_HMAC = Mac.getInstance(HMAC_SHA256);\n\n\t\tSecretKeySpec signature = new SecretKeySpec(encodedKey.getBytes(), HMAC_SHA256);\n\t\ttry {\n\t\t\tsha256_HMAC.init(signature);\n\t\t} catch (InvalidKeyException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Encode it using base64 to get secret-key\n\t\tsecret_key = Base64.getEncoder().encodeToString(sha256_HMAC.doFinal(secret_key_timestamp.getBytes())).trim();\n\t\t\n\t\tSystem.out.println(\"secret_key_timestamp : \"+secret_key_timestamp);\n\t\tSystem.out.println(\"secret_key : \"+secret_key);\n\t}\n}", "language": "java" }, { "code": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Web;\nusing System.Security.Cryptography;\nusing System.Text;\nusing System.Configuration;\n\nnamespace RechargePortal.Models\n{\n public class SequrityKeys\n {\n public string secret_key { get; set; }\n public string secret_key_timestamp { get; set; }\n }\n\n public class Eko\n {\n public string Unique_Order_No { get; set; }\n public string Secrect_Key { get; set; }\n public string secretKeyTimestamp { get; set; }\n public string HashKey { get; set; }\n\n #region Get Security Key\n public static SequrityKeys GetSequrityKeys\n {\n get\n {\n SequrityKeys objSequrityKeys = new SequrityKeys();\n\n // call GenerateSequrityKeys static mathod\n objSequrityKeys = GenerateSequrityKeys();\n\n return objSequrityKeys;\n }\n }\n #endregion\n\n \n #region Generate Security Key\n private static SequrityKeys GenerateSequrityKeys()\n {\n SequrityKeys sequrityKey = new SequrityKeys();\n sequrityKey.secret_key = \"\";\n sequrityKey.secret_key_timestamp = \"\";\n\n try\n {\n string key = \"f74c50a1-f705-4634-9cda-30a477df91b7\"; // you can keep this in your configuration files\n var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(key);\n var encodedKey = System.Convert.ToBase64String(plainTextBytes);\n DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);\n long dateTimeInMilliseconds = (long)(DateTime.UtcNow - epoch).TotalMilliseconds;\n sequrityKey.secret_key_timestamp = dateTimeInMilliseconds.ToString();\n\n sequrityKey.secret_key = CalcHMACSHA256Hash(dateTimeInMilliseconds.ToString(), encodedKey);\n\n }\n catch (Exception ex)\n {\n // Write Exception handling code here.... \n }\n\n\n return sequrityKey;\n }\n\n\n public static string GenerateHash(string message,string timespan)\n {\n SequrityKeys sequrityKey = new SequrityKeys();\n sequrityKey.secret_key = \"\";\n sequrityKey.secret_key_timestamp = \"\";\n string hash = \"\";\n try\n {\n string key = ConfigurationManager.AppSettings[\"SecretKey\"];\n var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(key);\n var encodedKey = System.Convert.ToBase64String(plainTextBytes);\n hash= CalcHMACSHA256Hash(message, encodedKey);\n\n }\n catch (Exception ex)\n {\n // Write Exception handling code here.... \n }\n\n\n return hash;\n }\n #endregion\n\n #region Cal hash Mac Eko\n public static string CalcHMACSHA256Hash(string message, string secret)\n {\n try\n {\n secret = secret ?? \"\";\n var encoding = new System.Text.ASCIIEncoding();\n byte[] keyByte = encoding.GetBytes(secret);\n byte[] messageBytes = encoding.GetBytes(message);\n using (var hmacsha256 = new HMACSHA256(keyByte))\n {\n byte[] hashmessage = hmacsha256.ComputeHash(messageBytes);\n return Convert.ToBase64String(hashmessage);\n }\n }\n catch (Exception ex)\n {\n // write exception handling code here\n return \"\";\n }\n\n }\n\n #endregion\n\n }\n}\n\n // CALLING METHOD :\n\nEko ek = new Models.Eko();\n\n ek.Unique_Order_No = Uniqurorderno.ToString();\n\n SequrityKeys ks = Eko.GetSequrityKeys;\n\n ek.Secrect_Key = ks.secret_key;\n\n ek.secretKeyTimestamp = ks.secret_key_timestamp;\n\n \n\n if (interactiontypeid == 221) // for money transfer\n\n {\n\n string requsetHsh = ek.secretKeyTimestamp + bankMaster.CustomerID + bankMaster.recipientid + amount;\n\n ek.HashKey = Eko.GenerateHash(requsetHsh, ek.secretKeyTimestamp);\n\n }\n\n else if (interactiontypeid == 149) // for bank addd\n\n {\n\n string requsetHsh = ek.secretKeyTimestamp;\n\n ek.HashKey = Eko.GenerateHash(requsetHsh, ek.secretKeyTimestamp);\n\n }", "language": "csharp" } ] } [/block] [block:api-header] { "title": "How to generate the request-hash ?" } [/block] **This is only for the API widget users.** Steps are mostly the same as above (for generating secret-key) 1. Encode key using base64 encoding technique 2. Use the same timestamp (secret-key-timestamp) that you generated in the previous step 3. Generate the salt by attaching (concatenating) the important request parameter values to the secret-key-timestamp. The parameters and their order will be defined by us for each type of transaction: * For Money Transfer: secret-key-timestamp + customer_id + recipient_id + amount 4. Compute the signature by hashing salt and base64 encoded key using Hash-based message authentication code HMAC and SHA256 5. Encode the signature using base64 encoding technique and use this as **request-hash** [block:callout] { "type": "info", "body": "The key will be provided to you by Eko via email.\n\n**Sample key**\n\n***key = f74c50a1-f705-4634-9cda-30a477df91b7***", "title": "How will you get the key for generating secret-key & request-hash?" } [/block] [block:callout] { "type": "danger", "body": "If you are using .NET, you should not send overly specific time stamps, due to differing interpretations of how extra time precision should be dropped. To avoid overly specific time stamps, manually construct dateTime objects with no more than millisecond precision.", "title": "Note" } [/block] [block:callout] { "type": "danger", "title": "Important Note :", "body": "Only IP which is in India will be whitelisted while going on the production mode. IP which is present outside India will not be whitelisted." } [/block]
{"_id":"5a703cdd26bd90005ba5ae48","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d8bab42dd610d00a3cfb6","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-01-30T09:37:33.516Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"Eko's API allows you to:\n1. Create a customer \n2. Enquire about customer profile\n3. Add entity, like recipient bank account, to a customer profile\n4. Process financial transactions on behalf of customers via IMPS/NEFT\n5. Enable third-party lending organizations to provide a working capital loan to Eko's network of merchants, distributors, channel partners and customers\n6. Collect repayment of loans\n7. Enable verification of bank account details \n8. Enable sale of third-party products/services via Eko merchant network\n9. Verify your customers/merchants via eKYC\n10. Process biometric-based cash-out transactions via AePS (Aadhaar enabled payment system)\n11. Verify your customer's PAN card for KYC [(refer here)](https://developers.eko.in/v1.0/docs/pan-verification) \n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Limits\",\n  \"body\": \"IMPS/NEFT limit is:\\n1. Rs 5,000 per sender per transaction \\n2. Rs 25,000 per sender per month\\n\\nIn case of Indo-Nepal remittance, the limit is:\\n1. Rs 50k per sender per transaction \\n2. Rs 6 lakh per sender per year \\n3. 12 transactions per customer per year\\n\\nLimits for AePS transaction:\\n1. Upto Rs. 10,000 per transaction\\n2. Number of transactions per Aadhaar per day: 5\"\n}\n[/block]","excerpt":"Set of transactions supported by Eko APIs","slug":"api-transactions","type":"basic","title":"Transactions","__v":0,"parentDoc":null,"childrenPages":[]}

Transactions

Set of transactions supported by Eko APIs

Eko's API allows you to: 1. Create a customer 2. Enquire about customer profile 3. Add entity, like recipient bank account, to a customer profile 4. Process financial transactions on behalf of customers via IMPS/NEFT 5. Enable third-party lending organizations to provide a working capital loan to Eko's network of merchants, distributors, channel partners and customers 6. Collect repayment of loans 7. Enable verification of bank account details 8. Enable sale of third-party products/services via Eko merchant network 9. Verify your customers/merchants via eKYC 10. Process biometric-based cash-out transactions via AePS (Aadhaar enabled payment system) 11. Verify your customer's PAN card for KYC [(refer here)](https://developers.eko.in/v1.0/docs/pan-verification) [block:callout] { "type": "info", "title": "Limits", "body": "IMPS/NEFT limit is:\n1. Rs 5,000 per sender per transaction \n2. Rs 25,000 per sender per month\n\nIn case of Indo-Nepal remittance, the limit is:\n1. Rs 50k per sender per transaction \n2. Rs 6 lakh per sender per year \n3. 12 transactions per customer per year\n\nLimits for AePS transaction:\n1. Upto Rs. 10,000 per transaction\n2. Number of transactions per Aadhaar per day: 5" } [/block]
Eko's API allows you to: 1. Create a customer 2. Enquire about customer profile 3. Add entity, like recipient bank account, to a customer profile 4. Process financial transactions on behalf of customers via IMPS/NEFT 5. Enable third-party lending organizations to provide a working capital loan to Eko's network of merchants, distributors, channel partners and customers 6. Collect repayment of loans 7. Enable verification of bank account details 8. Enable sale of third-party products/services via Eko merchant network 9. Verify your customers/merchants via eKYC 10. Process biometric-based cash-out transactions via AePS (Aadhaar enabled payment system) 11. Verify your customer's PAN card for KYC [(refer here)](https://developers.eko.in/v1.0/docs/pan-verification) [block:callout] { "type": "info", "title": "Limits", "body": "IMPS/NEFT limit is:\n1. Rs 5,000 per sender per transaction \n2. Rs 25,000 per sender per month\n\nIn case of Indo-Nepal remittance, the limit is:\n1. Rs 50k per sender per transaction \n2. Rs 6 lakh per sender per year \n3. 12 transactions per customer per year\n\nLimits for AePS transaction:\n1. Upto Rs. 10,000 per transaction\n2. Number of transactions per Aadhaar per day: 5" } [/block]
{"_id":"5aa52e37bb43ec00125299ce","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d8bab42dd610d00a3cfb6","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-03-11T13:25:11.933Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"Eko platform services can be used in the following 2 ways:\n\n1. **Connect Widget**\n  * This is a ready-to-use widget that can be easily embedded in your application\n  * All APIs, apart from inquiry, are already integrated into this widget; transaction inquiry needs to be developed separately\n  * This will enable you to start your services very quickly\n  * Integrates well with your own website interface and looks completely a part of it\n  * You may also use the widget to understand end-to-end transaction flows and the associated API calls.\n\n2. **Eko Gateway**\n  * Another fast method to add features in your web application\n  * All secure products ( AePS) are provided as a Gateway\n\n3. **Eko APIs** \n  * This will enable customization of UI/UX (User Interface/User Experience) on your application\n  * You will have to develop all flows regarding customer registration, recipient registration, transaction, refund and inquiry","excerpt":"Ways to use Eko APIs in your own application or website","slug":"how-to-integrate","type":"basic","title":"How to Use Eko Platform?","__v":0,"parentDoc":null,"childrenPages":[]}

How to Use Eko Platform?

Ways to use Eko APIs in your own application or website

Eko platform services can be used in the following 2 ways: 1. **Connect Widget** * This is a ready-to-use widget that can be easily embedded in your application * All APIs, apart from inquiry, are already integrated into this widget; transaction inquiry needs to be developed separately * This will enable you to start your services very quickly * Integrates well with your own website interface and looks completely a part of it * You may also use the widget to understand end-to-end transaction flows and the associated API calls. 2. **Eko Gateway** * Another fast method to add features in your web application * All secure products ( AePS) are provided as a Gateway 3. **Eko APIs** * This will enable customization of UI/UX (User Interface/User Experience) on your application * You will have to develop all flows regarding customer registration, recipient registration, transaction, refund and inquiry
Eko platform services can be used in the following 2 ways: 1. **Connect Widget** * This is a ready-to-use widget that can be easily embedded in your application * All APIs, apart from inquiry, are already integrated into this widget; transaction inquiry needs to be developed separately * This will enable you to start your services very quickly * Integrates well with your own website interface and looks completely a part of it * You may also use the widget to understand end-to-end transaction flows and the associated API calls. 2. **Eko Gateway** * Another fast method to add features in your web application * All secure products ( AePS) are provided as a Gateway 3. **Eko APIs** * This will enable customization of UI/UX (User Interface/User Experience) on your application * You will have to develop all flows regarding customer registration, recipient registration, transaction, refund and inquiry
{"_id":"5aa54f5cd3a6f3001ea4f217","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d8bab42dd610d00a3cfb6","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-03-11T15:46:36.868Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"Any financial transaction has the following flow:\n1. CUSTOMER ENQUIRY\nFor an existing customer, an inquiry can be made to check if a customer with a mobile number exists or not on the platform. If the customer does not exist then the customer needs to be created\n\n2. CUSTOMER CREATION\nA customer is created with a mobile number and name. The mobile number needs to be verified via OTP or by doing a missed call to a defined number. \n\n3. FETCHING LIST OF RECIPIENTS\nFor an existing customer, the list of recipients can be fetched for a customer\n\n4. RECIPIENT ADDITION\nFor transferring money to a bank account, a recipient (bank account) needs to be added to a customer profile. The bank account number can be verified by returning the name of the beneficiary bank account. This functionality also needs to be developed for an existing customer who wants to add a new bank account\n\n5. TRANSACTION\nA transaction can be initiated into a bank account via IMPS/NEFT for a customer.\n\n6. REFUND\nFor a cash to digital transaction, if the transaction fails then the customer can take refund via OTP\n\n7. TRANSACTION ENQUIRY\nFor a transaction which is in pending state, an inquiry can be made on the system to check the current status of the transaction using Eko transaction id or client's unique reference id.\n\nCheck out the flows for a remittance transaction below:\n[block:embed]\n{\n  \"html\": false,\n  \"url\": \"https://drive.google.com/file/d/19VQfa_a8ZWJd5ZOMh5Ye2lrmApGLi6aO/view?usp=drive_web\",\n  \"title\": \"Remittance user flow - New customer.pdf\",\n  \"favicon\": \"https://ssl.gstatic.com/docs/doclist/images/icon_14_pdf_favicon.ico\",\n  \"image\": \"https://lh3.googleusercontent.com/4Mtsk6kIBlwWci_jgKgw6cNDwj8no51iXqaGDfI4wrghEf-6WJ-XT5EJPWA=w1200-h630-p\"\n}\n[/block]\n\n[block:embed]\n{\n  \"html\": false,\n  \"url\": \"https://drive.google.com/file/d/1uiD5a_a2A5bGx-Pz7QfTwJDVpCx1aCiW/view?usp=drive_web\",\n  \"title\": \"Remittance user flow - Repeat Customer.pdf\",\n  \"favicon\": \"https://ssl.gstatic.com/docs/doclist/images/icon_14_pdf_favicon.ico\",\n  \"image\": \"https://lh6.googleusercontent.com/YtIYcPSx8h2VMQ1EzQqqq2KAL7sXqBBzDVE5mOxhCqE0RR-wehTa4pMp3D0=w1200-h630-p\"\n}\n[/block]\nThe following excel sheet lists all the APIs that need to be covered for money transfer transaction. The filled excel sheet will be required by Eko team to approve the flows.\n[block:embed]\n{\n  \"html\": false,\n  \"url\": \"https://drive.google.com/file/d/1c0dLV7Zhx0DrvnbkCDBT4LDWfJx2Xh2J/view?usp=drive_web\",\n  \"title\": \"API Test Plan.xlsx\",\n  \"favicon\": \"https://ssl.gstatic.com/docs/doclist/images/icon_14_excel_favicon.ico\",\n  \"image\": \"https://lh3.googleusercontent.com/GovocCSgh6HkIdoy1jL8tis3MmrRH7_30xYDxVCoaHUMQpvSrKu9ywSoIdg=w1200-h630-p\"\n}\n[/block]\nThe flow can be referred here as well: http://blog.eko.co.in/enable-remittance-services-using-eko-apis/","excerpt":"Describes the transaction flow for a money transfer transaction","slug":"payment-flow","type":"basic","title":"Payment Flow","__v":0,"parentDoc":null,"childrenPages":[]}

Payment Flow

Describes the transaction flow for a money transfer transaction

Any financial transaction has the following flow: 1. CUSTOMER ENQUIRY For an existing customer, an inquiry can be made to check if a customer with a mobile number exists or not on the platform. If the customer does not exist then the customer needs to be created 2. CUSTOMER CREATION A customer is created with a mobile number and name. The mobile number needs to be verified via OTP or by doing a missed call to a defined number. 3. FETCHING LIST OF RECIPIENTS For an existing customer, the list of recipients can be fetched for a customer 4. RECIPIENT ADDITION For transferring money to a bank account, a recipient (bank account) needs to be added to a customer profile. The bank account number can be verified by returning the name of the beneficiary bank account. This functionality also needs to be developed for an existing customer who wants to add a new bank account 5. TRANSACTION A transaction can be initiated into a bank account via IMPS/NEFT for a customer. 6. REFUND For a cash to digital transaction, if the transaction fails then the customer can take refund via OTP 7. TRANSACTION ENQUIRY For a transaction which is in pending state, an inquiry can be made on the system to check the current status of the transaction using Eko transaction id or client's unique reference id. Check out the flows for a remittance transaction below: [block:embed] { "html": false, "url": "https://drive.google.com/file/d/19VQfa_a8ZWJd5ZOMh5Ye2lrmApGLi6aO/view?usp=drive_web", "title": "Remittance user flow - New customer.pdf", "favicon": "https://ssl.gstatic.com/docs/doclist/images/icon_14_pdf_favicon.ico", "image": "https://lh3.googleusercontent.com/4Mtsk6kIBlwWci_jgKgw6cNDwj8no51iXqaGDfI4wrghEf-6WJ-XT5EJPWA=w1200-h630-p" } [/block] [block:embed] { "html": false, "url": "https://drive.google.com/file/d/1uiD5a_a2A5bGx-Pz7QfTwJDVpCx1aCiW/view?usp=drive_web", "title": "Remittance user flow - Repeat Customer.pdf", "favicon": "https://ssl.gstatic.com/docs/doclist/images/icon_14_pdf_favicon.ico", "image": "https://lh6.googleusercontent.com/YtIYcPSx8h2VMQ1EzQqqq2KAL7sXqBBzDVE5mOxhCqE0RR-wehTa4pMp3D0=w1200-h630-p" } [/block] The following excel sheet lists all the APIs that need to be covered for money transfer transaction. The filled excel sheet will be required by Eko team to approve the flows. [block:embed] { "html": false, "url": "https://drive.google.com/file/d/1c0dLV7Zhx0DrvnbkCDBT4LDWfJx2Xh2J/view?usp=drive_web", "title": "API Test Plan.xlsx", "favicon": "https://ssl.gstatic.com/docs/doclist/images/icon_14_excel_favicon.ico", "image": "https://lh3.googleusercontent.com/GovocCSgh6HkIdoy1jL8tis3MmrRH7_30xYDxVCoaHUMQpvSrKu9ywSoIdg=w1200-h630-p" } [/block] The flow can be referred here as well: http://blog.eko.co.in/enable-remittance-services-using-eko-apis/
Any financial transaction has the following flow: 1. CUSTOMER ENQUIRY For an existing customer, an inquiry can be made to check if a customer with a mobile number exists or not on the platform. If the customer does not exist then the customer needs to be created 2. CUSTOMER CREATION A customer is created with a mobile number and name. The mobile number needs to be verified via OTP or by doing a missed call to a defined number. 3. FETCHING LIST OF RECIPIENTS For an existing customer, the list of recipients can be fetched for a customer 4. RECIPIENT ADDITION For transferring money to a bank account, a recipient (bank account) needs to be added to a customer profile. The bank account number can be verified by returning the name of the beneficiary bank account. This functionality also needs to be developed for an existing customer who wants to add a new bank account 5. TRANSACTION A transaction can be initiated into a bank account via IMPS/NEFT for a customer. 6. REFUND For a cash to digital transaction, if the transaction fails then the customer can take refund via OTP 7. TRANSACTION ENQUIRY For a transaction which is in pending state, an inquiry can be made on the system to check the current status of the transaction using Eko transaction id or client's unique reference id. Check out the flows for a remittance transaction below: [block:embed] { "html": false, "url": "https://drive.google.com/file/d/19VQfa_a8ZWJd5ZOMh5Ye2lrmApGLi6aO/view?usp=drive_web", "title": "Remittance user flow - New customer.pdf", "favicon": "https://ssl.gstatic.com/docs/doclist/images/icon_14_pdf_favicon.ico", "image": "https://lh3.googleusercontent.com/4Mtsk6kIBlwWci_jgKgw6cNDwj8no51iXqaGDfI4wrghEf-6WJ-XT5EJPWA=w1200-h630-p" } [/block] [block:embed] { "html": false, "url": "https://drive.google.com/file/d/1uiD5a_a2A5bGx-Pz7QfTwJDVpCx1aCiW/view?usp=drive_web", "title": "Remittance user flow - Repeat Customer.pdf", "favicon": "https://ssl.gstatic.com/docs/doclist/images/icon_14_pdf_favicon.ico", "image": "https://lh6.googleusercontent.com/YtIYcPSx8h2VMQ1EzQqqq2KAL7sXqBBzDVE5mOxhCqE0RR-wehTa4pMp3D0=w1200-h630-p" } [/block] The following excel sheet lists all the APIs that need to be covered for money transfer transaction. The filled excel sheet will be required by Eko team to approve the flows. [block:embed] { "html": false, "url": "https://drive.google.com/file/d/1c0dLV7Zhx0DrvnbkCDBT4LDWfJx2Xh2J/view?usp=drive_web", "title": "API Test Plan.xlsx", "favicon": "https://ssl.gstatic.com/docs/doclist/images/icon_14_excel_favicon.ico", "image": "https://lh3.googleusercontent.com/GovocCSgh6HkIdoy1jL8tis3MmrRH7_30xYDxVCoaHUMQpvSrKu9ywSoIdg=w1200-h630-p" } [/block] The flow can be referred here as well: http://blog.eko.co.in/enable-remittance-services-using-eko-apis/
{"_id":"556d8f34d0f4740d00380ce4","__v":8,"category":"556d8bab42dd610d00a3cfb6","createdAt":"2015-06-02T11:10:44.181Z","githubsync":"","version":"554757bb6184460d006fd8b7","api":{"auth":"required","params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","url":""},"hidden":false,"link_url":"","project":"554757ba6184460d006fd8b4","excerpt":"","order":5,"sync_unique":"","type":"basic","user":"5547561a9a48800d00c6e483","body":"[block:api-header]\n{\n  \"title\": \"Customer Entity\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"id\",\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-1\": \"string\",\n    \"0-2\": \"value of customer id\",\n    \"1-0\": \"customer_id_type\",\n    \"1-1\": \"string\",\n    \"1-2\": \"type of customer id\",\n    \"2-0\": \"state\",\n    \"3-0\": \"state_desc\",\n    \"2-1\": \"integer\",\n    \"3-1\": \"string\",\n    \"2-2\": \"a value which signifies the current state of the customer\",\n    \"3-2\": \"description of the current state of customer\",\n    \"4-0\": \"limit\",\n    \"5-0\": \"balance\",\n    \"6-0\": \"name\",\n    \"4-1\": \"array\",\n    \"4-2\": \"signifies the amount available for the customer to transact in the month\",\n    \"5-1\": \"double\",\n    \"5-2\": \"current balance of the customer\",\n    \"6-1\": \"string\",\n    \"6-2\": \"name of the customer\"\n  },\n  \"cols\": 3,\n  \"rows\": 7\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Recipient Entity\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"recipient_id_type\",\n    \"0-1\": \"string\",\n    \"0-2\": \"can have 2 values\\n1. acc_ifsc \\n2. acc_bankcode\",\n    \"2-0\": \"recipient_id\",\n    \"2-1\": \"string\",\n    \"2-2\": \"unique id of the recipient for the customer; this will be used in the transaction api\",\n    \"3-0\": \"name\",\n    \"3-1\": \"string\",\n    \"3-2\": \"name of the recipient\",\n    \"1-0\": \"id\",\n    \"1-1\": \"string\",\n    \"1-2\": \"id of the recipient; needs to have the same format as mentioned in recipient_id_type\",\n    \"4-0\": \"recipient_mobile\",\n    \"4-1\": \"integer\",\n    \"4-2\": \"mobile number of the recipient\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Transactions Entity\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"tid\",\n    \"0-1\": \"integer\",\n    \"2-0\": \"timestamp\",\n    \"1-0\": \"client_ref_id\",\n    \"3-0\": \"currency\",\n    \"4-0\": \"state\",\n    \"5-0\": \"channel\",\n    \"0-2\": \"unique transaction id on Eko platform\",\n    \"1-1\": \"string\",\n    \"1-2\": \"unique tid on partner platform\",\n    \"2-2\": \"time at which transaction was done, should be in TZ format\",\n    \"3-1\": \"string\",\n    \"3-2\": \"currency in which transaction is being processed\",\n    \"4-1\": \"integer\",\n    \"4-2\": \"signifies the state of the transaction\",\n    \"5-1\": \"integer\",\n    \"5-2\": \"signifies the mode of transaction\",\n    \"6-0\": \"refund_tid\",\n    \"6-1\": \"integer\",\n    \"6-2\": \"unique transaction id on Eko platform when a refund is done\"\n  },\n  \"cols\": 3,\n  \"rows\": 7\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Bank Entity\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"bank_code\",\n    \"0-1\": \"string\",\n    \"0-2\": \"short code for each bank\",\n    \"1-0\": \"name\",\n    \"1-1\": \"string\",\n    \"1-2\": \"name of the bank\",\n    \"2-0\": \"isverificationavailable\",\n    \"2-1\": \"boolean\",\n    \"2-2\": \"signifies availability of account name verification\",\n    \"3-0\": \"ifsc_status\",\n    \"3-1\": \"number\",\n    \"3-2\": \"signifies if IFSC is required for addition of bank account number\",\n    \"4-0\": \"code\",\n    \"4-1\": \"string\",\n    \"4-2\": \"short name of the bank\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\nValues of merchant-document-id-type\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"PAN Card\",\n    \"1-0\": \"Aadhaar Card\",\n    \"0-1\": \"1\",\n    \"1-1\": \"2\",\n    \"h-1\": \"Value\",\n    \"h-0\": \"Document type\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\nThe attribute **merchant-document-id-type** can have two possible values:\n  - **1** - for PAN Card\n  - **2** - for Aadhaar Card","link_external":false,"slug":"core-resources","title":"Core Resources","updates":[],"isReference":false,"next":{"description":"","pages":[]},"parentDoc":null,"childrenPages":[]}

Core Resources


[block:api-header] { "title": "Customer Entity" } [/block] [block:parameters] { "data": { "0-0": "id", "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-1": "string", "0-2": "value of customer id", "1-0": "customer_id_type", "1-1": "string", "1-2": "type of customer id", "2-0": "state", "3-0": "state_desc", "2-1": "integer", "3-1": "string", "2-2": "a value which signifies the current state of the customer", "3-2": "description of the current state of customer", "4-0": "limit", "5-0": "balance", "6-0": "name", "4-1": "array", "4-2": "signifies the amount available for the customer to transact in the month", "5-1": "double", "5-2": "current balance of the customer", "6-1": "string", "6-2": "name of the customer" }, "cols": 3, "rows": 7 } [/block] [block:api-header] { "title": "Recipient Entity" } [/block] [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-0": "recipient_id_type", "0-1": "string", "0-2": "can have 2 values\n1. acc_ifsc \n2. acc_bankcode", "2-0": "recipient_id", "2-1": "string", "2-2": "unique id of the recipient for the customer; this will be used in the transaction api", "3-0": "name", "3-1": "string", "3-2": "name of the recipient", "1-0": "id", "1-1": "string", "1-2": "id of the recipient; needs to have the same format as mentioned in recipient_id_type", "4-0": "recipient_mobile", "4-1": "integer", "4-2": "mobile number of the recipient" }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "title": "Transactions Entity" } [/block] [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-0": "tid", "0-1": "integer", "2-0": "timestamp", "1-0": "client_ref_id", "3-0": "currency", "4-0": "state", "5-0": "channel", "0-2": "unique transaction id on Eko platform", "1-1": "string", "1-2": "unique tid on partner platform", "2-2": "time at which transaction was done, should be in TZ format", "3-1": "string", "3-2": "currency in which transaction is being processed", "4-1": "integer", "4-2": "signifies the state of the transaction", "5-1": "integer", "5-2": "signifies the mode of transaction", "6-0": "refund_tid", "6-1": "integer", "6-2": "unique transaction id on Eko platform when a refund is done" }, "cols": 3, "rows": 7 } [/block] [block:api-header] { "title": "Bank Entity" } [/block] [block:parameters] { "data": { "0-0": "bank_code", "0-1": "string", "0-2": "short code for each bank", "1-0": "name", "1-1": "string", "1-2": "name of the bank", "2-0": "isverificationavailable", "2-1": "boolean", "2-2": "signifies availability of account name verification", "3-0": "ifsc_status", "3-1": "number", "3-2": "signifies if IFSC is required for addition of bank account number", "4-0": "code", "4-1": "string", "4-2": "short name of the bank" }, "cols": 3, "rows": 5 } [/block] Values of merchant-document-id-type [block:parameters] { "data": { "0-0": "PAN Card", "1-0": "Aadhaar Card", "0-1": "1", "1-1": "2", "h-1": "Value", "h-0": "Document type" }, "cols": 2, "rows": 2 } [/block] The attribute **merchant-document-id-type** can have two possible values: - **1** - for PAN Card - **2** - for Aadhaar Card
[block:api-header] { "title": "Customer Entity" } [/block] [block:parameters] { "data": { "0-0": "id", "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-1": "string", "0-2": "value of customer id", "1-0": "customer_id_type", "1-1": "string", "1-2": "type of customer id", "2-0": "state", "3-0": "state_desc", "2-1": "integer", "3-1": "string", "2-2": "a value which signifies the current state of the customer", "3-2": "description of the current state of customer", "4-0": "limit", "5-0": "balance", "6-0": "name", "4-1": "array", "4-2": "signifies the amount available for the customer to transact in the month", "5-1": "double", "5-2": "current balance of the customer", "6-1": "string", "6-2": "name of the customer" }, "cols": 3, "rows": 7 } [/block] [block:api-header] { "title": "Recipient Entity" } [/block] [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-0": "recipient_id_type", "0-1": "string", "0-2": "can have 2 values\n1. acc_ifsc \n2. acc_bankcode", "2-0": "recipient_id", "2-1": "string", "2-2": "unique id of the recipient for the customer; this will be used in the transaction api", "3-0": "name", "3-1": "string", "3-2": "name of the recipient", "1-0": "id", "1-1": "string", "1-2": "id of the recipient; needs to have the same format as mentioned in recipient_id_type", "4-0": "recipient_mobile", "4-1": "integer", "4-2": "mobile number of the recipient" }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "title": "Transactions Entity" } [/block] [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Type", "h-2": "Description", "0-0": "tid", "0-1": "integer", "2-0": "timestamp", "1-0": "client_ref_id", "3-0": "currency", "4-0": "state", "5-0": "channel", "0-2": "unique transaction id on Eko platform", "1-1": "string", "1-2": "unique tid on partner platform", "2-2": "time at which transaction was done, should be in TZ format", "3-1": "string", "3-2": "currency in which transaction is being processed", "4-1": "integer", "4-2": "signifies the state of the transaction", "5-1": "integer", "5-2": "signifies the mode of transaction", "6-0": "refund_tid", "6-1": "integer", "6-2": "unique transaction id on Eko platform when a refund is done" }, "cols": 3, "rows": 7 } [/block] [block:api-header] { "title": "Bank Entity" } [/block] [block:parameters] { "data": { "0-0": "bank_code", "0-1": "string", "0-2": "short code for each bank", "1-0": "name", "1-1": "string", "1-2": "name of the bank", "2-0": "isverificationavailable", "2-1": "boolean", "2-2": "signifies availability of account name verification", "3-0": "ifsc_status", "3-1": "number", "3-2": "signifies if IFSC is required for addition of bank account number", "4-0": "code", "4-1": "string", "4-2": "short name of the bank" }, "cols": 3, "rows": 5 } [/block] Values of merchant-document-id-type [block:parameters] { "data": { "0-0": "PAN Card", "1-0": "Aadhaar Card", "0-1": "1", "1-1": "2", "h-1": "Value", "h-0": "Document type" }, "cols": 2, "rows": 2 } [/block] The attribute **merchant-document-id-type** can have two possible values: - **1** - for PAN Card - **2** - for Aadhaar Card
{"_id":"556d8f52d0f4740d00380ce6","__v":4,"order":6,"project":"554757ba6184460d006fd8b4","sync_unique":"","version":"554757bb6184460d006fd8b7","body":"For all financial transactions, ***status = 0*** should be treated as successful else fail and the current state of the transaction can be retrieved from ***tx_status*** and ***txstatus_desc*** parameter. \n\nFor all non-financial requests, you may need to consider both status and response_type_id parameters\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Status\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Possible Next Action\",\n    \"0-0\": \"0\",\n    \"0-1\": \"Success\",\n    \"0-2\": \"Register the user\",\n    \"1-0\": \"463\",\n    \"1-1\": \"User not found\",\n    \"1-2\": \"Verify the user's mobile number\",\n    \"2-0\": \"327\",\n    \"2-1\": \"Enrollment done. Verification pending\",\n    \"3-0\": \"17\",\n    \"3-1\": \"User wallet already exists\",\n    \"4-0\": \"31\",\n    \"4-1\": \"Agent can not be registered\",\n    \"5-0\": \"132\",\n    \"5-1\": \"Sender name should only contain letters\",\n    \"6-0\": \"302\",\n    \"6-1\": \"Wrong OTP\",\n    \"7-0\": \"303\",\n    \"7-1\": \"OTP expired\",\n    \"6-2\": \"Enable customer to resend OTP\",\n    \"7-2\": \"Enable customer to resend OTP\",\n    \"8-0\": \"342\",\n    \"8-1\": \"Recipient already registered\",\n    \"9-0\": \"145\",\n    \"9-1\": \"Recipient mobile number should be numeric\",\n    \"10-0\": \"140\",\n    \"10-1\": \"Recipient mobile number should be 10 digit\",\n    \"11-0\": \"131\",\n    \"11-1\": \"Recipient name should only contain letters\",\n    \"12-0\": \"122\",\n    \"12-1\": \"Recipient name length should be in between 1 and 50\",\n    \"13-0\": \"39\",\n    \"13-1\": \"Max recipient limit reached\",\n    \"14-1\": \"Wrong IFSC\",\n    \"14-0\": \"41\",\n    \"15-0\": \"536\",\n    \"15-1\": \"Invalid recipient type format\",\n    \"16-0\": \"537\",\n    \"16-1\": \"Invalid recipient type length\",\n    \"17-0\": \"44/45\",\n    \"17-1\": \"Incomplete IFSC Code\",\n    \"18-0\": \"48\",\n    \"18-1\": \"Recipient bank not found\",\n    \"19-0\": \"102\",\n    \"19-1\": \"Invalid Account number length\",\n    \"20-0\": \"136\",\n    \"20-1\": \"Please provide valid ifsc format\",\n    \"21-1\": \"Invalid IFSC for the selected bank\",\n    \"21-0\": \"508\",\n    \"22-0\": \"521\",\n    \"22-1\": \"IFSC not found out in the system\",\n    \"23-0\": \"313\",\n    \"23-1\": \"Recipient registration not done\",\n    \"24-0\": \"317\",\n    \"24-1\": \"NEFT not allowed\",\n    \"25-0\": \"53\",\n    \"25-1\": \"IMPS transaction not allowed\",\n    \"26-0\": \"55\",\n    \"26-1\": \"Error from NPCI\",\n    \"27-0\": \"460\",\n    \"27-1\": \"Invalid channel\",\n    \"28-0\": \"319\",\n    \"28-1\": \"Invalid Sender/Initiator\",\n    \"29-0\": \"314\",\n    \"29-1\": \"Failed! Monthly limit exceeds\",\n    \"30-0\": \"350\",\n    \"30-1\": \"Verification failed. Recipient name not found.\",\n    \"31-0\": \"344\",\n    \"31-1\": \"IMPS is not available in this bank\",\n    \"32-0\": \"46\",\n    \"32-1\": \"Invalid account details\",\n    \"33-0\": \"168\",\n    \"33-1\": \"TID does not exist\",\n    \"34-0\": \"1237\",\n    \"34-1\": \"ID proof number already exists in the system\",\n    \"35-0\": \"585\",\n    \"35-1\": \"Customer already KYC Approved\",\n    \"36-0\": \"347\",\n    \"36-1\": \"Insufficient balance\",\n    \"37-0\": \"945\",\n    \"37-1\": \"Sender /Beneficiary limit has been exhausted for this month\"\n  },\n  \"cols\": 2,\n  \"rows\": 38\n}\n[/block]\nPossible values of parameter ***tx_status*** \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"tx_status\",\n    \"h-1\": \"txstatus_desc\",\n    \"0-0\": \"0\",\n    \"0-1\": \"Success\",\n    \"1-0\": \"1\",\n    \"1-1\": \"Fail\",\n    \"2-0\": \"2\",\n    \"3-0\": \"3\",\n    \"4-0\": \"4\",\n    \"2-1\": \"Response Awaited/Initiated (in case of NEFT)\",\n    \"3-1\": \"Refund Pending\",\n    \"4-1\": \"Refunded\",\n    \"5-0\": \"5\",\n    \"5-1\": \"Hold ( Please re-inquiry)\"\n  },\n  \"cols\": 2,\n  \"rows\": 6\n}\n[/block]","createdAt":"2015-06-02T11:11:14.413Z","githubsync":"","link_external":false,"title":"Error Codes","category":"556d8bab42dd610d00a3cfb6","hidden":false,"link_url":"","slug":"error-codes","type":"basic","api":{"params":[],"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"code":"{}","name":"","status":400,"language":"json"}]},"settings":"","url":"","auth":"required"},"excerpt":"","updates":[],"user":"5547561a9a48800d00c6e483","isReference":false,"next":{"description":"","pages":[]},"parentDoc":null,"childrenPages":[]}

Error Codes


For all financial transactions, ***status = 0*** should be treated as successful else fail and the current state of the transaction can be retrieved from ***tx_status*** and ***txstatus_desc*** parameter. For all non-financial requests, you may need to consider both status and response_type_id parameters [block:parameters] { "data": { "h-0": "Status", "h-1": "Description", "h-2": "Possible Next Action", "0-0": "0", "0-1": "Success", "0-2": "Register the user", "1-0": "463", "1-1": "User not found", "1-2": "Verify the user's mobile number", "2-0": "327", "2-1": "Enrollment done. Verification pending", "3-0": "17", "3-1": "User wallet already exists", "4-0": "31", "4-1": "Agent can not be registered", "5-0": "132", "5-1": "Sender name should only contain letters", "6-0": "302", "6-1": "Wrong OTP", "7-0": "303", "7-1": "OTP expired", "6-2": "Enable customer to resend OTP", "7-2": "Enable customer to resend OTP", "8-0": "342", "8-1": "Recipient already registered", "9-0": "145", "9-1": "Recipient mobile number should be numeric", "10-0": "140", "10-1": "Recipient mobile number should be 10 digit", "11-0": "131", "11-1": "Recipient name should only contain letters", "12-0": "122", "12-1": "Recipient name length should be in between 1 and 50", "13-0": "39", "13-1": "Max recipient limit reached", "14-1": "Wrong IFSC", "14-0": "41", "15-0": "536", "15-1": "Invalid recipient type format", "16-0": "537", "16-1": "Invalid recipient type length", "17-0": "44/45", "17-1": "Incomplete IFSC Code", "18-0": "48", "18-1": "Recipient bank not found", "19-0": "102", "19-1": "Invalid Account number length", "20-0": "136", "20-1": "Please provide valid ifsc format", "21-1": "Invalid IFSC for the selected bank", "21-0": "508", "22-0": "521", "22-1": "IFSC not found out in the system", "23-0": "313", "23-1": "Recipient registration not done", "24-0": "317", "24-1": "NEFT not allowed", "25-0": "53", "25-1": "IMPS transaction not allowed", "26-0": "55", "26-1": "Error from NPCI", "27-0": "460", "27-1": "Invalid channel", "28-0": "319", "28-1": "Invalid Sender/Initiator", "29-0": "314", "29-1": "Failed! Monthly limit exceeds", "30-0": "350", "30-1": "Verification failed. Recipient name not found.", "31-0": "344", "31-1": "IMPS is not available in this bank", "32-0": "46", "32-1": "Invalid account details", "33-0": "168", "33-1": "TID does not exist", "34-0": "1237", "34-1": "ID proof number already exists in the system", "35-0": "585", "35-1": "Customer already KYC Approved", "36-0": "347", "36-1": "Insufficient balance", "37-0": "945", "37-1": "Sender /Beneficiary limit has been exhausted for this month" }, "cols": 2, "rows": 38 } [/block] Possible values of parameter ***tx_status*** [block:parameters] { "data": { "h-0": "tx_status", "h-1": "txstatus_desc", "0-0": "0", "0-1": "Success", "1-0": "1", "1-1": "Fail", "2-0": "2", "3-0": "3", "4-0": "4", "2-1": "Response Awaited/Initiated (in case of NEFT)", "3-1": "Refund Pending", "4-1": "Refunded", "5-0": "5", "5-1": "Hold ( Please re-inquiry)" }, "cols": 2, "rows": 6 } [/block]
For all financial transactions, ***status = 0*** should be treated as successful else fail and the current state of the transaction can be retrieved from ***tx_status*** and ***txstatus_desc*** parameter. For all non-financial requests, you may need to consider both status and response_type_id parameters [block:parameters] { "data": { "h-0": "Status", "h-1": "Description", "h-2": "Possible Next Action", "0-0": "0", "0-1": "Success", "0-2": "Register the user", "1-0": "463", "1-1": "User not found", "1-2": "Verify the user's mobile number", "2-0": "327", "2-1": "Enrollment done. Verification pending", "3-0": "17", "3-1": "User wallet already exists", "4-0": "31", "4-1": "Agent can not be registered", "5-0": "132", "5-1": "Sender name should only contain letters", "6-0": "302", "6-1": "Wrong OTP", "7-0": "303", "7-1": "OTP expired", "6-2": "Enable customer to resend OTP", "7-2": "Enable customer to resend OTP", "8-0": "342", "8-1": "Recipient already registered", "9-0": "145", "9-1": "Recipient mobile number should be numeric", "10-0": "140", "10-1": "Recipient mobile number should be 10 digit", "11-0": "131", "11-1": "Recipient name should only contain letters", "12-0": "122", "12-1": "Recipient name length should be in between 1 and 50", "13-0": "39", "13-1": "Max recipient limit reached", "14-1": "Wrong IFSC", "14-0": "41", "15-0": "536", "15-1": "Invalid recipient type format", "16-0": "537", "16-1": "Invalid recipient type length", "17-0": "44/45", "17-1": "Incomplete IFSC Code", "18-0": "48", "18-1": "Recipient bank not found", "19-0": "102", "19-1": "Invalid Account number length", "20-0": "136", "20-1": "Please provide valid ifsc format", "21-1": "Invalid IFSC for the selected bank", "21-0": "508", "22-0": "521", "22-1": "IFSC not found out in the system", "23-0": "313", "23-1": "Recipient registration not done", "24-0": "317", "24-1": "NEFT not allowed", "25-0": "53", "25-1": "IMPS transaction not allowed", "26-0": "55", "26-1": "Error from NPCI", "27-0": "460", "27-1": "Invalid channel", "28-0": "319", "28-1": "Invalid Sender/Initiator", "29-0": "314", "29-1": "Failed! Monthly limit exceeds", "30-0": "350", "30-1": "Verification failed. Recipient name not found.", "31-0": "344", "31-1": "IMPS is not available in this bank", "32-0": "46", "32-1": "Invalid account details", "33-0": "168", "33-1": "TID does not exist", "34-0": "1237", "34-1": "ID proof number already exists in the system", "35-0": "585", "35-1": "Customer already KYC Approved", "36-0": "347", "36-1": "Insufficient balance", "37-0": "945", "37-1": "Sender /Beneficiary limit has been exhausted for this month" }, "cols": 2, "rows": 38 } [/block] Possible values of parameter ***tx_status*** [block:parameters] { "data": { "h-0": "tx_status", "h-1": "txstatus_desc", "0-0": "0", "0-1": "Success", "1-0": "1", "1-1": "Fail", "2-0": "2", "3-0": "3", "4-0": "4", "2-1": "Response Awaited/Initiated (in case of NEFT)", "3-1": "Refund Pending", "4-1": "Refunded", "5-0": "5", "5-1": "Hold ( Please re-inquiry)" }, "cols": 2, "rows": 6 } [/block]
{"_id":"5aa8cd2ab7d085000fdb5868","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d8bab42dd610d00a3cfb6","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-03-14T07:20:10.068Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":7,"body":"[Postman](https://www.getpostman.com/) is a powerful HTTP client for testing web services. Postman is a great tool when trying to dissect RESTful APIs made by others or test ones you have made yourself. It offers a sleek user interface with which to make HTML requests, without the hassle of writing a bunch of code just to test an API's functionality\n\nYou can import the below-given Eko API Postman collection link which will give the sense of each API URL, request, method type, etc.\n\nPostman collection link for the DMT and Indo-Nepal:\n[block:embed]\n{\n  \"html\": false,\n  \"url\": \"https://www.getpostman.com/collections/e0f78d6126cfb79e332b\",\n  \"title\": null,\n  \"favicon\": \"https://www.getpostman.com/favicon.ico\",\n  \"iframe\": false\n}\n[/block]\nPostman collection link for the user onboarding:\n\n\n[block:embed]\n{\n  \"html\": false,\n  \"url\": \"https://www.getpostman.com/collections/d20261893b4823500e95\",\n  \"title\": null,\n  \"favicon\": \"https://www.getpostman.com/favicon.ico\"\n}\n[/block]\nPostman Collection for the AePS fund settlement:\n\n[block:embed]\n{\n  \"html\": false,\n  \"url\": \"https://www.getpostman.com/collections/36799713f1dd368c5ae4\",\n  \"title\": null,\n  \"favicon\": \"https://www.getpostman.com/favicon.ico\"\n}\n[/block]","excerpt":"","slug":"test-apis-in-postman","type":"basic","title":"Testing in Postman","__v":0,"parentDoc":null,"childrenPages":[]}

Testing in Postman


[Postman](https://www.getpostman.com/) is a powerful HTTP client for testing web services. Postman is a great tool when trying to dissect RESTful APIs made by others or test ones you have made yourself. It offers a sleek user interface with which to make HTML requests, without the hassle of writing a bunch of code just to test an API's functionality You can import the below-given Eko API Postman collection link which will give the sense of each API URL, request, method type, etc. Postman collection link for the DMT and Indo-Nepal: [block:embed] { "html": false, "url": "https://www.getpostman.com/collections/e0f78d6126cfb79e332b", "title": null, "favicon": "https://www.getpostman.com/favicon.ico", "iframe": false } [/block] Postman collection link for the user onboarding: [block:embed] { "html": false, "url": "https://www.getpostman.com/collections/d20261893b4823500e95", "title": null, "favicon": "https://www.getpostman.com/favicon.ico" } [/block] Postman Collection for the AePS fund settlement: [block:embed] { "html": false, "url": "https://www.getpostman.com/collections/36799713f1dd368c5ae4", "title": null, "favicon": "https://www.getpostman.com/favicon.ico" } [/block]
[Postman](https://www.getpostman.com/) is a powerful HTTP client for testing web services. Postman is a great tool when trying to dissect RESTful APIs made by others or test ones you have made yourself. It offers a sleek user interface with which to make HTML requests, without the hassle of writing a bunch of code just to test an API's functionality You can import the below-given Eko API Postman collection link which will give the sense of each API URL, request, method type, etc. Postman collection link for the DMT and Indo-Nepal: [block:embed] { "html": false, "url": "https://www.getpostman.com/collections/e0f78d6126cfb79e332b", "title": null, "favicon": "https://www.getpostman.com/favicon.ico", "iframe": false } [/block] Postman collection link for the user onboarding: [block:embed] { "html": false, "url": "https://www.getpostman.com/collections/d20261893b4823500e95", "title": null, "favicon": "https://www.getpostman.com/favicon.ico" } [/block] Postman Collection for the AePS fund settlement: [block:embed] { "html": false, "url": "https://www.getpostman.com/collections/36799713f1dd368c5ae4", "title": null, "favicon": "https://www.getpostman.com/favicon.ico" } [/block]
{"_id":"5b18dc7f180d310003a74ecf","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d8bab42dd610d00a3cfb6","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-07T07:19:27.913Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":8,"body":"**You can use the following parameter values for testing Remittance APIs:**\n1. developer_key - becbbce45f79c6f5109f848acd540567\n2. secret-key - f74c50a1-f705-4634-9cda-30a477df91b7 (will be used to generate secret-key and secret-key-timestamp)\n3. initiator_id - 9910028267\n4. customer_id - 9900998877\n5. recipient_id - 10002343\n**For testing AePS Gateway, activation of services and API 2.0, kindly use the below details.**\n1. developer_key - becbbce45f79c6f5109f848acd540567\n2. secret-key - f74c50a1-f705-4634-9cda-30a477df91b7 (will be used to generate secret-key and secret-key-timestamp)\n3. initiator_id - 9962981729\n4. user_code - 20810200","excerpt":"","slug":"platform-credentials","type":"basic","title":"Platform credentials","__v":0,"parentDoc":null,"childrenPages":[]}

Platform credentials


**You can use the following parameter values for testing Remittance APIs:** 1. developer_key - becbbce45f79c6f5109f848acd540567 2. secret-key - f74c50a1-f705-4634-9cda-30a477df91b7 (will be used to generate secret-key and secret-key-timestamp) 3. initiator_id - 9910028267 4. customer_id - 9900998877 5. recipient_id - 10002343 **For testing AePS Gateway, activation of services and API 2.0, kindly use the below details.** 1. developer_key - becbbce45f79c6f5109f848acd540567 2. secret-key - f74c50a1-f705-4634-9cda-30a477df91b7 (will be used to generate secret-key and secret-key-timestamp) 3. initiator_id - 9962981729 4. user_code - 20810200
**You can use the following parameter values for testing Remittance APIs:** 1. developer_key - becbbce45f79c6f5109f848acd540567 2. secret-key - f74c50a1-f705-4634-9cda-30a477df91b7 (will be used to generate secret-key and secret-key-timestamp) 3. initiator_id - 9910028267 4. customer_id - 9900998877 5. recipient_id - 10002343 **For testing AePS Gateway, activation of services and API 2.0, kindly use the below details.** 1. developer_key - becbbce45f79c6f5109f848acd540567 2. secret-key - f74c50a1-f705-4634-9cda-30a477df91b7 (will be used to generate secret-key and secret-key-timestamp) 3. initiator_id - 9962981729 4. user_code - 20810200
{"_id":"5aa8fdfed30e0b001f21fd95","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"5aa8e888b7d085000fdb5b99","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-03-14T10:48:30.615Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"**Eko API Widget** is the easiest and quickest way to integrate with all our APIs and get Money Transfer and all other features in your own website!\n\nAPI Widget, our **premium product**, allows merchant assisted business to quickly integrate with Eko APIs for money transfer and other services. It was originally built for our own web app **Connect** where it has been successfully used for the last couple of years.  \n\nIn order to reduce the time for you to go-live and to provide a great experience for your users, Eko has finally released the API Widget for you.\n\nAPI Widgets are completly **white-labeled** so that there are no Eko brandings. **You can do your full branding** as well as change the color theme of the widget to match your own website colors.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"\",\n  \"body\": \"Connect itself has been built with the API Widget and it is being successfully used daily by our 20,000+ merchants for the last couple of years.\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/f9db6fb-connect-widget-intro-v2.png\",\n        \"connect-widget-intro-v2.png\",\n        574,\n        448,\n        \"#e6e3e3\"\n      ],\n      \"border\": false,\n      \"sizing\": \"smart\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Features of API Widget\"\n}\n[/block]\n  * The widget integration would allow you to start your service within 2 - 7 days. \n  * The widget would take care of the complete flow involving that transaction (For example, for Money Remittance: customer registration, recipient registration, and transaction).\n  * The widget has been built to do transactions in the shortest possible time with maximum accuracy. It handles all kinds of validations and prevents typing mistakes\n  * The partner would only need to take care of transaction inquiry. Transaction inquiry is essential to handle the exception cases (like network failure during a transaction) and the client should not go-live without integrating this API\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Benefits of using Widget\",\n  \"body\": \"* **One Integration, Multiple Products:** get all our current (and future) API products with just one integration for free.\\n* **Fast integration:** Start your business quickly. Save time in building a sophisticated UI (User Interface)\\n* **Beautiful & powerful UI:** subtle animations and a fast intuitive interface for your users.\\n* **Camera & Image Compression:** Use your webcam or your mobile camera to quickly upload documents. The Widget smartly compresses the images for very fast uploads! \\n* **Smart** validations and restricted input to minimize error.\\n* **Responsive:** Looks and works great on both desktop and mobile phones.\\n* **Themes:** Change colors to match your website's theme.\\n* **Multi-Language:** Built-in support for 5 languages: ***English, Hindi, Marathi, Gujarati & Kannada***.  (More coming soon...)\\n* **Print Receipt:** give the option to print transaction receipts with your full branding: your company logo, your heading, title, etc.\\n* **Google Analytics:** Get Google Analytics about your website usage free of cost with our widget. By understanding your users and their behavior on your website, you can improve your website and your business. No coding required.\\n* **Secure & Blackboxed:** The Widget is built using the Web Component & Shadow DOM technology so that both the Widget and your website are completely safe from each other.\\n\\nEven if you want to integrate our APIs on your own, the Connect Widget is a very good way to:\\n* quickly test our APIs\\n* understand the complete transaction flow, i.e, the combination of various APIs and UI to make a transaction (eg: Money Transfer) happen\\n* play with the widget (in debug mode) to see live API calls and learn from it\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<div><a href=\\\"https://beta.ekoconnect.in/elements/tf-eko-connect-widget/demo/widget_demo.html\\\" target=\\\"_blank\\\">Open full demo in a new tab ↗</div>\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:embed]\n{\n  \"html\": false,\n  \"url\": \"https://beta.ekoconnect.in/elements/tf-eko-connect-widget/demo/widget_demo.html\",\n  \"title\": \"Connect Widget demo\",\n  \"favicon\": \"https://beta.ekoconnect.in/favicon.ico\",\n  \"iframe\": true,\n  \"width\": \"100%\",\n  \"height\": \"1200px\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<div><a href=\\\"https://beta.ekoconnect.in/elements/tf-eko-connect-widget/demo/widget_demo.html\\\" target=\\\"_blank\\\">Click here to see the <strong>widget demo</strong> in a new tab ↗</div>\"\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<div><a href=\\\"https://beta.ekoconnect.in/elements/tf-eko-connect-widget/demo/widget_demo.html\\\" target=\\\"_blank\\\">Open full demo in a new tab ↗</div>\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:html]\n{\n  \"html\": \"<div class=\\\"ekowidgetintrotypes\\\">\\n  <h3>Widgets are currently available for:</h3>\\n  <ol>\\n    <li>Domestic Money Transfer (DMT)</li>\\n    <li>Refund process for DMT</li>\\n    <li>Indo-Nepal Money Transfer</li>\\n    <li><em>More widgets coming soon...</em></li>\\n  </ol>\\n  <br>\\n</div>\\n\\n<style>\\n  div.ekowidgetintrotypes > h3 {\\n    font-weight:500 !important;\\n    font-size:1.4em !important;\\n    color:#5ABDDB !important;\\n  }\\n  div.ekowidgetintrotypes > ol > li {\\n    margin:10px 0;\\n  }\\n  div.ekowidgetintrotypes em {\\n    color:yellow;\\n    font-size:0.9em;\\n  }\\n</style>\",\n  \"sidebar\": true\n}\n[/block]","excerpt":"","slug":"widget-introduction","type":"basic","title":"Widget Introduction","__v":0,"parentDoc":null,"childrenPages":[]}

Widget Introduction


**Eko API Widget** is the easiest and quickest way to integrate with all our APIs and get Money Transfer and all other features in your own website! API Widget, our **premium product**, allows merchant assisted business to quickly integrate with Eko APIs for money transfer and other services. It was originally built for our own web app **Connect** where it has been successfully used for the last couple of years. In order to reduce the time for you to go-live and to provide a great experience for your users, Eko has finally released the API Widget for you. API Widgets are completly **white-labeled** so that there are no Eko brandings. **You can do your full branding** as well as change the color theme of the widget to match your own website colors. [block:callout] { "type": "info", "title": "", "body": "Connect itself has been built with the API Widget and it is being successfully used daily by our 20,000+ merchants for the last couple of years." } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/f9db6fb-connect-widget-intro-v2.png", "connect-widget-intro-v2.png", 574, 448, "#e6e3e3" ], "border": false, "sizing": "smart" } ] } [/block] [block:api-header] { "title": "Features of API Widget" } [/block] * The widget integration would allow you to start your service within 2 - 7 days. * The widget would take care of the complete flow involving that transaction (For example, for Money Remittance: customer registration, recipient registration, and transaction). * The widget has been built to do transactions in the shortest possible time with maximum accuracy. It handles all kinds of validations and prevents typing mistakes * The partner would only need to take care of transaction inquiry. Transaction inquiry is essential to handle the exception cases (like network failure during a transaction) and the client should not go-live without integrating this API [block:callout] { "type": "success", "title": "Benefits of using Widget", "body": "* **One Integration, Multiple Products:** get all our current (and future) API products with just one integration for free.\n* **Fast integration:** Start your business quickly. Save time in building a sophisticated UI (User Interface)\n* **Beautiful & powerful UI:** subtle animations and a fast intuitive interface for your users.\n* **Camera & Image Compression:** Use your webcam or your mobile camera to quickly upload documents. The Widget smartly compresses the images for very fast uploads! \n* **Smart** validations and restricted input to minimize error.\n* **Responsive:** Looks and works great on both desktop and mobile phones.\n* **Themes:** Change colors to match your website's theme.\n* **Multi-Language:** Built-in support for 5 languages: ***English, Hindi, Marathi, Gujarati & Kannada***. (More coming soon...)\n* **Print Receipt:** give the option to print transaction receipts with your full branding: your company logo, your heading, title, etc.\n* **Google Analytics:** Get Google Analytics about your website usage free of cost with our widget. By understanding your users and their behavior on your website, you can improve your website and your business. No coding required.\n* **Secure & Blackboxed:** The Widget is built using the Web Component & Shadow DOM technology so that both the Widget and your website are completely safe from each other.\n\nEven if you want to integrate our APIs on your own, the Connect Widget is a very good way to:\n* quickly test our APIs\n* understand the complete transaction flow, i.e, the combination of various APIs and UI to make a transaction (eg: Money Transfer) happen\n* play with the widget (in debug mode) to see live API calls and learn from it" } [/block] [block:html] { "html": "<div><a href=\"https://beta.ekoconnect.in/elements/tf-eko-connect-widget/demo/widget_demo.html\" target=\"_blank\">Open full demo in a new tab ↗</div>", "sidebar": true } [/block] [block:embed] { "html": false, "url": "https://beta.ekoconnect.in/elements/tf-eko-connect-widget/demo/widget_demo.html", "title": "Connect Widget demo", "favicon": "https://beta.ekoconnect.in/favicon.ico", "iframe": true, "width": "100%", "height": "1200px", "sidebar": true } [/block] [block:html] { "html": "<div><a href=\"https://beta.ekoconnect.in/elements/tf-eko-connect-widget/demo/widget_demo.html\" target=\"_blank\">Click here to see the <strong>widget demo</strong> in a new tab ↗</div>" } [/block] [block:html] { "html": "<div><a href=\"https://beta.ekoconnect.in/elements/tf-eko-connect-widget/demo/widget_demo.html\" target=\"_blank\">Open full demo in a new tab ↗</div>", "sidebar": true } [/block] [block:html] { "html": "<div class=\"ekowidgetintrotypes\">\n <h3>Widgets are currently available for:</h3>\n <ol>\n <li>Domestic Money Transfer (DMT)</li>\n <li>Refund process for DMT</li>\n <li>Indo-Nepal Money Transfer</li>\n <li><em>More widgets coming soon...</em></li>\n </ol>\n <br>\n</div>\n\n<style>\n div.ekowidgetintrotypes > h3 {\n font-weight:500 !important;\n font-size:1.4em !important;\n color:#5ABDDB !important;\n }\n div.ekowidgetintrotypes > ol > li {\n margin:10px 0;\n }\n div.ekowidgetintrotypes em {\n color:yellow;\n font-size:0.9em;\n }\n</style>", "sidebar": true } [/block]
**Eko API Widget** is the easiest and quickest way to integrate with all our APIs and get Money Transfer and all other features in your own website! API Widget, our **premium product**, allows merchant assisted business to quickly integrate with Eko APIs for money transfer and other services. It was originally built for our own web app **Connect** where it has been successfully used for the last couple of years. In order to reduce the time for you to go-live and to provide a great experience for your users, Eko has finally released the API Widget for you. API Widgets are completly **white-labeled** so that there are no Eko brandings. **You can do your full branding** as well as change the color theme of the widget to match your own website colors. [block:callout] { "type": "info", "title": "", "body": "Connect itself has been built with the API Widget and it is being successfully used daily by our 20,000+ merchants for the last couple of years." } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/f9db6fb-connect-widget-intro-v2.png", "connect-widget-intro-v2.png", 574, 448, "#e6e3e3" ], "border": false, "sizing": "smart" } ] } [/block] [block:api-header] { "title": "Features of API Widget" } [/block] * The widget integration would allow you to start your service within 2 - 7 days. * The widget would take care of the complete flow involving that transaction (For example, for Money Remittance: customer registration, recipient registration, and transaction). * The widget has been built to do transactions in the shortest possible time with maximum accuracy. It handles all kinds of validations and prevents typing mistakes * The partner would only need to take care of transaction inquiry. Transaction inquiry is essential to handle the exception cases (like network failure during a transaction) and the client should not go-live without integrating this API [block:callout] { "type": "success", "title": "Benefits of using Widget", "body": "* **One Integration, Multiple Products:** get all our current (and future) API products with just one integration for free.\n* **Fast integration:** Start your business quickly. Save time in building a sophisticated UI (User Interface)\n* **Beautiful & powerful UI:** subtle animations and a fast intuitive interface for your users.\n* **Camera & Image Compression:** Use your webcam or your mobile camera to quickly upload documents. The Widget smartly compresses the images for very fast uploads! \n* **Smart** validations and restricted input to minimize error.\n* **Responsive:** Looks and works great on both desktop and mobile phones.\n* **Themes:** Change colors to match your website's theme.\n* **Multi-Language:** Built-in support for 5 languages: ***English, Hindi, Marathi, Gujarati & Kannada***. (More coming soon...)\n* **Print Receipt:** give the option to print transaction receipts with your full branding: your company logo, your heading, title, etc.\n* **Google Analytics:** Get Google Analytics about your website usage free of cost with our widget. By understanding your users and their behavior on your website, you can improve your website and your business. No coding required.\n* **Secure & Blackboxed:** The Widget is built using the Web Component & Shadow DOM technology so that both the Widget and your website are completely safe from each other.\n\nEven if you want to integrate our APIs on your own, the Connect Widget is a very good way to:\n* quickly test our APIs\n* understand the complete transaction flow, i.e, the combination of various APIs and UI to make a transaction (eg: Money Transfer) happen\n* play with the widget (in debug mode) to see live API calls and learn from it" } [/block] [block:html] { "html": "<div><a href=\"https://beta.ekoconnect.in/elements/tf-eko-connect-widget/demo/widget_demo.html\" target=\"_blank\">Open full demo in a new tab ↗</div>", "sidebar": true } [/block] [block:embed] { "html": false, "url": "https://beta.ekoconnect.in/elements/tf-eko-connect-widget/demo/widget_demo.html", "title": "Connect Widget demo", "favicon": "https://beta.ekoconnect.in/favicon.ico", "iframe": true, "width": "100%", "height": "1200px", "sidebar": true } [/block] [block:html] { "html": "<div><a href=\"https://beta.ekoconnect.in/elements/tf-eko-connect-widget/demo/widget_demo.html\" target=\"_blank\">Click here to see the <strong>widget demo</strong> in a new tab ↗</div>" } [/block] [block:html] { "html": "<div><a href=\"https://beta.ekoconnect.in/elements/tf-eko-connect-widget/demo/widget_demo.html\" target=\"_blank\">Open full demo in a new tab ↗</div>", "sidebar": true } [/block] [block:html] { "html": "<div class=\"ekowidgetintrotypes\">\n <h3>Widgets are currently available for:</h3>\n <ol>\n <li>Domestic Money Transfer (DMT)</li>\n <li>Refund process for DMT</li>\n <li>Indo-Nepal Money Transfer</li>\n <li><em>More widgets coming soon...</em></li>\n </ol>\n <br>\n</div>\n\n<style>\n div.ekowidgetintrotypes > h3 {\n font-weight:500 !important;\n font-size:1.4em !important;\n color:#5ABDDB !important;\n }\n div.ekowidgetintrotypes > ol > li {\n margin:10px 0;\n }\n div.ekowidgetintrotypes em {\n color:yellow;\n font-size:0.9em;\n }\n</style>", "sidebar": true } [/block]
{"_id":"5aa901cd51d1e2003a83fd63","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"5aa8e888b7d085000fdb5b99","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-03-14T11:04:45.563Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"1.  **Copy-paste** the following code **inside the HTML <head> tag** of the page where you want to show the widget:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<script src=\\\"https://beta.ekoconnect.in/widget/import-eko-connect-widget.js\\\"></script>\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\n2.  **Copy-paste** the following code **inside the HTML <body> tag** of the page where you want to show the widget.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<tf-eko-connect-widget\\n     id=\\\"ekowidget\\\"\\n     transaction-flow=\\\"remittance\\\"\\n     developer-key=\\\"becbbce45f79c6f5109f848acd540567\\\"\\n     secret-key=\\\"a6dGwEILHdlezzy1ZycRvKuUr6+6yqAOd7OlL4dvQvc=\\\"\\n     secret-key-timestamp=\\\"1512158087256\\\"\\n     initiator-id=\\\"9910028267\\\"\\n     merchant-document-id-type=\\\"1\\\"\\n     merchant-document-id=\\\"AABTG6381M\\\"\\n     pincode=\\\"122003\\\"\\n     language=\\\"en\\\"\\n     debug>\\n</tf-eko-connect-widget>\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note\",\n  \"body\": \"* The value of **transaction-flow** changes which widget will be shown. Use the following values:\\n  - **remittance**: widget for Domestic Money Transfer\\n  -  **remittance_refund**: widget for Refund of Domestic Money Transfer\\n  -  **indonepal**: widget for Money Transfer to Nepal\\n  \\n  \\n* The values of **developer-key** & **initiator-id** should be configured on your server with your own values and replaced within the code mentioned\\n\\n* The values of **secret-key** & **secret-key-timestamp** must be generated on your server and inserted in the page during server-side-rendering. **It must not be hard-coded in the page!**  (For generating these values, please refer to the [Authentication](doc:authentication) section)\\n\\n* The values of **merchant-document-id-type**, **merchant-document-id** & **pincode** corresponds to your user/retailer/merchant currently using your portal. These values must be inserted into the page from your server after the user logs-in.\\n\\n* The attribute **merchant-document-id-type** can have two possible values:\\n  - **1** - for PAN Card\\n  - **2** - for Aadhaar Card\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"The **debug** flag is only *used for testing* the widget and the internal API calls. Remove it from the final code for production.\",\n  \"title\": \"Debugging the Widget\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"Please ensure you implement transaction inquiry API separately in case a transaction fails due to network issues and you need to verify the status of the transaction\",\n  \"title\": \"Note\"\n}\n[/block]\n**NEXT STEPS:**\n  * Implement **Debit-Hook Listener** to validate transaction and capture transactions in your database (See [Security & Validation](doc:widget-security) section)\n\n  * Implement **Eko-Response Listener** to update your database for successful or failed transaction status (See [Capture Widget Response](doc:capture-widget-response) section)\n\n  * Implement **Eko-Network-Error Listener** to handle and confirm transaction status in case of network issues (See [Capture Widget Response](doc:capture-widget-response) section)","excerpt":"","slug":"integrate-widget","type":"basic","title":"How to Integrate Widget?","__v":0,"parentDoc":null,"childrenPages":[]}

How to Integrate Widget?


1. **Copy-paste** the following code **inside the HTML <head> tag** of the page where you want to show the widget: [block:code] { "codes": [ { "code": "<script src=\"https://beta.ekoconnect.in/widget/import-eko-connect-widget.js\"></script>", "language": "html" } ] } [/block] 2. **Copy-paste** the following code **inside the HTML <body> tag** of the page where you want to show the widget. [block:code] { "codes": [ { "code": "<tf-eko-connect-widget\n id=\"ekowidget\"\n transaction-flow=\"remittance\"\n developer-key=\"becbbce45f79c6f5109f848acd540567\"\n secret-key=\"a6dGwEILHdlezzy1ZycRvKuUr6+6yqAOd7OlL4dvQvc=\"\n secret-key-timestamp=\"1512158087256\"\n initiator-id=\"9910028267\"\n merchant-document-id-type=\"1\"\n merchant-document-id=\"AABTG6381M\"\n pincode=\"122003\"\n language=\"en\"\n debug>\n</tf-eko-connect-widget>", "language": "html" } ] } [/block] [block:callout] { "type": "info", "title": "Note", "body": "* The value of **transaction-flow** changes which widget will be shown. Use the following values:\n - **remittance**: widget for Domestic Money Transfer\n - **remittance_refund**: widget for Refund of Domestic Money Transfer\n - **indonepal**: widget for Money Transfer to Nepal\n \n \n* The values of **developer-key** & **initiator-id** should be configured on your server with your own values and replaced within the code mentioned\n\n* The values of **secret-key** & **secret-key-timestamp** must be generated on your server and inserted in the page during server-side-rendering. **It must not be hard-coded in the page!** (For generating these values, please refer to the [Authentication](doc:authentication) section)\n\n* The values of **merchant-document-id-type**, **merchant-document-id** & **pincode** corresponds to your user/retailer/merchant currently using your portal. These values must be inserted into the page from your server after the user logs-in.\n\n* The attribute **merchant-document-id-type** can have two possible values:\n - **1** - for PAN Card\n - **2** - for Aadhaar Card" } [/block] [block:callout] { "type": "warning", "body": "The **debug** flag is only *used for testing* the widget and the internal API calls. Remove it from the final code for production.", "title": "Debugging the Widget" } [/block] [block:callout] { "type": "danger", "body": "Please ensure you implement transaction inquiry API separately in case a transaction fails due to network issues and you need to verify the status of the transaction", "title": "Note" } [/block] **NEXT STEPS:** * Implement **Debit-Hook Listener** to validate transaction and capture transactions in your database (See [Security & Validation](doc:widget-security) section) * Implement **Eko-Response Listener** to update your database for successful or failed transaction status (See [Capture Widget Response](doc:capture-widget-response) section) * Implement **Eko-Network-Error Listener** to handle and confirm transaction status in case of network issues (See [Capture Widget Response](doc:capture-widget-response) section)
1. **Copy-paste** the following code **inside the HTML <head> tag** of the page where you want to show the widget: [block:code] { "codes": [ { "code": "<script src=\"https://beta.ekoconnect.in/widget/import-eko-connect-widget.js\"></script>", "language": "html" } ] } [/block] 2. **Copy-paste** the following code **inside the HTML <body> tag** of the page where you want to show the widget. [block:code] { "codes": [ { "code": "<tf-eko-connect-widget\n id=\"ekowidget\"\n transaction-flow=\"remittance\"\n developer-key=\"becbbce45f79c6f5109f848acd540567\"\n secret-key=\"a6dGwEILHdlezzy1ZycRvKuUr6+6yqAOd7OlL4dvQvc=\"\n secret-key-timestamp=\"1512158087256\"\n initiator-id=\"9910028267\"\n merchant-document-id-type=\"1\"\n merchant-document-id=\"AABTG6381M\"\n pincode=\"122003\"\n language=\"en\"\n debug>\n</tf-eko-connect-widget>", "language": "html" } ] } [/block] [block:callout] { "type": "info", "title": "Note", "body": "* The value of **transaction-flow** changes which widget will be shown. Use the following values:\n - **remittance**: widget for Domestic Money Transfer\n - **remittance_refund**: widget for Refund of Domestic Money Transfer\n - **indonepal**: widget for Money Transfer to Nepal\n \n \n* The values of **developer-key** & **initiator-id** should be configured on your server with your own values and replaced within the code mentioned\n\n* The values of **secret-key** & **secret-key-timestamp** must be generated on your server and inserted in the page during server-side-rendering. **It must not be hard-coded in the page!** (For generating these values, please refer to the [Authentication](doc:authentication) section)\n\n* The values of **merchant-document-id-type**, **merchant-document-id** & **pincode** corresponds to your user/retailer/merchant currently using your portal. These values must be inserted into the page from your server after the user logs-in.\n\n* The attribute **merchant-document-id-type** can have two possible values:\n - **1** - for PAN Card\n - **2** - for Aadhaar Card" } [/block] [block:callout] { "type": "warning", "body": "The **debug** flag is only *used for testing* the widget and the internal API calls. Remove it from the final code for production.", "title": "Debugging the Widget" } [/block] [block:callout] { "type": "danger", "body": "Please ensure you implement transaction inquiry API separately in case a transaction fails due to network issues and you need to verify the status of the transaction", "title": "Note" } [/block] **NEXT STEPS:** * Implement **Debit-Hook Listener** to validate transaction and capture transactions in your database (See [Security & Validation](doc:widget-security) section) * Implement **Eko-Response Listener** to update your database for successful or failed transaction status (See [Capture Widget Response](doc:capture-widget-response) section) * Implement **Eko-Network-Error Listener** to handle and confirm transaction status in case of network issues (See [Capture Widget Response](doc:capture-widget-response) section)
{"_id":"5adee5d654be240003a2c07a","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"5aa8e888b7d085000fdb5b99","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-04-24T08:07:50.236Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"You can use the **debit-hook** feature of the widget to add your own functionality (such as validation or authentication) before any financial transaction (where a wallet has to be debited).\n\nFor example,\n  * **Validate your merchant's wallet** to ensure he/she has sufficient funds before any financial transaction\n  * **Secure** critical transaction data on your server to prevent any fraud\n  * **Store & track** the initial state of **financial transactions** in your server (you get the final success/failure state of the transaction in [eko-response callback](doc:capture-widget-response))\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"To avoid any frauds, you should implement merchant authentication (password / OTP / etc) before any transaction where the merchant's wallet has to be debited.\",\n  \"title\": \"Please Note:\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Step 1: Add listener for the 'debit-hook' javascript event\"\n}\n[/block]\nThe *debit-hook* event will be called before any transaction where your merchant's wallet has to be debited (for example, before money-transfer or new-recipient-account-verification).\n\nYou can add a listener for the event in Javascript like this:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"document.querySelector('#ekowidget').addEventListener('debit-hook', function(e) {\\n\\t\\t// Rest of your code to call your server and handle debit-hook...\\n  \\t// You get transaction related information in e.detail\\n});\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\nYou get the following information in **e.detail**:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// e.detail =\\n{\\n    \\\"url\\\": \\\"https://staging.eko.in:25004/ekoapi/v1/transactions\\\",\\n    \\\"http_method\\\": \\\"POST\\\",\\n    \\\"interaction_type_id\\\": 221,\\n    \\\"interaction_label\\\": \\\"Send Cash\\\",\\n    \\\"body\\\": \\\"client_ref_id=1527237883837&amount=1000&channel=2&recipient_id=10009977&customer_id=8888888888\\\",\\n    \\\"client_ref_id\\\": \\\"1527237883837\\\",\\n    \\\"data\\\": {\\n        \\\"amount\\\": \\\"1000\\\",\\n        \\\"channel\\\": \\\"2\\\",\\n        \\\"recipient_id\\\": 10009977,\\n        \\\"customer_id\\\": \\\"8888888888\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Sample value of e.detail (JSON)\"\n    }\n  ]\n}\n[/block]\nIn **e.detail**, the most important parameters are:\n  * **interaction_type_id**: it tells which transaction this is. You will do validation and generate *request_hash* based on this value.\n  * **client_ref_id**: this is the unique reference for each transaction. If you do not receive any response from Eko (say, due to network error), you will use this id to check transaction status. You must save this in your database. Or, you can also generate and return your own unique ID for the transaction entry you make in your database and send it to the widget (check next step) as client_ref_id.\n  * **data**: it contains all transaction parameters, such as the amount.\n\nAfter firing this event, the **widget will wait for your consent** before moving forward. \n\n[block:api-header]\n{\n  \"title\": \"Step 2: Validate the transaction & generate secretKey, secretKeyTimestamp and request_hash\"\n}\n[/block]\nIn the debit-hook callback function (as per the previous step), call your server with e.detail and then do the following:\n\n  1. Validate the transaction. For example, check if your merchant has enough wallet balance to debit his account.\n  2. Block the transaction amount. Debit your merchant's account with the transaction amount.\n  3. If previous steps are successful, **generate secretKeyTimestamp and secretKey**. Check the [Authentication](doc:authentication) section for details & sample code.\n  4. Using the **same secretKeyTimestamp** (as in the previous step), **generate the request_hash**.\n  5. Return the generated values (secretKey, secretKeyTimestamp & request_hash) to your frontend.\n\n\n**HOW TO GENERATE \"request_hash\"?** \n\nThe request_hash is generated in the same way as *secret_key*. \n\nCheck the [Authentication](doc:authentication) section on how to generate the hash. But, along with the secret-key-timestamp, we also **attach (concatenate)** to it other important parameter values in the same order as mentioned below:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Transaction\",\n    \"h-1\": \"interaction_type_id\",\n    \"h-2\": \"Data for generating request_hash\",\n    \"0-0\": \"Domestic Money Transfer\",\n    \"0-1\": \"221\",\n    \"0-2\": \"secretKeyTimestamp + customer_id + recipient_id + amount\",\n    \"1-0\": \"Verify Recipient Bank Account (Domestic  Money Transfer)\",\n    \"1-1\": \"149\",\n    \"1-2\": \"secretKeyTimestamp\",\n    \"3-0\": \"\",\n    \"3-1\": \"\",\n    \"3-2\": \"\",\n    \"2-0\": \"Indo-Nepal Money Transfer\",\n    \"2-1\": \"279\",\n    \"2-2\": \"secretKeyTimestamp + customer_id + recipient_id + amount\"\n  },\n  \"cols\": 3,\n  \"rows\": 4\n}\n[/block]\nFor example, for Money Transfer (or, Indo-Nepal), if secret-key-timestamp=1234567890, customer_id=9876654321, recipient_is=1234 & amount=10000, then to get request_hash, pass the following string in the function to generate hash: \"12345678909876654321123410000\".\n\nNow, get Base64 encoded HMAC_SHA256 of \"12345678909876654321123410000\". Check the [Authentication](doc:authentication) section for the sample code to generate the hash (Same code that is used to generate the secret-key).\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"IMPORTANT\",\n  \"body\": \"The **request_hash** is only generated for a valid transaction that you want to commit. NEVER generate **request_hash** for an invalid transaction that you want to cancel!\\n\\nIf you are using .NET, you should not send overly specific time stamps, due to differing interpretations of how extra time precision should be dropped. To avoid overly specific time stamps, manually construct dateTime objects with no more than millisecond precision.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Step 3: Confirm or cancel widget transaction\"\n}\n[/block]\n**If Step 2 fails** (for example, not enough balance in your merchant's wallet), cancel the widget transaction by using the following Javascript code in your frontend:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"document.querySelector('#ekowidget').go(false, {message: \\\"You have insufficient balance\\\"});\",\n      \"language\": \"javascript\",\n      \"name\": \"Cancel Widget Transaction (Javascript)\"\n    }\n  ]\n}\n[/block]\n**If Step 2 is successful** and you receive secretKey, secretKeyTimestamp and request_hash from your backend server, use the following Javascript code to confirm the widget to proceed with the transaction:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"document.querySelector('#ekowidget').go(true, \\n                       {\\n  \\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\trequest_hash:\\\"...\\\", \\n                        \\tsecretKey:\\\"...\\\", \\n  \\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tsecretKeyTimestamp:\\\"...\\\",\\n  \\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t\\tclient_ref_id:\\\"...\\\"\\t\\t\\t\\t// OPTIONAL\\n\\t\\t\\t\\t\\t\\t});\",\n      \"language\": \"javascript\",\n      \"name\": \"Confirm Widget Transaction (Javascript)\"\n    }\n  ]\n}\n[/block]\n**NOTE:** the client_ref_id parameter is optional. If you want us to use your own unique transaction id as client_ref_id, pass it here.\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<html>\\n<body>\\n\\n  <!--\\n\\t\\tThis code will go at the end of the same page where you have inserted the tf-eko-connect-widget from the previous \\\"How to Integrate Widget?\\\" step:\\n\\n\\t\\t\\t<tf-eko-connect-widget id=\\\"ekowidget\\\" ... ></tf-eko-connect-widget>\\n\\t-->\\n\\n\\t<script>\\n\\n\\t\\t// CAPTURE EKO WIDGET DEBIT-HOOK\\n\\t\\tdocument.querySelector('#ekowidget').addEventListener('debit-hook', function(e) {\\n\\n\\t\\t\\tconsole.log(\\\"[ON DEBIT HOOK] Transaction Data = \\\", e.detail);\\n\\n\\t\\t\\t// SEND DATA TO YOUR SERVER TO DO THE FOLLOWING:\\n\\t\\t\\t\\t// 1. Get transaction details in \\\"e.details\\\"\\n\\t\\t\\t\\t// 2. VALIDATE: check user wallet balance\\n\\t\\t\\t\\t// 3. IF TRANSACTION IS VALID, generate request_hash, secretKey & secretKeyTimestamp \\n\\t\\t\\t\\t//    from your server (depending on e.detail.interaction_type_id)\\n\\n\\t\\t\\t$.ajax({url: 'https://MYTESTSITE.COM/handleDebitHook',\\n\\t\\t\\t\\ttype: 'post',\\n\\t\\t\\t\\tdataType: 'json',\\n\\t\\t\\t\\tcontentType: 'application/json',\\n\\t\\t\\t\\ttimeout:60000,\\n\\t\\t\\t\\tdata: { detail: JSON.stringify(e.detail) },\\n\\n\\t\\t\\t\\tsuccess: function (resp) {\\n\\t\\t\\t\\t\\t// Response returned from your server is stored in 'resp'\\n\\t\\t\\t\\t\\t// Eg: resp = {\\n\\t\\t\\t\\t\\t//\\t\\tcontinue: true/false,\\t// Validation passed?\\n\\t\\t\\t\\t\\t//\\t\\tsecretKey: \\\"...\\\",\\n\\t\\t\\t\\t\\t//\\t\\t...\\n\\t\\t\\t\\t\\t//\\t}\\n\\t\\t\\t\\t\\tconsole.log(\\\"[DEBIT HOOK] My Server Response = \\\", resp);\\n\\n\\t\\t\\t\\t\\tif (resp.continue === true)\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t// IF EVERYTHING IS ALLRIGHT, CONTINUE WIDGET...\\n\\t\\t\\t\\t\\t\\tdocument.querySelector('#ekowidget').go(true, {\\n\\t\\t\\t\\t\\t\\t\\trequest_hash: resp.request_hash, \\n\\t\\t\\t\\t\\t\\t\\tsecretKey: resp.secretKey, \\n\\t\\t\\t\\t\\t\\t\\tsecretKeyTimestamp: resp.secretKeyTimestamp, \\n\\t\\t\\t\\t\\t\\t\\tclient_ref_id: resp.client_ref_id // OPTIONAL\\n\\t\\t\\t\\t\\t\\t});\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t\\telse\\n\\t\\t\\t\\t\\t{\\n\\t\\t\\t\\t\\t\\t// IF VALIDATION FAILS, CANCEL WIDGET...\\n\\t\\t\\t\\t\\t\\tdocument.querySelector('#ekowidget').go(false, {\\n\\t\\t\\t\\t\\t\\t\\tmessage: resp.message || \\\"Validation failed\\\"\\n\\t\\t\\t\\t\\t\\t});\\n\\t\\t\\t\\t\\t}\\n\\t\\t\\t\\t},\\n\\n\\t\\t\\t\\terror: function(jqXHR, textStatus, errorThrown) {\\n\\t\\t\\t\\t\\tconsole.error(\\\"[DEBIT-HOOK] ERROR: \\\", textStatus, errorThrown);\\n\\t\\t\\t\\t}\\n\\t\\t\\t});\\n      \\n\\t\\t});\\n\\t</script>\\n\\n\\t<script src=\\\"https://code.jquery.com/jquery-3.3.1.min.js\\\" integrity=\\\"sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=\\\" crossorigin=\\\"anonymous\\\"></script>\\n</body>\\n</html>\",\n      \"language\": \"html\",\n      \"name\": \"SAMPLE CODE (HTML + Javascript)\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<?php\\n\\n// [SAMPLE CODE] DEBIT-HOOK BACKEND (/handleDebitHook/index.php)\\n// Validate User's Wallet and Generate secretKey, secretKeyTimestamp & request_hash\\n\\nheader(\\\"Content-Type: application/json; charset=UTF-8\\\");\\n\\n\\n// Initializing key in some variable. You will receive this key from Eko via email\\n$key = \\\"...\\\";\\n\\n// Get transaction details sent by the widget\\n$trxn_data = json_decode($_POST[\\\"detail\\\"], false);\\n\\n\\n// VALIDATE YOUR USER/MERCHANT'S WALLET BALANCE\\n$continue = validateUser($trxn_data);\\t// write your own function code\\n\\nif ($continue)\\n{\\n\\t// VALIDATION SUCCESSFUL...\\n\\n\\t// Encode 'key' using base64\\n\\t$encodedKey = base64_encode($key);\\n\\n\\t// Get current timestamp in milliseconds since UNIX epoch\\n  // Check out https://currentmillis.com to understand the timestamp format\\n\\t$secret_key_timestamp = round(microtime(true) * 1000);\\n\\n\\t$data = \\\"\\\";\\n\\n\\tif ($trxn_data->interaction_type_id == 221 || $trxn_data->interaction_type_id == 279)\\t// Money Transfer or Indo-Nepal\\n\\t{\\n\\t\\t$data = \\\"\\\" . $secret_key_timestamp . $trxn_data->data->customer_id . $trxn_data->data->recipient_id . $trxn_data->data->amount;\\n\\t}\\n\\telseif ($trxn_data->interaction_type_id == 149)\\t// Recipient Bank Verification\\n\\t{\\n\\t\\t$data = \\\"\\\" . $secret_key_timestamp;\\n\\t}\\n\\n\\t// Computes the signature by hashing the salt with the encoded key \\n\\t$signature_secret_key = hash_hmac('SHA256', $secret_key_timestamp, $encodedKey, true);\\n\\t$signature_req_hash = hash_hmac('SHA256', $data, $encodedKey, true);\\n\\n\\t// Encode it using base64\\n\\t$secret_key = base64_encode($signature_secret_key);\\n\\t$request_hash = base64_encode($signature_req_hash);\\n\\n\\t//echo $secret_key;\\n\\t//echo $secret_key_timestamp;\\n\\t//echo $request_hash;\\n\\t\\n  // Return all generated values as a JSON resonse\\n\\tjson_encode(array('continue' => True, 'secretKey' => $secret_key, 'secretKeyTimestamp' => $secret_key_timestamp, 'request_hash' => $request_hash));\\n}\\nelse\\n{\\n\\t// VALIDATION FAILED...\\n\\n  // Return transaction-failed respose\\n\\tjson_encode(array('continue' => False, 'message' => 'Validation failed'));\\n}\\n\\n?>\",\n      \"language\": \"php\",\n      \"name\": \"BACKEND SAMPLE CODE: Handle Debit-Hook (PHP)\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"Hook your server code to validate your merchants/users before any financial transaction and secure critical data","slug":"widget-security","type":"basic","title":"Security & Validation","__v":0,"parentDoc":null,"childrenPages":[]}

Security & Validation

Hook your server code to validate your merchants/users before any financial transaction and secure critical data

You can use the **debit-hook** feature of the widget to add your own functionality (such as validation or authentication) before any financial transaction (where a wallet has to be debited). For example, * **Validate your merchant's wallet** to ensure he/she has sufficient funds before any financial transaction * **Secure** critical transaction data on your server to prevent any fraud * **Store & track** the initial state of **financial transactions** in your server (you get the final success/failure state of the transaction in [eko-response callback](doc:capture-widget-response)) [block:callout] { "type": "warning", "body": "To avoid any frauds, you should implement merchant authentication (password / OTP / etc) before any transaction where the merchant's wallet has to be debited.", "title": "Please Note:" } [/block] [block:api-header] { "title": "Step 1: Add listener for the 'debit-hook' javascript event" } [/block] The *debit-hook* event will be called before any transaction where your merchant's wallet has to be debited (for example, before money-transfer or new-recipient-account-verification). You can add a listener for the event in Javascript like this: [block:code] { "codes": [ { "code": "document.querySelector('#ekowidget').addEventListener('debit-hook', function(e) {\n\t\t// Rest of your code to call your server and handle debit-hook...\n \t// You get transaction related information in e.detail\n});", "language": "javascript" } ] } [/block] You get the following information in **e.detail**: [block:code] { "codes": [ { "code": "// e.detail =\n{\n \"url\": \"https://staging.eko.in:25004/ekoapi/v1/transactions\",\n \"http_method\": \"POST\",\n \"interaction_type_id\": 221,\n \"interaction_label\": \"Send Cash\",\n \"body\": \"client_ref_id=1527237883837&amount=1000&channel=2&recipient_id=10009977&customer_id=8888888888\",\n \"client_ref_id\": \"1527237883837\",\n \"data\": {\n \"amount\": \"1000\",\n \"channel\": \"2\",\n \"recipient_id\": 10009977,\n \"customer_id\": \"8888888888\"\n }\n}", "language": "json", "name": "Sample value of e.detail (JSON)" } ] } [/block] In **e.detail**, the most important parameters are: * **interaction_type_id**: it tells which transaction this is. You will do validation and generate *request_hash* based on this value. * **client_ref_id**: this is the unique reference for each transaction. If you do not receive any response from Eko (say, due to network error), you will use this id to check transaction status. You must save this in your database. Or, you can also generate and return your own unique ID for the transaction entry you make in your database and send it to the widget (check next step) as client_ref_id. * **data**: it contains all transaction parameters, such as the amount. After firing this event, the **widget will wait for your consent** before moving forward. [block:api-header] { "title": "Step 2: Validate the transaction & generate secretKey, secretKeyTimestamp and request_hash" } [/block] In the debit-hook callback function (as per the previous step), call your server with e.detail and then do the following: 1. Validate the transaction. For example, check if your merchant has enough wallet balance to debit his account. 2. Block the transaction amount. Debit your merchant's account with the transaction amount. 3. If previous steps are successful, **generate secretKeyTimestamp and secretKey**. Check the [Authentication](doc:authentication) section for details & sample code. 4. Using the **same secretKeyTimestamp** (as in the previous step), **generate the request_hash**. 5. Return the generated values (secretKey, secretKeyTimestamp & request_hash) to your frontend. **HOW TO GENERATE "request_hash"?** The request_hash is generated in the same way as *secret_key*. Check the [Authentication](doc:authentication) section on how to generate the hash. But, along with the secret-key-timestamp, we also **attach (concatenate)** to it other important parameter values in the same order as mentioned below: [block:parameters] { "data": { "h-0": "Transaction", "h-1": "interaction_type_id", "h-2": "Data for generating request_hash", "0-0": "Domestic Money Transfer", "0-1": "221", "0-2": "secretKeyTimestamp + customer_id + recipient_id + amount", "1-0": "Verify Recipient Bank Account (Domestic Money Transfer)", "1-1": "149", "1-2": "secretKeyTimestamp", "3-0": "", "3-1": "", "3-2": "", "2-0": "Indo-Nepal Money Transfer", "2-1": "279", "2-2": "secretKeyTimestamp + customer_id + recipient_id + amount" }, "cols": 3, "rows": 4 } [/block] For example, for Money Transfer (or, Indo-Nepal), if secret-key-timestamp=1234567890, customer_id=9876654321, recipient_is=1234 & amount=10000, then to get request_hash, pass the following string in the function to generate hash: "12345678909876654321123410000". Now, get Base64 encoded HMAC_SHA256 of "12345678909876654321123410000". Check the [Authentication](doc:authentication) section for the sample code to generate the hash (Same code that is used to generate the secret-key). [block:callout] { "type": "danger", "title": "IMPORTANT", "body": "The **request_hash** is only generated for a valid transaction that you want to commit. NEVER generate **request_hash** for an invalid transaction that you want to cancel!\n\nIf you are using .NET, you should not send overly specific time stamps, due to differing interpretations of how extra time precision should be dropped. To avoid overly specific time stamps, manually construct dateTime objects with no more than millisecond precision." } [/block] [block:api-header] { "title": "Step 3: Confirm or cancel widget transaction" } [/block] **If Step 2 fails** (for example, not enough balance in your merchant's wallet), cancel the widget transaction by using the following Javascript code in your frontend: [block:code] { "codes": [ { "code": "document.querySelector('#ekowidget').go(false, {message: \"You have insufficient balance\"});", "language": "javascript", "name": "Cancel Widget Transaction (Javascript)" } ] } [/block] **If Step 2 is successful** and you receive secretKey, secretKeyTimestamp and request_hash from your backend server, use the following Javascript code to confirm the widget to proceed with the transaction: [block:code] { "codes": [ { "code": "document.querySelector('#ekowidget').go(true, \n {\n \t\t\t\t\t\t\t\t\t\t\t\trequest_hash:\"...\", \n \tsecretKey:\"...\", \n \t\t\t\t\t\t\t\t\t\t\t\tsecretKeyTimestamp:\"...\",\n \t\t\t\t\t\t\t\t\t\t\t\tclient_ref_id:\"...\"\t\t\t\t// OPTIONAL\n\t\t\t\t\t\t});", "language": "javascript", "name": "Confirm Widget Transaction (Javascript)" } ] } [/block] **NOTE:** the client_ref_id parameter is optional. If you want us to use your own unique transaction id as client_ref_id, pass it here. [block:code] { "codes": [ { "code": "<html>\n<body>\n\n <!--\n\t\tThis code will go at the end of the same page where you have inserted the tf-eko-connect-widget from the previous \"How to Integrate Widget?\" step:\n\n\t\t\t<tf-eko-connect-widget id=\"ekowidget\" ... ></tf-eko-connect-widget>\n\t-->\n\n\t<script>\n\n\t\t// CAPTURE EKO WIDGET DEBIT-HOOK\n\t\tdocument.querySelector('#ekowidget').addEventListener('debit-hook', function(e) {\n\n\t\t\tconsole.log(\"[ON DEBIT HOOK] Transaction Data = \", e.detail);\n\n\t\t\t// SEND DATA TO YOUR SERVER TO DO THE FOLLOWING:\n\t\t\t\t// 1. Get transaction details in \"e.details\"\n\t\t\t\t// 2. VALIDATE: check user wallet balance\n\t\t\t\t// 3. IF TRANSACTION IS VALID, generate request_hash, secretKey & secretKeyTimestamp \n\t\t\t\t// from your server (depending on e.detail.interaction_type_id)\n\n\t\t\t$.ajax({url: 'https://MYTESTSITE.COM/handleDebitHook',\n\t\t\t\ttype: 'post',\n\t\t\t\tdataType: 'json',\n\t\t\t\tcontentType: 'application/json',\n\t\t\t\ttimeout:60000,\n\t\t\t\tdata: { detail: JSON.stringify(e.detail) },\n\n\t\t\t\tsuccess: function (resp) {\n\t\t\t\t\t// Response returned from your server is stored in 'resp'\n\t\t\t\t\t// Eg: resp = {\n\t\t\t\t\t//\t\tcontinue: true/false,\t// Validation passed?\n\t\t\t\t\t//\t\tsecretKey: \"...\",\n\t\t\t\t\t//\t\t...\n\t\t\t\t\t//\t}\n\t\t\t\t\tconsole.log(\"[DEBIT HOOK] My Server Response = \", resp);\n\n\t\t\t\t\tif (resp.continue === true)\n\t\t\t\t\t{\n\t\t\t\t\t\t// IF EVERYTHING IS ALLRIGHT, CONTINUE WIDGET...\n\t\t\t\t\t\tdocument.querySelector('#ekowidget').go(true, {\n\t\t\t\t\t\t\trequest_hash: resp.request_hash, \n\t\t\t\t\t\t\tsecretKey: resp.secretKey, \n\t\t\t\t\t\t\tsecretKeyTimestamp: resp.secretKeyTimestamp, \n\t\t\t\t\t\t\tclient_ref_id: resp.client_ref_id // OPTIONAL\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// IF VALIDATION FAILS, CANCEL WIDGET...\n\t\t\t\t\t\tdocument.querySelector('#ekowidget').go(false, {\n\t\t\t\t\t\t\tmessage: resp.message || \"Validation failed\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\terror: function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\tconsole.error(\"[DEBIT-HOOK] ERROR: \", textStatus, errorThrown);\n\t\t\t\t}\n\t\t\t});\n \n\t\t});\n\t</script>\n\n\t<script src=\"https://code.jquery.com/jquery-3.3.1.min.js\" integrity=\"sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=\" crossorigin=\"anonymous\"></script>\n</body>\n</html>", "language": "html", "name": "SAMPLE CODE (HTML + Javascript)" } ], "sidebar": true } [/block] [block:code] { "codes": [ { "code": "<?php\n\n// [SAMPLE CODE] DEBIT-HOOK BACKEND (/handleDebitHook/index.php)\n// Validate User's Wallet and Generate secretKey, secretKeyTimestamp & request_hash\n\nheader(\"Content-Type: application/json; charset=UTF-8\");\n\n\n// Initializing key in some variable. You will receive this key from Eko via email\n$key = \"...\";\n\n// Get transaction details sent by the widget\n$trxn_data = json_decode($_POST[\"detail\"], false);\n\n\n// VALIDATE YOUR USER/MERCHANT'S WALLET BALANCE\n$continue = validateUser($trxn_data);\t// write your own function code\n\nif ($continue)\n{\n\t// VALIDATION SUCCESSFUL...\n\n\t// Encode 'key' using base64\n\t$encodedKey = base64_encode($key);\n\n\t// Get current timestamp in milliseconds since UNIX epoch\n // Check out https://currentmillis.com to understand the timestamp format\n\t$secret_key_timestamp = round(microtime(true) * 1000);\n\n\t$data = \"\";\n\n\tif ($trxn_data->interaction_type_id == 221 || $trxn_data->interaction_type_id == 279)\t// Money Transfer or Indo-Nepal\n\t{\n\t\t$data = \"\" . $secret_key_timestamp . $trxn_data->data->customer_id . $trxn_data->data->recipient_id . $trxn_data->data->amount;\n\t}\n\telseif ($trxn_data->interaction_type_id == 149)\t// Recipient Bank Verification\n\t{\n\t\t$data = \"\" . $secret_key_timestamp;\n\t}\n\n\t// Computes the signature by hashing the salt with the encoded key \n\t$signature_secret_key = hash_hmac('SHA256', $secret_key_timestamp, $encodedKey, true);\n\t$signature_req_hash = hash_hmac('SHA256', $data, $encodedKey, true);\n\n\t// Encode it using base64\n\t$secret_key = base64_encode($signature_secret_key);\n\t$request_hash = base64_encode($signature_req_hash);\n\n\t//echo $secret_key;\n\t//echo $secret_key_timestamp;\n\t//echo $request_hash;\n\t\n // Return all generated values as a JSON resonse\n\tjson_encode(array('continue' => True, 'secretKey' => $secret_key, 'secretKeyTimestamp' => $secret_key_timestamp, 'request_hash' => $request_hash));\n}\nelse\n{\n\t// VALIDATION FAILED...\n\n // Return transaction-failed respose\n\tjson_encode(array('continue' => False, 'message' => 'Validation failed'));\n}\n\n?>", "language": "php", "name": "BACKEND SAMPLE CODE: Handle Debit-Hook (PHP)" } ], "sidebar": true } [/block]
You can use the **debit-hook** feature of the widget to add your own functionality (such as validation or authentication) before any financial transaction (where a wallet has to be debited). For example, * **Validate your merchant's wallet** to ensure he/she has sufficient funds before any financial transaction * **Secure** critical transaction data on your server to prevent any fraud * **Store & track** the initial state of **financial transactions** in your server (you get the final success/failure state of the transaction in [eko-response callback](doc:capture-widget-response)) [block:callout] { "type": "warning", "body": "To avoid any frauds, you should implement merchant authentication (password / OTP / etc) before any transaction where the merchant's wallet has to be debited.", "title": "Please Note:" } [/block] [block:api-header] { "title": "Step 1: Add listener for the 'debit-hook' javascript event" } [/block] The *debit-hook* event will be called before any transaction where your merchant's wallet has to be debited (for example, before money-transfer or new-recipient-account-verification). You can add a listener for the event in Javascript like this: [block:code] { "codes": [ { "code": "document.querySelector('#ekowidget').addEventListener('debit-hook', function(e) {\n\t\t// Rest of your code to call your server and handle debit-hook...\n \t// You get transaction related information in e.detail\n});", "language": "javascript" } ] } [/block] You get the following information in **e.detail**: [block:code] { "codes": [ { "code": "// e.detail =\n{\n \"url\": \"https://staging.eko.in:25004/ekoapi/v1/transactions\",\n \"http_method\": \"POST\",\n \"interaction_type_id\": 221,\n \"interaction_label\": \"Send Cash\",\n \"body\": \"client_ref_id=1527237883837&amount=1000&channel=2&recipient_id=10009977&customer_id=8888888888\",\n \"client_ref_id\": \"1527237883837\",\n \"data\": {\n \"amount\": \"1000\",\n \"channel\": \"2\",\n \"recipient_id\": 10009977,\n \"customer_id\": \"8888888888\"\n }\n}", "language": "json", "name": "Sample value of e.detail (JSON)" } ] } [/block] In **e.detail**, the most important parameters are: * **interaction_type_id**: it tells which transaction this is. You will do validation and generate *request_hash* based on this value. * **client_ref_id**: this is the unique reference for each transaction. If you do not receive any response from Eko (say, due to network error), you will use this id to check transaction status. You must save this in your database. Or, you can also generate and return your own unique ID for the transaction entry you make in your database and send it to the widget (check next step) as client_ref_id. * **data**: it contains all transaction parameters, such as the amount. After firing this event, the **widget will wait for your consent** before moving forward. [block:api-header] { "title": "Step 2: Validate the transaction & generate secretKey, secretKeyTimestamp and request_hash" } [/block] In the debit-hook callback function (as per the previous step), call your server with e.detail and then do the following: 1. Validate the transaction. For example, check if your merchant has enough wallet balance to debit his account. 2. Block the transaction amount. Debit your merchant's account with the transaction amount. 3. If previous steps are successful, **generate secretKeyTimestamp and secretKey**. Check the [Authentication](doc:authentication) section for details & sample code. 4. Using the **same secretKeyTimestamp** (as in the previous step), **generate the request_hash**. 5. Return the generated values (secretKey, secretKeyTimestamp & request_hash) to your frontend. **HOW TO GENERATE "request_hash"?** The request_hash is generated in the same way as *secret_key*. Check the [Authentication](doc:authentication) section on how to generate the hash. But, along with the secret-key-timestamp, we also **attach (concatenate)** to it other important parameter values in the same order as mentioned below: [block:parameters] { "data": { "h-0": "Transaction", "h-1": "interaction_type_id", "h-2": "Data for generating request_hash", "0-0": "Domestic Money Transfer", "0-1": "221", "0-2": "secretKeyTimestamp + customer_id + recipient_id + amount", "1-0": "Verify Recipient Bank Account (Domestic Money Transfer)", "1-1": "149", "1-2": "secretKeyTimestamp", "3-0": "", "3-1": "", "3-2": "", "2-0": "Indo-Nepal Money Transfer", "2-1": "279", "2-2": "secretKeyTimestamp + customer_id + recipient_id + amount" }, "cols": 3, "rows": 4 } [/block] For example, for Money Transfer (or, Indo-Nepal), if secret-key-timestamp=1234567890, customer_id=9876654321, recipient_is=1234 & amount=10000, then to get request_hash, pass the following string in the function to generate hash: "12345678909876654321123410000". Now, get Base64 encoded HMAC_SHA256 of "12345678909876654321123410000". Check the [Authentication](doc:authentication) section for the sample code to generate the hash (Same code that is used to generate the secret-key). [block:callout] { "type": "danger", "title": "IMPORTANT", "body": "The **request_hash** is only generated for a valid transaction that you want to commit. NEVER generate **request_hash** for an invalid transaction that you want to cancel!\n\nIf you are using .NET, you should not send overly specific time stamps, due to differing interpretations of how extra time precision should be dropped. To avoid overly specific time stamps, manually construct dateTime objects with no more than millisecond precision." } [/block] [block:api-header] { "title": "Step 3: Confirm or cancel widget transaction" } [/block] **If Step 2 fails** (for example, not enough balance in your merchant's wallet), cancel the widget transaction by using the following Javascript code in your frontend: [block:code] { "codes": [ { "code": "document.querySelector('#ekowidget').go(false, {message: \"You have insufficient balance\"});", "language": "javascript", "name": "Cancel Widget Transaction (Javascript)" } ] } [/block] **If Step 2 is successful** and you receive secretKey, secretKeyTimestamp and request_hash from your backend server, use the following Javascript code to confirm the widget to proceed with the transaction: [block:code] { "codes": [ { "code": "document.querySelector('#ekowidget').go(true, \n {\n \t\t\t\t\t\t\t\t\t\t\t\trequest_hash:\"...\", \n \tsecretKey:\"...\", \n \t\t\t\t\t\t\t\t\t\t\t\tsecretKeyTimestamp:\"...\",\n \t\t\t\t\t\t\t\t\t\t\t\tclient_ref_id:\"...\"\t\t\t\t// OPTIONAL\n\t\t\t\t\t\t});", "language": "javascript", "name": "Confirm Widget Transaction (Javascript)" } ] } [/block] **NOTE:** the client_ref_id parameter is optional. If you want us to use your own unique transaction id as client_ref_id, pass it here. [block:code] { "codes": [ { "code": "<html>\n<body>\n\n <!--\n\t\tThis code will go at the end of the same page where you have inserted the tf-eko-connect-widget from the previous \"How to Integrate Widget?\" step:\n\n\t\t\t<tf-eko-connect-widget id=\"ekowidget\" ... ></tf-eko-connect-widget>\n\t-->\n\n\t<script>\n\n\t\t// CAPTURE EKO WIDGET DEBIT-HOOK\n\t\tdocument.querySelector('#ekowidget').addEventListener('debit-hook', function(e) {\n\n\t\t\tconsole.log(\"[ON DEBIT HOOK] Transaction Data = \", e.detail);\n\n\t\t\t// SEND DATA TO YOUR SERVER TO DO THE FOLLOWING:\n\t\t\t\t// 1. Get transaction details in \"e.details\"\n\t\t\t\t// 2. VALIDATE: check user wallet balance\n\t\t\t\t// 3. IF TRANSACTION IS VALID, generate request_hash, secretKey & secretKeyTimestamp \n\t\t\t\t// from your server (depending on e.detail.interaction_type_id)\n\n\t\t\t$.ajax({url: 'https://MYTESTSITE.COM/handleDebitHook',\n\t\t\t\ttype: 'post',\n\t\t\t\tdataType: 'json',\n\t\t\t\tcontentType: 'application/json',\n\t\t\t\ttimeout:60000,\n\t\t\t\tdata: { detail: JSON.stringify(e.detail) },\n\n\t\t\t\tsuccess: function (resp) {\n\t\t\t\t\t// Response returned from your server is stored in 'resp'\n\t\t\t\t\t// Eg: resp = {\n\t\t\t\t\t//\t\tcontinue: true/false,\t// Validation passed?\n\t\t\t\t\t//\t\tsecretKey: \"...\",\n\t\t\t\t\t//\t\t...\n\t\t\t\t\t//\t}\n\t\t\t\t\tconsole.log(\"[DEBIT HOOK] My Server Response = \", resp);\n\n\t\t\t\t\tif (resp.continue === true)\n\t\t\t\t\t{\n\t\t\t\t\t\t// IF EVERYTHING IS ALLRIGHT, CONTINUE WIDGET...\n\t\t\t\t\t\tdocument.querySelector('#ekowidget').go(true, {\n\t\t\t\t\t\t\trequest_hash: resp.request_hash, \n\t\t\t\t\t\t\tsecretKey: resp.secretKey, \n\t\t\t\t\t\t\tsecretKeyTimestamp: resp.secretKeyTimestamp, \n\t\t\t\t\t\t\tclient_ref_id: resp.client_ref_id // OPTIONAL\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// IF VALIDATION FAILS, CANCEL WIDGET...\n\t\t\t\t\t\tdocument.querySelector('#ekowidget').go(false, {\n\t\t\t\t\t\t\tmessage: resp.message || \"Validation failed\"\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\n\t\t\t\terror: function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\tconsole.error(\"[DEBIT-HOOK] ERROR: \", textStatus, errorThrown);\n\t\t\t\t}\n\t\t\t});\n \n\t\t});\n\t</script>\n\n\t<script src=\"https://code.jquery.com/jquery-3.3.1.min.js\" integrity=\"sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=\" crossorigin=\"anonymous\"></script>\n</body>\n</html>", "language": "html", "name": "SAMPLE CODE (HTML + Javascript)" } ], "sidebar": true } [/block] [block:code] { "codes": [ { "code": "<?php\n\n// [SAMPLE CODE] DEBIT-HOOK BACKEND (/handleDebitHook/index.php)\n// Validate User's Wallet and Generate secretKey, secretKeyTimestamp & request_hash\n\nheader(\"Content-Type: application/json; charset=UTF-8\");\n\n\n// Initializing key in some variable. You will receive this key from Eko via email\n$key = \"...\";\n\n// Get transaction details sent by the widget\n$trxn_data = json_decode($_POST[\"detail\"], false);\n\n\n// VALIDATE YOUR USER/MERCHANT'S WALLET BALANCE\n$continue = validateUser($trxn_data);\t// write your own function code\n\nif ($continue)\n{\n\t// VALIDATION SUCCESSFUL...\n\n\t// Encode 'key' using base64\n\t$encodedKey = base64_encode($key);\n\n\t// Get current timestamp in milliseconds since UNIX epoch\n // Check out https://currentmillis.com to understand the timestamp format\n\t$secret_key_timestamp = round(microtime(true) * 1000);\n\n\t$data = \"\";\n\n\tif ($trxn_data->interaction_type_id == 221 || $trxn_data->interaction_type_id == 279)\t// Money Transfer or Indo-Nepal\n\t{\n\t\t$data = \"\" . $secret_key_timestamp . $trxn_data->data->customer_id . $trxn_data->data->recipient_id . $trxn_data->data->amount;\n\t}\n\telseif ($trxn_data->interaction_type_id == 149)\t// Recipient Bank Verification\n\t{\n\t\t$data = \"\" . $secret_key_timestamp;\n\t}\n\n\t// Computes the signature by hashing the salt with the encoded key \n\t$signature_secret_key = hash_hmac('SHA256', $secret_key_timestamp, $encodedKey, true);\n\t$signature_req_hash = hash_hmac('SHA256', $data, $encodedKey, true);\n\n\t// Encode it using base64\n\t$secret_key = base64_encode($signature_secret_key);\n\t$request_hash = base64_encode($signature_req_hash);\n\n\t//echo $secret_key;\n\t//echo $secret_key_timestamp;\n\t//echo $request_hash;\n\t\n // Return all generated values as a JSON resonse\n\tjson_encode(array('continue' => True, 'secretKey' => $secret_key, 'secretKeyTimestamp' => $secret_key_timestamp, 'request_hash' => $request_hash));\n}\nelse\n{\n\t// VALIDATION FAILED...\n\n // Return transaction-failed respose\n\tjson_encode(array('continue' => False, 'message' => 'Validation failed'));\n}\n\n?>", "language": "php", "name": "BACKEND SAMPLE CODE: Handle Debit-Hook (PHP)" } ], "sidebar": true } [/block]
{"_id":"5aded80654be240003a2bfbc","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"5aa8e888b7d085000fdb5b99","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-04-24T07:08:54.800Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"Capture the widget API request/response to do the following to track successful and failed transactions and to manage your merchant's wallet.\n\nConnect Widget exposes the following javascript events for tracking **responses**, **network error**, and **requests**:\n[block:api-header]\n{\n  \"title\": \"eko-response\"\n}\n[/block]\nThe event **eko-response** is fired when a response is returned after an Eko API call. It is called **for both SUCCESSFUL and FAILED transactions**. Get the details inside \"e.detail\" parameter in JSON format.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"HOW TO CHECK TRANSACTION STATUS\",\n  \"body\": \"Check ***e.detail.response.status*** to know **whether the transaction was successful or failed**\\n\\nFor successful transactions, the status is always 0. Any other status code means failure.\\n\\nSee the section [Error Codes](doc:error-codes) for a list of status codes.\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"url\\\": \\\"https://staging.eko.in:25004/ekoapi/v1/transactions\\\",\\n    \\\"client_ref_id\\\": \\\"1527072247040\\\",\\n    \\\"http_method\\\": \\\"POST\\\",\\n    \\\"http_status\\\": 200,\\n    \\\"interaction_type_id\\\": 221,\\n    \\\"response\\\": {\\n        \\\"status\\\": 0,\\n        \\\"response_status_id\\\": 0,\\n        \\\"response_type_id\\\": 325,\\n        \\\"message\\\": \\\"Transaction successful\\\",\\n        \\\"data\\\": {\\n            \\\"tx_status\\\": \\\"0\\\",\\n            \\\"debit_user_id\\\": \\\"9910028267\\\",\\n            \\\"txstatus_desc\\\": \\\"In Progress\\\",\\n            \\\"channel\\\": \\\"2\\\",\\n            \\\"tid\\\": \\\"12777102\\\",\\n            \\\"bank\\\": \\\"Punjab National Bank\\\",\\n            \\\"bank_ref_num\\\": \\\"814316777102\\\",\\n            \\\"recipient_id\\\": 10009966,\\n            \\\"timestamp\\\": \\\"2018-05-23T10:44:13.122Z\\\",\\n            \\\"amount\\\": \\\"1000.00\\\",\\n            \\\"channel_desc\\\": \\\"IMPS\\\",\\n            \\\"customer_id\\\": \\\"8888888888\\\",\\n            \\\"account\\\": \\\"2363654555555556\\\"\\n        }\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Sample Response Data (e.detail)\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"eko-network-error\"\n}\n[/block]\nThe event **eko-network-error** is fired when the request **fails due to a network issue**. Get the details inside \"e.detail\" parameter in JSON format.\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"If you get **eko-network-error** event in case of a financial transaction (eg: Money Transfer), **you must call the [Get Transaction Status](doc:transaction-inquiry) API** from your server to **check the actual status of that transaction**.\",\n  \"title\": \"IMPORTANT\"\n}\n[/block]\n*[Check Sample Code for usage example]*\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<html>\\n<body>\\n    \\n    \\n\\t<!--\\n\\t\\tThis code will go at the end of the same page where you have inserted the tf-eko-connect-widget from the \\\"How to Integrate Widget?\\\" step:\\n\\n\\t\\t<tf-eko-connect-widget id=\\\"ekowidget\\\" ... ></tf-eko-connect-widget>\\n\\t-->\\n    \\n\\t<script>\\n\\n\\t\\t// CAPTURE EKO WIDGET RESPONSE...\\n\\t\\tdocument.querySelector('#ekowidget').addEventListener('eko-response', function(e) {\\n\\n\\t\\t\\tconsole.log(\\\">> WIDGET RESPONSE: \\\", e.detail);\\n\\t\\t\\tconsole.log(\\\"REQUEST Interaction-Type-ID: \\\", e.detail.interaction_type_id);\\n\\t\\t\\tconsole.log(\\\"REQUEST Client-Ref-ID: \\\", e.detail.client_ref_id);\\n\\t\\t\\tconsole.log(\\\"RESPONSE HTTP STATUS: \\\", e.detail.http_status);\\n\\t\\t\\tconsole.log(\\\"RESPONSE data: \\\", e.detail.response);\\n\\n\\t\\t\\t// Update transaction response in your server database\\n\\t\\t\\t// Note: Change MYTESTSITE.COM to your own server URL\\n\\t\\t\\t// Note: The code below assumes that you are using jQuery\\n\\t\\t\\t$.ajax({url: 'https://MYTESTSITE.COM/handleEkoResponse',\\n\\t\\t\\t\\ttype: 'post',\\n\\t\\t\\t\\tdataType: 'json',\\n\\t\\t\\t\\tcontentType: 'application/json',\\n\\t\\t\\t\\ttimeout:60000,\\n\\t\\t\\t\\tdata: { detail: JSON.stringify(e.detail) },\\n\\n\\t\\t\\t\\terror: function(jqXHR, textStatus, errorThrown) {\\n\\t\\t\\t\\t\\tconsole.error(\\\"ERROR: Eko-Response Update Failed: \\\", textStatus, errorThrown);\\n\\t\\t\\t\\t\\t// Retry, if your server update fails due to network issues\\n\\t\\t\\t\\t}\\n\\t\\t\\t});\\n\\n\\t\\t});\\n\\n\\n\\n\\t\\t// HANDLE NETWORK ERROR...\\n\\t\\tdocument.querySelector('#ekowidget').addEventListener('eko-network-error', function(e) {\\n\\n\\t\\t\\tconsole.warn(\\\"!! WIDGET NETWORK ERROR: \\\", e.detail);\\n\\t\\t\\tconsole.log(\\\"REQUEST Interaction-Type-ID: \\\", e.detail.interaction_type_id);\\n\\t\\t\\tconsole.log(\\\"RESPONSE HTTP STATUS: \\\", e.detail.http_status);\\n\\t\\t\\tconsole.log(\\\"NETWORK TIME-OUT? \\\", e.detail.timed_out);\\n\\n\\t\\t\\t// Use the GET TRANSACTION STATUS API from your server to check actual transaction status and update your database\\n\\t\\t\\t// Note: Change MYTESTSITE.COM to your own server URL\\n\\t\\t\\t// Note: The code below assumes that you are using jQuery\\n\\t\\t\\t$.ajax({url: 'https://MYTESTSITE.COM/handleEkoNetworkError',\\n\\t\\t\\t\\ttype: 'post',\\n\\t\\t\\t\\tdataType: 'json',\\n\\t\\t\\t\\tcontentType: 'application/json',\\n\\t\\t\\t\\ttimeout:60000,\\n\\t\\t\\t\\tdata: { detail: JSON.stringify(e.detail) },\\n\\n\\t\\t\\t\\terror: function(jqXHR, textStatus, errorThrown) {\\n\\t\\t\\t\\t\\tconsole.error(\\\"ERROR: Eko-Network-Error Update Failed: \\\", textStatus, errorThrown);\\n\\t\\t\\t\\t\\t// Retry, if your server update fails due to network issues\\n\\t\\t\\t\\t}\\n\\t\\t\\t});\\n\\t\\t});\\n\\n\\n\\n\\t\\t// CAPTURE EKO WIDGET ANY REQUEST... [OPTIONAL]\\n\\t\\tdocument.querySelector('#ekowidget').addEventListener('eko-request', function(e) {\\n\\n\\t\\t\\tconsole.log(\\\"<< WIDGET REQUEST: \\\", e.detail);\\n\\t\\t\\tconsole.log(\\\"REQUEST METHOD (GET/POST/etc): \\\", e.detail.http_method);\\n\\t\\t\\tconsole.log(\\\"REQUEST URL: \\\", e.detail.url);\\n\\t\\t\\tconsole.log(\\\"REQUEST Interaction-Type-ID: \\\", e.detail.interaction_type_id);\\n\\t\\t\\tconsole.log(\\\"REQUEST PARAMETERS: \\\", e.detail.data);\\n\\t\\t});\\n\\n\\t</script>\\n\\n</body>\\n</html>\",\n      \"language\": \"html\",\n      \"name\": \"SAMPLE CODE (HTML + Javascript)\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"eko-request  [OPTIONAL]\"\n}\n[/block]\nThe event **eko-request** is fired just before any API is called by the widget. So, you can use it to keep track of any transaction done by the widget (whether financial or non-financial). Get the details inside \"e.detail\" parameter in JSON format.\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"IMPORTANT\",\n  \"body\": \"**To track financial transactions**; for example, Money Transfer or Recipient Bank-Account Validation; **use the [debit-hook](doc:widget-security) event** instead of eko-request.\"\n}\n[/block]\nCheck ***e.detail.interaction_type_id*** to know **which transaction it is**. Every transaction has a unique interaction_type_id. For example: Send Money = 221\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"url\\\": \\\"https://staging.eko.in:25004/ekoapi/v1/transactions\\\",\\n    \\\"http_method\\\": \\\"POST\\\",\\n    \\\"body\\\": \\\"client_ref_id=1527072247040&amount=1000&channel=2&recipient_id=10009966&customer_id=8888888888&initiator_id=9910028267\\\",\\n    \\\"client_ref_id\\\": \\\"1527072247040\\\",\\n    \\\"interaction_type_id\\\": 221,\\n    \\\"interaction_label\\\": \\\"Send Cash\\\",\\n    \\\"data\\\": {\\n        \\\"amount\\\": \\\"1000\\\",\\n        \\\"channel\\\": \\\"2\\\",\\n        \\\"recipient_id\\\": 10009966,\\n        \\\"customer_id\\\": \\\"8888888888\\\"\\n    }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Sample Request Data (e.detail)\"\n    }\n  ]\n}\n[/block]","excerpt":"Track the API requests made by the widget and the responses returned from Eko","slug":"capture-widget-response","type":"basic","title":"Capture Widget Response","__v":0,"parentDoc":null,"childrenPages":[]}

Capture Widget Response

Track the API requests made by the widget and the responses returned from Eko

Capture the widget API request/response to do the following to track successful and failed transactions and to manage your merchant's wallet. Connect Widget exposes the following javascript events for tracking **responses**, **network error**, and **requests**: [block:api-header] { "title": "eko-response" } [/block] The event **eko-response** is fired when a response is returned after an Eko API call. It is called **for both SUCCESSFUL and FAILED transactions**. Get the details inside "e.detail" parameter in JSON format. [block:callout] { "type": "info", "title": "HOW TO CHECK TRANSACTION STATUS", "body": "Check ***e.detail.response.status*** to know **whether the transaction was successful or failed**\n\nFor successful transactions, the status is always 0. Any other status code means failure.\n\nSee the section [Error Codes](doc:error-codes) for a list of status codes." } [/block] [block:code] { "codes": [ { "code": "{\n \"url\": \"https://staging.eko.in:25004/ekoapi/v1/transactions\",\n \"client_ref_id\": \"1527072247040\",\n \"http_method\": \"POST\",\n \"http_status\": 200,\n \"interaction_type_id\": 221,\n \"response\": {\n \"status\": 0,\n \"response_status_id\": 0,\n \"response_type_id\": 325,\n \"message\": \"Transaction successful\",\n \"data\": {\n \"tx_status\": \"0\",\n \"debit_user_id\": \"9910028267\",\n \"txstatus_desc\": \"In Progress\",\n \"channel\": \"2\",\n \"tid\": \"12777102\",\n \"bank\": \"Punjab National Bank\",\n \"bank_ref_num\": \"814316777102\",\n \"recipient_id\": 10009966,\n \"timestamp\": \"2018-05-23T10:44:13.122Z\",\n \"amount\": \"1000.00\",\n \"channel_desc\": \"IMPS\",\n \"customer_id\": \"8888888888\",\n \"account\": \"2363654555555556\"\n }\n }\n}", "language": "json", "name": "Sample Response Data (e.detail)" } ] } [/block] [block:api-header] { "title": "eko-network-error" } [/block] The event **eko-network-error** is fired when the request **fails due to a network issue**. Get the details inside "e.detail" parameter in JSON format. [block:callout] { "type": "danger", "body": "If you get **eko-network-error** event in case of a financial transaction (eg: Money Transfer), **you must call the [Get Transaction Status](doc:transaction-inquiry) API** from your server to **check the actual status of that transaction**.", "title": "IMPORTANT" } [/block] *[Check Sample Code for usage example]* [block:code] { "codes": [ { "code": "<html>\n<body>\n \n \n\t<!--\n\t\tThis code will go at the end of the same page where you have inserted the tf-eko-connect-widget from the \"How to Integrate Widget?\" step:\n\n\t\t<tf-eko-connect-widget id=\"ekowidget\" ... ></tf-eko-connect-widget>\n\t-->\n \n\t<script>\n\n\t\t// CAPTURE EKO WIDGET RESPONSE...\n\t\tdocument.querySelector('#ekowidget').addEventListener('eko-response', function(e) {\n\n\t\t\tconsole.log(\">> WIDGET RESPONSE: \", e.detail);\n\t\t\tconsole.log(\"REQUEST Interaction-Type-ID: \", e.detail.interaction_type_id);\n\t\t\tconsole.log(\"REQUEST Client-Ref-ID: \", e.detail.client_ref_id);\n\t\t\tconsole.log(\"RESPONSE HTTP STATUS: \", e.detail.http_status);\n\t\t\tconsole.log(\"RESPONSE data: \", e.detail.response);\n\n\t\t\t// Update transaction response in your server database\n\t\t\t// Note: Change MYTESTSITE.COM to your own server URL\n\t\t\t// Note: The code below assumes that you are using jQuery\n\t\t\t$.ajax({url: 'https://MYTESTSITE.COM/handleEkoResponse',\n\t\t\t\ttype: 'post',\n\t\t\t\tdataType: 'json',\n\t\t\t\tcontentType: 'application/json',\n\t\t\t\ttimeout:60000,\n\t\t\t\tdata: { detail: JSON.stringify(e.detail) },\n\n\t\t\t\terror: function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\tconsole.error(\"ERROR: Eko-Response Update Failed: \", textStatus, errorThrown);\n\t\t\t\t\t// Retry, if your server update fails due to network issues\n\t\t\t\t}\n\t\t\t});\n\n\t\t});\n\n\n\n\t\t// HANDLE NETWORK ERROR...\n\t\tdocument.querySelector('#ekowidget').addEventListener('eko-network-error', function(e) {\n\n\t\t\tconsole.warn(\"!! WIDGET NETWORK ERROR: \", e.detail);\n\t\t\tconsole.log(\"REQUEST Interaction-Type-ID: \", e.detail.interaction_type_id);\n\t\t\tconsole.log(\"RESPONSE HTTP STATUS: \", e.detail.http_status);\n\t\t\tconsole.log(\"NETWORK TIME-OUT? \", e.detail.timed_out);\n\n\t\t\t// Use the GET TRANSACTION STATUS API from your server to check actual transaction status and update your database\n\t\t\t// Note: Change MYTESTSITE.COM to your own server URL\n\t\t\t// Note: The code below assumes that you are using jQuery\n\t\t\t$.ajax({url: 'https://MYTESTSITE.COM/handleEkoNetworkError',\n\t\t\t\ttype: 'post',\n\t\t\t\tdataType: 'json',\n\t\t\t\tcontentType: 'application/json',\n\t\t\t\ttimeout:60000,\n\t\t\t\tdata: { detail: JSON.stringify(e.detail) },\n\n\t\t\t\terror: function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\tconsole.error(\"ERROR: Eko-Network-Error Update Failed: \", textStatus, errorThrown);\n\t\t\t\t\t// Retry, if your server update fails due to network issues\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\n\n\t\t// CAPTURE EKO WIDGET ANY REQUEST... [OPTIONAL]\n\t\tdocument.querySelector('#ekowidget').addEventListener('eko-request', function(e) {\n\n\t\t\tconsole.log(\"<< WIDGET REQUEST: \", e.detail);\n\t\t\tconsole.log(\"REQUEST METHOD (GET/POST/etc): \", e.detail.http_method);\n\t\t\tconsole.log(\"REQUEST URL: \", e.detail.url);\n\t\t\tconsole.log(\"REQUEST Interaction-Type-ID: \", e.detail.interaction_type_id);\n\t\t\tconsole.log(\"REQUEST PARAMETERS: \", e.detail.data);\n\t\t});\n\n\t</script>\n\n</body>\n</html>", "language": "html", "name": "SAMPLE CODE (HTML + Javascript)" } ], "sidebar": true } [/block] [block:api-header] { "title": "eko-request [OPTIONAL]" } [/block] The event **eko-request** is fired just before any API is called by the widget. So, you can use it to keep track of any transaction done by the widget (whether financial or non-financial). Get the details inside "e.detail" parameter in JSON format. [block:callout] { "type": "danger", "title": "IMPORTANT", "body": "**To track financial transactions**; for example, Money Transfer or Recipient Bank-Account Validation; **use the [debit-hook](doc:widget-security) event** instead of eko-request." } [/block] Check ***e.detail.interaction_type_id*** to know **which transaction it is**. Every transaction has a unique interaction_type_id. For example: Send Money = 221 [block:code] { "codes": [ { "code": "{\n \"url\": \"https://staging.eko.in:25004/ekoapi/v1/transactions\",\n \"http_method\": \"POST\",\n \"body\": \"client_ref_id=1527072247040&amount=1000&channel=2&recipient_id=10009966&customer_id=8888888888&initiator_id=9910028267\",\n \"client_ref_id\": \"1527072247040\",\n \"interaction_type_id\": 221,\n \"interaction_label\": \"Send Cash\",\n \"data\": {\n \"amount\": \"1000\",\n \"channel\": \"2\",\n \"recipient_id\": 10009966,\n \"customer_id\": \"8888888888\"\n }\n}", "language": "json", "name": "Sample Request Data (e.detail)" } ] } [/block]
Capture the widget API request/response to do the following to track successful and failed transactions and to manage your merchant's wallet. Connect Widget exposes the following javascript events for tracking **responses**, **network error**, and **requests**: [block:api-header] { "title": "eko-response" } [/block] The event **eko-response** is fired when a response is returned after an Eko API call. It is called **for both SUCCESSFUL and FAILED transactions**. Get the details inside "e.detail" parameter in JSON format. [block:callout] { "type": "info", "title": "HOW TO CHECK TRANSACTION STATUS", "body": "Check ***e.detail.response.status*** to know **whether the transaction was successful or failed**\n\nFor successful transactions, the status is always 0. Any other status code means failure.\n\nSee the section [Error Codes](doc:error-codes) for a list of status codes." } [/block] [block:code] { "codes": [ { "code": "{\n \"url\": \"https://staging.eko.in:25004/ekoapi/v1/transactions\",\n \"client_ref_id\": \"1527072247040\",\n \"http_method\": \"POST\",\n \"http_status\": 200,\n \"interaction_type_id\": 221,\n \"response\": {\n \"status\": 0,\n \"response_status_id\": 0,\n \"response_type_id\": 325,\n \"message\": \"Transaction successful\",\n \"data\": {\n \"tx_status\": \"0\",\n \"debit_user_id\": \"9910028267\",\n \"txstatus_desc\": \"In Progress\",\n \"channel\": \"2\",\n \"tid\": \"12777102\",\n \"bank\": \"Punjab National Bank\",\n \"bank_ref_num\": \"814316777102\",\n \"recipient_id\": 10009966,\n \"timestamp\": \"2018-05-23T10:44:13.122Z\",\n \"amount\": \"1000.00\",\n \"channel_desc\": \"IMPS\",\n \"customer_id\": \"8888888888\",\n \"account\": \"2363654555555556\"\n }\n }\n}", "language": "json", "name": "Sample Response Data (e.detail)" } ] } [/block] [block:api-header] { "title": "eko-network-error" } [/block] The event **eko-network-error** is fired when the request **fails due to a network issue**. Get the details inside "e.detail" parameter in JSON format. [block:callout] { "type": "danger", "body": "If you get **eko-network-error** event in case of a financial transaction (eg: Money Transfer), **you must call the [Get Transaction Status](doc:transaction-inquiry) API** from your server to **check the actual status of that transaction**.", "title": "IMPORTANT" } [/block] *[Check Sample Code for usage example]* [block:code] { "codes": [ { "code": "<html>\n<body>\n \n \n\t<!--\n\t\tThis code will go at the end of the same page where you have inserted the tf-eko-connect-widget from the \"How to Integrate Widget?\" step:\n\n\t\t<tf-eko-connect-widget id=\"ekowidget\" ... ></tf-eko-connect-widget>\n\t-->\n \n\t<script>\n\n\t\t// CAPTURE EKO WIDGET RESPONSE...\n\t\tdocument.querySelector('#ekowidget').addEventListener('eko-response', function(e) {\n\n\t\t\tconsole.log(\">> WIDGET RESPONSE: \", e.detail);\n\t\t\tconsole.log(\"REQUEST Interaction-Type-ID: \", e.detail.interaction_type_id);\n\t\t\tconsole.log(\"REQUEST Client-Ref-ID: \", e.detail.client_ref_id);\n\t\t\tconsole.log(\"RESPONSE HTTP STATUS: \", e.detail.http_status);\n\t\t\tconsole.log(\"RESPONSE data: \", e.detail.response);\n\n\t\t\t// Update transaction response in your server database\n\t\t\t// Note: Change MYTESTSITE.COM to your own server URL\n\t\t\t// Note: The code below assumes that you are using jQuery\n\t\t\t$.ajax({url: 'https://MYTESTSITE.COM/handleEkoResponse',\n\t\t\t\ttype: 'post',\n\t\t\t\tdataType: 'json',\n\t\t\t\tcontentType: 'application/json',\n\t\t\t\ttimeout:60000,\n\t\t\t\tdata: { detail: JSON.stringify(e.detail) },\n\n\t\t\t\terror: function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\tconsole.error(\"ERROR: Eko-Response Update Failed: \", textStatus, errorThrown);\n\t\t\t\t\t// Retry, if your server update fails due to network issues\n\t\t\t\t}\n\t\t\t});\n\n\t\t});\n\n\n\n\t\t// HANDLE NETWORK ERROR...\n\t\tdocument.querySelector('#ekowidget').addEventListener('eko-network-error', function(e) {\n\n\t\t\tconsole.warn(\"!! WIDGET NETWORK ERROR: \", e.detail);\n\t\t\tconsole.log(\"REQUEST Interaction-Type-ID: \", e.detail.interaction_type_id);\n\t\t\tconsole.log(\"RESPONSE HTTP STATUS: \", e.detail.http_status);\n\t\t\tconsole.log(\"NETWORK TIME-OUT? \", e.detail.timed_out);\n\n\t\t\t// Use the GET TRANSACTION STATUS API from your server to check actual transaction status and update your database\n\t\t\t// Note: Change MYTESTSITE.COM to your own server URL\n\t\t\t// Note: The code below assumes that you are using jQuery\n\t\t\t$.ajax({url: 'https://MYTESTSITE.COM/handleEkoNetworkError',\n\t\t\t\ttype: 'post',\n\t\t\t\tdataType: 'json',\n\t\t\t\tcontentType: 'application/json',\n\t\t\t\ttimeout:60000,\n\t\t\t\tdata: { detail: JSON.stringify(e.detail) },\n\n\t\t\t\terror: function(jqXHR, textStatus, errorThrown) {\n\t\t\t\t\tconsole.error(\"ERROR: Eko-Network-Error Update Failed: \", textStatus, errorThrown);\n\t\t\t\t\t// Retry, if your server update fails due to network issues\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\n\n\t\t// CAPTURE EKO WIDGET ANY REQUEST... [OPTIONAL]\n\t\tdocument.querySelector('#ekowidget').addEventListener('eko-request', function(e) {\n\n\t\t\tconsole.log(\"<< WIDGET REQUEST: \", e.detail);\n\t\t\tconsole.log(\"REQUEST METHOD (GET/POST/etc): \", e.detail.http_method);\n\t\t\tconsole.log(\"REQUEST URL: \", e.detail.url);\n\t\t\tconsole.log(\"REQUEST Interaction-Type-ID: \", e.detail.interaction_type_id);\n\t\t\tconsole.log(\"REQUEST PARAMETERS: \", e.detail.data);\n\t\t});\n\n\t</script>\n\n</body>\n</html>", "language": "html", "name": "SAMPLE CODE (HTML + Javascript)" } ], "sidebar": true } [/block] [block:api-header] { "title": "eko-request [OPTIONAL]" } [/block] The event **eko-request** is fired just before any API is called by the widget. So, you can use it to keep track of any transaction done by the widget (whether financial or non-financial). Get the details inside "e.detail" parameter in JSON format. [block:callout] { "type": "danger", "title": "IMPORTANT", "body": "**To track financial transactions**; for example, Money Transfer or Recipient Bank-Account Validation; **use the [debit-hook](doc:widget-security) event** instead of eko-request." } [/block] Check ***e.detail.interaction_type_id*** to know **which transaction it is**. Every transaction has a unique interaction_type_id. For example: Send Money = 221 [block:code] { "codes": [ { "code": "{\n \"url\": \"https://staging.eko.in:25004/ekoapi/v1/transactions\",\n \"http_method\": \"POST\",\n \"body\": \"client_ref_id=1527072247040&amount=1000&channel=2&recipient_id=10009966&customer_id=8888888888&initiator_id=9910028267\",\n \"client_ref_id\": \"1527072247040\",\n \"interaction_type_id\": 221,\n \"interaction_label\": \"Send Cash\",\n \"data\": {\n \"amount\": \"1000\",\n \"channel\": \"2\",\n \"recipient_id\": 10009966,\n \"customer_id\": \"8888888888\"\n }\n}", "language": "json", "name": "Sample Request Data (e.detail)" } ] } [/block]
{"_id":"5b04fa445f9a0d00039a794e","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"5aa8e888b7d085000fdb5b99","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-05-23T05:21:08.945Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"You can completely change the colors of the widget to match your website style. You can **check out some sample themes** (and corresponding widget code) in the [Widget Demo](doc:widget-introduction). \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"1. Select 'Light' or 'Dark' base theme\"\n}\n[/block]\nFirst, decide whether you want the **light** or the **dark** version of the widget.\n\n  * **Light Theme** is the default. You do not have to do anything to get the default Light theme.\n  * To get the **Dark Theme**, just add the HTML attribute ***dark-theme***, in the *<eko-connect-widget>* tag.\n\n[block:api-header]\n{\n  \"title\": \"2. Change theme colors to match your website\"\n}\n[/block]\nAfter selecting a base color (Light or Dark), you can change any of its colors to match your own website theme.\n\nYou can change colors by setting the HTML attribute \"**theme-colors**\" in the *<eko-connect-widget>* tag with different color values in JSON format, as explained below.\n\neg: <eko-connect-widget theme-colors = '{\"--accent-color\":\"#7E57C2\"}'>\n\nThe **easiest way** to match the widget to your own theme is by changing the **Accent Color** to match your website's primary or accent color. Change accent color by setting:\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Easiest Way To Match Your Website's Theme:\",\n  \"body\": \"You can start by just changing the **--accent-color** to match your website's primary or accent color.\\n\\nPlease do not forget to also set the lighter version of your --accent-color.\\n\\nEg:\\n <eko-connect-widget theme-colors = '{\\\"--accent-color\\\":\\\"#7E57C2\\\", \\\"--light-accent-color\\\":\\\"#9575CD\\\"}'>\"\n}\n[/block]\nHere are the different color values that you can change. Please play around with these values to see how they affect the theme:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Color Name\",\n    \"h-1\": \"Default Color (Light Theme)\",\n    \"0-0\": \"--accent-color\",\n    \"0-1\": \"FF4081\",\n    \"1-0\": \"--light-accent-color\",\n    \"1-1\": \"F06292\",\n    \"2-0\": \"--divider-color\",\n    \"2-1\": \"DBDBDB\",\n    \"3-0\": \"--dark-divider-color\",\n    \"3-1\": \"CCC\",\n    \"4-0\": \"--primary-text-color\",\n    \"4-1\": \"212121\",\n    \"5-0\": \"--secondary-text-color\",\n    \"5-1\": \"737373\",\n    \"6-0\": \"--disabled-text-color\",\n    \"6-1\": \"9b9b9b\",\n    \"7-0\": \"--light-text-color\",\n    \"7-1\": \"424242\",\n    \"8-0\": \"--lighter-text-color\",\n    \"8-1\": \"616161\",\n    \"9-0\": \"--lighter-2-text-color\",\n    \"9-1\": \"757575\",\n    \"10-0\": \"--lightest-text-color\",\n    \"10-1\": \"BDBDBD\",\n    \"11-0\": \"--lightest-2-text-color\",\n    \"11-1\": \"E0E0E0\",\n    \"12-0\": \"--accented-text-color\",\n    \"12-1\": \"448AFF\",\n    \"13-0\": \"--secondary-accented-text-color\",\n    \"13-1\": \"546E7A\",\n    \"14-0\": \"--error-color\",\n    \"14-1\": \"DD2C00\",\n    \"15-0\": \"--success-color\",\n    \"15-1\": \"4CAF50\",\n    \"16-0\": \"--card-background-color\",\n    \"16-1\": \"FFF\",\n    \"17-0\": \"--light-card-background-color\",\n    \"17-1\": \"F5F5F5\",\n    \"18-0\": \"--dark-card-background-color\",\n    \"18-1\": \"EEE\",\n    \"19-0\": \"--secondary-button-color\",\n    \"19-1\": \"42A5F5\",\n    \"20-0\": \"--light-secondary-button-color\",\n    \"20-1\": \"64B5F6\",\n    \"21-0\": \"--dark-secondary-button-color\",\n    \"21-1\": \"2196F3\",\n    \"22-0\": \"--error-button-color\",\n    \"22-1\": \"FF5252\",\n    \"23-0\": \"--menu-selected-background-color\",\n    \"23-1\": \"9EC2FF\",\n    \"24-0\": \"--light-menu-selected-background-color\",\n    \"24-1\": \"CCDFFF\",\n    \"25-0\": \"--dark-menu-selected-background-color\",\n    \"25-1\": \"64B5F6\",\n    \"26-0\": \"--tf-input-focus-color\",\n    \"26-1\": \"2979FF\",\n    \"27-0\": \"--tf-quick-select-unchecked-button-color\",\n    \"27-1\": \"E0E0E0\",\n    \"30-0\": \"--paper-toast-background-color\",\n    \"30-1\": \"323232\",\n    \"31-0\": \"--paper-toast-color\",\n    \"31-1\": \"F1F1F1\",\n    \"32-0\": \"--paper-tooltip-background\",\n    \"32-1\": \"616161\",\n    \"h-2\": \"Example Usage in Widget\",\n    \"28-0\": \"--tf-quick-select-checked-button-color\",\n    \"28-1\": \"448AFF\",\n    \"29-0\": \"--tf-quick-select-checked-highlight-color\",\n    \"29-1\": \"619DFF\",\n    \"0-2\": \"Card headings, go button, link hover, etc\",\n    \"4-2\": \"Main font color\",\n    \"5-2\": \"Light font color\",\n    \"6-2\": \"Disabled font color\",\n    \"14-2\": \"Error messages (red)\",\n    \"15-2\": \"Success messages (green)\",\n    \"16-2\": \"Background of widget card\",\n    \"22-2\": \"Delete button (red)\",\n    \"23-2\": \"List row color (response card)\",\n    \"27-2\": \"Multi select (Request card)\",\n    \"28-2\": \"Multi select (Request card)\",\n    \"29-2\": \"Multi select (Request card)\",\n    \"30-2\": \"Toast Message\",\n    \"31-2\": \"Toast Message\",\n    \"32-2\": \"Tooltip (on hover)\"\n  },\n  \"cols\": 3,\n  \"rows\": 33\n}\n[/block]","excerpt":"Change the widget theme to match your website style","slug":"widget-themes-colors","type":"basic","title":"Widget Themes & Colors","__v":0,"parentDoc":null,"childrenPages":[]}

Widget Themes & Colors

Change the widget theme to match your website style

You can completely change the colors of the widget to match your website style. You can **check out some sample themes** (and corresponding widget code) in the [Widget Demo](doc:widget-introduction). [block:api-header] { "type": "basic", "title": "1. Select 'Light' or 'Dark' base theme" } [/block] First, decide whether you want the **light** or the **dark** version of the widget. * **Light Theme** is the default. You do not have to do anything to get the default Light theme. * To get the **Dark Theme**, just add the HTML attribute ***dark-theme***, in the *<eko-connect-widget>* tag. [block:api-header] { "title": "2. Change theme colors to match your website" } [/block] After selecting a base color (Light or Dark), you can change any of its colors to match your own website theme. You can change colors by setting the HTML attribute "**theme-colors**" in the *<eko-connect-widget>* tag with different color values in JSON format, as explained below. eg: <eko-connect-widget theme-colors = '{"--accent-color":"#7E57C2"}'> The **easiest way** to match the widget to your own theme is by changing the **Accent Color** to match your website's primary or accent color. Change accent color by setting: [block:callout] { "type": "success", "title": "Easiest Way To Match Your Website's Theme:", "body": "You can start by just changing the **--accent-color** to match your website's primary or accent color.\n\nPlease do not forget to also set the lighter version of your --accent-color.\n\nEg:\n <eko-connect-widget theme-colors = '{\"--accent-color\":\"#7E57C2\", \"--light-accent-color\":\"#9575CD\"}'>" } [/block] Here are the different color values that you can change. Please play around with these values to see how they affect the theme: [block:parameters] { "data": { "h-0": "Color Name", "h-1": "Default Color (Light Theme)", "0-0": "--accent-color", "0-1": "FF4081", "1-0": "--light-accent-color", "1-1": "F06292", "2-0": "--divider-color", "2-1": "DBDBDB", "3-0": "--dark-divider-color", "3-1": "CCC", "4-0": "--primary-text-color", "4-1": "212121", "5-0": "--secondary-text-color", "5-1": "737373", "6-0": "--disabled-text-color", "6-1": "9b9b9b", "7-0": "--light-text-color", "7-1": "424242", "8-0": "--lighter-text-color", "8-1": "616161", "9-0": "--lighter-2-text-color", "9-1": "757575", "10-0": "--lightest-text-color", "10-1": "BDBDBD", "11-0": "--lightest-2-text-color", "11-1": "E0E0E0", "12-0": "--accented-text-color", "12-1": "448AFF", "13-0": "--secondary-accented-text-color", "13-1": "546E7A", "14-0": "--error-color", "14-1": "DD2C00", "15-0": "--success-color", "15-1": "4CAF50", "16-0": "--card-background-color", "16-1": "FFF", "17-0": "--light-card-background-color", "17-1": "F5F5F5", "18-0": "--dark-card-background-color", "18-1": "EEE", "19-0": "--secondary-button-color", "19-1": "42A5F5", "20-0": "--light-secondary-button-color", "20-1": "64B5F6", "21-0": "--dark-secondary-button-color", "21-1": "2196F3", "22-0": "--error-button-color", "22-1": "FF5252", "23-0": "--menu-selected-background-color", "23-1": "9EC2FF", "24-0": "--light-menu-selected-background-color", "24-1": "CCDFFF", "25-0": "--dark-menu-selected-background-color", "25-1": "64B5F6", "26-0": "--tf-input-focus-color", "26-1": "2979FF", "27-0": "--tf-quick-select-unchecked-button-color", "27-1": "E0E0E0", "30-0": "--paper-toast-background-color", "30-1": "323232", "31-0": "--paper-toast-color", "31-1": "F1F1F1", "32-0": "--paper-tooltip-background", "32-1": "616161", "h-2": "Example Usage in Widget", "28-0": "--tf-quick-select-checked-button-color", "28-1": "448AFF", "29-0": "--tf-quick-select-checked-highlight-color", "29-1": "619DFF", "0-2": "Card headings, go button, link hover, etc", "4-2": "Main font color", "5-2": "Light font color", "6-2": "Disabled font color", "14-2": "Error messages (red)", "15-2": "Success messages (green)", "16-2": "Background of widget card", "22-2": "Delete button (red)", "23-2": "List row color (response card)", "27-2": "Multi select (Request card)", "28-2": "Multi select (Request card)", "29-2": "Multi select (Request card)", "30-2": "Toast Message", "31-2": "Toast Message", "32-2": "Tooltip (on hover)" }, "cols": 3, "rows": 33 } [/block]
You can completely change the colors of the widget to match your website style. You can **check out some sample themes** (and corresponding widget code) in the [Widget Demo](doc:widget-introduction). [block:api-header] { "type": "basic", "title": "1. Select 'Light' or 'Dark' base theme" } [/block] First, decide whether you want the **light** or the **dark** version of the widget. * **Light Theme** is the default. You do not have to do anything to get the default Light theme. * To get the **Dark Theme**, just add the HTML attribute ***dark-theme***, in the *<eko-connect-widget>* tag. [block:api-header] { "title": "2. Change theme colors to match your website" } [/block] After selecting a base color (Light or Dark), you can change any of its colors to match your own website theme. You can change colors by setting the HTML attribute "**theme-colors**" in the *<eko-connect-widget>* tag with different color values in JSON format, as explained below. eg: <eko-connect-widget theme-colors = '{"--accent-color":"#7E57C2"}'> The **easiest way** to match the widget to your own theme is by changing the **Accent Color** to match your website's primary or accent color. Change accent color by setting: [block:callout] { "type": "success", "title": "Easiest Way To Match Your Website's Theme:", "body": "You can start by just changing the **--accent-color** to match your website's primary or accent color.\n\nPlease do not forget to also set the lighter version of your --accent-color.\n\nEg:\n <eko-connect-widget theme-colors = '{\"--accent-color\":\"#7E57C2\", \"--light-accent-color\":\"#9575CD\"}'>" } [/block] Here are the different color values that you can change. Please play around with these values to see how they affect the theme: [block:parameters] { "data": { "h-0": "Color Name", "h-1": "Default Color (Light Theme)", "0-0": "--accent-color", "0-1": "FF4081", "1-0": "--light-accent-color", "1-1": "F06292", "2-0": "--divider-color", "2-1": "DBDBDB", "3-0": "--dark-divider-color", "3-1": "CCC", "4-0": "--primary-text-color", "4-1": "212121", "5-0": "--secondary-text-color", "5-1": "737373", "6-0": "--disabled-text-color", "6-1": "9b9b9b", "7-0": "--light-text-color", "7-1": "424242", "8-0": "--lighter-text-color", "8-1": "616161", "9-0": "--lighter-2-text-color", "9-1": "757575", "10-0": "--lightest-text-color", "10-1": "BDBDBD", "11-0": "--lightest-2-text-color", "11-1": "E0E0E0", "12-0": "--accented-text-color", "12-1": "448AFF", "13-0": "--secondary-accented-text-color", "13-1": "546E7A", "14-0": "--error-color", "14-1": "DD2C00", "15-0": "--success-color", "15-1": "4CAF50", "16-0": "--card-background-color", "16-1": "FFF", "17-0": "--light-card-background-color", "17-1": "F5F5F5", "18-0": "--dark-card-background-color", "18-1": "EEE", "19-0": "--secondary-button-color", "19-1": "42A5F5", "20-0": "--light-secondary-button-color", "20-1": "64B5F6", "21-0": "--dark-secondary-button-color", "21-1": "2196F3", "22-0": "--error-button-color", "22-1": "FF5252", "23-0": "--menu-selected-background-color", "23-1": "9EC2FF", "24-0": "--light-menu-selected-background-color", "24-1": "CCDFFF", "25-0": "--dark-menu-selected-background-color", "25-1": "64B5F6", "26-0": "--tf-input-focus-color", "26-1": "2979FF", "27-0": "--tf-quick-select-unchecked-button-color", "27-1": "E0E0E0", "30-0": "--paper-toast-background-color", "30-1": "323232", "31-0": "--paper-toast-color", "31-1": "F1F1F1", "32-0": "--paper-tooltip-background", "32-1": "616161", "h-2": "Example Usage in Widget", "28-0": "--tf-quick-select-checked-button-color", "28-1": "448AFF", "29-0": "--tf-quick-select-checked-highlight-color", "29-1": "619DFF", "0-2": "Card headings, go button, link hover, etc", "4-2": "Main font color", "5-2": "Light font color", "6-2": "Disabled font color", "14-2": "Error messages (red)", "15-2": "Success messages (green)", "16-2": "Background of widget card", "22-2": "Delete button (red)", "23-2": "List row color (response card)", "27-2": "Multi select (Request card)", "28-2": "Multi select (Request card)", "29-2": "Multi select (Request card)", "30-2": "Toast Message", "31-2": "Toast Message", "32-2": "Tooltip (on hover)" }, "cols": 3, "rows": 33 } [/block]
{"_id":"5b45ed77ee36c700035705f5","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"5aa8e888b7d085000fdb5b99","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-07-11T11:43:51.178Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"Widget currently supports the following languages (more to come soon):\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Language\",\n    \"h-1\": \"Code\",\n    \"0-0\": \"English\",\n    \"0-1\": \"en\",\n    \"1-0\": \"Hindi\",\n    \"1-1\": \"hi\",\n    \"2-0\": \"Marathi\",\n    \"2-1\": \"mr\",\n    \"3-0\": \"Gujarati\",\n    \"3-1\": \"gu\",\n    \"4-0\": \"Kannada\",\n    \"4-1\": \"kn\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\n}\n[/block]\nChange widget language by passing the corresponding language code in the widget's **language** parameter.\n\nEg: <eko-connect-widget language=\"hi\">\n\nYou can **check out different languages** in the [Widget Demo](doc:widget-introduction).","excerpt":"Support multiple languages on your website","slug":"widget-language","type":"basic","title":"Widget Languages","__v":0,"parentDoc":null,"childrenPages":[]}

Widget Languages

Support multiple languages on your website

Widget currently supports the following languages (more to come soon): [block:parameters] { "data": { "h-0": "Language", "h-1": "Code", "0-0": "English", "0-1": "en", "1-0": "Hindi", "1-1": "hi", "2-0": "Marathi", "2-1": "mr", "3-0": "Gujarati", "3-1": "gu", "4-0": "Kannada", "4-1": "kn" }, "cols": 2, "rows": 5 } [/block] Change widget language by passing the corresponding language code in the widget's **language** parameter. Eg: <eko-connect-widget language="hi"> You can **check out different languages** in the [Widget Demo](doc:widget-introduction).
Widget currently supports the following languages (more to come soon): [block:parameters] { "data": { "h-0": "Language", "h-1": "Code", "0-0": "English", "0-1": "en", "1-0": "Hindi", "1-1": "hi", "2-0": "Marathi", "2-1": "mr", "3-0": "Gujarati", "3-1": "gu", "4-0": "Kannada", "4-1": "kn" }, "cols": 2, "rows": 5 } [/block] Change widget language by passing the corresponding language code in the widget's **language** parameter. Eg: <eko-connect-widget language="hi"> You can **check out different languages** in the [Widget Demo](doc:widget-introduction).
{"_id":"5b7130e20b125a00032a95f8","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"5aa8e888b7d085000fdb5b99","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-08-13T07:18:58.560Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/c98255a-Transaction_Receipt_2018-8-12_12_30_17-1.jpg\",\n        \"Transaction Receipt 2018-8-12 12_30_17-1.jpg\",\n        1606,\n        1123,\n        \"#111111\"\n      ],\n      \"caption\": \"Sample Receipt. You can change the branding as per your needs.\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\nYou can enable receipt printing feature in the widget using following quick steps:\n\n  1. Add attribute **enable-print-receipt** in the <tf-eko-connect-widget> code.\n\n  2. Add CSS to hide your website elements from printing (at the end of your CSS).\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<style>\\n\\n\\t@media print {\\n\\t\\tbody {\\n\\t\\t\\tbackground:none !important;\\n\\t\\t\\tcolor:#000;\\n\\t\\t\\tpadding:0;\\n\\t\\t\\tmargin:0;\\n\\t\\t\\t-webkit-print-color-adjust:exact;\\n\\t\\t\\tprint-color-adjust:exact;\\n\\t\\t}\\n\\n\\t\\t.header, .footer, .menubar {\\n\\t\\t\\tdisplay:none !important;\\n\\t\\t}\\n\\t}\\n</style>\",\n      \"language\": \"css\",\n      \"name\": \"CSS Example\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"NOTE\",\n  \"body\": \"The print receipt feature works on mobile as well. Just connect any mobile compatible printer to your mobile phone using Bluetooth, Wifi or a USB cable and start printing receipts.\\n\\nIt also works with any paper size!\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"To ensure that your CSS is correctly working, print out a sample receipt from our Widget Demo and compare it to your website's printed receipt\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Add Print-Receipt Branding\"\n}\n[/block]\nYou can set the logo, title, sub-title and the terms & conditions text by setting the following attributes after ***enable-print-receipt***:\n\n**receipt-logo** = \"https://yourcompany.com/company_logo.png\"\n**receipt-title** = \"ABC Communications\"\n**receipt-sub-title** = \"Shop no.1, New Market, East Delhi - 110001\"\n**receipt-tnc** = \"Terms and conditions appplied for all transactions\"\n\n**TIP:** You can use the title and subtitle to show your merchant's shop name and address so that it is good for your merchant's branding and easier for their customers to come back to their shop.","excerpt":"Enable transaction receipt printing in your website with your company's full branding.","slug":"widget-print-receipt","type":"basic","title":"Widget Print-Receipt","__v":0,"parentDoc":null,"childrenPages":[]}

Widget Print-Receipt

Enable transaction receipt printing in your website with your company's full branding.

[block:image] { "images": [ { "image": [ "https://files.readme.io/c98255a-Transaction_Receipt_2018-8-12_12_30_17-1.jpg", "Transaction Receipt 2018-8-12 12_30_17-1.jpg", 1606, 1123, "#111111" ], "caption": "Sample Receipt. You can change the branding as per your needs." } ], "sidebar": true } [/block] You can enable receipt printing feature in the widget using following quick steps: 1. Add attribute **enable-print-receipt** in the <tf-eko-connect-widget> code. 2. Add CSS to hide your website elements from printing (at the end of your CSS). [block:code] { "codes": [ { "code": "<style>\n\n\t@media print {\n\t\tbody {\n\t\t\tbackground:none !important;\n\t\t\tcolor:#000;\n\t\t\tpadding:0;\n\t\t\tmargin:0;\n\t\t\t-webkit-print-color-adjust:exact;\n\t\t\tprint-color-adjust:exact;\n\t\t}\n\n\t\t.header, .footer, .menubar {\n\t\t\tdisplay:none !important;\n\t\t}\n\t}\n</style>", "language": "css", "name": "CSS Example" } ] } [/block] [block:callout] { "type": "success", "title": "NOTE", "body": "The print receipt feature works on mobile as well. Just connect any mobile compatible printer to your mobile phone using Bluetooth, Wifi or a USB cable and start printing receipts.\n\nIt also works with any paper size!" } [/block] [block:callout] { "type": "warning", "body": "To ensure that your CSS is correctly working, print out a sample receipt from our Widget Demo and compare it to your website's printed receipt" } [/block] [block:api-header] { "title": "Add Print-Receipt Branding" } [/block] You can set the logo, title, sub-title and the terms & conditions text by setting the following attributes after ***enable-print-receipt***: **receipt-logo** = "https://yourcompany.com/company_logo.png" **receipt-title** = "ABC Communications" **receipt-sub-title** = "Shop no.1, New Market, East Delhi - 110001" **receipt-tnc** = "Terms and conditions appplied for all transactions" **TIP:** You can use the title and subtitle to show your merchant's shop name and address so that it is good for your merchant's branding and easier for their customers to come back to their shop.
[block:image] { "images": [ { "image": [ "https://files.readme.io/c98255a-Transaction_Receipt_2018-8-12_12_30_17-1.jpg", "Transaction Receipt 2018-8-12 12_30_17-1.jpg", 1606, 1123, "#111111" ], "caption": "Sample Receipt. You can change the branding as per your needs." } ], "sidebar": true } [/block] You can enable receipt printing feature in the widget using following quick steps: 1. Add attribute **enable-print-receipt** in the <tf-eko-connect-widget> code. 2. Add CSS to hide your website elements from printing (at the end of your CSS). [block:code] { "codes": [ { "code": "<style>\n\n\t@media print {\n\t\tbody {\n\t\t\tbackground:none !important;\n\t\t\tcolor:#000;\n\t\t\tpadding:0;\n\t\t\tmargin:0;\n\t\t\t-webkit-print-color-adjust:exact;\n\t\t\tprint-color-adjust:exact;\n\t\t}\n\n\t\t.header, .footer, .menubar {\n\t\t\tdisplay:none !important;\n\t\t}\n\t}\n</style>", "language": "css", "name": "CSS Example" } ] } [/block] [block:callout] { "type": "success", "title": "NOTE", "body": "The print receipt feature works on mobile as well. Just connect any mobile compatible printer to your mobile phone using Bluetooth, Wifi or a USB cable and start printing receipts.\n\nIt also works with any paper size!" } [/block] [block:callout] { "type": "warning", "body": "To ensure that your CSS is correctly working, print out a sample receipt from our Widget Demo and compare it to your website's printed receipt" } [/block] [block:api-header] { "title": "Add Print-Receipt Branding" } [/block] You can set the logo, title, sub-title and the terms & conditions text by setting the following attributes after ***enable-print-receipt***: **receipt-logo** = "https://yourcompany.com/company_logo.png" **receipt-title** = "ABC Communications" **receipt-sub-title** = "Shop no.1, New Market, East Delhi - 110001" **receipt-tnc** = "Terms and conditions appplied for all transactions" **TIP:** You can use the title and subtitle to show your merchant's shop name and address so that it is good for your merchant's branding and easier for their customers to come back to their shop.
{"_id":"5b5971778b6dd70003ab8558","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"5b5970c22cbdf5000330ad2d","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-07-26T07:00:07.820Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"Eko has designed AePS Gateway to allow you to securely process a biometric-based cash-out and balance inquiry services for your customers. [Get AePS demo](https://beta.ekoconnect.in:20011/aeps/v2)\n\n**Steps to activating AePS for your users**:\n1. Onboard your users on Eko platform using [Onboard User](https://developers.eko.in/docs/onboard-user) API\n2. [Activate AePS](https://developers.eko.in/docs/activate-service) service for your users\n3. Integrate AePS Gateway for enabling AePS transactions for onboarded users\n\n**Limits for AePS transaction:**\n1. Up to Rs. 10,000 per transaction\n2. Number of transactions per Aadhaar per day: 5\n\nCurrently, Eko supports the following biometric device operators:\n1. Morpho\n2. TMF20\n3. Mantra\n4. Startek\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note:\",\n  \"body\": \"SecuGen biometric device is not supported for the AePS.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Please Note:\",\n  \"body\": \"1. If the users are not onboarded then they will not be able to use AePS\\n2. All information about users is required for compliance process and will be shared with banking partners for onboarding on their platform\\n3. After activation, the user state goes into pending state and it will take 3 business days for any user to get activated for AePS\"\n}\n[/block]","excerpt":"","slug":"introduction-1","type":"basic","title":"AePS Gateway Introduction","__v":0,"parentDoc":null,"childrenPages":[]}

AePS Gateway Introduction


Eko has designed AePS Gateway to allow you to securely process a biometric-based cash-out and balance inquiry services for your customers. [Get AePS demo](https://beta.ekoconnect.in:20011/aeps/v2) **Steps to activating AePS for your users**: 1. Onboard your users on Eko platform using [Onboard User](https://developers.eko.in/docs/onboard-user) API 2. [Activate AePS](https://developers.eko.in/docs/activate-service) service for your users 3. Integrate AePS Gateway for enabling AePS transactions for onboarded users **Limits for AePS transaction:** 1. Up to Rs. 10,000 per transaction 2. Number of transactions per Aadhaar per day: 5 Currently, Eko supports the following biometric device operators: 1. Morpho 2. TMF20 3. Mantra 4. Startek [block:callout] { "type": "info", "title": "Note:", "body": "SecuGen biometric device is not supported for the AePS." } [/block] [block:callout] { "type": "warning", "title": "Please Note:", "body": "1. If the users are not onboarded then they will not be able to use AePS\n2. All information about users is required for compliance process and will be shared with banking partners for onboarding on their platform\n3. After activation, the user state goes into pending state and it will take 3 business days for any user to get activated for AePS" } [/block]
Eko has designed AePS Gateway to allow you to securely process a biometric-based cash-out and balance inquiry services for your customers. [Get AePS demo](https://beta.ekoconnect.in:20011/aeps/v2) **Steps to activating AePS for your users**: 1. Onboard your users on Eko platform using [Onboard User](https://developers.eko.in/docs/onboard-user) API 2. [Activate AePS](https://developers.eko.in/docs/activate-service) service for your users 3. Integrate AePS Gateway for enabling AePS transactions for onboarded users **Limits for AePS transaction:** 1. Up to Rs. 10,000 per transaction 2. Number of transactions per Aadhaar per day: 5 Currently, Eko supports the following biometric device operators: 1. Morpho 2. TMF20 3. Mantra 4. Startek [block:callout] { "type": "info", "title": "Note:", "body": "SecuGen biometric device is not supported for the AePS." } [/block] [block:callout] { "type": "warning", "title": "Please Note:", "body": "1. If the users are not onboarded then they will not be able to use AePS\n2. All information about users is required for compliance process and will be shared with banking partners for onboarding on their platform\n3. After activation, the user state goes into pending state and it will take 3 business days for any user to get activated for AePS" } [/block]
{"_id":"5b5979f22cbdf5000330ae01","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"5b5970c22cbdf5000330ad2d","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-07-26T07:36:18.955Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"The Gateway works in the following manner:\n\n1. Your application/website opens the Gateway in a new tab/window\n\n2. Your user/merchant initiates an AePS transaction on the Gateway\n\n3. At the time of a financial transaction, Gateway needs a confirmation from your application to validate the user and the transaction\n\n4. After getting a go-ahead from your application, Gateway executes the transaction.\n\n5. After a transaction is finished, Gateway will communicate back to your application sharing transaction details\n- Incase of cash-out, your balance on Eko platform will get credited\n- In lieu of Eko's confirmation, you would need to give balance to your user/merchant\n[block:api-header]\n{\n  \"title\": \"AePS Flow Diagram\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/a7d7b5b-AePS_flow.png\",\n        \"AePS flow.png\",\n        720,\n        540,\n        \"#1a58cb\"\n      ],\n      \"sizing\": \"smart\"\n    }\n  ]\n}\n[/block]\n\n[block:embed]\n{\n  \"html\": false,\n  \"url\": \"https://drive.google.com/file/d/1ebJkrMjVIajo4mrXqrJxc2-Du-bzVNXY/view?usp=sharing\",\n  \"title\": \"AePS Flow.pdf\",\n  \"favicon\": \"https://ssl.gstatic.com/docs/doclist/images/icon_14_pdf_favicon.ico\",\n  \"image\": \"https://lh6.googleusercontent.com/gNQM6HGQL7a9ialpOtW9vMvecS_FDYvFSRcLTMpxlEyIxPylWCh9wP3lK5I=w1200-h630-p\"\n}\n[/block]","excerpt":"","slug":"how-does-aeps-gateway-work","type":"basic","title":"AePS Gateway Flow","__v":0,"parentDoc":null,"childrenPages":[]}

AePS Gateway Flow


The Gateway works in the following manner: 1. Your application/website opens the Gateway in a new tab/window 2. Your user/merchant initiates an AePS transaction on the Gateway 3. At the time of a financial transaction, Gateway needs a confirmation from your application to validate the user and the transaction 4. After getting a go-ahead from your application, Gateway executes the transaction. 5. After a transaction is finished, Gateway will communicate back to your application sharing transaction details - Incase of cash-out, your balance on Eko platform will get credited - In lieu of Eko's confirmation, you would need to give balance to your user/merchant [block:api-header] { "title": "AePS Flow Diagram" } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/a7d7b5b-AePS_flow.png", "AePS flow.png", 720, 540, "#1a58cb" ], "sizing": "smart" } ] } [/block] [block:embed] { "html": false, "url": "https://drive.google.com/file/d/1ebJkrMjVIajo4mrXqrJxc2-Du-bzVNXY/view?usp=sharing", "title": "AePS Flow.pdf", "favicon": "https://ssl.gstatic.com/docs/doclist/images/icon_14_pdf_favicon.ico", "image": "https://lh6.googleusercontent.com/gNQM6HGQL7a9ialpOtW9vMvecS_FDYvFSRcLTMpxlEyIxPylWCh9wP3lK5I=w1200-h630-p" } [/block]
The Gateway works in the following manner: 1. Your application/website opens the Gateway in a new tab/window 2. Your user/merchant initiates an AePS transaction on the Gateway 3. At the time of a financial transaction, Gateway needs a confirmation from your application to validate the user and the transaction 4. After getting a go-ahead from your application, Gateway executes the transaction. 5. After a transaction is finished, Gateway will communicate back to your application sharing transaction details - Incase of cash-out, your balance on Eko platform will get credited - In lieu of Eko's confirmation, you would need to give balance to your user/merchant [block:api-header] { "title": "AePS Flow Diagram" } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/a7d7b5b-AePS_flow.png", "AePS flow.png", 720, 540, "#1a58cb" ], "sizing": "smart" } ] } [/block] [block:embed] { "html": false, "url": "https://drive.google.com/file/d/1ebJkrMjVIajo4mrXqrJxc2-Du-bzVNXY/view?usp=sharing", "title": "AePS Flow.pdf", "favicon": "https://ssl.gstatic.com/docs/doclist/images/icon_14_pdf_favicon.ico", "image": "https://lh6.googleusercontent.com/gNQM6HGQL7a9ialpOtW9vMvecS_FDYvFSRcLTMpxlEyIxPylWCh9wP3lK5I=w1200-h630-p" } [/block]
{"_id":"5b59a0712cbdf5000330b0d8","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"5b5970c22cbdf5000330ad2d","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-07-26T10:20:33.161Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"[Get AePS Demo](https://beta.ekoconnect.in:20011/aeps/v2)\n[block:api-header]\n{\n  \"title\": \"Initiation\"\n}\n[/block]\n1. You should add a button on your website for AePS transaction\n2. On clicking this button, AePS Gateway will open in a new tab/window\n3. While executing the AePS transaction on the Gateway, ensure your website is always present in the background\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"POST\",\n  \"body\": \"https://stagegateway.eko.in/v2/aeps\\n\\n**POST PARAMETERS:**\\n**initiator_id** (required) - partner id from where the request has been initiated\\n**partner_name** (required) - name of the partner\\n**developer_key**  (required) - Your unique API key that will authenticate your request\\n**secret_key**  (required) - refer to [authentication section](https://developers.eko.in/docs/authentication)\\n**secret_key_timestamp**  (required) - refer to [authentication section](https://developers.eko.in/docs/authentication)\\n**user_code**  (required)  - unique code of the user availing AePS; this needs to be generated while onboarding users ([refer here](https://developers.eko.in/docs/activate-service))\\n**initiator_logo_url** (required) - logo to be shown on AePS Gateway\\n**language** (optional) - Default language is English(en). For more language options, check below language-code table\\n**callback_url** (optional) - URL for communication with partner application.Callback URL should be of POST type\\n**callback_url_custom_params** (optional) - Any custom parameters if partner wants to get, when callback URL is called for partner’s own use\\n**callback_url_custom_headers** (optional) -  Any custom headers if partner wants to get, when callback URL is called for partner’s own use. e.g. Authorization headers\\n**is_light_header** (optional) - true / false, for light-colored header in AePS Gateway\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Language\",\n    \"h-1\": \"Code\",\n    \"0-0\": \"English\",\n    \"0-1\": \"en\",\n    \"1-0\": \"Hindi\",\n    \"1-1\": \"hi\",\n    \"2-0\": \"Marathi\",\n    \"2-1\": \"mr\",\n    \"3-0\": \"Gujarati\",\n    \"3-1\": \"gu\",\n    \"4-0\": \"Kannada\",\n    \"4-1\": \"kn\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\n}\n[/block]\n**Sample code to open AePS Gateway portal  in new Browser Tab** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<button onclick=\\\"openEkoGateway()\\\">\\n\\t\\tAePS\\n</button>\\n\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"function openEkoGateway() {\\n\\t\\t\\tvar params = {\\n\\t\\t\\t  \\\"developer_key\\\": \\\"becbbce45f79c6f5109f848acd540567\\\",\\n\\t\\t\\t  \\\"secret_key\\\": \\\"dCUujUywtuu86CyoHkZZzBjLUAVC365e6PLaa4UYwqM=\\\",\\n\\t\\t\\t  \\\"secret_key_timestamp\\\": \\\"1532582133692\\\",\\n\\t\\t\\t  \\\"initiator_id\\\": \\\"9962981729\\\",\\n\\t\\t\\t  \\\"user_code\\\": \\\"20810200\\\",\\n\\t\\t\\t  \\\"initiator_logo_url\\\": \\\"https://files.eko.co.in:8080/docs/logos/payment/dummy-partner-logo.png\\\",\\n\\t\\t\\t  \\\"partner_name\\\": \\\"Payments INC\\\",\\n\\t\\t\\t  \\\"language\\\": \\\"en\\\"\\n\\t\\t};\\n\\n\\t\\tvar url = 'https://stagegateway.eko.in/v2/aeps';\\n\\t\\tvar form = document.createElement(\\\"form\\\");\\n\\t\\tform.setAttribute('method', 'post');\\n\\t\\tform.setAttribute('action', url);\\n\\n\\t\\tform.setAttribute('target', 'ekogateway');\\n\\t\\tpopup = window.open(\\\"\\\", \\\"ekogateway\\\");\\n\\n\\t\\tfor(const prop in params) {\\n\\n\\t\\t  if(params.hasOwnProperty(prop)) {\\n\\t\\t\\tvar input = document.createElement('input');\\n\\t\\t\\tinput.type = 'hidden';\\n\\t\\t\\tinput.name = prop;\\n\\t\\t\\tinput.value = params[prop];\\n\\t\\t\\tform.appendChild(input);\\n\\t\\t  }\\n\\n\\t\\t}\\n\\n\\t\\tdocument.body.appendChild(form);\\n\\t\\tform.submit();\\n\\n\\t\\t}\",\n      \"language\": \"javascript\",\n      \"name\": \"Javascript\"\n    }\n  ]\n}\n[/block]\nIf you want communication using callback URL, then sample params should be\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"var params = {\\n        \\\"developer_key\\\": \\\"becbbce45f79c6f5109f848acd540567\\\",\\n        \\\"secret_key\\\": \\\"dCUujUywtuu86CyoHkZZzBjLUAVC365e6PLaa4UYwqM=\\\",\\n        \\\"secret_key_timestamp\\\": \\\"1532582133692\\\",\\n        \\\"initiator_id\\\": \\\"9962981729\\\",\\n        \\\"user_code\\\": \\\"20810200\\\",\\n        \\\"initiator_logo_url\\\": \\\"https://files.eko.co.in:8080/docs/logos/payment/dummy-partner-logo.png\\\",\\n        \\\"partner_name\\\": \\\"Payments INC\\\",\\n        \\\"language\\\": \\\"en\\\",\\n        \\\"callback_url\\\": \\\"\\\",\\n\\n };\",\n      \"language\": \"javascript\",\n      \"name\": \"Sample request sent to callback Url for debit-hook\"\n    }\n  ]\n}\n[/block]\nIf you want to send any custom headers/params with callback URL, for own use then send them\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\t {\\n\\t \\\"callback_url_custom_params\\\" : JSON.stringify({param1: 'value1',param2: 'value2'}),\\n\\t \\\"callback_url_custom_headers\\\" : JSON.stringify({header1: 'header1val', header2: 'header2val'})\\n\\t }\",\n      \"language\": \"json\",\n      \"name\": \"Optional Custom Params / Headers with Callback URL\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"  * Above code is just a sample, with static param values\\n  * All the static values need to be replaced with actual ones relevant to the partner \",\n  \"title\": \"Please Note:\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Pre-transaction Confirmation\"\n}\n[/block]\nAt the time of every financial transaction (credit/debit), AePS gateway will trigger a message event to your website for confirmation.\n\nThis message event will inform your application/website that a financial transaction has been initiated. Your server should make a note of this transaction and give confirmation to AePS Gateway to proceed or cancel with the transaction.\n\nImplement a Javascript message event listener that listens to the message event coming from AePS Gateway\n\n**Sample code for listening to the message event**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"window.addEventListener('message', function(e) {\\n\\n\\tif(event.origin === 'https://stagegateway.eko.in'\\n\\t|| event.origin === 'https://gateway.eko.in') {\\n\\n\\t\\t//e.data\\n\\t}\\n\\n});\\n\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n**Information you get in e.data** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"eko_gateway_response\\\": {\\n    \\\"gateway_url\\\": \\\"https://stagegateway.eko.in/v2/aeps\\\",\\n    \\\"action\\\": \\\"debit-hook\\\",\\n    \\\"transaction\\\": \\\"aeps\\\",\\n    \\\"detail\\\": {\\n      \\\"interaction_label\\\": \\\"AePS\\\",\\n      \\\"interaction_type_id\\\": 344,\\n      \\\"client_ref_id\\\": \\\"1538678967604\\\",\\n      \\\"data\\\": {\\n        \\\"customer_id\\\": \\\"9999999999\\\",\\n        \\\"bank_code\\\": \\\"SBIN\\\",\\n        \\\"type\\\": \\\"2\\\",\\n        \\\"amount\\\": \\\"1200\\\",\\n        \\\"user_code\\\": \\\"20810200\\\"\\n      },\\n      \\\"request_hash_params\\\": [\\n        \\\"customer_id\\\",\\n        \\\"amount\\\",\\n        \\\"user_code\\\"\\n      ]\\n    }\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Sample e.data\"\n    }\n  ]\n}\n[/block]\n\nSome important parameters in e.data are as follows:\n\n  * amount = e.data.eko_gateway_response.detail.data.amount\n  * customer_id = e.data.eko_gateway_response.detail.data.customer_id\n  * type = e.data.eko_gateway_response.detail.type\n  a. For AePS Cash Deposit, type will be 1 (service currently not available)\n  b. For AePS Cash withdrawal, type will be 2\n  c. For AePS Balance Inquiry, type will be 3\n\n  * client_ref_id = e.data.eko_gateway_response.detail.client_ref_id\n  * action = e.data.eko_gateway_response.action\n  * For pre-transaction confirmation, action value will be debit-hook \n\n\n**If communicating using callback URL, then sample payload in the callback URL\n** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"param1\\\": \\\"value1\\\",\\n  \\\"param2\\\": \\\"value2\\\",\\n  \\\"action\\\": \\\"debit-hook\\\",\\n  \\\"detail\\\": {\\n    \\\"url\\\": \\\"/api\\\",\\n    \\\"http_method\\\": \\\"POST\\\",\\n    \\\"interaction_type_id\\\": 344,\\n    \\\"interaction_label\\\": \\\"AePS\\\",\\n    \\\"client_ref_id\\\": \\\"1540880592059\\\",\\n    \\\"card_index\\\": 2,\\n    \\\"request_hash_params\\\": [\\n      \\\"customer_id\\\",\\n      \\\"amount\\\",\\n      \\\"user_code\\\"\\n    ],\\n    \\\"data\\\": {\\n      \\\"customer_id\\\": \\\"9999999999\\\",\\n      \\\"bank_code\\\": \\\"PUNB\\\",\\n      \\\"type\\\": \\\"2\\\",\\n      \\\"user_code\\\": \\\"20810200\\\",\\n      \\\"amount\\\": \\\"100\\\"\\n    }\\n  }\\n}\\n\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"With every financial transaction, a unique **client_ref_id** will be shared for your reference and transaction identification.\\nYour application can make a note of this **client_ref_id** for future inquiry purpose.\\n\\nIf implementing using callback URL, then send CORS headers in the response of callback URL\\n\\nAdd following response headers\\n\\n**For OPTIONS method**\\nAccess-Control-Allow-Methods: POST, OPTIONS\\nAccess-Control-Allow-Origin: https://stagegateway.eko.in\\nAccess-Control-Allow-Headers: Content-Type\\n\\n\\n**For POST method **\\nAccess-Control-Allow-Origin: https://stagegateway.eko.in\\n\\n\\nFor quick reference, you can walk through the [demo](https://beta.ekoconnect.in:20011/aeps/v2) and view network calls using developers tools and understand how the above headers are sent in response headers.\\n\\nAlso, on migration to Production,  replace Test URL(https://stagegateway.eko.in) with production URL in above headers\\n \\nFor a detailed study on CORS, you can read this [resource](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS).\\n\\nFor security reasons,  callback URL should use **HTTPS** protocol instead of HTTP (when not on localhost).\",\n  \"title\": \"Please Note:\"\n}\n[/block]\nAfter getting above details of the initiated transaction, your application needs to validate and make a note of it. For this, you need to implement AJAX to communicate between your website and server to give a go-ahead with the AePS transaction\n\nYour server application needs to validate the transaction with merchant details and e.data\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"if( ACTION === ‘debit-hook’) {\\n  // Add Logic to decide if the transaction can be proceeded  and make a note of transaction\\n}\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\nACTION, INTERACTION_TYPE_ID, TYPE are variables storing corresponding data from e.data\n\n\nIf your application decides to proceed with the transaction, then generate below security parameters:\n\n  * secret_key\n  * secret_key_timestamp\n  * request_hash \n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"To generate secret_key, secret_key_timestamp and request_hash,  refer to [authentication](https://developers.eko.in/docs/authentication) section\\n\\nFor generating request_hash, the request will be formed by concatenating secret_ley_timestamp and  value of parameters present in request_hash_params(detail.request_hash_params) array list in same order.\\n\\nYou should iterate through request_hash_params list and check if that field is present in **detail.data**, if present then append its value in the request signature, used to generate request_hash\\n\\n\\nFor e.g.\\nWhen request_hash_params = [\\\"customer_id\\\",\\\"amount\\\",\\\"user_code\\\"]\\nsecret_key_timestamp = “1532582133692”\\nThen\\n\\n\\n**For Cash Withdrawal\\n**\\ndetail.data: {\\n        \\\"customer_id\\\": \\\"9999999999\\\",\\n        \\\"bank_code\\\": \\\"PUNB\\\",\\n        \\\"type\\\": \\\"2\\\",\\n        \\\"user_code\\\": \\\"20810200\\\",\\n        \\\"amount\\\": \\\"2000\\\"\\n}\\n\\nrequest signature =\\nsecret_key_timestamp + customer_id + amount + user_code\\n“1532582133692” + “9999999999” + “2000” + “ 20810200”\\n“15325821336929999999999200020810200”\\n\\n\\n**For Balance Inquiry\\n**\\n detail.data: {\\n        \\\"customer_id\\\": \\\"9999999999\\\",\\n        \\\"bank_code\\\": \\\"PUNB\\\",\\n        \\\"type\\\": \\\"3\\\",\\n        \\\"user_code\\\": \\\"20810200\\\"\\n}\\n\\n\\nrequest signature =\\nsecret_key_timestamp + customer_id + user_code\\n“1532582133692” + “9999999999” + “ 20810200”\\n“1532582133692999999999920810200”\\n\\nplease refer to [section](https://developers.eko.in/docs/widget-security) for more info\",\n  \"title\": \"Please Note:\"\n}\n[/block]\nYour website, after receiving AJAX response (containing data like secret_key, secret_key_timestamp, request_hash) f, should now communicate back to the AePS Gateway sharing its decision to proceed or cancel the transaction.\n\n** If communicating using Javascript message event, then send Postmessage to Gateway in below format\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"ekoReq = {\\n  \\\"eko_gateway_request\\\": {\\n    \\\"action\\\": \\\"go\\\",\\n    \\\"allow\\\": true,\\n    \\\"request_hash\\\": \\\"5zf8i/q/KA=\\\",\\n    \\\"secret_key\\\": \\\"IAmttMF/XZ5T0sHCq1GGag0=\\\",\\n    \\\"secret_key_timestamp\\\": \\\"1528725377641\\\",\\n    \\\"client_ref_id\\\": \\\"1234567766777777\\\"//(optional)\\n      }\\n  }\",\n      \"language\": \"javascript\",\n      \"name\": \"Proceed the transaction\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"ekoReq = {\\n\\\"eko_gateway_request\\\": {\\n  \\\"action\\\": \\\"go\\\",\\n  \\\"allow\\\":false,\\n    \\\"message\\\": \\\"Reason behind transaction cancellation.. insifficient balance\\\"\\n  }\\n}\",\n      \"language\": \"javascript\",\n      \"name\": \"Cancel the transaction\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"popup.postMessage(ekoReq, '*')\",\n      \"language\": \"javascript\",\n      \"name\": \"Send Javascript postMessage back to Gateway\"\n    }\n  ]\n}\n[/block]\n\n**If communicating using callback URL, then the response sent by callback URL should be in below format** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"allow\\\": true,\\n  \\\"action\\\": \\\"go\\\",\\n  \\\"secret_key_timestamp\\\": \\\"1540880719963\\\",\\n  \\\"request_hash\\\": \\\"r8SC5YiCylzllnftA9ys4/hPi5hIJrMVZhykamemqKE=\\\",\\n  \\\"secret_key\\\": \\\"4CKAzpT/B44CnhXM01pRnZELcGKWOhvbZg7TqoGDIrA=\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Proceed the transaction\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"allow\\\": false,\\n  \\\"action\\\": \\\"go\\\",\\n  \\\"message\\\": \\\"Any error message... insifficient balance\\\"\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Cancel the transaction\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"1. Message parameter value should contain reason behind transaction cancellation\\n2. Above ekoReq is just a sample variable, defining the structure of data to be sent to gateway website\\n3. Values of keys request_hash, secret_key, secret_key_timestamp, client_ref_id, message are dynamic and should be replaced with actual values\",\n  \"title\": \"Please Note:\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Post-transaction Communication\"\n}\n[/block]\nAfter a transaction is finished, AePS gateway will send a message event to partner website sharing transaction details.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"window.addEventListener('message', function(e) {\\n\\n  if(event.origin === 'https://stagegateway.eko.in'\\n  || event.origin === 'https://gateway.eko.in') {\\n\\n    //e.data\\n  }\\n\\n});\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\n{\\n  \\\"eko_gateway_response\\\": {\\n    \\\"gateway_url\\\": \\\"https://stagegateway.eko.in/v2/aeps\\\",\\n    \\\"action\\\": \\\"response\\\",\\n    \\\"transaction\\\": \\\"aeps\\\",\\n    \\\"detail\\\": {\\n      \\\"client_ref_id\\\": \\\"1546497183438\\\",\\n      \\\"http_status\\\": 200,\\n      \\\"interaction_type_id\\\": 344,\\n      \\\"response\\\": {\\n        \\\"status\\\": 0,\\n        \\\"response_status_id\\\": 0,\\n        \\\"response_type_id\\\": 1305,\\n        \\\"message\\\": \\\"Transaction successful\\\",\\n        \\\"data\\\": {\\n          \\\"tx_status\\\": \\\"0\\\",\\n          \\\"transaction_date\\\": \\\"\\\",\\n          \\\"reason\\\": \\\"\\\",\\n          \\\"amount\\\": \\\"2000.0\\\",\\n          \\\"merchant_code\\\": \\\"\\\",\\n          \\\"tds\\\": \\\"0.3\\\",\\n          \\\"shop\\\": \\\"\\\",\\n          \\\"sender_name\\\": \\\"amit\\\",\\n          \\\"tid\\\": \\\"14563687\\\",\\n          \\\"auth_code\\\": \\\"\\\",\\n          \\\"balance\\\": \\\"339976.26\\\",\\n          \\\"shop_address_line1\\\": \\\"\\\",\\n          \\\"user_code\\\": \\\"20810200\\\",\\n          \\\"merchantname\\\": \\\"Sneha\\\",\\n          \\\"stan\\\": \\\"\\\",\\n          \\\"aadhar\\\": \\\"XXXX XXXX 9999\\\",\\n          \\\"customer_balance\\\": \\\"\\\",\\n          \\\"transaction_time\\\": \\\"\\\",\\n          \\\"commission\\\": \\\"6.0\\\",\\n          \\\"bank_ref_num\\\": \\\"\\\",\\n          \\\"terminal_id\\\": \\\"\\\"\\n        }\\n      }\\n    }\\n  }\\n}\\n\",\n      \"language\": \"json\",\n      \"name\": \"Sample e.data\"\n    }\n  ]\n}\n[/block]\nFor post-transaction confirmation, value of **action** field is **response** and  **interaction_type_id** is **344**\n\nStatus of transaction is represented by field **tx_status** (eko_gateway_response.detail.response.data.tx_status)\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"tx_status\",\n    \"h-1\": \"Transaction Description\",\n    \"0-0\": \"0\",\n    \"0-1\": \"Success\",\n    \"1-0\": \"1\",\n    \"1-1\": \"Failure\",\n    \"2-0\": \"Any other\",\n    \"2-1\": \"Suspicious\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\nMoney deducted from the customer's bank account and not received as an E-value will be reversed to the account in T+7 days according to partner bank TAT.\n\n**commission**(eko_gateway_response.detail.response.data.commission) field states the commission given to partner for that transaction.\n\n\nIf communicating using callback URL, then sample data received in the callback URL \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"param1\\\": \\\"value1\\\",\\n  \\\"param2\\\": \\\"value2\\\",\\n  \\\"action\\\": \\\"eko-response\\\",\\n  \\\"detail\\\": {\\n    \\\"url\\\": \\\"https://stagegateway.eko.in/v2/api\\\",\\n    \\\"client_ref_id\\\": \\\"1546497183438\\\",\\n    \\\"card_index\\\": 2,\\n    \\\"http_method\\\": \\\"POST\\\",\\n    \\\"http_status\\\": 200,\\n    \\\"interaction_type_id\\\": 344,\\n    \\\"is_debithook_response\\\": true,\\n    \\\"is_final\\\": true,\\n    \\\"response\\\": {\\n      \\\"status\\\": 0,\\n      \\\"response_status_id\\\": 0,\\n      \\\"response_type_id\\\": 1305,\\n      \\\"message\\\": \\\"Transaction successful\\\",\\n      \\\"data\\\": {\\n        \\\"tx_status\\\": \\\"0\\\",\\n        \\\"transaction_date\\\": \\\"\\\",\\n        \\\"reason\\\": \\\"\\\",\\n        \\\"amount\\\": \\\"2000.0\\\",\\n        \\\"merchant_code\\\": \\\"\\\",\\n        \\\"tds\\\": \\\"0.3\\\",\\n        \\\"shop\\\": \\\"\\\",\\n        \\\"sender_name\\\": \\\"amit\\\",\\n        \\\"tid\\\": \\\"14563687\\\",\\n        \\\"auth_code\\\": \\\"\\\",\\n        \\\"balance\\\": \\\"339976.26\\\",\\n        \\\"shop_address_line1\\\": \\\"\\\",\\n        \\\"user_code\\\": \\\"20310001\\\",\\n        \\\"merchantname\\\": \\\"Sneha\\\",\\n        \\\"stan\\\": \\\"\\\",\\n        \\\"aadhaar\\\": \\\"XXXX XXXX 9999\\\",\\n        \\\"customer_balance\\\": \\\"\\\",\\n        \\\"transaction_time\\\": \\\"\\\",\\n        \\\"commission\\\": \\\"6.0\\\",\\n        \\\"bank_ref_num\\\": \\\"\\\",\\n        \\\"terminal_id\\\": \\\"\\\"\\n      }\\n    }\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Final AePS Response\"\n    }\n  ]\n}\n[/block]\nIn the above check **action** field  is **eko-response** and **interaction_type_id** field is **344**, for final transaction\n\nSend a dummy / trivial response to callback URL in this case or in case of any non pre-transaction confirmation  e.g. {\"message\":\"ok\"}\n\nFor transaction inquiry, use the following API: [transaction inquiry](https://developers.eko.in/docs/transaction-inquiry)\nSecurity Tip: Make sure to use the above inquiry API at your backend, to validate  the state of the transaction and its details\n\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"FAQ\",\n  \"body\": \"**Q On clicking AePS transaction submit button,  submit button keeps on rotating and nothing happens**\\n**A** Check if you have handled debit-hook properly\\n\\n**Q How to generate the secret key timestamp, secret key, and request hash ?**\\n**A** Check [security section](https://developers.eko.in/docs/authentication)\"\n}\n[/block]","excerpt":"","slug":"aeps-gateway","type":"basic","title":"Technical Integration","__v":0,"parentDoc":null,"childrenPages":[]}

Technical Integration


[Get AePS Demo](https://beta.ekoconnect.in:20011/aeps/v2) [block:api-header] { "title": "Initiation" } [/block] 1. You should add a button on your website for AePS transaction 2. On clicking this button, AePS Gateway will open in a new tab/window 3. While executing the AePS transaction on the Gateway, ensure your website is always present in the background [block:callout] { "type": "success", "title": "POST", "body": "https://stagegateway.eko.in/v2/aeps\n\n**POST PARAMETERS:**\n**initiator_id** (required) - partner id from where the request has been initiated\n**partner_name** (required) - name of the partner\n**developer_key** (required) - Your unique API key that will authenticate your request\n**secret_key** (required) - refer to [authentication section](https://developers.eko.in/docs/authentication)\n**secret_key_timestamp** (required) - refer to [authentication section](https://developers.eko.in/docs/authentication)\n**user_code** (required) - unique code of the user availing AePS; this needs to be generated while onboarding users ([refer here](https://developers.eko.in/docs/activate-service))\n**initiator_logo_url** (required) - logo to be shown on AePS Gateway\n**language** (optional) - Default language is English(en). For more language options, check below language-code table\n**callback_url** (optional) - URL for communication with partner application.Callback URL should be of POST type\n**callback_url_custom_params** (optional) - Any custom parameters if partner wants to get, when callback URL is called for partner’s own use\n**callback_url_custom_headers** (optional) - Any custom headers if partner wants to get, when callback URL is called for partner’s own use. e.g. Authorization headers\n**is_light_header** (optional) - true / false, for light-colored header in AePS Gateway" } [/block] [block:parameters] { "data": { "h-0": "Language", "h-1": "Code", "0-0": "English", "0-1": "en", "1-0": "Hindi", "1-1": "hi", "2-0": "Marathi", "2-1": "mr", "3-0": "Gujarati", "3-1": "gu", "4-0": "Kannada", "4-1": "kn" }, "cols": 2, "rows": 5 } [/block] **Sample code to open AePS Gateway portal in new Browser Tab** [block:code] { "codes": [ { "code": "<button onclick=\"openEkoGateway()\">\n\t\tAePS\n</button>\n", "language": "html" } ] } [/block] [block:code] { "codes": [ { "code": "function openEkoGateway() {\n\t\t\tvar params = {\n\t\t\t \"developer_key\": \"becbbce45f79c6f5109f848acd540567\",\n\t\t\t \"secret_key\": \"dCUujUywtuu86CyoHkZZzBjLUAVC365e6PLaa4UYwqM=\",\n\t\t\t \"secret_key_timestamp\": \"1532582133692\",\n\t\t\t \"initiator_id\": \"9962981729\",\n\t\t\t \"user_code\": \"20810200\",\n\t\t\t \"initiator_logo_url\": \"https://files.eko.co.in:8080/docs/logos/payment/dummy-partner-logo.png\",\n\t\t\t \"partner_name\": \"Payments INC\",\n\t\t\t \"language\": \"en\"\n\t\t};\n\n\t\tvar url = 'https://stagegateway.eko.in/v2/aeps';\n\t\tvar form = document.createElement(\"form\");\n\t\tform.setAttribute('method', 'post');\n\t\tform.setAttribute('action', url);\n\n\t\tform.setAttribute('target', 'ekogateway');\n\t\tpopup = window.open(\"\", \"ekogateway\");\n\n\t\tfor(const prop in params) {\n\n\t\t if(params.hasOwnProperty(prop)) {\n\t\t\tvar input = document.createElement('input');\n\t\t\tinput.type = 'hidden';\n\t\t\tinput.name = prop;\n\t\t\tinput.value = params[prop];\n\t\t\tform.appendChild(input);\n\t\t }\n\n\t\t}\n\n\t\tdocument.body.appendChild(form);\n\t\tform.submit();\n\n\t\t}", "language": "javascript", "name": "Javascript" } ] } [/block] If you want communication using callback URL, then sample params should be [block:code] { "codes": [ { "code": "var params = {\n \"developer_key\": \"becbbce45f79c6f5109f848acd540567\",\n \"secret_key\": \"dCUujUywtuu86CyoHkZZzBjLUAVC365e6PLaa4UYwqM=\",\n \"secret_key_timestamp\": \"1532582133692\",\n \"initiator_id\": \"9962981729\",\n \"user_code\": \"20810200\",\n \"initiator_logo_url\": \"https://files.eko.co.in:8080/docs/logos/payment/dummy-partner-logo.png\",\n \"partner_name\": \"Payments INC\",\n \"language\": \"en\",\n \"callback_url\": \"\",\n\n };", "language": "javascript", "name": "Sample request sent to callback Url for debit-hook" } ] } [/block] If you want to send any custom headers/params with callback URL, for own use then send them [block:code] { "codes": [ { "code": "\t {\n\t \"callback_url_custom_params\" : JSON.stringify({param1: 'value1',param2: 'value2'}),\n\t \"callback_url_custom_headers\" : JSON.stringify({header1: 'header1val', header2: 'header2val'})\n\t }", "language": "json", "name": "Optional Custom Params / Headers with Callback URL" } ] } [/block] [block:callout] { "type": "warning", "body": " * Above code is just a sample, with static param values\n * All the static values need to be replaced with actual ones relevant to the partner ", "title": "Please Note:" } [/block] [block:api-header] { "title": "Pre-transaction Confirmation" } [/block] At the time of every financial transaction (credit/debit), AePS gateway will trigger a message event to your website for confirmation. This message event will inform your application/website that a financial transaction has been initiated. Your server should make a note of this transaction and give confirmation to AePS Gateway to proceed or cancel with the transaction. Implement a Javascript message event listener that listens to the message event coming from AePS Gateway **Sample code for listening to the message event** [block:code] { "codes": [ { "code": "window.addEventListener('message', function(e) {\n\n\tif(event.origin === 'https://stagegateway.eko.in'\n\t|| event.origin === 'https://gateway.eko.in') {\n\n\t\t//e.data\n\t}\n\n});\n", "language": "javascript" } ] } [/block] **Information you get in e.data** [block:code] { "codes": [ { "code": "{\n \"eko_gateway_response\": {\n \"gateway_url\": \"https://stagegateway.eko.in/v2/aeps\",\n \"action\": \"debit-hook\",\n \"transaction\": \"aeps\",\n \"detail\": {\n \"interaction_label\": \"AePS\",\n \"interaction_type_id\": 344,\n \"client_ref_id\": \"1538678967604\",\n \"data\": {\n \"customer_id\": \"9999999999\",\n \"bank_code\": \"SBIN\",\n \"type\": \"2\",\n \"amount\": \"1200\",\n \"user_code\": \"20810200\"\n },\n \"request_hash_params\": [\n \"customer_id\",\n \"amount\",\n \"user_code\"\n ]\n }\n }\n}", "language": "json", "name": "Sample e.data" } ] } [/block] Some important parameters in e.data are as follows: * amount = e.data.eko_gateway_response.detail.data.amount * customer_id = e.data.eko_gateway_response.detail.data.customer_id * type = e.data.eko_gateway_response.detail.type a. For AePS Cash Deposit, type will be 1 (service currently not available) b. For AePS Cash withdrawal, type will be 2 c. For AePS Balance Inquiry, type will be 3 * client_ref_id = e.data.eko_gateway_response.detail.client_ref_id * action = e.data.eko_gateway_response.action * For pre-transaction confirmation, action value will be debit-hook **If communicating using callback URL, then sample payload in the callback URL ** [block:code] { "codes": [ { "code": "{\n \"param1\": \"value1\",\n \"param2\": \"value2\",\n \"action\": \"debit-hook\",\n \"detail\": {\n \"url\": \"/api\",\n \"http_method\": \"POST\",\n \"interaction_type_id\": 344,\n \"interaction_label\": \"AePS\",\n \"client_ref_id\": \"1540880592059\",\n \"card_index\": 2,\n \"request_hash_params\": [\n \"customer_id\",\n \"amount\",\n \"user_code\"\n ],\n \"data\": {\n \"customer_id\": \"9999999999\",\n \"bank_code\": \"PUNB\",\n \"type\": \"2\",\n \"user_code\": \"20810200\",\n \"amount\": \"100\"\n }\n }\n}\n", "language": "json" } ] } [/block] [block:callout] { "type": "warning", "body": "With every financial transaction, a unique **client_ref_id** will be shared for your reference and transaction identification.\nYour application can make a note of this **client_ref_id** for future inquiry purpose.\n\nIf implementing using callback URL, then send CORS headers in the response of callback URL\n\nAdd following response headers\n\n**For OPTIONS method**\nAccess-Control-Allow-Methods: POST, OPTIONS\nAccess-Control-Allow-Origin: https://stagegateway.eko.in\nAccess-Control-Allow-Headers: Content-Type\n\n\n**For POST method **\nAccess-Control-Allow-Origin: https://stagegateway.eko.in\n\n\nFor quick reference, you can walk through the [demo](https://beta.ekoconnect.in:20011/aeps/v2) and view network calls using developers tools and understand how the above headers are sent in response headers.\n\nAlso, on migration to Production, replace Test URL(https://stagegateway.eko.in) with production URL in above headers\n \nFor a detailed study on CORS, you can read this [resource](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS).\n\nFor security reasons, callback URL should use **HTTPS** protocol instead of HTTP (when not on localhost).", "title": "Please Note:" } [/block] After getting above details of the initiated transaction, your application needs to validate and make a note of it. For this, you need to implement AJAX to communicate between your website and server to give a go-ahead with the AePS transaction Your server application needs to validate the transaction with merchant details and e.data [block:code] { "codes": [ { "code": "if( ACTION === ‘debit-hook’) {\n // Add Logic to decide if the transaction can be proceeded and make a note of transaction\n}", "language": "javascript" } ] } [/block] ACTION, INTERACTION_TYPE_ID, TYPE are variables storing corresponding data from e.data If your application decides to proceed with the transaction, then generate below security parameters: * secret_key * secret_key_timestamp * request_hash [block:callout] { "type": "info", "body": "To generate secret_key, secret_key_timestamp and request_hash, refer to [authentication](https://developers.eko.in/docs/authentication) section\n\nFor generating request_hash, the request will be formed by concatenating secret_ley_timestamp and value of parameters present in request_hash_params(detail.request_hash_params) array list in same order.\n\nYou should iterate through request_hash_params list and check if that field is present in **detail.data**, if present then append its value in the request signature, used to generate request_hash\n\n\nFor e.g.\nWhen request_hash_params = [\"customer_id\",\"amount\",\"user_code\"]\nsecret_key_timestamp = “1532582133692”\nThen\n\n\n**For Cash Withdrawal\n**\ndetail.data: {\n \"customer_id\": \"9999999999\",\n \"bank_code\": \"PUNB\",\n \"type\": \"2\",\n \"user_code\": \"20810200\",\n \"amount\": \"2000\"\n}\n\nrequest signature =\nsecret_key_timestamp + customer_id + amount + user_code\n“1532582133692” + “9999999999” + “2000” + “ 20810200”\n“15325821336929999999999200020810200”\n\n\n**For Balance Inquiry\n**\n detail.data: {\n \"customer_id\": \"9999999999\",\n \"bank_code\": \"PUNB\",\n \"type\": \"3\",\n \"user_code\": \"20810200\"\n}\n\n\nrequest signature =\nsecret_key_timestamp + customer_id + user_code\n“1532582133692” + “9999999999” + “ 20810200”\n“1532582133692999999999920810200”\n\nplease refer to [section](https://developers.eko.in/docs/widget-security) for more info", "title": "Please Note:" } [/block] Your website, after receiving AJAX response (containing data like secret_key, secret_key_timestamp, request_hash) f, should now communicate back to the AePS Gateway sharing its decision to proceed or cancel the transaction. ** If communicating using Javascript message event, then send Postmessage to Gateway in below format [block:code] { "codes": [ { "code": "ekoReq = {\n \"eko_gateway_request\": {\n \"action\": \"go\",\n \"allow\": true,\n \"request_hash\": \"5zf8i/q/KA=\",\n \"secret_key\": \"IAmttMF/XZ5T0sHCq1GGag0=\",\n \"secret_key_timestamp\": \"1528725377641\",\n \"client_ref_id\": \"1234567766777777\"//(optional)\n }\n }", "language": "javascript", "name": "Proceed the transaction" } ] } [/block] [block:code] { "codes": [ { "code": "ekoReq = {\n\"eko_gateway_request\": {\n \"action\": \"go\",\n \"allow\":false,\n \"message\": \"Reason behind transaction cancellation.. insifficient balance\"\n }\n}", "language": "javascript", "name": "Cancel the transaction" } ] } [/block] [block:code] { "codes": [ { "code": "popup.postMessage(ekoReq, '*')", "language": "javascript", "name": "Send Javascript postMessage back to Gateway" } ] } [/block] **If communicating using callback URL, then the response sent by callback URL should be in below format** [block:code] { "codes": [ { "code": "{\n \"allow\": true,\n \"action\": \"go\",\n \"secret_key_timestamp\": \"1540880719963\",\n \"request_hash\": \"r8SC5YiCylzllnftA9ys4/hPi5hIJrMVZhykamemqKE=\",\n \"secret_key\": \"4CKAzpT/B44CnhXM01pRnZELcGKWOhvbZg7TqoGDIrA=\"\n}", "language": "json", "name": "Proceed the transaction" } ] } [/block] [block:code] { "codes": [ { "code": "{\n \"allow\": false,\n \"action\": \"go\",\n \"message\": \"Any error message... insifficient balance\"\n}", "language": "json", "name": "Cancel the transaction" } ] } [/block] [block:callout] { "type": "warning", "body": "1. Message parameter value should contain reason behind transaction cancellation\n2. Above ekoReq is just a sample variable, defining the structure of data to be sent to gateway website\n3. Values of keys request_hash, secret_key, secret_key_timestamp, client_ref_id, message are dynamic and should be replaced with actual values", "title": "Please Note:" } [/block] [block:api-header] { "title": "Post-transaction Communication" } [/block] After a transaction is finished, AePS gateway will send a message event to partner website sharing transaction details. [block:code] { "codes": [ { "code": "window.addEventListener('message', function(e) {\n\n if(event.origin === 'https://stagegateway.eko.in'\n || event.origin === 'https://gateway.eko.in') {\n\n //e.data\n }\n\n});", "language": "javascript" } ] } [/block] [block:code] { "codes": [ { "code": "\n{\n \"eko_gateway_response\": {\n \"gateway_url\": \"https://stagegateway.eko.in/v2/aeps\",\n \"action\": \"response\",\n \"transaction\": \"aeps\",\n \"detail\": {\n \"client_ref_id\": \"1546497183438\",\n \"http_status\": 200,\n \"interaction_type_id\": 344,\n \"response\": {\n \"status\": 0,\n \"response_status_id\": 0,\n \"response_type_id\": 1305,\n \"message\": \"Transaction successful\",\n \"data\": {\n \"tx_status\": \"0\",\n \"transaction_date\": \"\",\n \"reason\": \"\",\n \"amount\": \"2000.0\",\n \"merchant_code\": \"\",\n \"tds\": \"0.3\",\n \"shop\": \"\",\n \"sender_name\": \"amit\",\n \"tid\": \"14563687\",\n \"auth_code\": \"\",\n \"balance\": \"339976.26\",\n \"shop_address_line1\": \"\",\n \"user_code\": \"20810200\",\n \"merchantname\": \"Sneha\",\n \"stan\": \"\",\n \"aadhar\": \"XXXX XXXX 9999\",\n \"customer_balance\": \"\",\n \"transaction_time\": \"\",\n \"commission\": \"6.0\",\n \"bank_ref_num\": \"\",\n \"terminal_id\": \"\"\n }\n }\n }\n }\n}\n", "language": "json", "name": "Sample e.data" } ] } [/block] For post-transaction confirmation, value of **action** field is **response** and **interaction_type_id** is **344** Status of transaction is represented by field **tx_status** (eko_gateway_response.detail.response.data.tx_status) [block:parameters] { "data": { "h-0": "tx_status", "h-1": "Transaction Description", "0-0": "0", "0-1": "Success", "1-0": "1", "1-1": "Failure", "2-0": "Any other", "2-1": "Suspicious" }, "cols": 2, "rows": 3 } [/block] Money deducted from the customer's bank account and not received as an E-value will be reversed to the account in T+7 days according to partner bank TAT. **commission**(eko_gateway_response.detail.response.data.commission) field states the commission given to partner for that transaction. If communicating using callback URL, then sample data received in the callback URL [block:code] { "codes": [ { "code": "{\n \"param1\": \"value1\",\n \"param2\": \"value2\",\n \"action\": \"eko-response\",\n \"detail\": {\n \"url\": \"https://stagegateway.eko.in/v2/api\",\n \"client_ref_id\": \"1546497183438\",\n \"card_index\": 2,\n \"http_method\": \"POST\",\n \"http_status\": 200,\n \"interaction_type_id\": 344,\n \"is_debithook_response\": true,\n \"is_final\": true,\n \"response\": {\n \"status\": 0,\n \"response_status_id\": 0,\n \"response_type_id\": 1305,\n \"message\": \"Transaction successful\",\n \"data\": {\n \"tx_status\": \"0\",\n \"transaction_date\": \"\",\n \"reason\": \"\",\n \"amount\": \"2000.0\",\n \"merchant_code\": \"\",\n \"tds\": \"0.3\",\n \"shop\": \"\",\n \"sender_name\": \"amit\",\n \"tid\": \"14563687\",\n \"auth_code\": \"\",\n \"balance\": \"339976.26\",\n \"shop_address_line1\": \"\",\n \"user_code\": \"20310001\",\n \"merchantname\": \"Sneha\",\n \"stan\": \"\",\n \"aadhaar\": \"XXXX XXXX 9999\",\n \"customer_balance\": \"\",\n \"transaction_time\": \"\",\n \"commission\": \"6.0\",\n \"bank_ref_num\": \"\",\n \"terminal_id\": \"\"\n }\n }\n }\n}", "language": "json", "name": "Final AePS Response" } ] } [/block] In the above check **action** field is **eko-response** and **interaction_type_id** field is **344**, for final transaction Send a dummy / trivial response to callback URL in this case or in case of any non pre-transaction confirmation e.g. {"message":"ok"} For transaction inquiry, use the following API: [transaction inquiry](https://developers.eko.in/docs/transaction-inquiry) Security Tip: Make sure to use the above inquiry API at your backend, to validate the state of the transaction and its details [block:callout] { "type": "warning", "title": "FAQ", "body": "**Q On clicking AePS transaction submit button, submit button keeps on rotating and nothing happens**\n**A** Check if you have handled debit-hook properly\n\n**Q How to generate the secret key timestamp, secret key, and request hash ?**\n**A** Check [security section](https://developers.eko.in/docs/authentication)" } [/block]
[Get AePS Demo](https://beta.ekoconnect.in:20011/aeps/v2) [block:api-header] { "title": "Initiation" } [/block] 1. You should add a button on your website for AePS transaction 2. On clicking this button, AePS Gateway will open in a new tab/window 3. While executing the AePS transaction on the Gateway, ensure your website is always present in the background [block:callout] { "type": "success", "title": "POST", "body": "https://stagegateway.eko.in/v2/aeps\n\n**POST PARAMETERS:**\n**initiator_id** (required) - partner id from where the request has been initiated\n**partner_name** (required) - name of the partner\n**developer_key** (required) - Your unique API key that will authenticate your request\n**secret_key** (required) - refer to [authentication section](https://developers.eko.in/docs/authentication)\n**secret_key_timestamp** (required) - refer to [authentication section](https://developers.eko.in/docs/authentication)\n**user_code** (required) - unique code of the user availing AePS; this needs to be generated while onboarding users ([refer here](https://developers.eko.in/docs/activate-service))\n**initiator_logo_url** (required) - logo to be shown on AePS Gateway\n**language** (optional) - Default language is English(en). For more language options, check below language-code table\n**callback_url** (optional) - URL for communication with partner application.Callback URL should be of POST type\n**callback_url_custom_params** (optional) - Any custom parameters if partner wants to get, when callback URL is called for partner’s own use\n**callback_url_custom_headers** (optional) - Any custom headers if partner wants to get, when callback URL is called for partner’s own use. e.g. Authorization headers\n**is_light_header** (optional) - true / false, for light-colored header in AePS Gateway" } [/block] [block:parameters] { "data": { "h-0": "Language", "h-1": "Code", "0-0": "English", "0-1": "en", "1-0": "Hindi", "1-1": "hi", "2-0": "Marathi", "2-1": "mr", "3-0": "Gujarati", "3-1": "gu", "4-0": "Kannada", "4-1": "kn" }, "cols": 2, "rows": 5 } [/block] **Sample code to open AePS Gateway portal in new Browser Tab** [block:code] { "codes": [ { "code": "<button onclick=\"openEkoGateway()\">\n\t\tAePS\n</button>\n", "language": "html" } ] } [/block] [block:code] { "codes": [ { "code": "function openEkoGateway() {\n\t\t\tvar params = {\n\t\t\t \"developer_key\": \"becbbce45f79c6f5109f848acd540567\",\n\t\t\t \"secret_key\": \"dCUujUywtuu86CyoHkZZzBjLUAVC365e6PLaa4UYwqM=\",\n\t\t\t \"secret_key_timestamp\": \"1532582133692\",\n\t\t\t \"initiator_id\": \"9962981729\",\n\t\t\t \"user_code\": \"20810200\",\n\t\t\t \"initiator_logo_url\": \"https://files.eko.co.in:8080/docs/logos/payment/dummy-partner-logo.png\",\n\t\t\t \"partner_name\": \"Payments INC\",\n\t\t\t \"language\": \"en\"\n\t\t};\n\n\t\tvar url = 'https://stagegateway.eko.in/v2/aeps';\n\t\tvar form = document.createElement(\"form\");\n\t\tform.setAttribute('method', 'post');\n\t\tform.setAttribute('action', url);\n\n\t\tform.setAttribute('target', 'ekogateway');\n\t\tpopup = window.open(\"\", \"ekogateway\");\n\n\t\tfor(const prop in params) {\n\n\t\t if(params.hasOwnProperty(prop)) {\n\t\t\tvar input = document.createElement('input');\n\t\t\tinput.type = 'hidden';\n\t\t\tinput.name = prop;\n\t\t\tinput.value = params[prop];\n\t\t\tform.appendChild(input);\n\t\t }\n\n\t\t}\n\n\t\tdocument.body.appendChild(form);\n\t\tform.submit();\n\n\t\t}", "language": "javascript", "name": "Javascript" } ] } [/block] If you want communication using callback URL, then sample params should be [block:code] { "codes": [ { "code": "var params = {\n \"developer_key\": \"becbbce45f79c6f5109f848acd540567\",\n \"secret_key\": \"dCUujUywtuu86CyoHkZZzBjLUAVC365e6PLaa4UYwqM=\",\n \"secret_key_timestamp\": \"1532582133692\",\n \"initiator_id\": \"9962981729\",\n \"user_code\": \"20810200\",\n \"initiator_logo_url\": \"https://files.eko.co.in:8080/docs/logos/payment/dummy-partner-logo.png\",\n \"partner_name\": \"Payments INC\",\n \"language\": \"en\",\n \"callback_url\": \"\",\n\n };", "language": "javascript", "name": "Sample request sent to callback Url for debit-hook" } ] } [/block] If you want to send any custom headers/params with callback URL, for own use then send them [block:code] { "codes": [ { "code": "\t {\n\t \"callback_url_custom_params\" : JSON.stringify({param1: 'value1',param2: 'value2'}),\n\t \"callback_url_custom_headers\" : JSON.stringify({header1: 'header1val', header2: 'header2val'})\n\t }", "language": "json", "name": "Optional Custom Params / Headers with Callback URL" } ] } [/block] [block:callout] { "type": "warning", "body": " * Above code is just a sample, with static param values\n * All the static values need to be replaced with actual ones relevant to the partner ", "title": "Please Note:" } [/block] [block:api-header] { "title": "Pre-transaction Confirmation" } [/block] At the time of every financial transaction (credit/debit), AePS gateway will trigger a message event to your website for confirmation. This message event will inform your application/website that a financial transaction has been initiated. Your server should make a note of this transaction and give confirmation to AePS Gateway to proceed or cancel with the transaction. Implement a Javascript message event listener that listens to the message event coming from AePS Gateway **Sample code for listening to the message event** [block:code] { "codes": [ { "code": "window.addEventListener('message', function(e) {\n\n\tif(event.origin === 'https://stagegateway.eko.in'\n\t|| event.origin === 'https://gateway.eko.in') {\n\n\t\t//e.data\n\t}\n\n});\n", "language": "javascript" } ] } [/block] **Information you get in e.data** [block:code] { "codes": [ { "code": "{\n \"eko_gateway_response\": {\n \"gateway_url\": \"https://stagegateway.eko.in/v2/aeps\",\n \"action\": \"debit-hook\",\n \"transaction\": \"aeps\",\n \"detail\": {\n \"interaction_label\": \"AePS\",\n \"interaction_type_id\": 344,\n \"client_ref_id\": \"1538678967604\",\n \"data\": {\n \"customer_id\": \"9999999999\",\n \"bank_code\": \"SBIN\",\n \"type\": \"2\",\n \"amount\": \"1200\",\n \"user_code\": \"20810200\"\n },\n \"request_hash_params\": [\n \"customer_id\",\n \"amount\",\n \"user_code\"\n ]\n }\n }\n}", "language": "json", "name": "Sample e.data" } ] } [/block] Some important parameters in e.data are as follows: * amount = e.data.eko_gateway_response.detail.data.amount * customer_id = e.data.eko_gateway_response.detail.data.customer_id * type = e.data.eko_gateway_response.detail.type a. For AePS Cash Deposit, type will be 1 (service currently not available) b. For AePS Cash withdrawal, type will be 2 c. For AePS Balance Inquiry, type will be 3 * client_ref_id = e.data.eko_gateway_response.detail.client_ref_id * action = e.data.eko_gateway_response.action * For pre-transaction confirmation, action value will be debit-hook **If communicating using callback URL, then sample payload in the callback URL ** [block:code] { "codes": [ { "code": "{\n \"param1\": \"value1\",\n \"param2\": \"value2\",\n \"action\": \"debit-hook\",\n \"detail\": {\n \"url\": \"/api\",\n \"http_method\": \"POST\",\n \"interaction_type_id\": 344,\n \"interaction_label\": \"AePS\",\n \"client_ref_id\": \"1540880592059\",\n \"card_index\": 2,\n \"request_hash_params\": [\n \"customer_id\",\n \"amount\",\n \"user_code\"\n ],\n \"data\": {\n \"customer_id\": \"9999999999\",\n \"bank_code\": \"PUNB\",\n \"type\": \"2\",\n \"user_code\": \"20810200\",\n \"amount\": \"100\"\n }\n }\n}\n", "language": "json" } ] } [/block] [block:callout] { "type": "warning", "body": "With every financial transaction, a unique **client_ref_id** will be shared for your reference and transaction identification.\nYour application can make a note of this **client_ref_id** for future inquiry purpose.\n\nIf implementing using callback URL, then send CORS headers in the response of callback URL\n\nAdd following response headers\n\n**For OPTIONS method**\nAccess-Control-Allow-Methods: POST, OPTIONS\nAccess-Control-Allow-Origin: https://stagegateway.eko.in\nAccess-Control-Allow-Headers: Content-Type\n\n\n**For POST method **\nAccess-Control-Allow-Origin: https://stagegateway.eko.in\n\n\nFor quick reference, you can walk through the [demo](https://beta.ekoconnect.in:20011/aeps/v2) and view network calls using developers tools and understand how the above headers are sent in response headers.\n\nAlso, on migration to Production, replace Test URL(https://stagegateway.eko.in) with production URL in above headers\n \nFor a detailed study on CORS, you can read this [resource](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS).\n\nFor security reasons, callback URL should use **HTTPS** protocol instead of HTTP (when not on localhost).", "title": "Please Note:" } [/block] After getting above details of the initiated transaction, your application needs to validate and make a note of it. For this, you need to implement AJAX to communicate between your website and server to give a go-ahead with the AePS transaction Your server application needs to validate the transaction with merchant details and e.data [block:code] { "codes": [ { "code": "if( ACTION === ‘debit-hook’) {\n // Add Logic to decide if the transaction can be proceeded and make a note of transaction\n}", "language": "javascript" } ] } [/block] ACTION, INTERACTION_TYPE_ID, TYPE are variables storing corresponding data from e.data If your application decides to proceed with the transaction, then generate below security parameters: * secret_key * secret_key_timestamp * request_hash [block:callout] { "type": "info", "body": "To generate secret_key, secret_key_timestamp and request_hash, refer to [authentication](https://developers.eko.in/docs/authentication) section\n\nFor generating request_hash, the request will be formed by concatenating secret_ley_timestamp and value of parameters present in request_hash_params(detail.request_hash_params) array list in same order.\n\nYou should iterate through request_hash_params list and check if that field is present in **detail.data**, if present then append its value in the request signature, used to generate request_hash\n\n\nFor e.g.\nWhen request_hash_params = [\"customer_id\",\"amount\",\"user_code\"]\nsecret_key_timestamp = “1532582133692”\nThen\n\n\n**For Cash Withdrawal\n**\ndetail.data: {\n \"customer_id\": \"9999999999\",\n \"bank_code\": \"PUNB\",\n \"type\": \"2\",\n \"user_code\": \"20810200\",\n \"amount\": \"2000\"\n}\n\nrequest signature =\nsecret_key_timestamp + customer_id + amount + user_code\n“1532582133692” + “9999999999” + “2000” + “ 20810200”\n“15325821336929999999999200020810200”\n\n\n**For Balance Inquiry\n**\n detail.data: {\n \"customer_id\": \"9999999999\",\n \"bank_code\": \"PUNB\",\n \"type\": \"3\",\n \"user_code\": \"20810200\"\n}\n\n\nrequest signature =\nsecret_key_timestamp + customer_id + user_code\n“1532582133692” + “9999999999” + “ 20810200”\n“1532582133692999999999920810200”\n\nplease refer to [section](https://developers.eko.in/docs/widget-security) for more info", "title": "Please Note:" } [/block] Your website, after receiving AJAX response (containing data like secret_key, secret_key_timestamp, request_hash) f, should now communicate back to the AePS Gateway sharing its decision to proceed or cancel the transaction. ** If communicating using Javascript message event, then send Postmessage to Gateway in below format [block:code] { "codes": [ { "code": "ekoReq = {\n \"eko_gateway_request\": {\n \"action\": \"go\",\n \"allow\": true,\n \"request_hash\": \"5zf8i/q/KA=\",\n \"secret_key\": \"IAmttMF/XZ5T0sHCq1GGag0=\",\n \"secret_key_timestamp\": \"1528725377641\",\n \"client_ref_id\": \"1234567766777777\"//(optional)\n }\n }", "language": "javascript", "name": "Proceed the transaction" } ] } [/block] [block:code] { "codes": [ { "code": "ekoReq = {\n\"eko_gateway_request\": {\n \"action\": \"go\",\n \"allow\":false,\n \"message\": \"Reason behind transaction cancellation.. insifficient balance\"\n }\n}", "language": "javascript", "name": "Cancel the transaction" } ] } [/block] [block:code] { "codes": [ { "code": "popup.postMessage(ekoReq, '*')", "language": "javascript", "name": "Send Javascript postMessage back to Gateway" } ] } [/block] **If communicating using callback URL, then the response sent by callback URL should be in below format** [block:code] { "codes": [ { "code": "{\n \"allow\": true,\n \"action\": \"go\",\n \"secret_key_timestamp\": \"1540880719963\",\n \"request_hash\": \"r8SC5YiCylzllnftA9ys4/hPi5hIJrMVZhykamemqKE=\",\n \"secret_key\": \"4CKAzpT/B44CnhXM01pRnZELcGKWOhvbZg7TqoGDIrA=\"\n}", "language": "json", "name": "Proceed the transaction" } ] } [/block] [block:code] { "codes": [ { "code": "{\n \"allow\": false,\n \"action\": \"go\",\n \"message\": \"Any error message... insifficient balance\"\n}", "language": "json", "name": "Cancel the transaction" } ] } [/block] [block:callout] { "type": "warning", "body": "1. Message parameter value should contain reason behind transaction cancellation\n2. Above ekoReq is just a sample variable, defining the structure of data to be sent to gateway website\n3. Values of keys request_hash, secret_key, secret_key_timestamp, client_ref_id, message are dynamic and should be replaced with actual values", "title": "Please Note:" } [/block] [block:api-header] { "title": "Post-transaction Communication" } [/block] After a transaction is finished, AePS gateway will send a message event to partner website sharing transaction details. [block:code] { "codes": [ { "code": "window.addEventListener('message', function(e) {\n\n if(event.origin === 'https://stagegateway.eko.in'\n || event.origin === 'https://gateway.eko.in') {\n\n //e.data\n }\n\n});", "language": "javascript" } ] } [/block] [block:code] { "codes": [ { "code": "\n{\n \"eko_gateway_response\": {\n \"gateway_url\": \"https://stagegateway.eko.in/v2/aeps\",\n \"action\": \"response\",\n \"transaction\": \"aeps\",\n \"detail\": {\n \"client_ref_id\": \"1546497183438\",\n \"http_status\": 200,\n \"interaction_type_id\": 344,\n \"response\": {\n \"status\": 0,\n \"response_status_id\": 0,\n \"response_type_id\": 1305,\n \"message\": \"Transaction successful\",\n \"data\": {\n \"tx_status\": \"0\",\n \"transaction_date\": \"\",\n \"reason\": \"\",\n \"amount\": \"2000.0\",\n \"merchant_code\": \"\",\n \"tds\": \"0.3\",\n \"shop\": \"\",\n \"sender_name\": \"amit\",\n \"tid\": \"14563687\",\n \"auth_code\": \"\",\n \"balance\": \"339976.26\",\n \"shop_address_line1\": \"\",\n \"user_code\": \"20810200\",\n \"merchantname\": \"Sneha\",\n \"stan\": \"\",\n \"aadhar\": \"XXXX XXXX 9999\",\n \"customer_balance\": \"\",\n \"transaction_time\": \"\",\n \"commission\": \"6.0\",\n \"bank_ref_num\": \"\",\n \"terminal_id\": \"\"\n }\n }\n }\n }\n}\n", "language": "json", "name": "Sample e.data" } ] } [/block] For post-transaction confirmation, value of **action** field is **response** and **interaction_type_id** is **344** Status of transaction is represented by field **tx_status** (eko_gateway_response.detail.response.data.tx_status) [block:parameters] { "data": { "h-0": "tx_status", "h-1": "Transaction Description", "0-0": "0", "0-1": "Success", "1-0": "1", "1-1": "Failure", "2-0": "Any other", "2-1": "Suspicious" }, "cols": 2, "rows": 3 } [/block] Money deducted from the customer's bank account and not received as an E-value will be reversed to the account in T+7 days according to partner bank TAT. **commission**(eko_gateway_response.detail.response.data.commission) field states the commission given to partner for that transaction. If communicating using callback URL, then sample data received in the callback URL [block:code] { "codes": [ { "code": "{\n \"param1\": \"value1\",\n \"param2\": \"value2\",\n \"action\": \"eko-response\",\n \"detail\": {\n \"url\": \"https://stagegateway.eko.in/v2/api\",\n \"client_ref_id\": \"1546497183438\",\n \"card_index\": 2,\n \"http_method\": \"POST\",\n \"http_status\": 200,\n \"interaction_type_id\": 344,\n \"is_debithook_response\": true,\n \"is_final\": true,\n \"response\": {\n \"status\": 0,\n \"response_status_id\": 0,\n \"response_type_id\": 1305,\n \"message\": \"Transaction successful\",\n \"data\": {\n \"tx_status\": \"0\",\n \"transaction_date\": \"\",\n \"reason\": \"\",\n \"amount\": \"2000.0\",\n \"merchant_code\": \"\",\n \"tds\": \"0.3\",\n \"shop\": \"\",\n \"sender_name\": \"amit\",\n \"tid\": \"14563687\",\n \"auth_code\": \"\",\n \"balance\": \"339976.26\",\n \"shop_address_line1\": \"\",\n \"user_code\": \"20310001\",\n \"merchantname\": \"Sneha\",\n \"stan\": \"\",\n \"aadhaar\": \"XXXX XXXX 9999\",\n \"customer_balance\": \"\",\n \"transaction_time\": \"\",\n \"commission\": \"6.0\",\n \"bank_ref_num\": \"\",\n \"terminal_id\": \"\"\n }\n }\n }\n}", "language": "json", "name": "Final AePS Response" } ] } [/block] In the above check **action** field is **eko-response** and **interaction_type_id** field is **344**, for final transaction Send a dummy / trivial response to callback URL in this case or in case of any non pre-transaction confirmation e.g. {"message":"ok"} For transaction inquiry, use the following API: [transaction inquiry](https://developers.eko.in/docs/transaction-inquiry) Security Tip: Make sure to use the above inquiry API at your backend, to validate the state of the transaction and its details [block:callout] { "type": "warning", "title": "FAQ", "body": "**Q On clicking AePS transaction submit button, submit button keeps on rotating and nothing happens**\n**A** Check if you have handled debit-hook properly\n\n**Q How to generate the secret key timestamp, secret key, and request hash ?**\n**A** Check [security section](https://developers.eko.in/docs/authentication)" } [/block]
{"_id":"5b712f806a90fc00037b4971","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"5b5970c22cbdf5000330ad2d","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-08-13T07:13:04.988Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"Step 1: Get the service code for AePS by **[Get Services](https://developers.eko.in/docs/get-services)** API \n\nStep 2: Onboard your users (merchants) by initiating [Onboard User](https://developers.eko.in/docs/onboard-user) API\n\nStep 3: Activate AePS services for your users by initiating the **[Activate Service](https://developers.eko.in/docs/activate-service)** API with user's unique code (Returned in the response to Onboard User API)\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Please Note:\",\n  \"body\": \"We do a PAN verification of the PAN number provided by you in the Onboard User API and match the name returned in PAN verification and the name coming in API. So please do enter valid PAN number and it should be of the same merchant/user whose name you are giving\\n\\nThe name matching is only for the production, on staging we won't be matching the name from PAN verification and in the request.\"\n}\n[/block]","excerpt":"","slug":"how-to-onboard-your-merchants-for-aeps","type":"basic","title":"How to onboard your merchants for AePS?","__v":0,"parentDoc":null,"childrenPages":[]}

How to onboard your merchants for AePS?


Step 1: Get the service code for AePS by **[Get Services](https://developers.eko.in/docs/get-services)** API Step 2: Onboard your users (merchants) by initiating [Onboard User](https://developers.eko.in/docs/onboard-user) API Step 3: Activate AePS services for your users by initiating the **[Activate Service](https://developers.eko.in/docs/activate-service)** API with user's unique code (Returned in the response to Onboard User API) [block:callout] { "type": "warning", "title": "Please Note:", "body": "We do a PAN verification of the PAN number provided by you in the Onboard User API and match the name returned in PAN verification and the name coming in API. So please do enter valid PAN number and it should be of the same merchant/user whose name you are giving\n\nThe name matching is only for the production, on staging we won't be matching the name from PAN verification and in the request." } [/block]
Step 1: Get the service code for AePS by **[Get Services](https://developers.eko.in/docs/get-services)** API Step 2: Onboard your users (merchants) by initiating [Onboard User](https://developers.eko.in/docs/onboard-user) API Step 3: Activate AePS services for your users by initiating the **[Activate Service](https://developers.eko.in/docs/activate-service)** API with user's unique code (Returned in the response to Onboard User API) [block:callout] { "type": "warning", "title": "Please Note:", "body": "We do a PAN verification of the PAN number provided by you in the Onboard User API and match the name returned in PAN verification and the name coming in API. So please do enter valid PAN number and it should be of the same merchant/user whose name you are giving\n\nThe name matching is only for the production, on staging we won't be matching the name from PAN verification and in the request." } [/block]
{"_id":"5cbdad9608cfba00622a0a1b","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"5caed08c49a3bb001f868e30","user":"5b878104b176670003e622e4","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-04-22T12:03:34.062Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"Please refer to the link \"https://docs.google.com/document/d/1YFYOHVPC_gnFFI-TEZ7qyVwFp59PCpoEnz1AOwaZsZw/edit?ts=5cb6b260\" for the documentation of the integration for the AePS SDK.","excerpt":"","slug":"aeps-sdk-integration-documentation","type":"basic","title":"AePS SDK Integration Documentation","__v":0,"parentDoc":null,"childrenPages":[]}

AePS SDK Integration Documentation


Please refer to the link "https://docs.google.com/document/d/1YFYOHVPC_gnFFI-TEZ7qyVwFp59PCpoEnz1AOwaZsZw/edit?ts=5cb6b260" for the documentation of the integration for the AePS SDK.
Please refer to the link "https://docs.google.com/document/d/1YFYOHVPC_gnFFI-TEZ7qyVwFp59PCpoEnz1AOwaZsZw/edit?ts=5cb6b260" for the documentation of the integration for the AePS SDK.
{"_id":"5cac963e2de0f7001fa95bab","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"5cac828bd99d610033a97d07","user":"5b878104b176670003e622e4","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-04-09T12:55:26.627Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"1. Enable users to add self bank account through **Add Bank Account API**\n2. Show list of recipients mapped to a user using **Get List of Recipients mapped to user API** or allow him/her to add new self bank account\n3. Read the amount the user can settle in his/her account from the parameter *unsettled_fund* in the response from Get List of Recipients mapped to user API\n4. The user chooses bank account and initiates the request for settlement\n5. The user will get money into his bank account within 3 hours \n\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Please Note\",\n  \"body\": \"1. Service available from Monday to Friday between 10 am to 5 pm\\n2. Max Amount for settlement: Rs 2 lakh per transaction\"\n}\n[/block]","excerpt":"","slug":"steps-for-fund-settlemement","type":"basic","title":"Steps for Fund Settlement","__v":0,"parentDoc":null,"childrenPages":[]}

Steps for Fund Settlement


1. Enable users to add self bank account through **Add Bank Account API** 2. Show list of recipients mapped to a user using **Get List of Recipients mapped to user API** or allow him/her to add new self bank account 3. Read the amount the user can settle in his/her account from the parameter *unsettled_fund* in the response from Get List of Recipients mapped to user API 4. The user chooses bank account and initiates the request for settlement 5. The user will get money into his bank account within 3 hours [block:callout] { "type": "info", "title": "Please Note", "body": "1. Service available from Monday to Friday between 10 am to 5 pm\n2. Max Amount for settlement: Rs 2 lakh per transaction" } [/block]
1. Enable users to add self bank account through **Add Bank Account API** 2. Show list of recipients mapped to a user using **Get List of Recipients mapped to user API** or allow him/her to add new self bank account 3. Read the amount the user can settle in his/her account from the parameter *unsettled_fund* in the response from Get List of Recipients mapped to user API 4. The user chooses bank account and initiates the request for settlement 5. The user will get money into his bank account within 3 hours [block:callout] { "type": "info", "title": "Please Note", "body": "1. Service available from Monday to Friday between 10 am to 5 pm\n2. Max Amount for settlement: Rs 2 lakh per transaction" } [/block]
{"_id":"5cac84a1b599250063f18af1","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"5cac828bd99d610033a97d07","user":"5b878104b176670003e622e4","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-04-09T11:40:17.687Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"put","examples":{"codes":[{"language":"curl","code":"curl -X PUT \\\n  'https://staging.eko.in:25004/ekoapi/v1/agent/user_code:20310003/settlementaccount' \\\n  -H 'Content-Type: application/x-www-form-urlencoded' \\\n  -H 'Postman-Token: 16c0f02d-d81e-49a6-b0ba-a3141989e6c9' \\\n  -H 'cache-control: no-cache' \\\n  -d 'initiator_id=7411111111&bank_id=108&ifsc=SBIN0000001&service_code=39&account=34567891234'"},{"name":"Python","language":"text","code":"import http.client\n\nconn = http.client.HTTPConnection(\"staging,eko,in\")\n\npayload = \"initiator_id=7411111111&bank_id=56&ifsc=KKBK0000261&service_code=39&account=1711650539\"\n\nheaders = {\n    'Content-Type': \"application/x-www-form-urlencoded\",\n    'developer_key': \"becbbce45f79c6f5109f848acd540567\",\n    'secret-key': \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    'secret-key-timestamp': \"1516705204593\",\n    'cache-control': \"no-cache\",\n    'Postman-Token': \"61956a50-2631-437a-a18d-9c8d4f80fcbc\"\n    }\n\nconn.request(\"PUT\", \"ekoapi,v1,agent,user_code:20310003,settlementaccount\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"name":"PHP","language":"text","code":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_PORT => \"25004\",\n  CURLOPT_URL => \"https://staging.eko.in:25004/ekoapi/v1/agent/user_code:20310003/settlementaccount\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_POSTFIELDS => \"initiator_id=7411111111&bank_id=56&ifsc=KKBK0000261&service_code=39&account=1711650539\",\n  CURLOPT_HTTPHEADER => array(\n    \"Content-Type: application/x-www-form-urlencoded\",\n    \"Postman-Token: f2d7452f-7496-4a30-9d1c-e0c86dba2c06\",\n    \"cache-control: no-cache\",\n    \"developer_key: becbbce45f79c6f5109f848acd540567\",\n    \"secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    \"secret-key-timestamp: 1516705204593\"\n  ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"name":"C#","language":"text","code":"var client = new RestClient(\"https://staging.eko.in:25004/ekoapi/v1/agent/user_code:20310003/settlementaccount\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"Postman-Token\", \"bd37a1a1-6cd4-4f0e-a143-2e0552958deb\");\nrequest.AddHeader(\"cache-control\", \"no-cache\");\nrequest.AddHeader(\"secret-key-timestamp\", \"1516705204593\");\nrequest.AddHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\");\nrequest.AddHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\");\nrequest.AddHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\nrequest.AddParameter(\"initiator_id=7411111111&bank_id=56&ifsc=KKBK0000261&service_code=39&account=1711650539\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"name":"Java","language":"text","code":"HttpResponse<String> response = Unirest.put(\"https://staging.eko.in:25004/ekoapi/v1/agent/user_code:20310003/settlementaccount\")\n  .header(\"Content-Type\", \"application/x-www-form-urlencoded\")\n  .header(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\")\n  .header(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\")\n  .header(\"secret-key-timestamp\", \"1516705204593\")\n  .header(\"cache-control\", \"no-cache\")\n  .header(\"Postman-Token\", \"3e6faf2f-8bb4-43e8-bf7c-86465df2169c\")\n  .body(\"initiator_id=7411111111&bank_id=56&ifsc=KKBK0000261&service_code=39&account=1711650539\")\n  .asString();"}]},"results":{"codes":[{"status":200,"language":"json","code":"{ \"response_status_id\": 0,\n    \"data\": {\n        \"recipient_id\": 1893\n    },\n    \"response_type_id\": 1336,\n    \"message\": \"Account added\",\n    \"status\": 0\n}","name":"Success Response"},{"status":400,"language":"json","code":"{}","name":""},{"name":"Name mismatch","status":200,"language":"text","code":"{\n    \"response_status_id\": 1,\n    \"data\": {\n        \"sender_name\": \"SANATAN CSP\",\n        \"recipient_name\": \"R K LAKSHYKAR\"\n    },\n    \"response_type_id\": 1335,\n    \"message\": \"Account verification fail, Name not matched\",\n    \"status\": 1335\n}"},{"status":200,"name":"Verification fail","language":"text","code":"{\n    \"response_status_id\": 1,\n    \"response_type_id\": 1334,\n    \"message\": \"Account verification fail name not returned by bank\",\n    \"status\": 1334\n}"}]},"settings":"","auth":"required","params":[{"_id":"5cac84a1b599250063f18afb","ref":"","in":"path","required":true,"desc":"user code of your merchant/distributor on Eko platform","default":"","type":"int","name":"user_code"},{"_id":"5cac84a1b599250063f18af9","ref":"","in":"body","required":true,"desc":"The unique cell number with which you are onboarded on Eko's platform","default":"","type":"int","name":"initiator_id"},{"_id":"5cac84a1b599250063f18af8","ref":"","in":"body","required":true,"desc":"unique id of each bank. Please refer to the attached google sheet below for the bank id","default":"","type":"int","name":"bank_id"},{"_id":"5cac84a1b599250063f18af7","ref":"","in":"body","required":true,"desc":"IFSC code of the bank account","default":"","type":"string","name":"ifsc"},{"_id":"5cac84a1b599250063f18af6","ref":"","in":"body","required":true,"desc":"This is the code of the service for fund settlement. The value of service_code for AePS fund settlement  is 39.","default":"","type":"int","name":"service_code"},{"_id":"5cac84a1b599250063f18af5","ref":"","in":"body","required":true,"desc":"account number of user's bank account","default":"","type":"int","name":"account"},{"_id":"5cac84a1b599250063f18af4","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5cac84a1b599250063f18af3","ref":"","in":"header","required":true,"desc":"refer to authentication section [https://developers.eko.in/docs/authentication]","default":"","type":"string","name":"secret-key"},{"_id":"5cac84a1b599250063f18af2","ref":"","in":"header","required":true,"desc":"refer to authentication section [https://developers.eko.in/docs/authentication]","default":"","type":"string","name":"secret-key-timestamp"}],"url":"/agent/user_code:20310003/settlementaccount"},"isReference":false,"order":1,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"1. The user would only be allowed to add his/her bank account; the name of the bank account holder will be matched to user's name and if there is a mismatch, the bank account will not get added\\n2. The user can add up to 3 bank accounts\\n3. Bank Accounts of only those banks can be added which has verification service available\\n4. You will need to use \\\"Get bank list\\\" API to get if verification is available for the bank or not. Alternatively you can store the list of banks for which verification is available on your server.\",\n  \"title\": \"Please Note\"\n}\n[/block]\n\n[block:embed]\n{\n  \"html\": false,\n  \"url\": \"https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https://docs.google.com/spreadsheets/d/1VSvnGERhHeZntKNRrAHjCVur0hr_jxTwr8Sb2-7u60c/edit&followup=https://docs.google.com/spreadsheets/d/1VSvnGERhHeZntKNRrAHjCVur0hr_jxTwr8Sb2-7u60c/edit&ltmpl=sheets\",\n  \"title\": \"Google Sheets - create and edit spreadsheets online, for free.\",\n  \"favicon\": \"https://accounts.google.com/favicon.ico\",\n  \"image\": \"https://ssl.gstatic.com/accounts/ui/avatar_2x.png\"\n}\n[/block]","excerpt":"This will enable user to add his/her bank accounts to his profile for enabling fund settlement","slug":"add-fund-settlement-recipient-request","type":"put","title":"Add bank account [Fund Settlement]","__v":17,"parentDoc":null,"childrenPages":[]}

putAdd bank account [Fund Settlement]

This will enable user to add his/her bank accounts to his profile for enabling fund settlement

Path Params

user_code:
required
integer
user code of your merchant/distributor on Eko platform

Body Params

initiator_id:
required
integer
The unique cell number with which you are onboarded on Eko's platform
bank_id:
required
integer
unique id of each bank. Please refer to the attached google sheet below for the bank id
ifsc:
required
string
IFSC code of the bank account
service_code:
required
integer
This is the code of the service for fund settlement. The value of service_code for AePS fund settlement is 39.
account:
required
integer
account number of user's bank account

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section [https://developers.eko.in/docs/authentication]
secret-key-timestamp:
required
string
refer to authentication section [https://developers.eko.in/docs/authentication]
[block:callout] { "type": "info", "body": "1. The user would only be allowed to add his/her bank account; the name of the bank account holder will be matched to user's name and if there is a mismatch, the bank account will not get added\n2. The user can add up to 3 bank accounts\n3. Bank Accounts of only those banks can be added which has verification service available\n4. You will need to use \"Get bank list\" API to get if verification is available for the bank or not. Alternatively you can store the list of banks for which verification is available on your server.", "title": "Please Note" } [/block] [block:embed] { "html": false, "url": "https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https://docs.google.com/spreadsheets/d/1VSvnGERhHeZntKNRrAHjCVur0hr_jxTwr8Sb2-7u60c/edit&followup=https://docs.google.com/spreadsheets/d/1VSvnGERhHeZntKNRrAHjCVur0hr_jxTwr8Sb2-7u60c/edit&ltmpl=sheets", "title": "Google Sheets - create and edit spreadsheets online, for free.", "favicon": "https://accounts.google.com/favicon.ico", "image": "https://ssl.gstatic.com/accounts/ui/avatar_2x.png" } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "info", "body": "1. The user would only be allowed to add his/her bank account; the name of the bank account holder will be matched to user's name and if there is a mismatch, the bank account will not get added\n2. The user can add up to 3 bank accounts\n3. Bank Accounts of only those banks can be added which has verification service available\n4. You will need to use \"Get bank list\" API to get if verification is available for the bank or not. Alternatively you can store the list of banks for which verification is available on your server.", "title": "Please Note" } [/block] [block:embed] { "html": false, "url": "https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https://docs.google.com/spreadsheets/d/1VSvnGERhHeZntKNRrAHjCVur0hr_jxTwr8Sb2-7u60c/edit&followup=https://docs.google.com/spreadsheets/d/1VSvnGERhHeZntKNRrAHjCVur0hr_jxTwr8Sb2-7u60c/edit&ltmpl=sheets", "title": "Google Sheets - create and edit spreadsheets online, for free.", "favicon": "https://accounts.google.com/favicon.ico", "image": "https://ssl.gstatic.com/accounts/ui/avatar_2x.png" } [/block]
{"_id":"5cac866d9a3dda004a99f87b","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"5cac828bd99d610033a97d07","user":"5b878104b176670003e622e4","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-04-09T11:47:57.421Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"get","examples":{"codes":[{"language":"curl","code":"curl -X GET \\\n 'https://staging.eko.in:25004/ekoapi/v1/agent/user_code:20310003/settlementaccounts?initiator_id=7411111111&service_code=39' \\\n  -H 'Content-Type: application/x-www-form-urlencoded' \\\n  -H 'Postman-Token: 2c874c72-4bfd-4dbd-a485-19169742655d' \\\n  -H 'cache-control: no-cache' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593'"},{"name":"PHP","language":"text","code":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_PORT => \"25004\",\n  CURLOPT_URL => \"https://staging.eko.in:25004/ekoapi/v1/agent/user_code:20310003/settlementaccounts?initiator_id=7411111111&service_code=39\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_POSTFIELDS => \"\",\n  CURLOPT_HTTPHEADER => array(\n    \"Content-Type: application/x-www-form-urlencoded\",\n    \"Postman-Token: 1fe6e20a-ce0a-413f-85ba-5339eed6dc0e\",\n    \"cache-control: no-cache\",\n    \"developer_key: becbbce45f79c6f5109f848acd540567\",\n    \"secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    \"secret-key-timestamp: 1516705204593\"\n  ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"name":"C#","language":"text","code":"var client = new RestClient(\"https://staging.eko.in:25004/ekoapi/v1/agent/user_code:20310003/settlementaccounts?initiator_id=7411111111&service_code=39\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"Postman-Token\", \"2243cf79-8a59-4249-9cf1-6c14d74b399d\");\nrequest.AddHeader(\"cache-control\", \"no-cache\");\nrequest.AddHeader(\"secret-key-timestamp\", \"1516705204593\");\nrequest.AddHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\");\nrequest.AddHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\");\nrequest.AddHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\nIRestResponse response = client.Execute(request);"},{"name":"Java","language":"text","code":"HttpResponse<String> response = Unirest.get(\"https://staging.eko.in:25004/ekoapi/v1/agent/user_code:20310003/settlementaccounts?initiator_id=7411111111&service_code=39\")\n  .header(\"Content-Type\", \"application/x-www-form-urlencoded\")\n  .header(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\")\n  .header(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\")\n  .header(\"secret-key-timestamp\", \"1516705204593\")\n  .header(\"cache-control\", \"no-cache\")\n  .header(\"Postman-Token\", \"69141b43-cb90-443e-973f-16b2a9f22e59\")\n  .asString();"},{"name":"Python","language":"text","code":"import http.client\n\nconn = http.client.HTTPConnection(\"staging,eko,in\")\n\npayload = \"\"\n\nheaders = {\n    'Content-Type': \"application/x-www-form-urlencoded\",\n    'developer_key': \"becbbce45f79c6f5109f848acd540567\",\n    'secret-key': \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    'secret-key-timestamp': \"1516705204593\",\n    'cache-control': \"no-cache\",\n    'Postman-Token': \"dc3e066b-2ea2-412c-a7c8-273a362d94e6\"\n    }\n\nconn.request(\"GET\", \"ekoapi,v1,agent,user_code:20310003,settlementaccounts\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n   \"response_status_id\": -1,\n   \"data\": {\n       \"unsettled_fund\": \"6100.0\",\n       \"remaining_limit\": \"190000\",\n       \"fund_transfer_list\": [\n           {\n               \"name\": \"Gaurav Mallik\",\n               \"ifsc\": \"PUNB0309300\",\n               \"account\": \"9989834392752938\",\n               \"recipient_id\": \"1828\"\n           },\n           {\n               \"name\": \"Gaurav Mallik\",\n               \"ifsc\": \"BKID0006701\",\n               \"account\": \"987867867967969\",\n               \"recipient_id\": \"1829\"\n           }\n       ]\n   },\n   \"response_type_id\": 1321,\n   \"message\": \"List of fund transfer recipients\",\n   \"status\": 0\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[{"_id":"5cac866d9a3dda004a99f881","ref":"","in":"path","required":true,"desc":"user code of your merchant/distributor on Eko platform","default":"","type":"string","name":"user_code"},{"_id":"5cac866d9a3dda004a99f880","ref":"","in":"query","required":true,"desc":"The unique cell number with which you are on-boarded on Eko's platform","default":"","type":"string","name":"initiator_id"},{"_id":"5cac866d9a3dda004a99f87f","ref":"","in":"query","required":true,"desc":"This is the code of the service for fund settlement. The value of service_code for AePS fund settlement  is 39.","default":"","type":"string","name":"service_code"},{"_id":"5cac866d9a3dda004a99f87e","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5cac866d9a3dda004a99f87d","ref":"","in":"header","required":true,"desc":"refer to authentication section [https://developers.eko.in/docs/authentication]","default":"","type":"string","name":"secret-key"},{"_id":"5cac866d9a3dda004a99f87c","ref":"","in":"header","required":true,"desc":"refer to authentication section [https://developers.eko.in/docs/authentication]","default":"","type":"string","name":"secret-key-timestamp"}],"url":"/agent/user_code:20310003/settlementaccounts?initiator_id=9962981729&service_code=39'"},"isReference":false,"order":2,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"This API is needed to retrieve the *recipient id* to which the user plans to settle the funds\",\n  \"title\": \"Please Note\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Please Note:\",\n  \"body\": \"**unsettled_fund** : Total AePS business (last 7 days) minus settlement done (last 7 days).\\nFor example: If a user has done AePS business worth of Rs. 1 lakh in the last 7 days and he/she has settled Rs. 25k in the last 7 days so he/she can now settle Rs 75k (1 lakh - 25k).\\n\\n**remaining_limit **: Total remaining limit of the maximum amount that you can settle per day.\"\n}\n[/block]","excerpt":"This will return the list of recipients mapped to the user for fund settlement services","slug":"get-all-aeps-fund-settlement-recipient-request","type":"get","title":"Get list of recipients mapped to user [Fund Settlement]","__v":14,"parentDoc":null,"childrenPages":[]}

getGet list of recipients mapped to user [Fund Settlement]

This will return the list of recipients mapped to the user for fund settlement services

Path Params

user_code:
required
string
user code of your merchant/distributor on Eko platform

Query Params

initiator_id:
required
string
The unique cell number with which you are on-boarded on Eko's platform
service_code:
required
string
This is the code of the service for fund settlement. The value of service_code for AePS fund settlement is 39.

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section [https://developers.eko.in/docs/authentication]
secret-key-timestamp:
required
string
refer to authentication section [https://developers.eko.in/docs/authentication]
[block:callout] { "type": "info", "body": "This API is needed to retrieve the *recipient id* to which the user plans to settle the funds", "title": "Please Note" } [/block] [block:callout] { "type": "info", "title": "Please Note:", "body": "**unsettled_fund** : Total AePS business (last 7 days) minus settlement done (last 7 days).\nFor example: If a user has done AePS business worth of Rs. 1 lakh in the last 7 days and he/she has settled Rs. 25k in the last 7 days so he/she can now settle Rs 75k (1 lakh - 25k).\n\n**remaining_limit **: Total remaining limit of the maximum amount that you can settle per day." } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "info", "body": "This API is needed to retrieve the *recipient id* to which the user plans to settle the funds", "title": "Please Note" } [/block] [block:callout] { "type": "info", "title": "Please Note:", "body": "**unsettled_fund** : Total AePS business (last 7 days) minus settlement done (last 7 days).\nFor example: If a user has done AePS business worth of Rs. 1 lakh in the last 7 days and he/she has settled Rs. 25k in the last 7 days so he/she can now settle Rs 75k (1 lakh - 25k).\n\n**remaining_limit **: Total remaining limit of the maximum amount that you can settle per day." } [/block]
{"_id":"5cac875cb48c3500447a25df","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"5cac828bd99d610033a97d07","user":"5b878104b176670003e622e4","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-04-09T11:51:56.328Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"post","examples":{"codes":[{"code":"curl -X POST \\\n  'https://staging.eko.in:25004/ekoapi/v1/agent/user_code:20310003/settlement' \\\n  -H 'Content-Type: application/x-www-form-urlencoded' \\\n  -H 'Postman-Token: 55346ab0-0e07-4c47-9528-0390e3eaa7f3' \\\n  -H 'cache-control: no-cache' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593' \\\n  -d 'initiator_id=7411111111&service_code=39&amount=100&recipient_id=1824&payment_mode=5&client_ref_id=Settlemet0000001'","language":"curl"},{"code":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_PORT => \"25004\",\n  CURLOPT_URL => \"https://staging.eko.in:25004/ekoapi/v1/agent/user_code:20310003/settlement\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"POST\",\n  CURLOPT_POSTFIELDS => \"initiator_id=7411111111&service_code=39&amount=100&recipient_id=1484&payment_mode=5&client_ref_id=Settlement0000010\",\n  CURLOPT_HTTPHEADER => array(\n    \"Content-Type: application/x-www-form-urlencoded\",\n    \"Postman-Token: d1ba3c7d-1b86-49a1-85de-217189a21099\",\n    \"cache-control: no-cache\",\n    \"developer_key: becbbce45f79c6f5109f848acd540567\",\n    \"secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    \"secret-key-timestamp: 1516705204593\"\n  ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}","language":"text","name":"PHP"},{"code":"var client = new RestClient(\"https://staging.eko.in:25004/ekoapi/v1/agent/user_code:20310003/settlement\");\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"Postman-Token\", \"5b95f432-a555-4fa0-810c-d67d23a27e7e\");\nrequest.AddHeader(\"cache-control\", \"no-cache\");\nrequest.AddHeader(\"secret-key-timestamp\", \"1516705204593\");\nrequest.AddHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\");\nrequest.AddHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\");\nrequest.AddHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\nrequest.AddParameter(\"undefined\", \"initiator_id=7411111111&service_code=39&amount=100&recipient_id=1484&payment_mode=5&client_ref_id=Settlement0000010\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);","language":"text","name":"C#"},{"code":"HttpResponse<String> response = Unirest.post(\"https://staging.eko.in:25004/ekoapi/v1/agent/user_code:20310003/settlement\")\n  .header(\"Content-Type\", \"application/x-www-form-urlencoded\")\n  .header(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\")\n  .header(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\")\n  .header(\"secret-key-timestamp\", \"1516705204593\")\n  .header(\"cache-control\", \"no-cache\")\n  .header(\"Postman-Token\", \"dd2f44b4-3b92-4fc3-a5d5-f66c283e22f0\")\n  .body(\"initiator_id=7411111111&service_code=39&amount=100&recipient_id=1484&payment_mode=5&client_ref_id=Settlement0000010\")\n  .asString();","language":"text","name":"Java"},{"code":"import http.client\n\nconn = http.client.HTTPConnection(\"staging,eko,in\")\n\npayload = \"initiator_id=7411111111&service_code=39&amount=100&recipient_id=1484&payment_mode=5&client_ref_id=Settlement0000010\"\n\nheaders = {\n    'Content-Type': \"application/x-www-form-urlencoded\",\n    'developer_key': \"becbbce45f79c6f5109f848acd540567\",\n    'secret-key': \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    'secret-key-timestamp': \"1516705204593\",\n    'cache-control': \"no-cache\",\n    'Postman-Token': \"de9ed04c-b1b0-47a1-8e32-7d267c31fd3b\"\n    }\n\nconn.request(\"POST\", \"ekoapi,v1,agent,user_code:20310003,settlement\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))","language":"text","name":"Python"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n   \"response_status_id\": 0,\n   \"data\": {\n       \"tx_status\": \"2\",\n       \"amount\": \"100.00\",\n       \"balance\": \"2.251010664E7\",\n       \"txstatus_desc\": \"Initiated\",\n       \"totalfee\": \"5.00\",\n       \"ifsc\": \"BKID0006701\",\n       \"account\": \"987867867967969\",\n       \"tid\": \"12937465\"\n   },\n   \"response_type_id\": 1329,\n   \"message\": \"Transaction initiated successfully\",\n   \"status\": 0\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[{"_id":"5cac875cb48c3500447a25e6","ref":"","in":"path","required":true,"desc":"The unique cell number with which you are onboarded on Eko's platform","default":"","type":"string","name":"user_code"},{"_id":"5cac875cb48c3500447a25e5","ref":"","in":"body","required":true,"desc":"The unique cell number with which you are onboarded on Eko's platform","default":"","type":"int","name":"initiator_id"},{"_id":"5cac875cb48c3500447a25e4","ref":"","in":"body","required":true,"desc":"This is the code of the service for fund settlement. The value of service code for AePS fund settlement is 39","default":"","type":"int","name":"service_code"},{"_id":"5cac875cb48c3500447a25e3","ref":"","in":"body","required":true,"desc":"Amount which user want to settle","default":"","type":"int","name":"amount"},{"_id":"5cac875cb48c3500447a25e2","ref":"","in":"body","required":true,"desc":"unique recipient_id against which user want to settle the amount","default":"","type":"int","name":"recipient_id"},{"_id":"5cac875cb48c3500447a25e1","ref":"","in":"body","required":true,"desc":"Please refer to the below table for values","default":"","type":"int","name":"payment_mode"},{"_id":"5cac875cb48c3500447a25e0","ref":"","in":"body","required":true,"desc":"Unique transaction ID which you will generate from you end for every transaction","default":"","type":"string","name":"client_ref_id"},{"_id":"5cac878af0ee2e003dc4ea49","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5cac878af0ee2e003dc4ea48","ref":"","in":"header","required":true,"desc":"refer to authentication section [https://developers.eko.in/docs/authentication]","default":"","type":"string","name":"secret-key"},{"_id":"5cac878af0ee2e003dc4ea47","ref":"","in":"header","required":true,"desc":"refer to authentication section [https://developers.eko.in/docs/authentication]","default":"","type":"string","name":"secret-key-timestamp"}],"url":"/agent/user_code:20310003/settlement"},"isReference":false,"order":3,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"1. The amount that a user can settle: Total AePS business (last 7 days) minus settlement done (last 7 days). \\n*For example: If a user has done AePS business worth of Rs. 1 lakh in the last 7 days and he/she has settled Rs. 25k in the last 7 days so he/she can now settle Rs 75k (1 lakh - 25k)\\n*2. Place a request for AePS settlement and get money in your bank account within 3 hours.\\n3. Service will be available from Monday to Friday between 10 AM to 5 PM except for RBI bank holidays.\\n4. Any transaction done after 5 PM will be settled on the next working day.\\n5. Maximum amount per transaction: ₹ 2 Lakh\",\n  \"title\": \"Please Note\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"payment_mode\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"4\",\n    \"1-0\": \"5\",\n    \"2-0\": \"13\",\n    \"0-1\": \"NEFT\",\n    \"1-1\": \"IMPS\",\n    \"2-1\": \"RTGS\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"tx_status\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"0\",\n    \"0-1\": \"Success\",\n    \"1-0\": \"2\",\n    \"1-1\": \"Initiated /Response Awaited\",\n    \"2-0\": \"4\",\n    \"2-1\": \"Refunded\",\n    \"3-0\": \"5\",\n    \"3-1\": \"Hold\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Once the transaction has been done it will go in the initiated state. After this, you will make an inquiry of the transaction using the Eko's TID or the client_ref_id which is being generated from your end. The [transaction inquiry](https://developers.eko.in/docs/transaction-inquiry) will be done in the same way as of DMT. \\n\\nIf the Transaction got failed from the bank side then, in this case, it will go in the refunded state and the balance will be auto reversed.\\n\\nIf you get tx_status other than 0 and 4, you need to do the inquiry before updating the tx_status in your system.\"\n}\n[/block]\nYou can test the AePS fund settlement in your postman by downloading the collection from the following link:\n[block:embed]\n{\n  \"html\": false,\n  \"url\": \"http://www.getpostman.com/collections/36799713f1dd368c5ae4\",\n  \"title\": null,\n  \"favicon\": null\n}\n[/block]","excerpt":"This will allow users to transfer funds to his account for his/her AePS business","slug":"aeps-fund-settlement-request","type":"post","title":"Initiate Settlement","__v":18,"parentDoc":null,"childrenPages":[]}

postInitiate Settlement

This will allow users to transfer funds to his account for his/her AePS business

Path Params

user_code:
required
string
The unique cell number with which you are onboarded on Eko's platform

Body Params

initiator_id:
required
integer
The unique cell number with which you are onboarded on Eko's platform
service_code:
required
integer
This is the code of the service for fund settlement. The value of service code for AePS fund settlement is 39
amount:
required
integer
Amount which user want to settle
recipient_id:
required
integer
unique recipient_id against which user want to settle the amount
payment_mode:
required
integer
Please refer to the below table for values
client_ref_id:
required
string
Unique transaction ID which you will generate from you end for every transaction

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section [https://developers.eko.in/docs/authentication]
secret-key-timestamp:
required
string
refer to authentication section [https://developers.eko.in/docs/authentication]
[block:callout] { "type": "info", "body": "1. The amount that a user can settle: Total AePS business (last 7 days) minus settlement done (last 7 days). \n*For example: If a user has done AePS business worth of Rs. 1 lakh in the last 7 days and he/she has settled Rs. 25k in the last 7 days so he/she can now settle Rs 75k (1 lakh - 25k)\n*2. Place a request for AePS settlement and get money in your bank account within 3 hours.\n3. Service will be available from Monday to Friday between 10 AM to 5 PM except for RBI bank holidays.\n4. Any transaction done after 5 PM will be settled on the next working day.\n5. Maximum amount per transaction: ₹ 2 Lakh", "title": "Please Note" } [/block] [block:parameters] { "data": { "h-0": "payment_mode", "h-1": "Description", "0-0": "4", "1-0": "5", "2-0": "13", "0-1": "NEFT", "1-1": "IMPS", "2-1": "RTGS" }, "cols": 2, "rows": 3 } [/block] [block:parameters] { "data": { "h-0": "tx_status", "h-1": "Description", "0-0": "0", "0-1": "Success", "1-0": "2", "1-1": "Initiated /Response Awaited", "2-0": "4", "2-1": "Refunded", "3-0": "5", "3-1": "Hold" }, "cols": 2, "rows": 4 } [/block] [block:callout] { "type": "warning", "body": "Once the transaction has been done it will go in the initiated state. After this, you will make an inquiry of the transaction using the Eko's TID or the client_ref_id which is being generated from your end. The [transaction inquiry](https://developers.eko.in/docs/transaction-inquiry) will be done in the same way as of DMT. \n\nIf the Transaction got failed from the bank side then, in this case, it will go in the refunded state and the balance will be auto reversed.\n\nIf you get tx_status other than 0 and 4, you need to do the inquiry before updating the tx_status in your system." } [/block] You can test the AePS fund settlement in your postman by downloading the collection from the following link: [block:embed] { "html": false, "url": "http://www.getpostman.com/collections/36799713f1dd368c5ae4", "title": null, "favicon": null } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "info", "body": "1. The amount that a user can settle: Total AePS business (last 7 days) minus settlement done (last 7 days). \n*For example: If a user has done AePS business worth of Rs. 1 lakh in the last 7 days and he/she has settled Rs. 25k in the last 7 days so he/she can now settle Rs 75k (1 lakh - 25k)\n*2. Place a request for AePS settlement and get money in your bank account within 3 hours.\n3. Service will be available from Monday to Friday between 10 AM to 5 PM except for RBI bank holidays.\n4. Any transaction done after 5 PM will be settled on the next working day.\n5. Maximum amount per transaction: ₹ 2 Lakh", "title": "Please Note" } [/block] [block:parameters] { "data": { "h-0": "payment_mode", "h-1": "Description", "0-0": "4", "1-0": "5", "2-0": "13", "0-1": "NEFT", "1-1": "IMPS", "2-1": "RTGS" }, "cols": 2, "rows": 3 } [/block] [block:parameters] { "data": { "h-0": "tx_status", "h-1": "Description", "0-0": "0", "0-1": "Success", "1-0": "2", "1-1": "Initiated /Response Awaited", "2-0": "4", "2-1": "Refunded", "3-0": "5", "3-1": "Hold" }, "cols": 2, "rows": 4 } [/block] [block:callout] { "type": "warning", "body": "Once the transaction has been done it will go in the initiated state. After this, you will make an inquiry of the transaction using the Eko's TID or the client_ref_id which is being generated from your end. The [transaction inquiry](https://developers.eko.in/docs/transaction-inquiry) will be done in the same way as of DMT. \n\nIf the Transaction got failed from the bank side then, in this case, it will go in the refunded state and the balance will be auto reversed.\n\nIf you get tx_status other than 0 and 4, you need to do the inquiry before updating the tx_status in your system." } [/block] You can test the AePS fund settlement in your postman by downloading the collection from the following link: [block:embed] { "html": false, "url": "http://www.getpostman.com/collections/36799713f1dd368c5ae4", "title": null, "favicon": null } [/block]
{"_id":"5b56dfd676674700034d926e","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-07-24T08:14:14.933Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"Services like AePS, various bank CDM and Cash deposit services, BBPS,PAN verification etc and many more will be provided to you. Partners can further activate these services to their users/merchants.  \n\nFor enabling your users for each service, some basic information about the user would be required. For each user, a unique code would be generated and this code would be used in each transaction API. \n\nCurrent Services available are as follows:\n1. AePS (Aadhaar enabled Payment System)\n2. Cash deposit services in various banks like KVB, SBI and Axis Bank\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"1. Users can be merchants or employees or vendors or any other entity\\n2. This information is mandatory due to compliance requirement\\n3. You don't need to create users for DMT services\",\n  \"title\": \"Please Note:\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Steps to onboard Users\"\n}\n[/block]\n1. Get the list of services that you can avail for your merchants and distributors through a single API \n2. Verify your merchant to onboard by calling the [Request OTP](https://developers.eko.in/docs/request-otp) and [Verify User API](https://developers.eko.in/docs/verify-user-mobile-number)\n3. Onboard your merchants and distributors as a user on Eko platform with the [**Onboard User**](https://developers.eko.in/docs/onboard-user) API and get unique codes for each user. Save this user code in you database to create unique identity for each of your user.\n4. Activate any service for your users by initiating the **[Activate Service](https://developers.eko.in/docs/activate-service)** API for that particular service using the user code for that user.\n5. Enquire about the status of your user on Eko platform by initiating the **[User Services Enquiry](https://developers.eko.in/docs/user-services-enquiry)** API","excerpt":"Onboard your merchants/users on Eko's platform and activate various services for them.","slug":"user-onboarding","type":"basic","title":"Users","__v":0,"parentDoc":null,"childrenPages":[]}

Users

Onboard your merchants/users on Eko's platform and activate various services for them.

Services like AePS, various bank CDM and Cash deposit services, BBPS,PAN verification etc and many more will be provided to you. Partners can further activate these services to their users/merchants. For enabling your users for each service, some basic information about the user would be required. For each user, a unique code would be generated and this code would be used in each transaction API. Current Services available are as follows: 1. AePS (Aadhaar enabled Payment System) 2. Cash deposit services in various banks like KVB, SBI and Axis Bank [block:callout] { "type": "info", "body": "1. Users can be merchants or employees or vendors or any other entity\n2. This information is mandatory due to compliance requirement\n3. You don't need to create users for DMT services", "title": "Please Note:" } [/block] [block:api-header] { "title": "Steps to onboard Users" } [/block] 1. Get the list of services that you can avail for your merchants and distributors through a single API 2. Verify your merchant to onboard by calling the [Request OTP](https://developers.eko.in/docs/request-otp) and [Verify User API](https://developers.eko.in/docs/verify-user-mobile-number) 3. Onboard your merchants and distributors as a user on Eko platform with the [**Onboard User**](https://developers.eko.in/docs/onboard-user) API and get unique codes for each user. Save this user code in you database to create unique identity for each of your user. 4. Activate any service for your users by initiating the **[Activate Service](https://developers.eko.in/docs/activate-service)** API for that particular service using the user code for that user. 5. Enquire about the status of your user on Eko platform by initiating the **[User Services Enquiry](https://developers.eko.in/docs/user-services-enquiry)** API
Services like AePS, various bank CDM and Cash deposit services, BBPS,PAN verification etc and many more will be provided to you. Partners can further activate these services to their users/merchants. For enabling your users for each service, some basic information about the user would be required. For each user, a unique code would be generated and this code would be used in each transaction API. Current Services available are as follows: 1. AePS (Aadhaar enabled Payment System) 2. Cash deposit services in various banks like KVB, SBI and Axis Bank [block:callout] { "type": "info", "body": "1. Users can be merchants or employees or vendors or any other entity\n2. This information is mandatory due to compliance requirement\n3. You don't need to create users for DMT services", "title": "Please Note:" } [/block] [block:api-header] { "title": "Steps to onboard Users" } [/block] 1. Get the list of services that you can avail for your merchants and distributors through a single API 2. Verify your merchant to onboard by calling the [Request OTP](https://developers.eko.in/docs/request-otp) and [Verify User API](https://developers.eko.in/docs/verify-user-mobile-number) 3. Onboard your merchants and distributors as a user on Eko platform with the [**Onboard User**](https://developers.eko.in/docs/onboard-user) API and get unique codes for each user. Save this user code in you database to create unique identity for each of your user. 4. Activate any service for your users by initiating the **[Activate Service](https://developers.eko.in/docs/activate-service)** API for that particular service using the user code for that user. 5. Enquire about the status of your user on Eko platform by initiating the **[User Services Enquiry](https://developers.eko.in/docs/user-services-enquiry)** API
{"_id":"5b56f0df1c38490003641205","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-07-24T09:26:55.139Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"get","examples":{"codes":[{"language":"curl","code":"  curl -X GET \\\n  'https://staging.eko.in:25004/ekoapi/v1/user/services?initiator_id=9962981729' \\\n  -H 'Cache-Control: no-cache' \\\n  -H 'Postman-Token: 1c4d5e19-0c1a-43ed-9caf-6cee10882b25' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593'\n"},{"language":"java","code":"HttpResponse<String> response = Unirest.get(\"https://staging.eko.in:25004/ekoapi/v1/user/services?initiator_id=9962981729\")\n  .header(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\")\n  .header(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\")\n  .header(\"secret-key-timestamp\", \"1516705204593\")\n  .header(\"cache-control\", \"no-cache\")\n  .header(\"postman-token\", \"c0c77598-96c0-be28-ba64-63660b0d7588\")\n  .asString();"},{"language":"python","code":"import requests\n\nurl = \"https://staging.eko.in:25004/ekoapi/v1/user/services\"\n\nquerystring = {\"initiator_id\":\"9962981729\"}\n\nheaders = {\n    'developer_key': \"becbbce45f79c6f5109f848acd540567\",\n    'secret-key': \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    'secret-key-timestamp': \"1516705204593\",\n    'cache-control': \"no-cache\",\n    'postman-token': \"259fd422-33a7-610f-ac7c-6540c0bf3b8c\"\n    }\n\nresponse = requests.request(\"GET\", url, headers=headers, params=querystring)\n\nprint(response.text)"},{"language":"csharp","code":"var client = new RestClient(\"https://staging.eko.in:25004/ekoapi/v1/user/services?initiator_id=9962981729\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"postman-token\", \"6cdefd17-9dfe-b6e0-94f5-932da8408fb6\");\nrequest.AddHeader(\"cache-control\", \"no-cache\");\nrequest.AddHeader(\"secret-key-timestamp\", \"1516705204593\");\nrequest.AddHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\");\nrequest.AddHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\");\nIRestResponse response = client.Execute(request);"},{"language":"php","code":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_PORT => \"25004\",\n  CURLOPT_URL => \"https://staging.eko.in:25004/ekoapi/v1/user/services?initiator_id=9962981729\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => array(\n    \"cache-control: no-cache\",\n    \"developer_key: becbbce45f79c6f5109f848acd540567\",\n    \"postman-token: c846f634-2299-70d5-bfc9-a11f3cafdaa2\",\n    \"secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    \"secret-key-timestamp: 1516705204593\"\n  ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"response_status_id\": -1,\n    \"data\": {\n        \"service_list\": [\n            {\n                \"service_name\": \"AEPS\",\n                \"service_code\": \"1\",\n                \"provider_name\": \"Yes Bank\"\n            },\n            {\n                \"service_name\": \"Cash Collection CDM\",\n                \"service_code\": \"2\",\n                \"provider_name\": \"KVB\"\n            },\n            {\n                \"service_name\": \"Cash Collection Cash\",\n                \"service_code\": \"3\",\n                \"provider_name\": \"KVB\"\n            },\n            {\n                \"service_name\": \"Aadhaar Authentication\",\n                \"service_code\": \"6\",\n                \"provider_name\": \"UIDAI\"\n            }\n        ]\n    },\n    \"response_type_id\": 1280,\n    \"message\": \"List of active services\",\n    \"status\": 0\n}\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[{"_id":"5b56f0df1c38490003641209","ref":"","in":"query","required":true,"desc":"The unique cell number with which you are onboarded on Eko's platform","default":"","type":"string","name":"initiator_id"},{"_id":"5b56f0df1c38490003641208","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5b56f0df1c38490003641207","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret_key"},{"_id":"5b56f0df1c38490003641206","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"}],"url":"/users/services"},"isReference":false,"order":2,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"1. The aim of the API is to return the unique **service_code** for each service\\n2. This **service_code ** needs to be used while activating the service for your users\\n3. The services available are:\\n- AePS\\n- eKYC\\n- Cash Deposit into SBI/KVB branches\\n- CDM service at KVB\",\n  \"title\": \"Please Note:\"\n}\n[/block]","excerpt":"This API will give the list of services available for your users","slug":"get-services","type":"get","title":"Get Services","__v":12,"parentDoc":null,"childrenPages":[]}

getGet Services

This API will give the list of services available for your users

Query Params

initiator_id:
required
string
The unique cell number with which you are onboarded on Eko's platform

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret_key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section
[block:callout] { "type": "info", "body": "1. The aim of the API is to return the unique **service_code** for each service\n2. This **service_code ** needs to be used while activating the service for your users\n3. The services available are:\n- AePS\n- eKYC\n- Cash Deposit into SBI/KVB branches\n- CDM service at KVB", "title": "Please Note:" } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "info", "body": "1. The aim of the API is to return the unique **service_code** for each service\n2. This **service_code ** needs to be used while activating the service for your users\n3. The services available are:\n- AePS\n- eKYC\n- Cash Deposit into SBI/KVB branches\n- CDM service at KVB", "title": "Please Note:" } [/block]
{"_id":"5b571a337baf140003ef7051","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-07-24T12:23:15.998Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"put","examples":{"codes":[{"code":"curl -X PUT \\\n  https://staging.eko.in:25004/ekoapi/v1/user/request/otp \\\n  -H 'Cache-Control: no-cache' \\\n  -H 'Content-Type: application/x-www-form-urlencoded' \\\n  -H 'Postman-Token: ab853780-7229-4bbd-8a29-3f75466caef0' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593' \\\n  -d 'initiator_id=9962981729&mobile=9962981729'\n\n","language":"curl"},{"code":"HttpResponse<String> response = Unirest.put(\"https://staging.eko.in:25004/ekoapi/v1/user/request/otp\")\n  .header(\"content-type\", \"application/x-www-form-urlencoded\")\n  .header(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\")\n  .header(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\")\n  .header(\"secret-key-timestamp\", \"1516705204593\")\n  .header(\"cache-control\", \"no-cache\")\n  .header(\"postman-token\", \"81422573-0a3e-553b-62bf-b5f651ec2460\")\n  .body(\"initiator_id=9962981729&mobile=8646546454\")\n  .asString();","language":"java"},{"code":"import http.client\n\nconn = http.client.HTTPSConnection(\"staging.eko.in:25004\")\n\npayload = \"initiator_id=9962981729&mobile=8646546454\"\n\nheaders = {\n    'content-type': \"application/x-www-form-urlencoded\",\n    'developer_key': \"becbbce45f79c6f5109f848acd540567\",\n    'secret-key': \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    'secret-key-timestamp': \"1516705204593\",\n    'cache-control': \"no-cache\",\n    'postman-token': \"5d4fe6c2-8eb9-5e7b-5623-cefd449825cb\"\n    }\n\nconn.request(\"PUT\", \"/ekoapi/v1/user/request/otp\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))","language":"python"},{"language":"csharp","code":"var client = new RestClient(\"https://staging.eko.in:25004/ekoapi/v1/user/request/otp\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"postman-token\", \"1a30c91d-5294-8c7a-acc7-bcedfce5f636\");\nrequest.AddHeader(\"cache-control\", \"no-cache\");\nrequest.AddHeader(\"secret-key-timestamp\", \"1516705204593\");\nrequest.AddHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\");\nrequest.AddHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\");\nrequest.AddHeader(\"content-type\", \"application/x-www-form-urlencoded\");\nrequest.AddParameter(\"application/x-www-form-urlencoded\", \"initiator_id=9962981729&mobile=8646546454\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"language":"php","code":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_PORT => \"25004\",\n  CURLOPT_URL => \"https://staging.eko.in:25004/ekoapi/v1/user/request/otp\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_POSTFIELDS => \"initiator_id=9962981729&mobile=8646546454\",\n  CURLOPT_HTTPHEADER => array(\n    \"cache-control: no-cache\",\n    \"content-type: application/x-www-form-urlencoded\",\n    \"developer_key: becbbce45f79c6f5109f848acd540567\",\n    \"postman-token: a5b4cd66-af69-a62b-f703-46ed1440cd90\",\n    \"secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    \"secret-key-timestamp: 1516705204593\"\n  ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"response_status_id\": -1,\n    \"data\": {\n        \"initiator_id\": \"9962981729\",\n        \"mobile\": \"9962981729\",\n        \"otp\": \"146\"\n    },\n    \"response_type_id\": 1282,\n    \"message\": \"Otp has been sent to the mobile\",\n    \"status\": 0\n}\n\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[{"_id":"5b571a337baf140003ef7056","ref":"","in":"body","required":true,"desc":"The unique cell number with which you are onboarded on Eko's platform","default":"","type":"string","name":"initiator_id"},{"_id":"5b571a337baf140003ef7055","ref":"","in":"body","required":true,"desc":"The mobile number of the user that needs to be verified","default":"","type":"string","name":"mobile"},{"_id":"5b571a337baf140003ef7054","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5b571a337baf140003ef7053","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5b571a337baf140003ef7052","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"}],"url":"/user/request/otp"},"isReference":false,"order":3,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Please Note:\",\n  \"body\": \"1. Mobile number of the user is an important parameter that needs to be captured during onboarding of a user. \\n2. Every mobile number needs to be verified via OTP or by missed call\\n3. You will not receive the OTP on the mobile number on UAT platform\"\n}\n[/block]","excerpt":"This API will send an OTP for verification of the mobile number of the user","slug":"request-otp","type":"put","title":"Request OTP","__v":7,"parentDoc":null,"childrenPages":[]}

putRequest OTP

This API will send an OTP for verification of the mobile number of the user

Body Params

initiator_id:
required
string
The unique cell number with which you are onboarded on Eko's platform
mobile:
required
string
The mobile number of the user that needs to be verified

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section
[block:callout] { "type": "info", "title": "Please Note:", "body": "1. Mobile number of the user is an important parameter that needs to be captured during onboarding of a user. \n2. Every mobile number needs to be verified via OTP or by missed call\n3. You will not receive the OTP on the mobile number on UAT platform" } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "info", "title": "Please Note:", "body": "1. Mobile number of the user is an important parameter that needs to be captured during onboarding of a user. \n2. Every mobile number needs to be verified via OTP or by missed call\n3. You will not receive the OTP on the mobile number on UAT platform" } [/block]
{"_id":"5b571adde6febb00033f4213","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-07-24T12:26:05.586Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"put","examples":{"codes":[{"language":"curl","code":"curl -X PUT \\\n  https://staging.eko.in:25004/ekoapi/v1/user/verify \\\n  -H 'Cache-Control: no-cache' \\\n  -H 'Content-Type: application/x-www-form-urlencoded' \\\n  -H 'Postman-Token: c6f859cb-a819-44d3-9765-d55a02e24a48' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593' \\\n  -d 'initiator_id=9962981729&mobile=9962981729&otp=146'\n"},{"language":"csharp","code":"var client = new RestClient(\"https://staging.eko.in:25004/ekoapi/v1/user/verify\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"postman-token\", \"9e7c01f2-ca2d-19ff-29b5-1a4b4ef42647\");\nrequest.AddHeader(\"cache-control\", \"no-cache\");\nrequest.AddHeader(\"secret-key-timestamp\", \"1516705204593\");\nrequest.AddHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\");\nrequest.AddHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\");\nrequest.AddHeader(\"content-type\", \"application/x-www-form-urlencoded\");\nrequest.AddParameter(\"application/x-www-form-urlencoded\", \"initiator_id=9962981729&mobile=8646546454&otp=447\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"language":"java","code":"HttpResponse<String> response = Unirest.put(\"https://staging.eko.in:25004/ekoapi/v1/user/verify\")\n  .header(\"content-type\", \"application/x-www-form-urlencoded\")\n  .header(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\")\n  .header(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\")\n  .header(\"secret-key-timestamp\", \"1516705204593\")\n  .header(\"cache-control\", \"no-cache\")\n  .header(\"postman-token\", \"b9c38042-8db0-eea8-3145-7d92f39bb9ff\")\n  .body(\"initiator_id=9962981729&mobile=8646546454&otp=447\")\n  .asString();"},{"language":"php","code":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_PORT => \"25004\",\n  CURLOPT_URL => \"https://staging.eko.in:25004/ekoapi/v1/user/verify\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_POSTFIELDS => \"initiator_id=9962981729&mobile=8646546454&otp=447\",\n  CURLOPT_HTTPHEADER => array(\n    \"cache-control: no-cache\",\n    \"content-type: application/x-www-form-urlencoded\",\n    \"developer_key: becbbce45f79c6f5109f848acd540567\",\n    \"postman-token: 83e49584-5d76-9673-2a6e-31b6a1568304\",\n    \"secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    \"secret-key-timestamp: 1516705204593\"\n  ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);"},{"language":"python","code":"import requests\n\nurl = \"https://staging.eko.in:25004/ekoapi/v1/user/verify\"\n\npayload = \"initiator_id=9962981729&mobile=8646546454&otp=447\"\nheaders = {\n    'content-type': \"application/x-www-form-urlencoded\",\n    'developer_key': \"becbbce45f79c6f5109f848acd540567\",\n    'secret-key': \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    'secret-key-timestamp': \"1516705204593\",\n    'cache-control': \"no-cache\",\n    'postman-token': \"f8d95c7e-c6c2-264a-7354-d4bffa984af9\"\n    }\n\nresponse = requests.request(\"PUT\", url, data=payload, headers=headers)\n\nprint(response.text)"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"response_status_id\": 0,\n    \"data\": {\n        \"csp_id\": \"\"\n    },\n    \"response_type_id\": 876,\n    \"message\": \"OTP verified\",\n    \"status\": 0\n}\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[{"_id":"5b571adde6febb00033f4216","ref":"","in":"body","required":true,"desc":"The unique cell number with which you are onboarded on Eko's platform","default":"","type":"string","name":"initiator_id"},{"_id":"5b571adde6febb00033f4215","ref":"","in":"body","required":true,"desc":"Mobile number of your merchant or user which you need to verify","default":"","type":"string","name":"mobile"},{"_id":"5b571adde6febb00033f4214","ref":"","in":"body","required":true,"desc":"OTP sent to the mobile number of the user after Request Otp API","default":"","type":"string","name":"otp"},{"_id":"5b6926a653f2ee00039e6a9c","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5b6926a653f2ee00039e6a9b","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5b6926a653f2ee00039e6a9a","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"}],"url":"/otp"},"isReference":false,"order":4,"body":"","excerpt":"This will allow you to verify user's mobile number via OTP","slug":"verify-user-mobile-number","type":"put","title":"Verify User Mobile Number","__v":3,"parentDoc":null,"childrenPages":[]}

putVerify User Mobile Number

This will allow you to verify user's mobile number via OTP

Body Params

initiator_id:
required
string
The unique cell number with which you are onboarded on Eko's platform
mobile:
required
string
Mobile number of your merchant or user which you need to verify
otp:
required
string
OTP sent to the mobile number of the user after Request Otp API

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"5b570ca6b567eb0003d1fc33","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-07-24T11:25:26.782Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"curl -X PUT \\\n  https://staging.eko.in:25004/ekoapi/v1/user/onboard \\\n  -H 'Cache-Control: no-cache' \\\n  -H 'Content-Type: application/x-www-form-urlencoded' \\\n  -H 'Postman-Token: e5ec6edc-7cab-4e8f-9b89-7b1038211806' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593' \\\n  -d 'initiator_id=9910028267&pan_number=BFUPM3499K&mobile=9123354235&first_name=Tina&last_name=Chawla&email=a@gmail.com&residence_address={\"line\": \"Eko India\",\"city\":\"Gurgaon\",\"state\":\"Haryana\",\"pincode\":\"122002\",\"district\":\"Banswara\",\"area\":\"Mongol\"}&dob=1992-05-10&shop_name=Akanksha Stores'\n","language":"curl"},{"code":"var client = new RestClient(\"https://staging.eko.in:25004/ekoapi/v1/user/onboard\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"Postman-Token\", \"2db70006-be1d-47ad-bddd-2eb19b026b56\");\nrequest.AddHeader(\"cache-control\", \"no-cache\");\nrequest.AddHeader(\"secret-key-timestamp\", \"1516705204593\");\nrequest.AddHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\");\nrequest.AddHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\");\nrequest.AddHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\nrequest.AddParameter(\"undefined\", \"initiator_id=9962981729&pan_number=FOYPS6095B&mobile=9999865775&first_name=Aditya&last_name=Singh&email=akku%40gmail.com&residence_address=%7B%22line%22%3A%20%22U-69%2F19%22%2C%22city%22%3A%22Gurgaon%22%2C%22state%22%3A%22Haryana%22%2C%22pincode%22%3A%22122002%22%7D%0A%0A&dob=1991-03-10&shop_name=Aditya%20Enterprises\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);","language":"csharp"},{"code":"HttpResponse<String> response = Unirest.put(\"https://staging.eko.in:25004/ekoapi/v1/user/onboard\")\n  .header(\"Content-Type\", \"application/x-www-form-urlencoded\")\n  .header(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\")\n  .header(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\")\n  .header(\"secret-key-timestamp\", \"1516705204593\")\n  .header(\"cache-control\", \"no-cache\")\n  .header(\"Postman-Token\", \"6074af7c-8282-4a2a-95b8-f86cffc6128a\")\n  .body(\"initiator_id=9962981729&pan_number=FOYPS6095B&mobile=9999865775&first_name=Aditya&last_name=Singh&email=akku%40gmail.com&residence_address=%7B%22line%22%3A%20%22U-69%2F19%22%2C%22city%22%3A%22Gurgaon%22%2C%22state%22%3A%22Haryana%22%2C%22pincode%22%3A%22122002%22%7D%0A%0A&dob=1991-03-10&shop_name=Aditya%20Enterprises\")\n  .asString();","language":"java"},{"code":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_PORT => \"25004\",\n  CURLOPT_URL => \"https://staging.eko.in:25004/ekoapi/v1/user/onboard\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"PUT\",\n  CURLOPT_POSTFIELDS => \"initiator_id=9910028267&pan_number=BFUPM3499K&mobile=9123354235&first_name=Tina&last_name=Chawla&email=a@gmail.com&residence_address={\"line\": \"Eko India\",\"city\":\"Gurgaon\",\"state\":\"Haryana\",\"pincode\":\"122002\"}&dob=1992-05-10&shop_name=Akanksha Stores\",\n  CURLOPT_HTTPHEADER => array(\n    \"Cache-Control: no-cache\",\n    \"Content-Type: application/x-www-form-urlencoded\",\n    \"Postman-Token: 20745aac-1424-48c1-9d28-603db30200a3\",\n    \"developer_key: becbbce45f79c6f5109f848acd540567\",\n    \"secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    \"secret-key-timestamp: 1516705204593\"\n  ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}","language":"php"},{"code":"import requests\n\nurl = \"https://staging.eko.in:25004/ekoapi/v1/user/onboard\"\n\npayload = \"initiator_id=9962981729&pan_number=FOYPS6095B&mobile=9999865775&first_name=Aditya&last_name=Singh&email=akku%40gmail.com&residence_address=%7B%22line%22%3A%20%22U-69%2F19%22%2C%22city%22%3A%22Gurgaon%22%2C%22state%22%3A%22Haryana%22%2C%22pincode%22%3A%22122002%22%7D%0A%0A&dob=1991-03-10&shop_name=Aditya%20Enterprises\"\nheaders = {\n    'Content-Type': \"application/x-www-form-urlencoded\",\n    'developer_key': \"becbbce45f79c6f5109f848acd540567\",\n    'secret-key': \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    'secret-key-timestamp': \"1516705204593\",\n    'cache-control': \"no-cache\",\n    'Postman-Token': \"b38221ae-6919-413f-bf88-167643fad225\"\n    }\n\nresponse = requests.request(\"PUT\", url, data=payload, headers=headers)\n\nprint(response.text)","language":"python"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"response_status_id\": -1,\n    \"data\": {\n        \"user_code\": \"20110002\",\n        \"initiator_id\": \"9962981729\"\n    },\n    \"response_type_id\": 1290,\n    \"message\": \"User onboarding successfull\",\n    \"status\": 0\n}\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[{"_id":"5b570ca6b567eb0003d1fc40","ref":"","in":"body","required":true,"desc":"The unique cell number with which you are onboarded on Eko's platform","default":"","type":"string","name":"initiator_id"},{"_id":"5b570ca6b567eb0003d1fc3f","ref":"","in":"body","required":true,"desc":"Pan Card Number of the User","default":"","type":"string","name":"pan_number"},{"_id":"5b570ca6b567eb0003d1fc3d","ref":"","in":"body","required":true,"desc":"The number which you verified and want to onboard","default":"","type":"string","name":"mobile"},{"_id":"5b570ca6b567eb0003d1fc3c","ref":"","in":"body","required":true,"desc":"First name of the user","default":"","type":"string","name":"first_name"},{"_id":"5b570ca6b567eb0003d1fc3b","ref":"","in":"body","required":true,"desc":"Last name of the user","default":"","type":"string","name":"last_name"},{"_id":"5b570ca6b567eb0003d1fc3a","ref":"","in":"body","required":true,"desc":"Email of the user/merchant","default":"","type":"string","name":"email"},{"_id":"5b570ca6b567eb0003d1fc39","ref":"","in":"body","required":true,"desc":"Residence Address of the user","default":"","type":"array_string","name":"residence_address"},{"_id":"5b570ca6b567eb0003d1fc38","ref":"","in":"body","required":true,"desc":"Date if birth of the user","default":"","type":"yyyy-mm-dd","name":"dob"},{"_id":"5b570ca6b567eb0003d1fc37","ref":"","in":"body","required":true,"desc":"Shop name of the merchant ( Required for AePS onboarding)","default":"","type":"string","name":"shop_name"},{"_id":"5b570ca6b567eb0003d1fc36","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5b570ca6b567eb0003d1fc35","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5b570ca6b567eb0003d1fc34","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"}],"url":"/user/onboard","method":"put"},"isReference":false,"order":5,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Note\",\n  \"body\": \"We do a PAN verification of the PAN number provided by you in the Onboard User API and match the name returned in PAN verification and the name coming in API. So please do enter valid PAN number and it should be of the same merchant/user whose name you are giving\\n\\nThe name matching is only for the production, on staging we won't be matching the name from PAN verification and in the request.\"\n}\n[/block]","excerpt":"This will enable you to onboard a new user on the platform","slug":"onboard-user","type":"put","title":"Onboard User","__v":18,"parentDoc":null,"childrenPages":[]}

putOnboard User

This will enable you to onboard a new user on the platform

Body Params

initiator_id:
required
string
The unique cell number with which you are onboarded on Eko's platform
pan_number:
required
string
Pan Card Number of the User
mobile:
required
string
The number which you verified and want to onboard
first_name:
required
string
First name of the user
last_name:
required
string
Last name of the user
email:
required
string
Email of the user/merchant
residence_address:
required
array of strings
Residence Address of the user
dob:
required
yyyy-mm-dd
Date if birth of the user
shop_name:
required
string
Shop name of the merchant ( Required for AePS onboarding)

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section
[block:callout] { "type": "warning", "title": "Note", "body": "We do a PAN verification of the PAN number provided by you in the Onboard User API and match the name returned in PAN verification and the name coming in API. So please do enter valid PAN number and it should be of the same merchant/user whose name you are giving\n\nThe name matching is only for the production, on staging we won't be matching the name from PAN verification and in the request." } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "warning", "title": "Note", "body": "We do a PAN verification of the PAN number provided by you in the Onboard User API and match the name returned in PAN verification and the name coming in API. So please do enter valid PAN number and it should be of the same merchant/user whose name you are giving\n\nThe name matching is only for the production, on staging we won't be matching the name from PAN verification and in the request." } [/block]
{"_id":"5b56f220b567eb0003d1fa79","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-07-24T09:32:16.039Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"put","examples":{"codes":[{"code":"curl -X PUT \\\n  https://staging.eko.in:25004/ekoapi/v1/user/service/activate \\\n  -H 'Cache-Control: no-cache' \\\n  -H 'Postman-Token: f1752a19-537b-423f-aa4a-45bd64d2bd4a' \\\n  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593' \\\n  -F 'form-data=service_code=1&initiator_id=9962981729&user_code=20110002&devicenumber=123234234234234&modelname=Morpho&office_address={\"line\": \"Eko India\",\"city\":\"Gurgaon\",\"state\":\"Haryana\",\"pincode\":\"122002\"}&address_as_per_proof={\"line\": \"Eko India\",\"city\":\"Gurgaon\",\"state\":\"Haryana\",\"pincode\":\"122002\"}' \\\n  -F pan_card=@/home/nirmal/Downloads/create_customer_issue/response_img.png \\\n  -F voter_card_front=@/home/nirmal/Desktop/Fundaura.png \\\n  -F voter_card_back=@/home/nirmal/Downloads/create_customer_issue/response_img.png\n","language":"curl","name":"Sample request for AePS activation"},{"code":"curl -X PUT \\\n https://staging.eko.in:25004/ekoapi/v1/user/service/activate \\\n -H 'Cache-Control: no-cache' \\\n -H 'Content-Type: application/x-www-form-urlencoded' \\\n -H 'Postman-Token: fd71e4c1-d915-4d2e-893e-cebb227926e8' \\\n -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n -H 'secret-key-timestamp: 1516705204593' \\\n -d 'service_code=2&initiator_id=9962981729&user_code=20810200'","language":"curl","name":"Sample request for Cash Collection"},{"code":"<?php \n\n\n$target_url = \"https://staging.eko.in:25004/ekoapi/v1/user/service/activate\";   \n\n$fname1 = \"C:\\\\Users\\\\Aditya\\\\Desktop\\\\dmtrefund.PNG\";\n$fname2 = \"C:\\\\Users\\\\Aditya\\\\Desktop\\\\dmtrefund.PNG\";\n$fname3 = \"C:\\\\Users\\\\Aditya\\\\Desktop\\\\dmtrefund.PNG\";\n \n \n$cfile1 = new CURLFile(realpath($fname1));\n$cfile2 = new CURLFile(realpath($fname2));\n$cfile3 = new CURLFile(realpath($fname3));\n\n    $post = array (\n              'pan_card' => $cfile1,\n\t\t\t  'aadhar_front' => $cfile2,\n\t\t\t  'aadhar_back' => $cfile3,\n\t\t\t  'form-data' => 'service_code=1&initiator_id=9962981729&user_code=20110002&devicenumber=123234234234234&modelname=Morpho&office_address={\"line\": \"Eko India\",\"city\":\"Gurgaon\",\"state\":\"Haryana\",\"pincode\":\"122002\"}&address_as_per_proof={\"line\": \"Eko India\",\"city\":\"Gurgaon\",\"state\":\"Haryana\",\"pincode\":\"122002\"}',\n\t\t\t  ); \n\n$ch = curl_init();\ncurl_setopt($ch, CURLOPT_URL, $target_url);\ncurl_setopt($ch, CURLOPT_POST, 1);\ncurl_setopt($ch, CURLOPT_HEADER, 0);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \ncurl_setopt($ch, CURLOPT_HTTPHEADER,array('Content-Type: multipart/form-data','developer_key: becbbce45f79c6f5109f848acd540567', 'secret-key:MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=','secret-key-timestamp:1516705204593'));\ncurl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);   \ncurl_setopt($ch, CURLOPT_FORBID_REUSE, 1);  \ncurl_setopt($ch, CURLOPT_TIMEOUT, 100);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n\n\n$result = curl_exec ($ch);\n\nif ($result === FALSE) {\n   echo \"Error sending\" . $fname .  \" ... \" . curl_error($ch);\n    curl_close ($ch);\n}else{\n    curl_close ($ch);\n    echo  \"Result: \" . $result;\n}   \t\t\t  \n\n//Please make sure that you are passing the complete path of the image from your localsystem not URL. Passing of URL will not work.\n","language":"php","name":"PHP sample code for AePS activation"},{"code":" var client = new RestClient(\"https://staging.eko.in:25004/ekoapi/v1/user/service/activate\");\n\n            var request = new RestRequest(Method.PUT);\n\n            request.AddHeader(\"Postman-Token\", \"2db70006-be1d-47ad-bddd-2eb19b026b56\");\n\n            request.AddHeader(\"cache-control\", \"no-cache\");\n\n            request.AddHeader(\"secret-key-timestamp\", \"1516705204593\");\n\n            request.AddHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\");\n\n            request.AddHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\");\n\n            request.AddHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\n            request.AddParameter(\"form-data\", \"service_code=1&initiator_id=9962981729&user_code=20110068&devicenumber=123234234234234&modelname=Morpho&office_address={\\\"line\\\": \\\"Eko India\\\",\\\"city\\\":\\\"Gurgaon\\\",\\\"state\\\":\\\"Haryana\\\",\\\"pincode\\\":\\\"122002\\\"}&address_as_per_proof={\\\"line\\\": \\\"Eko India\\\",\\\"city\\\":\\\"Gurgaon\\\",\\\"state\\\":\\\"Haryana\\\",\\\"pincode\\\":\\\"122002\\\"}\");\n\n            request.AddFile(\"pan_card\", Server.MapPath(\"../Image/\") + \"Default.jpg\");\n\n            request.AddFile(\"voter_card_front\", Server.MapPath(\"../Image/\") + \"Default.jpg\");\n\n            request.AddFile(\"voter_card_back\", Server.MapPath(\"../Image/\") + \"Default.jpg\");\n\n            IRestResponse response = client.Execute(request);\n\n            string str = response.Content;\n\n            return str;\n\n \n//Note : Rest Sharp version must be 104.1.0. This is a sample code, any changes in the code have to be handled at your end only.","language":"text","name":"c# sample request for AePS activation"}]},"results":{"codes":[{"name":"Sample response for AePS activation ","code":"{\n    \"response_status_id\": -1,\n    \"data\": {\n        \"service_status_desc\": \"Pending\",\n        \"user_code\": \"20110002\",\n        \"initiator_id\": \"9962981729\",\n        \"service_status\": \"2\",\n        \"service_code\": \"1\"\n    },\n    \"response_type_id\": 1302,\n    \"message\": \"User state is pending for this service\",\n    \"status\": 0\n}\n","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400},{"name":"Response for Cash Collection Service","code":"{\n   \"response_status_id\": -1,\n   \"data\": {\n       \"service_status_desc\": \"Service Activated for the user\",\n       \"user_code\": \"20810200\",\n       \"initiator_id\": \"9962981729\",\n       \"service_status\": \"1\",\n       \"service_code\": \"2\",\n       \"virtual_account_number\": \"20110001BFUPM3499H\"\n   },\n   \"response_type_id\": 1294,\n   \"message\": \"Service Request Submitted\",\n   \"status\": 0\n}","language":"json"}]},"settings":"","auth":"required","params":[{"_id":"5b56f220b567eb0003d1fa7d","ref":"","in":"body","required":true,"desc":"Unique code of the user on the platform","default":"","type":"string","name":"user_code"},{"_id":"5b56f220b567eb0003d1fa7c","ref":"","in":"body","required":true,"desc":"partner id from where the request has been initiated","default":"","type":"string","name":"initiator_id"},{"_id":"5b56f220b567eb0003d1fa7b","ref":"","in":"body","required":true,"desc":"This is the code of the service for which the user needs to be activated","default":"","type":"string","name":"service_code"},{"_id":"5b56f80b76674700034d9346","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5b56f80b76674700034d9345","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5b56f80b76674700034d9344","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"},{"_id":"5b56fad71c384900036412df","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"modelname"},{"_id":"5b56fad71c384900036412de","ref":"","in":"body","required":false,"desc":"This will contain \"line_address\", \"city\", \"state\" and \"pincode\"","default":"","type":"array_string","name":"office_address"},{"_id":"5b56fad71c384900036412dd","ref":"","in":"body","required":true,"desc":"For AePS activation","default":"","type":"file","name":"pan_card"},{"_id":"5b56fad71c384900036412dc","ref":"","in":"body","required":false,"desc":"For AePS activation","default":"","type":"file","name":"voter_card_front"},{"_id":"5b56fad71c384900036412db","ref":"","in":"body","required":false,"desc":"For AePS activation","default":"","type":"file","name":"voter_card_back"},{"_id":"5bd2e90285d2e1005631a7b2","ref":"","in":"body","required":false,"desc":"For AePS Activation","default":"","type":"file","name":"aadhar_front"},{"_id":"5bd2e90285d2e1005631a7b1","ref":"","in":"body","required":false,"desc":"For AePS Activation","default":"","type":"file","name":"aadhar_back"},{"_id":"5c8f79848f9884001f0c3e92","ref":"","in":"body","required":false,"desc":"This will contain \"line_address\", \"city\", \"state\" and \"pincode\"","default":"","type":"array_string","name":"address_as_per_proof"}],"url":"/user/service/activate"},"isReference":false,"order":6,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"After activation, the user state goes into pending state and it will take 3 business days for any user to get activated for AePS\",\n  \"title\": \"AePS Activation TAT\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Please Note:\",\n  \"body\": \"1. In case of AePS service activation, the **user_code** is the unique code received in response to the **Onboard User** API\\n2. Either of Voter Card or Aadhaar Card is required.\\nIf you are sending voter card send in the parameters voter_card_front and voter_card_back. If you are sending aadhaar card send int the parameters aadhar_front and aadhar_back\\n3. The file size for the documents for AePS activation should be less than 1MB.\\n4. We accept the images in JPEG, JPG and PDF format, not in PNG. PNG images are rejected from the partner bank.\"\n}\n[/block]","excerpt":"This will enable you to activate a user for a particular service","slug":"activate-service","type":"put","title":"Activate Service","__v":28,"parentDoc":null,"childrenPages":[]}

putActivate Service

This will enable you to activate a user for a particular service

Body Params

user_code:
required
string
Unique code of the user on the platform
initiator_id:
required
string
partner id from where the request has been initiated
service_code:
required
string
This is the code of the service for which the user needs to be activated
modelname:
string
office_address:
array of strings
This will contain "line_address", "city", "state" and "pincode"
pan_card:
required
file
For AePS activation
voter_card_front:
file
For AePS activation
voter_card_back:
file
For AePS activation
aadhar_front:
file
For AePS Activation
aadhar_back:
file
For AePS Activation
address_as_per_proof:
array of strings
This will contain "line_address", "city", "state" and "pincode"

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section
[block:callout] { "type": "info", "body": "After activation, the user state goes into pending state and it will take 3 business days for any user to get activated for AePS", "title": "AePS Activation TAT" } [/block] [block:callout] { "type": "warning", "title": "Please Note:", "body": "1. In case of AePS service activation, the **user_code** is the unique code received in response to the **Onboard User** API\n2. Either of Voter Card or Aadhaar Card is required.\nIf you are sending voter card send in the parameters voter_card_front and voter_card_back. If you are sending aadhaar card send int the parameters aadhar_front and aadhar_back\n3. The file size for the documents for AePS activation should be less than 1MB.\n4. We accept the images in JPEG, JPG and PDF format, not in PNG. PNG images are rejected from the partner bank." } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "info", "body": "After activation, the user state goes into pending state and it will take 3 business days for any user to get activated for AePS", "title": "AePS Activation TAT" } [/block] [block:callout] { "type": "warning", "title": "Please Note:", "body": "1. In case of AePS service activation, the **user_code** is the unique code received in response to the **Onboard User** API\n2. Either of Voter Card or Aadhaar Card is required.\nIf you are sending voter card send in the parameters voter_card_front and voter_card_back. If you are sending aadhaar card send int the parameters aadhar_front and aadhar_back\n3. The file size for the documents for AePS activation should be less than 1MB.\n4. We accept the images in JPEG, JPG and PDF format, not in PNG. PNG images are rejected from the partner bank." } [/block]
{"_id":"5b570ebf558adb0003b9f9bc","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-07-24T11:34:23.255Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"get","examples":{"codes":[{"language":"curl","code":"curl -X GET \\\n  'https://staging.eko.in:25004/ekoapi/v1/user/services/user_code:20110002?initiator_id=9962981729' \\\n  -H 'Cache-Control: no-cache' \\\n  -H 'Postman-Token: 23754449-a0d9-4294-8f37-656632de4005' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593'\n"},{"language":"csharp","code":""}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"response_status_id\": -1,\n    \"data\": {\n        \"user_code\": \"20110002\",\n        \"initiator_id\": \"9962981729\",\n        \"service_status_list\": [\n            {\n                \"comments\": null,\n                \"status_desc\": \"PENDING\",\n                \"service_code\": \"1\",\n                \"status\": 2\n            }\n        ]\n    },\n    \"response_type_id\": 1299,\n    \"message\": \"Status of services for this user\",\n    \"status\": 0\n}\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[{"_id":"5b570ebf558adb0003b9f9c1","ref":"","in":"body","required":true,"desc":"partner id from where the request has been initiated","default":"","type":"string","name":"initiator_id"},{"_id":"5b570ebf558adb0003b9f9c0","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5b570ebf558adb0003b9f9bf","ref":"","in":"path","required":true,"desc":"The user for whom the enquiry needs to be done","default":"","type":"string","name":"user_code"},{"_id":"5b570ebf558adb0003b9f9be","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5b570ebf558adb0003b9f9bd","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"}],"url":"/user_code"},"isReference":false,"order":7,"body":"","excerpt":"This will enable you to inquire about the state of a user for the list of services","slug":"user-services-enquiry","type":"get","title":"User Services Enquiry","__v":1,"parentDoc":null,"childrenPages":[]}

getUser Services Enquiry

This will enable you to inquire about the state of a user for the list of services

Path Params

user_code:
required
string
The user for whom the enquiry needs to be done

Body Params

initiator_id:
required
string
partner id from where the request has been initiated

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"5a72f1b5ec70100012581d71","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-02-01T10:53:41.350Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":8,"body":"Customer objects allow you to perform recurring transactions and add multiple recipients to the same customer. The API allows you to create and verify customers. You can retrieve individual customers information as well.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Notes\",\n  \"body\": \"1. Default value of **customer_id_type** is **mobile_number**\\n2. Customer account balance will always be 0\"\n}\n[/block]","excerpt":"","slug":"introduction-to","type":"basic","title":"Customers","__v":0,"parentDoc":null,"childrenPages":[]}

Customers


Customer objects allow you to perform recurring transactions and add multiple recipients to the same customer. The API allows you to create and verify customers. You can retrieve individual customers information as well. [block:callout] { "type": "info", "title": "Notes", "body": "1. Default value of **customer_id_type** is **mobile_number**\n2. Customer account balance will always be 0" } [/block]
Customer objects allow you to perform recurring transactions and add multiple recipients to the same customer. The API allows you to create and verify customers. You can retrieve individual customers information as well. [block:callout] { "type": "info", "title": "Notes", "body": "1. Default value of **customer_id_type** is **mobile_number**\n2. Customer account balance will always be 0" } [/block]
{"_id":"556d9179e24c5a0d0070344e","hidden":false,"order":9,"project":"554757ba6184460d006fd8b4","__v":91,"api":{"settings":"","url":"/customers/:customer_id_type::customer_id","auth":"required","examples":{"codes":[{"code":"curl -X GET \\\n  'https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:3000000010?initiator_id=9910028267' \\\n  -H 'cache-control: no-cache' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593'\n","name":"","language":"curl"},{"language":"java","code":"HttpResponse<String> response = Unirest.get(\"https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:3000000010?initiator_id=9910028267\")\n  .header(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\")\n  .header(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\")\n  .header(\"secret-key-timestamp\", \"1516705204593\")\n  .header(\"cache-control\", \"no-cache\")\n  .asString();"},{"language":"python","code":"import http.client\n\nconn = http.client.HTTPSConnection(\"staging.eko.in:25004\")\n\nheaders = {\n    'developer_key': \"becbbce45f79c6f5109f848acd540567\",\n    'secret-key': \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    'secret-key-timestamp': \"1516705204593\",\n    'cache-control': \"no-cache\",\n    }\n\nconn.request(\"GET\", \"/ekoapi/v1/customers/mobile_number:3000000010?initiator_id=9910028267\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"language":"csharp","code":"var client = new RestClient(\"https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:3000000010?initiator_id=9910028267\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"cache-control\", \"no-cache\");\nrequest.AddHeader(\"secret-key-timestamp\", \"1516705204593\");\nrequest.AddHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\");\nrequest.AddHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\");\nIRestResponse response = client.Execute(request);"},{"language":"php","code":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_PORT => \"25004\",\n  CURLOPT_URL => \"https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:3000000010?initiator_id=9910028267\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => array(\n    \"cache-control: no-cache\",\n    \"developer_key: becbbce45f79c6f5109f848acd540567\",\n    \"secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    \"secret-key-timestamp: 1516705204593\"\n  ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);"}]},"method":"get","params":[{"_id":"5a6f0a5392a03c0038ab0791","ref":"","in":"path","required":true,"desc":"Value= mobile_number","default":"","type":"string","name":"customer_id_type"},{"_id":"5a6f1a3b57f6fd004420c7ad","ref":"","in":"query","required":true,"desc":"partner id from where the request has been initiated","default":"","type":"int","name":"initiator_id"},{"_id":"5a6f663fa45e5e005646b2c7","ref":"","in":"path","required":true,"desc":"Value of customer's mobile number","default":"","type":"int","name":"customer_id"},{"_id":"5a703f9fb0a01400369583c0","ref":"","in":"path","required":false,"desc":"The unique cell number with which you are onboarded on Eko's platform","default":"indonepal","type":"string","name":"product"},{"_id":"5a74434c6a226a00561c70ea","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5a74434c6a226a00561c70e9","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5a74434c6a226a00561c70e8","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"response_status_id\": 0,\n    \"data\": {\n        \"customer_id_type\": \"mobile_number\",\n        \"bc_available_limit\": 50000,\n        \"mobile\": \"3000000010\",\n        \"used_limit\": 0,\n        \"total_limit\": 50000,\n        \"available_limit\": 50000,\n        \"balance\": \"0.0\",\n        \"state_desc\": \"KYC Verification Pending\",\n        \"name\": \"Sankalp\",\n        \"limit\": [\n            {\n                \"name\": \"BC_Pipe4\",\n                \"pipe\": \"1\",\n                \"used\": \"0.0\",\n                \"priority\": null,\n                \"remaining\": \"25000.0\",\n                \"status\": \"0\"\n            },\n            {\n                \"name\": \"Wallet\",\n                \"pipe\": \"2\",\n                \"used\": \"0.0\",\n                \"priority\": 1,\n                \"remaining\": \"20000.0\",\n                \"status\": \"1\"\n            },\n            {\n                \"name\": \"BC_Pipe3\",\n                \"pipe\": \"3\",\n                \"used\": \"0.0\",\n                \"priority\": null,\n                \"remaining\": \"25000.0\",\n                \"status\": \"0\"\n            },\n            {\n                \"name\": \"BC_Pipe2\",\n                \"pipe\": \"4\",\n                \"used\": \"0.0\",\n                \"priority\": null,\n                \"remaining\": \"25000.0\",\n                \"status\": \"0\"\n            },\n            {\n                \"name\": \"BC_Pipe1\",\n                \"pipe\": \"5\",\n                \"used\": \"0.0\",\n                \"priority\": 5,\n                \"remaining\": \"25000.0\",\n                \"status\": \"1\"\n            },\n            {\n                \"name\": \"BC_Pipe5\",\n                \"pipe\": \"7\",\n                \"used\": \"0.0\",\n                \"priority\": 2,\n                \"remaining\": \"25000.0\",\n                \"status\": \"1\"\n            }\n        ],\n        \"currency\": \"INR\",\n        \"state\": \"3\",\n        \"wallet_available_limit\": 0,\n        \"customer_id\": \"3000000010\"\n    },\n    \"response_type_id\": 33,\n    \"message\": \"Non-KYC active\",\n    \"status\": 0\n}","name":"For existing Customer"},{"language":"json","code":"{\n    \"response_status_id\": 1,\n    \"invalid_params\": {\n        \"customer_id\": \"Merchant does not exist in System\"\n    },\n    \"response_type_id\": -1,\n    \"message\": \"customer_id does not exist in system\",\n    \"status\": 463\n}","name":"For Non-existing New Customer","status":200},{"name":"Sample response for a Indo-Nepal transaction","language":"json","code":"{\n\"message\":\"Success! INDO-NEPAL sender detail found\", \"response_type_id\":1019,\n\"response_status_id\":0,\n\"status\":0,\n\"data\":\n  {\n\t\"kyc_state\":1, \n  \"id_proof_type_id\":3, \n  \"name\":\"Testing\", \n  \"id_proof\":\"SVE1245370\",\n  \"customer_profile\":\n    {\n\t\t\t\"kyc_state\":-1, \n      \"kyc_remark\":\"\",\n      \"kyc_id\":\"SVE1245370\", \n      \"kyc_type\":3, \n      \"name\":\"Testing\", \n      \"chart\":[\n\t\t\t\t\t{\n\t\t\t\t\t\"data_type_id\":10, \n          \"data\":{\n\t\t\t\t\t\t\t\t\t\"unavailable\":\"0\", \n            \t\t\t\"remaining\":590900.0, \n            \t\t\t\"used\":9100.0\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"label\":\"Volume (Per Year)\" \n          },\n\t\t\t\t\t{\n\t\t\t\t\t\t\"data_type_id\":11,\n            \"data\":{\n\t\t\t\t\t\t\t\t\t\t\"unavailable\":\"0\",\n             \t\t\t\t\"remaining\":5,\n              \t\t\t\"used\":7\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\"label\":\"Count (Per Year)\" }\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\"mobile\":\"7010101019\" \n    \t\t\t}\n    }\n}"},{"code":"{\n    \"response_status_id\": -1,\n    \"data\": {\n        \"state_desc\": \"Verification Pending\",\n        \"name\": \"Sankalp\",\n        \"state\": \"1\",\n        \"customer_id\": \"8877665544\"\n    },\n    \"response_type_id\": 37,\n    \"message\": \"Verification pending\",\n    \"status\": 0\n}","language":"json","status":200,"name":"For Verification Pending customer"}]}},"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"GET\",\n  \"body\": \"/customers/**{customer_id_type}:{customer_id}** \\n\\n###### *eg:*   /customers/**mobile_number:9876543210**\"\n}\n[/block]\nPlease read the parameters **available_limit** and **used_limit** to show limits for the customer on your UI/UX.\n\nReturns a customer's basic profile information such as name, mobile number, eKYC status, wallet balance, monthly available limit for money transfer, etc.\n\nYou can use this API to check if the customer has been created on our platform. If not, you must create the customer before using Eko related services (like Money Transfer) for him/her.\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Note\",\n  \"body\": \"Limits for customer\\n1. For customer who has done KYC - Rs 74,500 per customer per month\\n2. For non-KYC customer - Rs 50,000 per customer per month\\n \\nAlso, the parameter /product as an endpoint only needs to be used for an Indo-Nepal remittance transaction\"\n}\n[/block]\n**Response Description for DMT customer** \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter Name\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Use\",\n    \"0-0\": \"available_limit\",\n    \"0-1\": \"Limit left in the month for the customer.\",\n    \"0-2\": \"You can show this on your UI as the Available Limit for the customer\",\n    \"1-0\": \"used_limit\",\n    \"1-1\": \"Limit consumed in the month by the customer.\",\n    \"1-2\": \"Show this as the Used Limit for the customer mobile number.\",\n    \"2-0\": \"state\",\n    \"2-1\": \"Tell you what is the state of the customer.\\nValues the parameter can have\\n1 - OTP Verification Pending\\n2 - OTP Verified Customer, Non-KYC / Rejected\\n3- KYC verifcation pending\\n4 - Verified and  Full Kyc Customer\\n\\n5- Name change verification Pending\\n\\n\\n\\n8-Partial KYC\",\n    \"2-2\": \"You can show the state of the customer on your portal.\\n\\nIf you get the remarks as rejected then again call the API create customer for KYC with the documents for the KYC.\\n\\n\\nIf you have initiated for name change of wallet but OTP has not been entered yet. \\n\\nThis state means we have only Aadhaar card number right now  and OVD documents have not been updated yet.\",\n    \"3-0\": \"total_limit\",\n    \"3-1\": \"Total limit available for the customer depending on whether he is kyc or not.\",\n    \"3-2\": \"Show the total limit of the customer on your UI\",\n    \"4-0\": \"wallet_available_limit\",\n    \"5-0\": \"bc_available_limit\",\n    \"4-1\": \"Limit available in the Wallet. It will 0 for Non-KYC customers and for Kyc customers it will be 49,500 and reduce correspondingly after transactions.\",\n    \"4-2\": \"To know the transaction will go through the wallet for Kyc customer or through a BC pipe.\\nSo that commission at your end can be calculated correspondingly\",\n    \"5-1\": \"Total Limit available in the BC Pipes.\",\n    \"5-2\": \"\"\n  },\n  \"cols\": 3,\n  \"rows\": 6\n}\n[/block]","createdAt":"2015-06-02T11:20:25.719Z","editedParams":true,"githubsync":"","title":"Get Customer Information","updates":[],"user":"5547561a9a48800d00c6e483","version":"554757bb6184460d006fd8b7","editedParams2":true,"link_external":false,"link_url":"","slug":"get-customer-info","type":"get","category":"556d914e42dd610d00a3cfc2","excerpt":"Get a customer's basic profile information","sync_unique":"","isReference":false,"next":{"description":"","pages":[]},"parentDoc":null,"childrenPages":[]}

getGet Customer Information

Get a customer's basic profile information

Path Params

customer_id_type:
required
string
Value= mobile_number
customer_id:
required
integer
Value of customer's mobile number
product:
stringindonepal
The unique cell number with which you are onboarded on Eko's platform

Query Params

initiator_id:
required
integer
partner id from where the request has been initiated

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section
[block:callout] { "type": "success", "title": "GET", "body": "/customers/**{customer_id_type}:{customer_id}** \n\n###### *eg:* /customers/**mobile_number:9876543210**" } [/block] Please read the parameters **available_limit** and **used_limit** to show limits for the customer on your UI/UX. Returns a customer's basic profile information such as name, mobile number, eKYC status, wallet balance, monthly available limit for money transfer, etc. You can use this API to check if the customer has been created on our platform. If not, you must create the customer before using Eko related services (like Money Transfer) for him/her. [block:callout] { "type": "danger", "title": "Note", "body": "Limits for customer\n1. For customer who has done KYC - Rs 74,500 per customer per month\n2. For non-KYC customer - Rs 50,000 per customer per month\n \nAlso, the parameter /product as an endpoint only needs to be used for an Indo-Nepal remittance transaction" } [/block] **Response Description for DMT customer** [block:parameters] { "data": { "h-0": "Parameter Name", "h-1": "Description", "h-2": "Use", "0-0": "available_limit", "0-1": "Limit left in the month for the customer.", "0-2": "You can show this on your UI as the Available Limit for the customer", "1-0": "used_limit", "1-1": "Limit consumed in the month by the customer.", "1-2": "Show this as the Used Limit for the customer mobile number.", "2-0": "state", "2-1": "Tell you what is the state of the customer.\nValues the parameter can have\n1 - OTP Verification Pending\n2 - OTP Verified Customer, Non-KYC / Rejected\n3- KYC verifcation pending\n4 - Verified and Full Kyc Customer\n\n5- Name change verification Pending\n\n\n\n8-Partial KYC", "2-2": "You can show the state of the customer on your portal.\n\nIf you get the remarks as rejected then again call the API create customer for KYC with the documents for the KYC.\n\n\nIf you have initiated for name change of wallet but OTP has not been entered yet. \n\nThis state means we have only Aadhaar card number right now and OVD documents have not been updated yet.", "3-0": "total_limit", "3-1": "Total limit available for the customer depending on whether he is kyc or not.", "3-2": "Show the total limit of the customer on your UI", "4-0": "wallet_available_limit", "5-0": "bc_available_limit", "4-1": "Limit available in the Wallet. It will 0 for Non-KYC customers and for Kyc customers it will be 49,500 and reduce correspondingly after transactions.", "4-2": "To know the transaction will go through the wallet for Kyc customer or through a BC pipe.\nSo that commission at your end can be calculated correspondingly", "5-1": "Total Limit available in the BC Pipes.", "5-2": "" }, "cols": 3, "rows": 6 } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "success", "title": "GET", "body": "/customers/**{customer_id_type}:{customer_id}** \n\n###### *eg:* /customers/**mobile_number:9876543210**" } [/block] Please read the parameters **available_limit** and **used_limit** to show limits for the customer on your UI/UX. Returns a customer's basic profile information such as name, mobile number, eKYC status, wallet balance, monthly available limit for money transfer, etc. You can use this API to check if the customer has been created on our platform. If not, you must create the customer before using Eko related services (like Money Transfer) for him/her. [block:callout] { "type": "danger", "title": "Note", "body": "Limits for customer\n1. For customer who has done KYC - Rs 74,500 per customer per month\n2. For non-KYC customer - Rs 50,000 per customer per month\n \nAlso, the parameter /product as an endpoint only needs to be used for an Indo-Nepal remittance transaction" } [/block] **Response Description for DMT customer** [block:parameters] { "data": { "h-0": "Parameter Name", "h-1": "Description", "h-2": "Use", "0-0": "available_limit", "0-1": "Limit left in the month for the customer.", "0-2": "You can show this on your UI as the Available Limit for the customer", "1-0": "used_limit", "1-1": "Limit consumed in the month by the customer.", "1-2": "Show this as the Used Limit for the customer mobile number.", "2-0": "state", "2-1": "Tell you what is the state of the customer.\nValues the parameter can have\n1 - OTP Verification Pending\n2 - OTP Verified Customer, Non-KYC / Rejected\n3- KYC verifcation pending\n4 - Verified and Full Kyc Customer\n\n5- Name change verification Pending\n\n\n\n8-Partial KYC", "2-2": "You can show the state of the customer on your portal.\n\nIf you get the remarks as rejected then again call the API create customer for KYC with the documents for the KYC.\n\n\nIf you have initiated for name change of wallet but OTP has not been entered yet. \n\nThis state means we have only Aadhaar card number right now and OVD documents have not been updated yet.", "3-0": "total_limit", "3-1": "Total limit available for the customer depending on whether he is kyc or not.", "3-2": "Show the total limit of the customer on your UI", "4-0": "wallet_available_limit", "5-0": "bc_available_limit", "4-1": "Limit available in the Wallet. It will 0 for Non-KYC customers and for Kyc customers it will be 49,500 and reduce correspondingly after transactions.", "4-2": "To know the transaction will go through the wallet for Kyc customer or through a BC pipe.\nSo that commission at your end can be calculated correspondingly", "5-1": "Total Limit available in the BC Pipes.", "5-2": "" }, "cols": 3, "rows": 6 } [/block]
{"_id":"556d920bd0f4740d00380cf8","order":10,"type":"put","user":"5547561a9a48800d00c6e483","version":"554757bb6184460d006fd8b7","createdAt":"2015-06-02T11:22:51.528Z","githubsync":"","hidden":false,"sync_unique":"","slug":"create-customer","title":"Create Customer","updates":[],"excerpt":"Onboard a new customer to enable him/her to transact for DMT","link_url":"","project":"554757ba6184460d006fd8b4","body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"PUT\",\n  \"body\": \"/customers/**{customer_id_type}:{customer_id}** \\n\\n###### *eg:*   /customers/**mobile_number:9876543210**\\n\\n**Note**: Parameters passed in request body should be **application/x-www-form-urlencoded** \"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"OTP will not be coming on the mobile on UAT systems. It will be coming as a parameter on the UAT system, you can read that parameter and enter as OTP\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Parameters \\\"dob\\\", \\\"gender\\\", \\\"address_line1\\\", \\\"company_name\\\", \\\"nationality\\\", \\\"id_proof_type_id\\\", \\\"id_proof\\\", \\\"file1\\\", file2\\\", \\\"income_address\\\" and \\\"remittance_reason\\\" are optional parameters and needs to be send only when product = indonepal\"\n}\n[/block]","category":"556d914e42dd610d00a3cfc2","editedParams":true,"editedParams2":true,"link_external":false,"__v":46,"api":{"auth":"required","examples":{"codes":[{"language":"curl","code":"curl -X PUT \\\n  https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:3000000026 \\\n  -H 'cache-control: no-cache' \\\n  -H 'content-type: application/x-www-form-urlencoded' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'postman-token: 6b58d274-72df-0d21-3190-e5ecab9e9d5e' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593' \\\n  -d 'initiator_id=9910028267&name=Sankalp'","name":""},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/x-www-form-urlencoded\");\nRequestBody body = RequestBody.create(mediaType, \"initiator_id=9910028267&name=Sankalp\");\nRequest request = new Request.Builder()\n  .url(\"https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:3000000026\")\n  .put(body)\n  .addHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\")\n  .addHeader(\"content-type\", \"application/x-www-form-urlencoded\")\n  .addHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\")\n  .addHeader(\"secret-key-timestamp\", \"1516705204593\")\n  .addHeader(\"cache-control\", \"no-cache\")\n  .addHeader(\"postman-token\", \"21aae1b4-19fa-0e1e-1481-328d0ef8f1b5\")\n  .build();\n\nResponse response = client.newCall(request).execute();"},{"language":"python","code":"import http.client\n\nconn = http.client.HTTPSConnection(\"staging.eko.in:25004\")\n\npayload = \"initiator_id=9910028267&name=Sankalp\"\n\nheaders = {\n    'developer_key': \"becbbce45f79c6f5109f848acd540567\",\n    'content-type': \"application/x-www-form-urlencoded\",\n    'secret-key': \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    'secret-key-timestamp': \"1516705204593\",\n    'cache-control': \"no-cache\",\n    'postman-token': \"20bb97b1-d79f-3486-1a71-ce1d7121c4f0\"\n    }\n\nconn.request(\"PUT\", \"/ekoapi/v1/customers/mobile_number:3000000026\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"language":"csharp","code":"var client = new RestClient(\"https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:3000000026\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"postman-token\", \"630d84f7-bd68-c47c-312f-f4927f774d97\");\nrequest.AddHeader(\"cache-control\", \"no-cache\");\nrequest.AddHeader(\"secret-key-timestamp\", \"1516705204593\");\nrequest.AddHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\");\nrequest.AddHeader(\"content-type\", \"application/x-www-form-urlencoded\");\nrequest.AddHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\");\nrequest.AddParameter(\"application/x-www-form-urlencoded\", \"initiator_id=9910028267&name=Sankalp\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"language":"php","code":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:3000000026');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders(array(\n  'postman-token' => '89ce1baf-531e-e42b-dbf8-102be0d9e5a1',\n  'cache-control' => 'no-cache',\n  'secret-key-timestamp' => '1516705204593',\n  'secret-key' => 'MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=',\n  'content-type' => 'application/x-www-form-urlencoded',\n  'developer_key' => 'becbbce45f79c6f5109f848acd540567'\n));\n\n$request->setContentType('application/x-www-form-urlencoded');\n$request->setPostFields(array(\n  'initiator_id' => '9910028267',\n  'name' => 'Sankalp'\n));\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;"}]},"method":"put","params":[{"_id":"5a6f17af3fed500047754658","ref":"","in":"path","required":true,"desc":"value : mobile_number","default":"","type":"string","name":"customer_id_type"},{"_id":"5a6f17af3fed500047754656","ref":"","in":"body","required":true,"desc":"Name of the customer","default":"","type":"string","name":"name"},{"_id":"5a6f1bbf57f6fd004420c7d5","ref":"","in":"body","required":true,"desc":"The unique cell number with which you are on-boarded on Eko's platform","default":"","type":"int","name":"initiator_id"},{"_id":"5a6f669f043d990023daea29","ref":"","in":"path","required":true,"desc":"id of the customer; currently only Customer's mobile number can be used","default":"","type":"int","name":"customer_id"},{"_id":"5a704478b0a0140036958469","ref":"","in":"body","required":false,"desc":"Date of birth of the customer as per id, this have to be send for the Indo-Nepal","default":"","type":"datetime","name":"dob"},{"_id":"5a704478b0a0140036958468","ref":"","in":"body","required":false,"desc":"This have to be send for the Indo-Nepal","default":"","type":"int","name":"gender"},{"_id":"5a704478b0a0140036958467","ref":"","in":"body","required":false,"desc":"This have to be send for the Indo-Nepal","default":"","type":"string","name":"address_line1"},{"_id":"5a704478b0a0140036958466","ref":"","in":"body","required":false,"desc":"This have to be send for the Indo-Nepal","default":"","type":"string","name":"nationality"},{"_id":"5a704478b0a0140036958465","ref":"","in":"body","required":false,"desc":"This have to be send for the Indo-Nepal","default":"","type":"string","name":"id_proof_type_id"},{"_id":"5a704478b0a0140036958464","ref":"","in":"body","required":false,"desc":"This have to be send for the Indo-Nepal","default":"","type":"string","name":"id_proof"},{"_id":"5a704478b0a0140036958463","ref":"","in":"body","required":false,"desc":"this have to be send for the Indo-Nepal","default":"","type":"file","name":"file1 (front)"},{"_id":"5a704478b0a0140036958462","ref":"","in":"body","required":false,"desc":"this have to be send for the Indo-Nepal","default":"","type":"file","name":"file2 (back)"},{"_id":"5a704478b0a0140036958461","ref":"","in":"body","required":false,"desc":"This have to be send for the Indo-Nepal","default":"","type":"string","name":"income_source"},{"_id":"5a704478b0a0140036958460","ref":"","in":"body","required":false,"desc":"This have to be send for the Indo-Nepal","default":"","type":"string","name":"remittance_reason"},{"_id":"5a8aaaabb01701001f3dc9cc","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5a8aaacc13cba9004f298c65","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5a8aaacc13cba9004f298c64","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"response_status_id\": 0,\n    \"data\": {\n        \"customer_id_type\": \"mobile_number\",\n        \"state_desc\": \"\",\n        \"name\": \"\",\n        \"otp\": \"811\",\n        \"state\": \"\",\n        \"customer_id\": \"8877665545\",\n        \"list_specific_id\": \"\"\n    },\n    \"response_type_id\": 327,\n    \"message\": \"OTP sent. Proceed with verification.\",\n    \"status\": 0\n}","name":"For new Customer"},{"status":200,"language":"json","code":"{\n    \"response_status_id\": 1,\n    \"invalid_params\": {\n        \"customer_id\": \"DEPOSITOR ALREADY REGISTERED.\"\n    },\n    \"data\": {\n        \"reason\": \"\",\n        \"customer_id_type\": \"mobile_number\",\n        \"customer_id\": \"8877665545\"\n    },\n    \"response_type_id\": -1,\n    \"message\": \"Sender already registered\",\n    \"status\": 17\n}","name":"For already verified Customer"}]},"settings":"","url":"/customers/:customer_id_type:customer_id"},"isReference":false,"next":{"description":"","pages":[]},"parentDoc":null,"childrenPages":[]}

putCreate Customer

Onboard a new customer to enable him/her to transact for DMT

Path Params

customer_id_type:
required
string
value : mobile_number
customer_id:
required
integer
id of the customer; currently only Customer's mobile number can be used

Body Params

name:
required
string
Name of the customer
initiator_id:
required
integer
The unique cell number with which you are on-boarded on Eko's platform
dob:
datetime
Date of birth of the customer as per id, this have to be send for the Indo-Nepal
gender:
integer
This have to be send for the Indo-Nepal
address_line1:
string
This have to be send for the Indo-Nepal
nationality:
string
This have to be send for the Indo-Nepal
id_proof_type_id:
string
This have to be send for the Indo-Nepal
id_proof:
string
This have to be send for the Indo-Nepal
file1:
file
this have to be send for the Indo-Nepal
file2:
file
this have to be send for the Indo-Nepal
income_source:
string
This have to be send for the Indo-Nepal
remittance_reason:
string
This have to be send for the Indo-Nepal

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section
[block:callout] { "type": "success", "title": "PUT", "body": "/customers/**{customer_id_type}:{customer_id}** \n\n###### *eg:* /customers/**mobile_number:9876543210**\n\n**Note**: Parameters passed in request body should be **application/x-www-form-urlencoded** " } [/block] [block:callout] { "type": "info", "title": "OTP will not be coming on the mobile on UAT systems. It will be coming as a parameter on the UAT system, you can read that parameter and enter as OTP" } [/block] [block:callout] { "type": "warning", "body": "Parameters \"dob\", \"gender\", \"address_line1\", \"company_name\", \"nationality\", \"id_proof_type_id\", \"id_proof\", \"file1\", file2\", \"income_address\" and \"remittance_reason\" are optional parameters and needs to be send only when product = indonepal" } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "success", "title": "PUT", "body": "/customers/**{customer_id_type}:{customer_id}** \n\n###### *eg:* /customers/**mobile_number:9876543210**\n\n**Note**: Parameters passed in request body should be **application/x-www-form-urlencoded** " } [/block] [block:callout] { "type": "info", "title": "OTP will not be coming on the mobile on UAT systems. It will be coming as a parameter on the UAT system, you can read that parameter and enter as OTP" } [/block] [block:callout] { "type": "warning", "body": "Parameters \"dob\", \"gender\", \"address_line1\", \"company_name\", \"nationality\", \"id_proof_type_id\", \"id_proof\", \"file1\", file2\", \"income_address\" and \"remittance_reason\" are optional parameters and needs to be send only when product = indonepal" } [/block]
{"_id":"556d92a8e24c5a0d00703457","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","__v":29,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"PUT\",\n  \"body\": \"/customers/verification/**otp:{otp}** \\n\\n###### *eg:*   /customers/verification/**otp:345**\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"For UAT,\\n1. OTP will not be sent to customer mobile number\\n2. For testing, otp will be returned in resend otp api\",\n  \"title\": \"Note\"\n}\n[/block]","category":"556d914e42dd610d00a3cfc2","link_external":false,"api":{"auth":"required","method":"put","params":[{"_id":"5a6f683546736c00632b49a3","ref":"","in":"path","required":false,"desc":"Which you received by calling Create Customer or Resend OTP API","default":"otp","type":"int","name":"otp"},{"_id":"5a6f683546736c00632b49a2","ref":"","in":"body","required":true,"desc":"","default":"mobile_number","type":"string","name":"customer_id_type"},{"_id":"5a6f683546736c00632b49a1","ref":"","in":"body","required":true,"desc":"id of the customer; currently only mobile number of the customer can be used","default":"","type":"int","name":"customer_id"},{"_id":"5a6f683546736c00632b49a0","ref":"","in":"body","required":true,"desc":"partner id from where the request has been initiated","default":"","type":"string","name":"initiator_id"},{"_id":"5a704ce47c739c0012e945ef","ref":"","in":"path","required":false,"desc":"This parameter needs to be send for a India to Nepal remittance transaction","default":"indonepal","type":"string","name":"product"},{"_id":"5aacfc0709528100120b330c","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5aacfc0709528100120b330b","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5aacfc0709528100120b330a","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"}],"results":{"codes":[{"name":"","code":"{\n\t\t\"message\":\"Wallet opened successfully\",\n\t\t\"response_type_id\":300,\n\t\t\"response_status_id\":0,\n\t\t\"status\":0,\n\t\t\"data\":\n\t\t\t\t\t {\n\t\t\t\t\t\t\"state\":\"2\",\t\n\t\t\t\t\t\t\"customer_id_type\":\"mobile_number\",\n\t\t\t\t\t\t\"customer_id\":\"9962817283\"\n\t\t\t\t\t\t}\n}\n","language":"json","status":200},{"name":"For non existing Customers","code":"{\n    \"response_status_id\": 1,\n    \"invalid_params\": {\n        \"customer_id\": \"Merchant does not exist in System\"\n    },\n    \"response_type_id\": -1,\n    \"message\": \"customer_id does not exist in system\",\n    \"status\": 463\n}","language":"json","status":200},{"name":"Sample response for Indo-Nepal transaction","language":"text","code":"{\n\t\"message\": \"Wallet opened successfully.\",\n\t\"response_type_id\": 300, \n  \"response_status_id\": 0,\n\t\"status\": 0,\n\t\"data\": \n  \t{\n\t\t\t\"state\": \"3\",\n\t\t\t\"customer_id_type\": \"mobile_number\",\n      \"customer_id\": \"7010101969\",\n      \"state_desc\": \"KYC Verification Pending\"\n\t\t} \t\n}\n"}]},"settings":"","url":"/customers/verification/otp:otp","examples":{"codes":[{"language":"curl","code":"curl -X PUT \\\n  https://staging.eko.in:25004/ekoapi/v1/customers/verification/otp:346 \\\n  -H 'cache-control: no-cache' \\\n  -H 'content-type: application/x-www-form-urlencoded' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'postman-token: ca051271-b8f0-007a-7a2f-bed77fc69406' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593' \\\n  -d 'initiator_id=9910028267&id_type=mobile_number&id=3000000026'"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/x-www-form-urlencoded\");\nRequestBody body = RequestBody.create(mediaType, \"initiator_id=9910028267&id_type=mobile_number&id=3000000026\");\nRequest request = new Request.Builder()\n  .url(\"https://staging.eko.in:25004/ekoapi/v1/customers/verification/otp:346\")\n  .put(body)\n  .addHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\")\n  .addHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\")\n  .addHeader(\"secret-key-timestamp\", \"1516705204593\")\n  .addHeader(\"content-type\", \"application/x-www-form-urlencoded\")\n  .addHeader(\"cache-control\", \"no-cache\")\n  .addHeader(\"postman-token\", \"ce910162-1841-d662-f7b5-b69b4d25fde1\")\n  .build();\n\nResponse response = client.newCall(request).execute();"},{"language":"python","code":"import http.client\n\nconn = http.client.HTTPSConnection(\"staging.eko.in:25004\")\n\npayload = \"initiator_id=9910028267&id_type=mobile_number&id=3000000026\"\n\nheaders = {\n    'developer_key': \"becbbce45f79c6f5109f848acd540567\",\n    'secret-key': \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    'secret-key-timestamp': \"1516705204593\",\n    'content-type': \"application/x-www-form-urlencoded\",\n    'cache-control': \"no-cache\",\n    'postman-token': \"998a7654-be9d-9b00-a807-43e4478d5c53\"\n    }\n\nconn.request(\"PUT\", \"/ekoapi/v1/customers/verification/otp:346\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"language":"csharp","code":"var client = new RestClient(\"https://staging.eko.in:25004/ekoapi/v1/customers/verification/otp:346\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"postman-token\", \"7ddff860-92b7-0308-c3fb-97d9a73d4cfc\");\nrequest.AddHeader(\"cache-control\", \"no-cache\");\nrequest.AddHeader(\"content-type\", \"application/x-www-form-urlencoded\");\nrequest.AddHeader(\"secret-key-timestamp\", \"1516705204593\");\nrequest.AddHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\");\nrequest.AddHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\");\nrequest.AddParameter(\"application/x-www-form-urlencoded\", \"initiator_id=9910028267&id_type=mobile_number&id=3000000026\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"language":"php","code":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://staging.eko.in:25004/ekoapi/v1/customers/verification/otp:346');\n$request->setMethod(HTTP_METH_PUT);\n\n$request->setHeaders(array(\n  'postman-token' => '490ebd6d-e9e4-2bab-b821-a12010fc7df1',\n  'cache-control' => 'no-cache',\n  'content-type' => 'application/x-www-form-urlencoded',\n  'secret-key-timestamp' => '1516705204593',\n  'secret-key' => 'MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=',\n  'developer_key' => 'becbbce45f79c6f5109f848acd540567'\n));\n\n$request->setContentType('application/x-www-form-urlencoded');\n$request->setPostFields(array(\n  'initiator_id' => '9910028267',\n  'id_type' => 'mobile_number',\n  'id' => '3000000026'\n));\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"},{"name":"Sample request for Indo-Nepal transaction","language":"curl","code":"curl -i -X POST\n-d \"initiator_id=9910028267&id_type=mobile_number&id=7010101969\" https://staging.eko.in:25004/ekoapi/v1/customers/product:indonepal/verification/otp:361 -H 'developer_key:becbbce45f79c6f5109f848acd540567'"}]}},"link_url":"","slug":"verify-customer-identity","type":"put","title":"Verify Customer Identity","user":"5547561a9a48800d00c6e483","createdAt":"2015-06-02T11:25:28.609Z","editedParams":true,"sync_unique":"","order":11,"updates":[],"editedParams2":true,"excerpt":"Verify a customer's mobile number via OTP","githubsync":"","hidden":false,"isReference":false,"next":{"description":"","pages":[]},"parentDoc":null,"childrenPages":[]}

putVerify Customer Identity

Verify a customer's mobile number via OTP

Path Params

otp:
integerotp
Which you received by calling Create Customer or Resend OTP API
product:
stringindonepal
This parameter needs to be send for a India to Nepal remittance transaction

Body Params

customer_id_type:
required
stringmobile_number
customer_id:
required
integer
id of the customer; currently only mobile number of the customer can be used
initiator_id:
required
string
partner id from where the request has been initiated

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section
[block:callout] { "type": "success", "title": "PUT", "body": "/customers/verification/**otp:{otp}** \n\n###### *eg:* /customers/verification/**otp:345**" } [/block] [block:callout] { "type": "info", "body": "For UAT,\n1. OTP will not be sent to customer mobile number\n2. For testing, otp will be returned in resend otp api", "title": "Note" } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "success", "title": "PUT", "body": "/customers/verification/**otp:{otp}** \n\n###### *eg:* /customers/verification/**otp:345**" } [/block] [block:callout] { "type": "info", "body": "For UAT,\n1. OTP will not be sent to customer mobile number\n2. For testing, otp will be returned in resend otp api", "title": "Note" } [/block]
{"_id":"5aae3f4adb321a00125524c9","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-03-18T10:28:26.715Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"curl -X POST \\\n  https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:3000000026/otp \\\n  -H 'cache-control: no-cache' \\\n  -H 'content-type: application/x-www-form-urlencoded' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'postman-token: be1a4225-4a8b-cf14-1b43-f5eb81b7a84d' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593' \\\n  -d initiator_id=9910028267","language":"curl"},{"code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/x-www-form-urlencoded\");\nRequestBody body = RequestBody.create(mediaType, \"initiator_id=9910028267\");\nRequest request = new Request.Builder()\n  .url(\"https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:3000000026/otp\")\n  .post(body)\n  .addHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\")\n  .addHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\")\n  .addHeader(\"secret-key-timestamp\", \"1516705204593\")\n  .addHeader(\"content-type\", \"application/x-www-form-urlencoded\")\n  .addHeader(\"cache-control\", \"no-cache\")\n  .addHeader(\"postman-token\", \"c12c2f1a-f5bb-6b57-d3f0-50040f7879e3\")\n  .build();\n\nResponse response = client.newCall(request).execute();","language":"java"},{"code":"import http.client\n\nconn = http.client.HTTPSConnection(\"staging.eko.in:25004\")\n\npayload = \"initiator_id=9910028267\"\n\nheaders = {\n    'developer_key': \"becbbce45f79c6f5109f848acd540567\",\n    'secret-key': \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    'secret-key-timestamp': \"1516705204593\",\n    'content-type': \"application/x-www-form-urlencoded\",\n    'cache-control': \"no-cache\",\n    'postman-token': \"97298349-e572-a646-a7ce-5e9c5c4ff0a9\"\n    }\n\nconn.request(\"POST\", \"/ekoapi/v1/customers/mobile_number:3000000026/otp\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))","language":"python"},{"code":"var client = new RestClient(\"https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:3000000026/otp\");\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"postman-token\", \"7dce8831-5402-9b30-5866-316fd94a0b14\");\nrequest.AddHeader(\"cache-control\", \"no-cache\");\nrequest.AddHeader(\"content-type\", \"application/x-www-form-urlencoded\");\nrequest.AddHeader(\"secret-key-timestamp\", \"1516705204593\");\nrequest.AddHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\");\nrequest.AddHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\");\nrequest.AddParameter(\"application/x-www-form-urlencoded\", \"initiator_id=9910028267\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);","language":"csharp"},{"code":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:3000000026/otp');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders(array(\n  'postman-token' => '7775eb96-09c7-fbe8-e842-2d3f409e1642',\n  'cache-control' => 'no-cache',\n  'content-type' => 'application/x-www-form-urlencoded',\n  'secret-key-timestamp' => '1516705204593',\n  'secret-key' => 'MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=',\n  'developer_key' => 'becbbce45f79c6f5109f848acd540567'\n));\n\n$request->setContentType('application/x-www-form-urlencoded');\n$request->setPostFields(array(\n  'initiator_id' => '9910028267'\n));\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}","language":"php"}]},"settings":"","results":{"codes":[{"name":"For unverified Customers","code":"{\n\t\"message\":\"success! OTP processed\",\n\t\"response_type_id\":321,\n\t\"response_status_id\":0,\n\t\"status\":0,\n\t\"data\":\n\t\t\t\t{\n\t\t\t\t\t\"otp\":\"540\"\n\t\t\t\t}\n}\n","language":"json","status":200},{"name":"For already verified Customers","code":"{\n    \"response_status_id\": -1,\n    \"data\": {\n        \"mobile\": \"8877665545\"\n    },\n    \"response_type_id\": 322,\n    \"message\": \"Sender already registered\",\n    \"status\": 0\n}","language":"json","status":200},{"name":"Sample response for Indo-Nepal transaction","language":"text","code":"{\n\t\"message\": \"Wallet opened successfully.\",\n\t\"response_type_id\": 300, \n  \"response_status_id\": 0,\n\t\"status\": 0,\n\t\"data\": \n  \t{\n\t\t\t\"state\": \"3\",\n\t\t\t\"customer_id_type\": \"mobile_number\",\n      \"customer_id\": \"7010101969\",\n      \"state_desc\": \"KYC Verification Pending\"\n\t\t} \t\n}\n"},{"name":"For non existing Customers","status":200,"language":"json","code":"{\n    \"response_status_id\": 1,\n    \"invalid_params\": {\n        \"customer_id\": \"Merchant does not exist in System\"\n    },\n    \"response_type_id\": -1,\n    \"message\": \"customer_id does not exist in system\",\n    \"status\": 463\n}"}]},"method":"post","auth":"required","params":[{"_id":"5a6f683546736c00632b49a3","ref":"","in":"path","required":true,"desc":"","default":"mobile_number","type":"string","name":"customer_id_type"},{"_id":"5a6f683546736c00632b49a0","ref":"","in":"body","required":true,"desc":"The unique cell number with which you are onboarded on Eko's platform","default":"","type":"string","name":"initiator_id"},{"_id":"5aacfc0709528100120b330c","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5aacfc0709528100120b330b","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5aacfc0709528100120b330a","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"},{"_id":"5aae40f31337c4001263fed6","ref":"","in":"path","required":true,"desc":"id of the customer; currently only mobile number of the customer can be used","default":"","type":"int","name":"customer_id"}],"url":"/customers/customer_id_type:customer_id/otp"},"isReference":false,"order":12,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"PUT\",\n  \"body\": \"/customers/{customer_id_type}:{customer_id}/otp \\n\\n###### *eg:*   /customers/mobile_number:9900887766/otp\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"For UAT,\\n1. OTP will not be sent to customer mobile number\\n2. For testing, otp will be returned in resend otp api\",\n  \"title\": \"Note\"\n}\n[/block]","excerpt":"Resend OTP to a customer for verifying his/her mobile number","slug":"resend-otp","type":"post","title":"Resend OTP","__v":11,"parentDoc":null,"childrenPages":[]}

postResend OTP

Resend OTP to a customer for verifying his/her mobile number

Path Params

customer_id_type:
required
stringmobile_number
customer_id:
required
integer
id of the customer; currently only mobile number of the customer can be used

Body Params

initiator_id:
required
string
The unique cell number with which you are onboarded on Eko's platform

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section
[block:callout] { "type": "success", "title": "PUT", "body": "/customers/{customer_id_type}:{customer_id}/otp \n\n###### *eg:* /customers/mobile_number:9900887766/otp" } [/block] [block:callout] { "type": "info", "body": "For UAT,\n1. OTP will not be sent to customer mobile number\n2. For testing, otp will be returned in resend otp api", "title": "Note" } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "success", "title": "PUT", "body": "/customers/{customer_id_type}:{customer_id}/otp \n\n###### *eg:* /customers/mobile_number:9900887766/otp" } [/block] [block:callout] { "type": "info", "body": "For UAT,\n1. OTP will not be sent to customer mobile number\n2. For testing, otp will be returned in resend otp api", "title": "Note" } [/block]
{"_id":"5c3dbb3b54e7a900138cf81b","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-01-15T10:51:39.034Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":13,"body":"Customer KYC can be done in 2 ways:\n1. Instant KYC via Aadhaar XML \n2. Offline Process via uploading KYC documents\n- The TAT for reviewing documents is 1 business day\n\nEndpoints for both methods are same","excerpt":"Upgrade customer KYC status and enable higher amount of transactions per month","slug":"customer-kyc","type":"basic","title":"Customer KYC","__v":0,"parentDoc":null,"childrenPages":[]}

Customer KYC

Upgrade customer KYC status and enable higher amount of transactions per month

Customer KYC can be done in 2 ways: 1. Instant KYC via Aadhaar XML 2. Offline Process via uploading KYC documents - The TAT for reviewing documents is 1 business day Endpoints for both methods are same
Customer KYC can be done in 2 ways: 1. Instant KYC via Aadhaar XML 2. Offline Process via uploading KYC documents - The TAT for reviewing documents is 1 business day Endpoints for both methods are same
{"_id":"5bdd634d066b8a001fbfe3e5","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5b878104b176670003e622e4","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-11-03T08:58:53.144Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"response_status_id\": 0,\n  \"response_type_id\": 214,\n  \"message\": \"Success ! Id Proof is updated in the system\",\n  \"status\": 0\n}","name":null},{"name":"Name Change Response","language":"json","code":"{\n  \"response_status_id\": 0,\n  \"response_type_id\": 1387,\n  \"message\": \"OTP sent. Proceed with verification.\",\n  \"status\": 0\n}"}]},"settings":"","auth":"required","params":[{"_id":"5bdd6c0eea37cd003e8b231c","ref":"","in":"path","required":true,"desc":"Value = mobile_number","default":"","type":"string","name":"customer_id_type"},{"_id":"5bdd6c0eea37cd003e8b231b","ref":"","in":"path","required":true,"desc":"id of the customer; currently only mobile number of the customer can be used","default":"","type":"int","name":"customer_id"},{"_id":"5bdd74f7e05af1003879dd8c","ref":"","in":"body","required":true,"desc":"Name of the customer as per ID proof","default":"","type":"string","name":"name"},{"_id":"5bdd74f7e05af1003879dd8b","ref":"","in":"body","required":true,"desc":"The unique cell number with which you are on-boarded on Eko's platform","default":"","type":"int","name":"initiator_id"},{"_id":"5bdd74f7e05af1003879dd80","ref":"","in":"body","required":true,"desc":"Refer to below table. This needs to be send for doing KYC of Customer.","default":"","type":"int","name":"id_proof_type_id"},{"_id":"5bdd74f7e05af1003879dd7f","ref":"","in":"body","required":true,"desc":"Id Proof number. This needs to be send for doing KYC of Customer. You have to pass only Aadhaar card number in this parameter always.","default":"","type":"string","name":"id_proof"},{"_id":"5c7524278a14b00020bdf13f","ref":"","in":"body","required":true,"desc":"Refer to the table below. This needs to be send for doing KYC of Customer","default":"","type":"int","name":"ovd_type_id"},{"_id":"5c7524278a14b00020bdf13e","ref":"","in":"body","required":true,"desc":"OVD (other valid documents) proof number. This needs to be send for doing KYC of Customer. You need to send the front image of the OVD. If using the PAN Card as the OVD only front image need to be passed.","default":"","type":"string","name":"ovd_number"},{"_id":"5bdd74f7e05af1003879dd7e","ref":"","in":"body","required":true,"desc":"This will be front image of the id proof. This needs to be send for doing customer's KYC.","default":"","type":"file","name":"file1(front)"},{"_id":"5bdd74f7e05af1003879dd7d","ref":"","in":"body","required":true,"desc":"This will be back image of the id proof. This needs to be send for doing customer's KYC.","default":"","type":"file","name":"file2(back)"},{"_id":"5bdd74f7e05af1003879dd7c","ref":"","in":"body","required":true,"desc":"Photo of the Customer. This needs to be send for doing customer's KYC","default":"","type":"file","name":"customer_photo"},{"_id":"5c7524278a14b00020bdf13c","ref":"","in":"body","required":true,"desc":"Image of the OVD( Other Valid Document)","default":"","type":"file","name":"ovd_image"},{"_id":"5c783cf2a9efee0063683268","ref":"","in":"body","required":false,"desc":"Image of the OVD( Other Valid Document back). This parameter needs to be only passed when you are sending the OVD any other than pan card. In this parameter back image of the OVD has to be passed.","default":"","type":"file","name":"ovd_image_back"},{"_id":"5c3dbef3c5b3cf0063b2d949","ref":"","in":"body","required":false,"desc":"This parameter value is required if customer wants to change his name according to his id proof; Value of this parameter will be the new name of the customer","default":"","type":"string","name":"customer_name_as_id"},{"_id":"5c7524278a14b00020bdf13d","ref":"","in":"body","required":false,"desc":"form_60 image if you are not passing the PAN card number in the ovd_type_id and ovd_number","default":"","type":"file","name":"form_60"},{"_id":"5bdd74f7e05af1003879dd7b","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5bdd74f7e05af1003879dd7a","ref":"","in":"header","required":true,"desc":"[refer to authentication section](https://developers.eko.in/docs/authentication)","default":"","type":"string","name":"secret-key"},{"_id":"5bdd74f6e05af1003879dd79","ref":"","in":"header","required":true,"desc":"[refer to authentication section](https://developers.eko.in/docs/authentication)","default":"","type":"string","name":"secret-key-timestamp"}],"url":"/customers/customer_id_type:customer_id","examples":{"codes":[{"code":"curl -X PUT \\\n  https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:8465156465 \\\n -H 'cache-control: no-cache' \\\n -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \\\n -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n -H 'postman-token: e6c7603d-2fe4-5687-9d5b-1f6d00f919c2' \\\n -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n -H 'secret-key-timestamp: 1516705204593' \\\n -F 'form-data=initiator_id=9910028267&id_proof_type_id=15&id_proof=123456789119&name=Eko&ovd_type_id=4&ovd_number=AOYPM2624P&file1&file2' \\\n -F 'customer_photo=@Screenshot from 2018-10-26 12-33-59.png' \\\n -F 'file1=@Screenshot from 2018-10-26 12-33-59.png' \\\n -F 'file2=@Screenshot from 2018-10-26 12-33-59.png' \\\n -F 'form_60=@/home/gaurav/Pictures/form60.png' \\\n -F 'ovd_image=@/home/gaurav/Pictures/pan.jpeg'  \\\n -F 'ovd_image_back=@/home/gaurav/Pictures/ovdback.jpeg'","language":"curl"},{"code":"<?php\n \n$file1 = \"C:\\\\Users\\\\Aditya\\\\Desktop\\\\payatozsearchcustomer.PNG\";\n$file2 = \"C:\\\\Users\\\\Aditya\\\\Desktop\\\\payatozsearchcustomer.PNG\";\n$file3 = \"C:\\\\Users\\\\Aditya\\\\Desktop\\\\payatozsearchcustomer.PNG\";\n$file4 = \"C:\\\\Users\\\\Aditya\\\\Desktop\\\\payatozsearchcustomer.PNG\";\n$cfile1 = new CURLFile(realpath($file1));\n$cfile2 = new CURLFile(realpath($file2));\n$cfile3 = new CURLFile(realpath($file3));\n$cfile4 = new CURLFile(realpath($file4));\n$post = array (\n  'file1' => $cfile1,\n  'file2' => $cfile2,\n  'customer_photo' => $cfile3,\n  'ovd_image' => $cfile4 ,\n  'form-data' => 'initiator_id=9910028267&id_proof_type_id=15&id_proof=123456789117&name=Test&ovd_type_id=4&ovd_number=AOYPM2624w&file1&file2&customer_photo',\n);\n\n$ch = curl_init();\ncurl_setopt($ch, CURLOPT_URL, \"https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:8800776655\");\ncurl_setopt($ch, CURLOPT_PORT, \"25004\");\ncurl_setopt($ch, CURLOPT_POST, 1);\ncurl_setopt($ch, CURLOPT_HEADER, 0);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \ncurl_setopt($ch, CURLOPT_HTTPHEADER,array(\n    'Content-Type: multipart/form-data',\n    'developer_key: becbbce45f79c6f5109f848acd540567',\n    'secret-key:MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=',\n    'secret-key-timestamp:1516705204593'\n    ));\ncurl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);   \ncurl_setopt($ch, CURLOPT_FORBID_REUSE, 1);  \ncurl_setopt($ch, CURLOPT_TIMEOUT, 100);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n$result = curl_exec ($ch);\nif ($result === FALSE) {\n\techo \"Error sending\" . curl_error($ch);\n    curl_close ($ch);\n}else{\n    curl_close ($ch);\n    echo $result;\n}\n\n//Please make sure that you are passing the complete path of the image from your localsystem not URL. Passing of URL will not work.","language":"php"},{"language":"csharp","code":"\nvar client = new RestClient(\"https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:8800776655\");\n\n            var request = new RestRequest(Method.PUT);\n\n            request.AddHeader(\"Postman-Token\", \"2db70006-be1d-47ad-bddd-2eb19b026b56\");\n\n            request.AddHeader(\"cache-control\", \"no-cache\");\n\n            request.AddHeader(\"secret-key-timestamp\", \"1516705204593\");\n\n            request.AddHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\");\n\n            request.AddHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\");\n\n            request.AddHeader(\"Content-Type\", \"application/x-www-form-urlencoded\");\n\n            request.AddParameter(\"form-data\", \"initiator_id=9910028267&id_proof_type_id=15&id_proof=123456789117&name=Test&ovd_type_id=4&ovd_number=AOYPM2624w&file1&file2&customer_photo\");\n\n            request.AddFile(\"file1\", Server.MapPath(\"../Image/\") + \"Default.jpg\");\n\n            request.AddFile(\"file2\", Server.MapPath(\"../Image/\") + \"Default.jpg\");\n\n            request.AddFile(\"customer_photo\", Server.MapPath(\"../Image/\") + \"Default.jpg\");\n\t\t\t\n\t\t\trequest.AddFile(\"ovd_image\", Server.MapPath(\"../Image/\") + \"Default.jpg\");\n\n            IRestResponse response = client.Execute(request);\n\n            string str = response.Content;\n\n            return str;\n\n\n//Note : Rest Sharp version must be 104.1.0. This is a sample code, any changes in the code have to be handled at your end only."}]},"method":"put"},"isReference":false,"order":14,"body":"Parameter id_proof_type_id can have the following values:\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"id_proof_type_id\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"15\",\n    \"0-1\": \"Aadhaar Card\",\n    \"h-2\": \"id_proof\",\n    \"0-2\": \"Aadhaar Card - Aadhaar Card Number\"\n  },\n  \"cols\": 3,\n  \"rows\": 1\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"ovd_type_id\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"ovd_number\",\n    \"0-0\": \"2\",\n    \"1-0\": \"3\",\n    \"2-0\": \"4\",\n    \"3-0\": \"6\",\n    \"0-1\": \"PASSPORT\",\n    \"0-2\": \"Passport Number\",\n    \"1-1\": \"VOTER ID\",\n    \"1-2\": \"Voter ID Number\",\n    \"2-1\": \"PAN CARD\",\n    \"2-2\": \"Pan Card Number\",\n    \"3-1\": \"DRIVING LICENSE\",\n    \"3-2\": \"Driving License Number\",\n    \"4-0\": \"14\",\n    \"4-1\": \"MGNREGA\",\n    \"4-2\": \"MGNREGA Number\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note :\",\n  \"body\": \"You have to pass the Aadhaar card number as mandatory in the id_proof parameter. In the ovd_type_id if you pass the PAN card then you not need to send the form 60 otherwise if you are selecting any other OVD like passport, voter id or driving license then you need to send the image of form 60 in the form_60 parameter.\\n\\nIf you are sending the OVD as PAN card then you need to only send the front image of the pan card in the ovd_image parameter. If you are passing any other document in the OVD then you need to send the front image in the ovd_image parameter and back image in ovd_image_back.\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/e2f94e1-KYC_Image.jpeg\",\n        \"KYC Image.jpeg\",\n        794,\n        1123,\n        \"#35c5b9\"\n      ],\n      \"caption\": \"Format of the documents required. If you have selected for Pan card in the OVD then the image should be OSV and similarly if any other OVD has been selected then the OSV should also be there.\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/3559431-Form_60.PNG\",\n        \"Form_60.PNG\",\n        792,\n        590,\n        \"#343433\"\n      ],\n      \"caption\": \"Form_60 Format\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/00db52e-Form_60_continued.PNG\",\n        \"Form_60_continued.PNG\",\n        679,\n        408,\n        \"#41413f\"\n      ],\n      \"caption\": \"Form_60 format\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note :\",\n  \"body\": \"It will take a maximum of 1 business day for the approval of KYC. You need to call Get Customer Information API to check whether the customer has been approved for the KYC or not. By checking the** \\\"state\\\"** parameter you will get to know about the status for the KYC. If the KYC has been rejected due to some reason you will get the reason in the **\\\"state_desc\\\"** parameter in the Get Customer Information API itself. \"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note:\",\n  \"body\": \"After the customer has been marked as KYC customer, his total limit will be increased up to Rs 74,500. First Rs 49,500 will be transferred from the PPI wallet and next Rs 25,000 will be transferred from the BC_pipe.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note:\",\n  \"body\": \"1. If the customer intends to change the name in his profile according to his id proof then the new name needs to be passed in the parameter \\\"*customer_name_as_id*\\\".\\n2. If the new name does not match with the old name then an OTP will be sent to the customer's mobile number\\n3. Name will be changed only when the OTP entered is correct in \\\"Name Change Verification\\\" API and Eko's back-end team approves the id and address proof.\"\n}\n[/block]","excerpt":"Do customer KYC via upload of documents","slug":"create-customer-for-kyc","type":"put","title":"Manual Customer KYC","__v":64,"parentDoc":null,"childrenPages":[]}

putManual Customer KYC

Do customer KYC via upload of documents

Path Params

customer_id_type:
required
string
Value = mobile_number
customer_id:
required
integer
id of the customer; currently only mobile number of the customer can be used

Body Params

name:
required
string
Name of the customer as per ID proof
initiator_id:
required
integer
The unique cell number with which you are on-boarded on Eko's platform
id_proof_type_id:
required
integer
Refer to below table. This needs to be send for doing KYC of Customer.
id_proof:
required
string
Id Proof number. This needs to be send for doing KYC of Customer. You have to pass only Aadhaar card number in this parameter always.
ovd_type_id:
required
integer
Refer to the table below. This needs to be send for doing KYC of Customer
ovd_number:
required
string
OVD (other valid documents) proof number. This needs to be send for doing KYC of Customer. You need to send the front image of the OVD. If using the PAN Card as the OVD only front image need to be passed.
file1:
required
file
This will be front image of the id proof. This needs to be send for doing customer's KYC.
file2:
required
file
This will be back image of the id proof. This needs to be send for doing customer's KYC.
customer_photo:
required
file
Photo of the Customer. This needs to be send for doing customer's KYC
ovd_image:
required
file
Image of the OVD( Other Valid Document)
ovd_image_back:
file
Image of the OVD( Other Valid Document back). This parameter needs to be only passed when you are sending the OVD any other than pan card. In this parameter back image of the OVD has to be passed.
customer_name_as_id:
string
This parameter value is required if customer wants to change his name according to his id proof; Value of this parameter will be the new name of the customer
form_60:
file
form_60 image if you are not passing the PAN card number in the ovd_type_id and ovd_number

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
[refer to authentication section](https://developers.eko.in/docs/authentication)
secret-key-timestamp:
required
string
[refer to authentication section](https://developers.eko.in/docs/authentication)
Parameter id_proof_type_id can have the following values: [block:parameters] { "data": { "h-0": "id_proof_type_id", "h-1": "Description", "0-0": "15", "0-1": "Aadhaar Card", "h-2": "id_proof", "0-2": "Aadhaar Card - Aadhaar Card Number" }, "cols": 3, "rows": 1 } [/block] [block:parameters] { "data": { "h-0": "ovd_type_id", "h-1": "Description", "h-2": "ovd_number", "0-0": "2", "1-0": "3", "2-0": "4", "3-0": "6", "0-1": "PASSPORT", "0-2": "Passport Number", "1-1": "VOTER ID", "1-2": "Voter ID Number", "2-1": "PAN CARD", "2-2": "Pan Card Number", "3-1": "DRIVING LICENSE", "3-2": "Driving License Number", "4-0": "14", "4-1": "MGNREGA", "4-2": "MGNREGA Number" }, "cols": 3, "rows": 5 } [/block] [block:callout] { "type": "info", "title": "Note :", "body": "You have to pass the Aadhaar card number as mandatory in the id_proof parameter. In the ovd_type_id if you pass the PAN card then you not need to send the form 60 otherwise if you are selecting any other OVD like passport, voter id or driving license then you need to send the image of form 60 in the form_60 parameter.\n\nIf you are sending the OVD as PAN card then you need to only send the front image of the pan card in the ovd_image parameter. If you are passing any other document in the OVD then you need to send the front image in the ovd_image parameter and back image in ovd_image_back." } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/e2f94e1-KYC_Image.jpeg", "KYC Image.jpeg", 794, 1123, "#35c5b9" ], "caption": "Format of the documents required. If you have selected for Pan card in the OVD then the image should be OSV and similarly if any other OVD has been selected then the OSV should also be there." } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/3559431-Form_60.PNG", "Form_60.PNG", 792, 590, "#343433" ], "caption": "Form_60 Format" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/00db52e-Form_60_continued.PNG", "Form_60_continued.PNG", 679, 408, "#41413f" ], "caption": "Form_60 format" } ] } [/block] [block:callout] { "type": "info", "title": "Note :", "body": "It will take a maximum of 1 business day for the approval of KYC. You need to call Get Customer Information API to check whether the customer has been approved for the KYC or not. By checking the** \"state\"** parameter you will get to know about the status for the KYC. If the KYC has been rejected due to some reason you will get the reason in the **\"state_desc\"** parameter in the Get Customer Information API itself. " } [/block] [block:callout] { "type": "info", "title": "Note:", "body": "After the customer has been marked as KYC customer, his total limit will be increased up to Rs 74,500. First Rs 49,500 will be transferred from the PPI wallet and next Rs 25,000 will be transferred from the BC_pipe." } [/block] [block:callout] { "type": "info", "title": "Note:", "body": "1. If the customer intends to change the name in his profile according to his id proof then the new name needs to be passed in the parameter \"*customer_name_as_id*\".\n2. If the new name does not match with the old name then an OTP will be sent to the customer's mobile number\n3. Name will be changed only when the OTP entered is correct in \"Name Change Verification\" API and Eko's back-end team approves the id and address proof." } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



Parameter id_proof_type_id can have the following values: [block:parameters] { "data": { "h-0": "id_proof_type_id", "h-1": "Description", "0-0": "15", "0-1": "Aadhaar Card", "h-2": "id_proof", "0-2": "Aadhaar Card - Aadhaar Card Number" }, "cols": 3, "rows": 1 } [/block] [block:parameters] { "data": { "h-0": "ovd_type_id", "h-1": "Description", "h-2": "ovd_number", "0-0": "2", "1-0": "3", "2-0": "4", "3-0": "6", "0-1": "PASSPORT", "0-2": "Passport Number", "1-1": "VOTER ID", "1-2": "Voter ID Number", "2-1": "PAN CARD", "2-2": "Pan Card Number", "3-1": "DRIVING LICENSE", "3-2": "Driving License Number", "4-0": "14", "4-1": "MGNREGA", "4-2": "MGNREGA Number" }, "cols": 3, "rows": 5 } [/block] [block:callout] { "type": "info", "title": "Note :", "body": "You have to pass the Aadhaar card number as mandatory in the id_proof parameter. In the ovd_type_id if you pass the PAN card then you not need to send the form 60 otherwise if you are selecting any other OVD like passport, voter id or driving license then you need to send the image of form 60 in the form_60 parameter.\n\nIf you are sending the OVD as PAN card then you need to only send the front image of the pan card in the ovd_image parameter. If you are passing any other document in the OVD then you need to send the front image in the ovd_image parameter and back image in ovd_image_back." } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/e2f94e1-KYC_Image.jpeg", "KYC Image.jpeg", 794, 1123, "#35c5b9" ], "caption": "Format of the documents required. If you have selected for Pan card in the OVD then the image should be OSV and similarly if any other OVD has been selected then the OSV should also be there." } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/3559431-Form_60.PNG", "Form_60.PNG", 792, 590, "#343433" ], "caption": "Form_60 Format" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/00db52e-Form_60_continued.PNG", "Form_60_continued.PNG", 679, 408, "#41413f" ], "caption": "Form_60 format" } ] } [/block] [block:callout] { "type": "info", "title": "Note :", "body": "It will take a maximum of 1 business day for the approval of KYC. You need to call Get Customer Information API to check whether the customer has been approved for the KYC or not. By checking the** \"state\"** parameter you will get to know about the status for the KYC. If the KYC has been rejected due to some reason you will get the reason in the **\"state_desc\"** parameter in the Get Customer Information API itself. " } [/block] [block:callout] { "type": "info", "title": "Note:", "body": "After the customer has been marked as KYC customer, his total limit will be increased up to Rs 74,500. First Rs 49,500 will be transferred from the PPI wallet and next Rs 25,000 will be transferred from the BC_pipe." } [/block] [block:callout] { "type": "info", "title": "Note:", "body": "1. If the customer intends to change the name in his profile according to his id proof then the new name needs to be passed in the parameter \"*customer_name_as_id*\".\n2. If the new name does not match with the old name then an OTP will be sent to the customer's mobile number\n3. Name will be changed only when the OTP entered is correct in \"Name Change Verification\" API and Eko's back-end team approves the id and address proof." } [/block]
{"_id":"5c650fb9244bda0032050b90","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5b878104b176670003e622e4","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-02-14T06:50:33.331Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"put","examples":{"codes":[{"language":"curl","code":"curl -X PUT \\\n https://staging.eko.in:25004/ekoapi/v1/customers/product:changename/verification/otp:3342 \\\n -H 'Cache-Control: no-cache' \\\n -H 'Content-Type: application/x-www-form-urlencoded' \\\n -H 'Postman-Token: 45ab689f-fc17-4bca-aae2-efbcd73788f2' \\\n -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n -H 'secret-key-timestamp: 1516705204593' \\\n -d 'initiator_id=9910028267&id_type=mobile_number&id=9237392939'"}]},"results":{"codes":[{"status":200,"language":"json","code":"{ \n  \"response_status_id\": 0,\n   \"response_type_id\": 214,\n   \"message\": \"Success ! Id Proof is updated in the system\",\n   \"status\": 0\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[{"_id":"5c650fb9244bda0032050b97","ref":"","in":"path","required":true,"desc":"OTP received on customer mobile","default":"","type":"int","name":"otp"},{"_id":"5c650fb9244bda0032050b96","ref":"","in":"body","required":true,"desc":"The unique cell number with which you are on-boarded on Eko's platform","default":"","type":"int","name":"initiator_id"},{"_id":"5c650fb9244bda0032050b95","ref":"","in":"body","required":true,"desc":"This should be fixed as mobile_number","default":"mobile_number","type":"string","name":"id_type"},{"_id":"5c650fb9244bda0032050b94","ref":"","in":"body","required":true,"desc":"Mobile number of the customer","default":"","type":"int","name":"id"},{"_id":"5c650fb9244bda0032050b93","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5c650fb9244bda0032050b92","ref":"","in":"header","required":true,"desc":"refer to authentication section [https://developers.eko.in/docs/authentication]","default":"","type":"string","name":"secret-key"},{"_id":"5c650fb9244bda0032050b91","ref":"","in":"header","required":false,"desc":"refer to authentication section [https://developers.eko.in/docs/authentication]","default":"","type":"string","name":"secret-key-timestamp"}],"url":"/customers/id_type:id/product:changename/verification/otp:otp"},"isReference":false,"order":15,"body":"","excerpt":"Allows the name change when the customer is doing the manual KYC using the Manual Customer KYC API. \nThis API will do the verification if the name you have entered in the manual KYC API is different from the existing customer name and you have to send the OTP in this API which customer have received on the mobile number which was entered at the time of manual KYC.","slug":"name-change-verification-api","type":"put","title":"Name Change Verification API","__v":2,"parentDoc":null,"childrenPages":[]}

putName Change Verification API

Allows the name change when the customer is doing the manual KYC using the Manual Customer KYC API. This API will do the verification if the name you have entered in the manual KYC API is different from the existing customer name and you have to send the OTP in this API which customer have received on the mobile number which was entered at the time of manual KYC.

Path Params

otp:
required
integer
OTP received on customer mobile

Body Params

initiator_id:
required
integer
The unique cell number with which you are on-boarded on Eko's platform
id_type:
required
stringmobile_number
This should be fixed as mobile_number
id:
required
integer
Mobile number of the customer

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section [https://developers.eko.in/docs/authentication]
secret-key-timestamp:
string
refer to authentication section [https://developers.eko.in/docs/authentication]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"5c41656697ec51004579ccc1","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5b878104b176670003e622e4","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-01-18T05:34:30.144Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"post","examples":{"codes":[{"language":"curl","code":"curl -X POST \\\n  https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:9237392939/product:changename/otp \\\n  -H 'Content-Type: application/x-www-form-urlencoded' \\\n  -H 'Postman-Token: 33939863-b23b-4192-b9be-efe02bb740a2' \\\n  -H 'cache-control: no-cache' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'secret-key-timestamp: 1516705204593' \\\n  -d 'initiator_id=9910028267&customer_name_as_id=Virender'"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"response_status_id\": 0,\n    \"data\": {\n        \"otp\": \"7394\"\n    },\n    \"response_type_id\": 1391,\n    \"message\": \"OTP resent.\",\n    \"status\": 0\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[{"_id":"5c416a9142608b002475f65b","ref":"","in":"path","required":true,"desc":"This should be fixed as mobile_number","default":"","type":"string","name":"id_type"},{"_id":"5c416a9142608b002475f65a","ref":"","in":"path","required":true,"desc":"Mobile number of the customer","default":"","type":"int","name":"id"},{"_id":"5c416a9142608b002475f659","ref":"","in":"body","required":true,"desc":"The unique cell number with which you are on-boarded on Eko's platform","default":"","type":"int","name":"initiator_id"},{"_id":"5c416a9142608b002475f657","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5c416ad2828e510029bcf1c2","ref":"","in":"header","required":true,"desc":"refer to authentication section [https://developers.eko.in/docs/authentication]","default":"","type":"string","name":"secret-key"},{"_id":"5c416ad2828e510029bcf1c1","ref":"","in":"header","required":true,"desc":"refer to authentication section [https://developers.eko.in/docs/authentication]","default":"","type":"string","name":"secret-key-timestamp"}],"url":"/customers/id_type:id/product:changename/otp"},"isReference":false,"order":16,"body":"","excerpt":"Resends the OTP for the name change verification","slug":"resend-otp-for-name-change-verification","type":"post","title":"Resend OTP for Name Change Verification","__v":4,"parentDoc":null,"childrenPages":[]}

postResend OTP for Name Change Verification

Resends the OTP for the name change verification

Path Params

id_type:
required
string
This should be fixed as mobile_number
id:
required
integer
Mobile number of the customer

Body Params

initiator_id:
required
integer
The unique cell number with which you are on-boarded on Eko's platform

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section [https://developers.eko.in/docs/authentication]
secret-key-timestamp:
required
string
refer to authentication section [https://developers.eko.in/docs/authentication]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"5c3dbd1c0e7b78000e7fded3","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-01-15T10:59:40.273Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[{"name":"","code":"{\n  \"response_status_id\": 0,\n    \"response_type_id\": 1354,\n    \"message\": \"KYC approved\",\n    \"status\": 0\n}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"examples":{"codes":[{"language":"curl","code":"curl -X PUT \\\n  https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:8588097380 \\\n  -H 'cache-control: no-cache' \\\n  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'postman-token: 98c1ceeb-19ca-62bb-36b4-2bd59fa729e0' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593' \\\n  -F 'form-data=initiator_id=9910028267&aadhaar_xml_password=VIR124113u&kyc_option=2&Offlineaadhaar20181126120024846.zip&ovd_type_id=4&ovd_number=AOYPM2624P' \\\n  -F 'zip_file=@Offlineaadhaar20181126120024846.zip' \\\n  -F 'ovd_image=@/home/gaurav/Pictures/back.jpeg' \\\n  -F 'form_60=@/home/gaurav/Pictures/form60.png'   \\\n  -F 'ovd_image_back=@/home/gaurav/Pictures/ovdback.jpeg'"},{"language":"php","code":"<?php\n \n//$file1 = \"C:\\\\Users\\\\Aditya\\\\Desktop\\\\payatozsearchcustomer.PNG\";\n$file2 = \"C:\\\\Users\\\\Aditya\\\\Desktop\\\\payatozsearchcustomer.PNG\";\n$file3 = \"C:\\Users\\Aditya\\Downloads\\Offlineaadhaar20181126120024846.zip\";\n//$cfile1 = new CURLFile(realpath($file1));\n$cfile2 = new CURLFile(realpath($file2));\n$cfile3 = new CURLFile(realpath($file3));\n$post = array (\n // 'file1' => $cfile1,\n  'ovd_image' => $cfile2,\n  'zip_file' => $cfile3,\n  'form-data' => 'initiator_id=9910028267&aadhaar_xml_password=VIR124113u&kyc_option=2&file_name=Offlineaadhaar20181126120024846.zip&ovd_type_id=4&ovd_number=AOYPM2624F',\n);\n\n$ch = curl_init();\ncurl_setopt($ch, CURLOPT_URL, \"https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:8588097380\");\ncurl_setopt($ch, CURLOPT_PORT, \"25004\");\ncurl_setopt($ch, CURLOPT_POST, 1);\ncurl_setopt($ch, CURLOPT_HEADER, 0);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \ncurl_setopt($ch, CURLOPT_HTTPHEADER,array(\n    'Content-Type: multipart/form-data',\n    'developer_key: becbbce45f79c6f5109f848acd540567',\n    'secret-key:MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=',\n    'secret-key-timestamp:1516705204593',\n    ));\ncurl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);   \ncurl_setopt($ch, CURLOPT_FORBID_REUSE, 1);  \ncurl_setopt($ch, CURLOPT_TIMEOUT, 100);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');\n$result = curl_exec ($ch);\nif ($result === FALSE) {\n\techo \"Error sending\" . curl_error($ch);\n    curl_close ($ch);\n}else{\n    curl_close ($ch);\n    echo $result;\n}\n\n//Please make sure that you are passing the complete path of the image and Zip file from your localsystem not URL. Passing of URL will not work."}]},"method":"put","auth":"required","params":[{"_id":"5c37210010a4f6424485dd62","ref":"","in":"path","required":true,"desc":"value : mobile_number","default":"","type":"string","name":"customer_id_type"},{"_id":"5c37210010a4f6424485dd61","ref":"","in":"path","required":true,"desc":"id of the customer; currently only mobile number of the customer can be used. This mobile number should be same as of mobile number which is linked with aadhaar.","default":"","type":"int","name":"customer_id"},{"_id":"5c37210010a4f6424485dd60","ref":"","in":"body","required":true,"desc":"The unique cell number with which you are on-boarded on Eko's platform","default":"","type":"int","name":"initiator_id"},{"_id":"5c37210010a4f6424485dd5f","ref":"","in":"body","required":true,"desc":"share code set by customer on the uidai website","default":"","type":"string","name":"aadhaar_xml_password"},{"_id":"5c763f6a324fcd002949063a","ref":"","in":"body","required":true,"desc":"Refer to the table below.","default":"","type":"int","name":"ovd_type_id"},{"_id":"5c763fa351aaf700135c2321","ref":"","in":"body","required":true,"desc":"OVD (other valid documents) proof number","default":"","type":"string","name":"ovd_number"},{"_id":"5c37210010a4f6424485dd5e","ref":"","in":"body","required":true,"desc":"value = 2","default":"","type":"int","name":"kyc_option"},{"_id":"5c382c3817403200199ba08a","ref":"","in":"body","required":true,"desc":"Zip file downloaded","default":"","type":"file","name":"Zip_file"},{"_id":"5c764039ce844f0043f9d265","ref":"","in":"body","required":true,"desc":"Image of the OVD( Other Valid Document). You need to send the front image of the OVD. If using the PAN Card as the OVD only front image need to be passed.","default":"","type":"file","name":"ovd_image"},{"_id":"5c783d0812ea2e00242d5fca","ref":"","in":"body","required":false,"desc":"Image of the OVD( Other Valid Document Back). This parameter needs to be only passed when you are sending the OVD any other than pan card. In this parameter back image of the OVD has to be passed.","default":"","type":"file","name":"ovd_image_back"},{"_id":"5c5542670acd61011a3c4dea","ref":"","in":"body","required":false,"desc":"Name of the zip file which has been downloaded from UIDAI","default":"optional","type":"string","name":"file_name"},{"_id":"5c7640782690d1004b449c50","ref":"","in":"body","required":false,"desc":"form_60 image if you are not passing the PAN card number in the ovd_type_id and ovd_number","default":"","type":"file","name":"form_60"},{"_id":"5c37210010a4f6424485dd5d","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5c37210010a4f6424485dd5c","ref":"","in":"header","required":true,"desc":"refer to authentication section [https://developers.eko.in/docs/authentication]","default":"","type":"string","name":"secret-key"},{"_id":"5c37210010a4f6424485dd5b","ref":"","in":"header","required":true,"desc":"refer to authentication section [https://developers.eko.in/docs/authentication]","default":"","type":"string","name":"secret-key-timestamp"}],"url":"/customers/customer_id_type:customer_id"},"isReference":false,"order":17,"body":"[block:api-header]\n{\n  \"title\": \"Process Flow for Manual KYC Using the Aadhaar XML\"\n}\n[/block]\nBelow is the flow process flow for doing the Aadhaar XML \n\n1) Re-direct your application to \"https://resident.uidai.gov.in/offlineaadhaar\"\n2) Enter customer's 12 digit Aadhaar Number and the security code displayed\n3) Click on \"Send OTP\" button; the customer will receive an OTP on the mobile number which is linked to his/her Aadhaar number \n4) The OTP needs to be entered and set the share code\n5) Click on download. A zip file will be downloaded on your desktop/laptop\n6) Pass this zip file along with share code (shared on UIDAI website) and other parameters in the \n    API. \n\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"\",\n  \"body\": \"The customer should already exist before using this API for doing the KYC.\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"ovd_type_id\",\n    \"0-0\": \"2\",\n    \"1-0\": \"3\",\n    \"2-0\": \"4\",\n    \"3-0\": \"6\",\n    \"h-1\": \"Description\",\n    \"0-1\": \"PASSPORT\",\n    \"1-1\": \"VOTER ID\",\n    \"2-1\": \"PAN CARD\",\n    \"3-1\": \"DRIVING LICENSE\",\n    \"h-2\": \"ovd_number\",\n    \"0-2\": \"Passport Number\",\n    \"1-2\": \"Voter ID Number\",\n    \"2-2\": \"Pan Card Number\",\n    \"3-2\": \"Driving License Number\",\n    \"4-0\": \"14\",\n    \"4-1\": \"MGNREGA\",\n    \"4-2\": \"MGNREGA Number\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note:\",\n  \"body\": \"In the ovd_type_id if you pass the PAN card then you not need to send the form 60 otherwise if you are selecting any other OVD like passport, voter id or driving license then you need to send the image of form 60 in the form_60 parameter.\\n\\nIf you are sending the OVD as PAN card then you need to only send the front image of the pan card in the ovd_image parameter. If you are passing any other document in the OVD then you need to send the front image in the ovd_image parameter and back image in ovd_image_back.\\n\\nYour OVD images should be OSV(Orginal seen and verified which means customer and merchant should verify their signature. Please find the format below.\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/0ff51b0-KYC_Image.jpeg\",\n        \"KYC Image.jpeg\",\n        794,\n        1123,\n        \"#35c5b9\"\n      ],\n      \"caption\": \"OSV format for OVD\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/f4211c1-Form_60.PNG\",\n        \"Form_60.PNG\",\n        792,\n        590,\n        \"#343433\"\n      ],\n      \"caption\": \"Form_60 format\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/315d7ec-Form_60_continued.PNG\",\n        \"Form_60_continued.PNG\",\n        679,\n        408,\n        \"#41413f\"\n      ],\n      \"caption\": \"Form_60 format\"\n    }\n  ]\n}\n[/block]","excerpt":"Allow KYC of customers using the XML file","slug":"instant-kyc-using-aadhaar-xml","type":"put","title":"Manual KYC using Aadhaar XML","__v":27,"parentDoc":null,"childrenPages":[]}

putManual KYC using Aadhaar XML

Allow KYC of customers using the XML file

Path Params

customer_id_type:
required
string
value : mobile_number
customer_id:
required
integer
id of the customer; currently only mobile number of the customer can be used. This mobile number should be same as of mobile number which is linked with aadhaar.

Body Params

initiator_id:
required
integer
The unique cell number with which you are on-boarded on Eko's platform
aadhaar_xml_password:
required
string
share code set by customer on the uidai website
ovd_type_id:
required
integer
Refer to the table below.
ovd_number:
required
string
OVD (other valid documents) proof number
kyc_option:
required
integer
value = 2
Zip_file:
required
file
Zip file downloaded
ovd_image:
required
file
Image of the OVD( Other Valid Document). You need to send the front image of the OVD. If using the PAN Card as the OVD only front image need to be passed.
ovd_image_back:
file
Image of the OVD( Other Valid Document Back). This parameter needs to be only passed when you are sending the OVD any other than pan card. In this parameter back image of the OVD has to be passed.
file_name:
stringoptional
Name of the zip file which has been downloaded from UIDAI
form_60:
file
form_60 image if you are not passing the PAN card number in the ovd_type_id and ovd_number

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section [https://developers.eko.in/docs/authentication]
secret-key-timestamp:
required
string
refer to authentication section [https://developers.eko.in/docs/authentication]
[block:api-header] { "title": "Process Flow for Manual KYC Using the Aadhaar XML" } [/block] Below is the flow process flow for doing the Aadhaar XML 1) Re-direct your application to "https://resident.uidai.gov.in/offlineaadhaar" 2) Enter customer's 12 digit Aadhaar Number and the security code displayed 3) Click on "Send OTP" button; the customer will receive an OTP on the mobile number which is linked to his/her Aadhaar number 4) The OTP needs to be entered and set the share code 5) Click on download. A zip file will be downloaded on your desktop/laptop 6) Pass this zip file along with share code (shared on UIDAI website) and other parameters in the API. [block:callout] { "type": "info", "title": "", "body": "The customer should already exist before using this API for doing the KYC." } [/block] [block:parameters] { "data": { "h-0": "ovd_type_id", "0-0": "2", "1-0": "3", "2-0": "4", "3-0": "6", "h-1": "Description", "0-1": "PASSPORT", "1-1": "VOTER ID", "2-1": "PAN CARD", "3-1": "DRIVING LICENSE", "h-2": "ovd_number", "0-2": "Passport Number", "1-2": "Voter ID Number", "2-2": "Pan Card Number", "3-2": "Driving License Number", "4-0": "14", "4-1": "MGNREGA", "4-2": "MGNREGA Number" }, "cols": 3, "rows": 5 } [/block] [block:callout] { "type": "info", "title": "Note:", "body": "In the ovd_type_id if you pass the PAN card then you not need to send the form 60 otherwise if you are selecting any other OVD like passport, voter id or driving license then you need to send the image of form 60 in the form_60 parameter.\n\nIf you are sending the OVD as PAN card then you need to only send the front image of the pan card in the ovd_image parameter. If you are passing any other document in the OVD then you need to send the front image in the ovd_image parameter and back image in ovd_image_back.\n\nYour OVD images should be OSV(Orginal seen and verified which means customer and merchant should verify their signature. Please find the format below." } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/0ff51b0-KYC_Image.jpeg", "KYC Image.jpeg", 794, 1123, "#35c5b9" ], "caption": "OSV format for OVD" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/f4211c1-Form_60.PNG", "Form_60.PNG", 792, 590, "#343433" ], "caption": "Form_60 format" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/315d7ec-Form_60_continued.PNG", "Form_60_continued.PNG", 679, 408, "#41413f" ], "caption": "Form_60 format" } ] } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:api-header] { "title": "Process Flow for Manual KYC Using the Aadhaar XML" } [/block] Below is the flow process flow for doing the Aadhaar XML 1) Re-direct your application to "https://resident.uidai.gov.in/offlineaadhaar" 2) Enter customer's 12 digit Aadhaar Number and the security code displayed 3) Click on "Send OTP" button; the customer will receive an OTP on the mobile number which is linked to his/her Aadhaar number 4) The OTP needs to be entered and set the share code 5) Click on download. A zip file will be downloaded on your desktop/laptop 6) Pass this zip file along with share code (shared on UIDAI website) and other parameters in the API. [block:callout] { "type": "info", "title": "", "body": "The customer should already exist before using this API for doing the KYC." } [/block] [block:parameters] { "data": { "h-0": "ovd_type_id", "0-0": "2", "1-0": "3", "2-0": "4", "3-0": "6", "h-1": "Description", "0-1": "PASSPORT", "1-1": "VOTER ID", "2-1": "PAN CARD", "3-1": "DRIVING LICENSE", "h-2": "ovd_number", "0-2": "Passport Number", "1-2": "Voter ID Number", "2-2": "Pan Card Number", "3-2": "Driving License Number", "4-0": "14", "4-1": "MGNREGA", "4-2": "MGNREGA Number" }, "cols": 3, "rows": 5 } [/block] [block:callout] { "type": "info", "title": "Note:", "body": "In the ovd_type_id if you pass the PAN card then you not need to send the form 60 otherwise if you are selecting any other OVD like passport, voter id or driving license then you need to send the image of form 60 in the form_60 parameter.\n\nIf you are sending the OVD as PAN card then you need to only send the front image of the pan card in the ovd_image parameter. If you are passing any other document in the OVD then you need to send the front image in the ovd_image parameter and back image in ovd_image_back.\n\nYour OVD images should be OSV(Orginal seen and verified which means customer and merchant should verify their signature. Please find the format below." } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/0ff51b0-KYC_Image.jpeg", "KYC Image.jpeg", 794, 1123, "#35c5b9" ], "caption": "OSV format for OVD" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/f4211c1-Form_60.PNG", "Form_60.PNG", 792, 590, "#343433" ], "caption": "Form_60 format" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/315d7ec-Form_60_continued.PNG", "Form_60_continued.PNG", 679, 408, "#41413f" ], "caption": "Form_60 format" } ] } [/block]
{"_id":"5a7301c2c037f5006b9c49bb","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-02-01T12:02:10.797Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":18,"body":"A recipient is someone to whom a customer can transfer money. To be able to transfer money, a customer must add a recipient using the recipient's bank-account or wallet details.\n\nUsing these APIs, you can create, delete and update recipients for your customers.\n\nEach recipient may have an associated wallet or bank account information (Account Number, IFSC) to be able to receive fund.\n[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"**IFSC is not required** to add a recipient for most banks. An account number is sufficient.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"A recipient is identified by\",\n  \"body\": \"**/recipients/{recipient_id_type}:{recipient_id}**\"\n}\n[/block]\nWhere, *recipient_id_type* could be:\n  * acc_bankcode: Account number + bank code. Only applicable when IMPS service is enabled for the bank and IFSC is not required    (eg: \"**acc_bankcode:12376598346_SBIN**\")\n\n  * acc_ifsc: Account number + IFSC code for banks where IFSC is mandatory  (eg: \"**acc_ifsc:980003598346_ALLG0009062**\")","excerpt":"","slug":"recipients","type":"basic","title":"Recipients","__v":0,"parentDoc":null,"childrenPages":[]}

Recipients


A recipient is someone to whom a customer can transfer money. To be able to transfer money, a customer must add a recipient using the recipient's bank-account or wallet details. Using these APIs, you can create, delete and update recipients for your customers. Each recipient may have an associated wallet or bank account information (Account Number, IFSC) to be able to receive fund. [block:callout] { "type": "success", "body": "**IFSC is not required** to add a recipient for most banks. An account number is sufficient." } [/block] [block:callout] { "type": "info", "title": "A recipient is identified by", "body": "**/recipients/{recipient_id_type}:{recipient_id}**" } [/block] Where, *recipient_id_type* could be: * acc_bankcode: Account number + bank code. Only applicable when IMPS service is enabled for the bank and IFSC is not required (eg: "**acc_bankcode:12376598346_SBIN**") * acc_ifsc: Account number + IFSC code for banks where IFSC is mandatory (eg: "**acc_ifsc:980003598346_ALLG0009062**")
A recipient is someone to whom a customer can transfer money. To be able to transfer money, a customer must add a recipient using the recipient's bank-account or wallet details. Using these APIs, you can create, delete and update recipients for your customers. Each recipient may have an associated wallet or bank account information (Account Number, IFSC) to be able to receive fund. [block:callout] { "type": "success", "body": "**IFSC is not required** to add a recipient for most banks. An account number is sufficient." } [/block] [block:callout] { "type": "info", "title": "A recipient is identified by", "body": "**/recipients/{recipient_id_type}:{recipient_id}**" } [/block] Where, *recipient_id_type* could be: * acc_bankcode: Account number + bank code. Only applicable when IMPS service is enabled for the bank and IFSC is not required (eg: "**acc_bankcode:12376598346_SBIN**") * acc_ifsc: Account number + IFSC code for banks where IFSC is mandatory (eg: "**acc_ifsc:980003598346_ALLG0009062**")
{"_id":"5548b0c2afc5ed0d00e1457a","link_external":false,"category":"556d914e42dd610d00a3cfc2","type":"get","user":"5547561a9a48800d00c6e483","createdAt":"2015-05-05T12:00:02.075Z","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","__v":87,"slug":"get-all-recipients","excerpt":"Get list of recipients for a customer","githubsync":"","hidden":false,"link_url":"","order":19,"sync_unique":"","api":{"auth":"required","params":[{"_id":"5a701967580a0c005721460c","ref":"","in":"path","required":true,"desc":"","default":"mobile_number","type":"string","name":"customer_id_type"},{"_id":"5a701967580a0c005721460b","ref":"","in":"path","required":true,"desc":"id of the customer; currently only mobile number of the customer can be used","default":"","type":"int","name":"customer_id"},{"_id":"5a701967580a0c005721460a","ref":"","in":"query","required":true,"desc":"The unique cell number with which you are onboarded on Eko's platform","default":"","type":"int","name":"initiator_id"},{"_id":"5a8ab315b01701001f3dcaf8","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5a8ab315b01701001f3dcaf7","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5a8ab315b01701001f3dcaf6","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"}],"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"response_status_id\": 0,\n    \"data\": {\n        \"pan_required\": 2,\n        \"recipient_list\": [\n            {\n                \"channel_absolute\": 0,\n                \"available_channel\": 0,\n                \"account_type\": \"Bank Account\",\n                \"ifsc_status\": 1,\n                \"is_self_account\": \"0\",\n                \"channel\": 0,\n                \"is_imps_scheduled\": 0,\n                \"recipient_id_type\": \"acc_ifsc\",\n                \"imps_inactive_reason\": \"\",\n                \"allowed_channel\": 0,\n                \"is_verified\": 1,\n                \"bank\": \"State Bank of India\",\n                \"is_otp_required\": \"0\",\n                \"recipient_mobile\": \"7268423424\",\n                \"recipient_name\": \"Rohit MR\",\n                \"ifsc\": \"SBIN0009062\",\n                \"account\": \"34712732131\",\n                \"pipes\": {\n                    \"3\": {\n                        \"pipe\": 3,\n                        \"status\": 3\n                    }\n                },\n                \"recipient_id\": 10009799,\n                \"is_rblbc_recipient\": 3,\n                \"recipient_info\": \"YES\"\n            }\n        ],\n        \"remaining_limit_before_pan_required\": 50000\n    },\n    \"response_type_id\": 23,\n    \"message\": \"Success\",\n    \"status\": 0\n}","name":"For Customers with Recipients"},{"status":200,"language":"json","code":"{\n    \"response_status_id\": -1,\n    \"response_type_id\": 22,\n    \"message\": \"No recepients found\",\n    \"status\": 0\n}","name":"For Customers with no Recipients"},{"name":"For non existing Customers","status":200,"code":"{\n    \"response_status_id\": 1,\n    \"invalid_params\": {\n        \"customer_id\": \"Merchant does not exist in System\"\n    },\n    \"response_type_id\": -1,\n    \"message\": \"customer_id does not exist in system\",\n    \"status\": 463\n}","language":"json"}]},"settings":"","url":"/customers/customer_id_type:customer_id/recipients","examples":{"codes":[{"language":"curl","code":"curl -X GET \\\n  'https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:3000000026/recipients?initiator_id=9910028267' \\\n  -H 'cache-control: no-cache' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593'"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nRequest request = new Request.Builder()\n  .url(\"https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:3000000026/recipients?initiator_id=9910028267\")\n  .get()\n  .addHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\")\n  .addHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\")\n  .addHeader(\"secret-key-timestamp\", \"1516705204593\")\n  .addHeader(\"cache-control\", \"no-cache\")\n  .build();\n\nResponse response = client.newCall(request).execute();"},{"language":"python","code":"import http.client\n\nconn = http.client.HTTPSConnection(\"staging.eko.in:25004\")\n\nheaders = {\n    'developer_key': \"becbbce45f79c6f5109f848acd540567\",\n    'secret-key': \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    'secret-key-timestamp': \"1516705204593\",\n    'cache-control': \"no-cache\",\n    }\n\nconn.request(\"GET\", \"/ekoapi/v1/customers/mobile_number:3000000026/recipients?initiator_id=9910028267\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"language":"csharp","code":"var client = new RestClient(\"https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:3000000026/recipients?initiator_id=9910028267\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"cache-control\", \"no-cache\");\nrequest.AddHeader(\"secret-key-timestamp\", \"1516705204593\");\nrequest.AddHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\");\nrequest.AddHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\");\nIRestResponse response = client.Execute(request);"},{"language":"php","code":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:3000000026/recipients');\n$request->setMethod(HTTP_METH_GET);\n\n$request->setQueryData(array(\n  'initiator_id' => '9910028267'\n));\n\n$request->setHeaders(array(\n  'cache-control' => 'no-cache',\n  'secret-key-timestamp' => '1516705204593',\n  'secret-key' => 'MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=',\n  'developer_key' => 'becbbce45f79c6f5109f848acd540567'\n));\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"}]},"method":"get"},"body":"**Response Parameters Description** \n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Parameter Name\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Use\",\n    \"0-0\": \"recipient_id\",\n    \"0-1\": \"Unique Id generated for each recipient\",\n    \"0-2\": \"You can map this recipient_id against each account as this will be required at the time of transaction\",\n    \"1-0\": \"available_channel\",\n    \"1-1\": \"Channels available for this recipient. IMPS or NEFT\\n\\nValues and Channels allowed.\\n0- Both NEFT and IMPS.\\n1- Only NEFT.\\n2- Only IMPS.\",\n    \"1-2\": \"You can enable disable the IMPS, NEFT option on your UI on the basis of the value of this parameter.\",\n    \"2-0\": \"is_verified\",\n    \"2-1\": \"If the recipient is verified from the bank or not\\n\\nValues and description\\n0- Not verified from bank\\n1- Verified from bank\",\n    \"2-2\": \"You can use this parameter to know if the recipient is verified from the bank or not.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"GET\",\n  \"body\": \"/customers/{customer_id_type}:{customer_id}/recipients\\n\\n###### *eg:*   /customers/**mobile_number:9876543210/recipients**\"\n}\n[/block]","title":"Get List of Recipients","updates":[],"isReference":false,"next":{"description":"","pages":[]},"parentDoc":null,"childrenPages":[]}

getGet List of Recipients

Get list of recipients for a customer

Path Params

customer_id_type:
required
stringmobile_number
customer_id:
required
integer
id of the customer; currently only mobile number of the customer can be used

Query Params

initiator_id:
required
integer
The unique cell number with which you are onboarded on Eko's platform

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section
**Response Parameters Description** [block:parameters] { "data": { "h-0": "Parameter Name", "h-1": "Description", "h-2": "Use", "0-0": "recipient_id", "0-1": "Unique Id generated for each recipient", "0-2": "You can map this recipient_id against each account as this will be required at the time of transaction", "1-0": "available_channel", "1-1": "Channels available for this recipient. IMPS or NEFT\n\nValues and Channels allowed.\n0- Both NEFT and IMPS.\n1- Only NEFT.\n2- Only IMPS.", "1-2": "You can enable disable the IMPS, NEFT option on your UI on the basis of the value of this parameter.", "2-0": "is_verified", "2-1": "If the recipient is verified from the bank or not\n\nValues and description\n0- Not verified from bank\n1- Verified from bank", "2-2": "You can use this parameter to know if the recipient is verified from the bank or not." }, "cols": 3, "rows": 3 } [/block] [block:callout] { "type": "success", "title": "GET", "body": "/customers/{customer_id_type}:{customer_id}/recipients\n\n###### *eg:* /customers/**mobile_number:9876543210/recipients**" } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



**Response Parameters Description** [block:parameters] { "data": { "h-0": "Parameter Name", "h-1": "Description", "h-2": "Use", "0-0": "recipient_id", "0-1": "Unique Id generated for each recipient", "0-2": "You can map this recipient_id against each account as this will be required at the time of transaction", "1-0": "available_channel", "1-1": "Channels available for this recipient. IMPS or NEFT\n\nValues and Channels allowed.\n0- Both NEFT and IMPS.\n1- Only NEFT.\n2- Only IMPS.", "1-2": "You can enable disable the IMPS, NEFT option on your UI on the basis of the value of this parameter.", "2-0": "is_verified", "2-1": "If the recipient is verified from the bank or not\n\nValues and description\n0- Not verified from bank\n1- Verified from bank", "2-2": "You can use this parameter to know if the recipient is verified from the bank or not." }, "cols": 3, "rows": 3 } [/block] [block:callout] { "type": "success", "title": "GET", "body": "/customers/{customer_id_type}:{customer_id}/recipients\n\n###### *eg:* /customers/**mobile_number:9876543210/recipients**" } [/block]
{"_id":"5548b0eaafc5ed0d00e1457c","hidden":false,"link_external":false,"slug":"get-recipient","title":"Get Recipient Details","updates":[],"user":"5547561a9a48800d00c6e483","type":"get","api":{"settings":"","url":"/customers/customer_id_type:customer_id/recipients/recipient_id::id","auth":"required","params":[{"_id":"5a701a29b0a014003695804a","ref":"","in":"path","required":true,"desc":"This is the unique recipient id that is returned when a recipient is added to the customer in Create recipient API","default":"","type":"int","name":"id"},{"_id":"5a701a29b0a0140036958049","ref":"","in":"query","required":true,"desc":"partner id from where the request has been initiated","default":"","type":"int","name":"initiator_id"},{"_id":"5a705021e64d90004cd3fa8a","ref":"","in":"path","required":false,"desc":"This parameter needs to be send for a India to Nepal remittance transaction","default":"indonepal","type":"string","name":"product"},{"_id":"5a8ab60413885d0039cd85b3","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5a8ab60413885d0039cd85b2","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5a8ab60413885d0039cd85b1","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"},{"_id":"5aa8c5a9947b01000f955946","ref":"","in":"path","required":true,"desc":"","default":"mobile_number","type":"string","name":"customer_id_type"},{"_id":"5aa8c5a9947b01000f955945","ref":"","in":"path","required":true,"desc":"id of the customer; currently only mobile number of the customer can be used","default":"","type":"string","name":"customer_id"}],"results":{"codes":[{"language":"json","status":200,"name":"If Recipient exists","code":"{\n    \"response_status_id\": -1,\n    \"data\": {\n        \"name\": \"Rohit MR\",\n        \"recipient_id_type\": \"recipient_id\",\n        \"ifsc\": \"SBIN0009062\",\n        \"is_verified\": \"0\",\n        \"account\": \"61046336411\",\n        \"pipes\": {\n            \"3\": {\n                \"pipe\": 3,\n                \"status\": 1\n            }\n        },\n        \"recipient_id\": 10002921\n    },\n    \"response_type_id\": 18,\n    \"message\": \"SUCCESS\",\n    \"status\": 0\n}"},{"code":"{\n    \"response_status_id\": 1,\n    \"data\": {\n        \"pipes\": {}\n    },\n    \"response_type_id\": 19,\n    \"message\": \"Failed! no registered recipient found\",\n    \"status\": 19\n}","language":"json","status":200,"name":"If Recipient does not exist"},{"code":"{\n\"message\":\"Recipient(s) found for this sender\", \"response_type_id\":1017, \"response_status_id\":-1,\n\"status\":0,\n\"data\":{\n\t\t\t\t\"user_profile_list\":[\n        \t\t{\n\t\t\t\t\t\t\"bank_name\":null, \n            \"address_line1\":null, \n            \"payment_mode_desc\":\"Cash Payout\", \n            \"payment_mode\":1, \n            \"recipient_id\":1132,\n            \"branch\":null,\n            \"account\":null,\n\t\t\t\t\t\t\"gender\":\"Male\", \n            \"recipient_mobile\":\"6010101010\", \n            \"relationship_with_sender\":\"Father\", \n            \"recipient_name\":\"irfan ansari\"\n\t\t\t\t\t\t}\n            {\n\t\t\t\t\t\t\"bank_name\":\"ACE DEVELOPMENT BANK LIMITED\",\n            \"address_line1\":null, \n            \"payment_mode_desc\":\"Account Deposit\",\n            \"payment_mode\":2,\n\t\t\t\t\t\t\"recipient_id\":1134, \n            \"branch\":\"JAWALAKHEL\", \n            \"account\":\"12345678910\", \n            \"gender\":\"Male\", \n            \"recipient_mobile\":\"9811458963\", \n            \"relationship_with_sender\":\"Father\", \n            \"recipient_name\":\"irfan ansari\"\n            }\n            ]\n\t\t\t\t }\n       }\n        \n  \n","language":"text","name":"sample response for indo-nepal transaction"}]},"examples":{"codes":[{"language":"curl","code":"curl -X GET \\\n  'https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:9818526830/recipients/recipient_id:10002921?initiator_id=9910028267' \\\n  -H 'Cache-Control: no-cache' \\\n  -H 'Postman-Token: 0f087416-9e53-47fb-9caf-bfe015942f5d' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593'"},{"language":"java","code":"String myUrl=\"https://staging.eko.in:25004/ekoapi/v1/customers/\";\nmyUrl = myUrl + cust_type + \":\" + cust_id + \"/recipients/\" + recep_type + \":\" + recep_id + \"?initiator_id=\" + init_id;\n\nURL url = new URL(myUrl);\nHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\nconn.setRequestMethod(\"GET\");\nconn.setRequestProperty(\"Accept\", \"application/json\");\nconn.setRequestProperty( \"developer_key\" , dev_key );\nconn.setRequestProperty( \"secret-key\" , secret_key );\nconn.setRequestProperty( \"secret-key-timestamp\" , secret_key_timestamp );\n\nif (conn.getResponseCode() != 200) {\n\tthrow new RuntimeException(\"Failed : HTTP error code : \"\n\t+ conn.getResponseCode());\n}\n\nBufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));\n\nString output; // This string contains the output from the server\noutput = br.readLine();"},{"language":"python","code":"import http.client\n\nconn = http.client.HTTPConnection(\"staging,eko,in\")\n\nheaders = {\n    'developer_key': \"becbbce45f79c6f5109f848acd540567\",\n    'secret-key': \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    'secret-key-timestamp': \"1516705204593\",\n    'Cache-Control': \"no-cache\",\n    'Postman-Token': \"8063415a-c116-44d1-9c75-3d901acd3e6c\"\n    }\n\nconn.request(\"GET\", \"ekoapi,v1,customers,mobile_number:9818526830,recipients,recipient_id:10002921\", headers=headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"language":"csharp","code":"var client = new RestClient(\"https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:9818526830/recipients/recipient_id:10002921?initiator_id=9910028267\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"Postman-Token\", \"4bd583cf-af02-4126-b834-d72ae74d9ee4\");\nrequest.AddHeader(\"Cache-Control\", \"no-cache\");\nrequest.AddHeader(\"secret-key-timestamp\", \"1516705204593\");\nrequest.AddHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\");\nrequest.AddHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\");\nIRestResponse response = client.Execute(request);"},{"language":"php","code":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_PORT => \"25004\",\n  CURLOPT_URL => \"https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:9818526830/recipients/recipient_id:10002921?initiator_id=9910028267\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_HTTPHEADER => array(\n    \"Cache-Control: no-cache\",\n    \"Postman-Token: d79c5ba7-b5d8-4511-b744-45b60bd12110\",\n    \"developer_key: becbbce45f79c6f5109f848acd540567\",\n    \"secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    \"secret-key-timestamp: 1516705204593\"\n  ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"name":"sample request for indo-nepal transaction","language":"text","code":"curl -i -X GET https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:7010101019/product:indonepal /recipients?initiator_id=9910028267\n-H 'developer_key:becbbce45f79c6f5109f848acd540567'"}]},"method":"get"},"body":"**Response parameters description** \n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"recipient_id\",\n    \"1-0\": \"is_verified\",\n    \"h-0\": \"Parameter Name\",\n    \"h-1\": \"Description\",\n    \"h-2\": \"Use\",\n    \"0-1\": \"Unique Id generated for each recipient\",\n    \"1-1\": \"If the recipient is verified from the bank or not.\\n\\nValues and description\\n0- Not verified from bank\\n1- Verified from bank\",\n    \"0-2\": \"You can map this recipient_id against each account as this will be required at the time of transaction\",\n    \"1-2\": \"You can use this parameter to know if the recipient is verified from the bank or not.\"\n  },\n  \"cols\": 3,\n  \"rows\": 2\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"GET\",\n  \"body\": \"/customers/{customer_id_type}:{customer_id}/recipients/recipient_id:{id}\\n\\n###### *eg:*   /customers/**mobile_number:9876543210/recipients/recipient_id:10002332\"\n}\n[/block]","category":"556d914e42dd610d00a3cfc2","githubsync":"","link_url":"","project":"554757ba6184460d006fd8b4","sync_unique":"","order":20,"__v":62,"createdAt":"2015-05-05T12:00:42.023Z","excerpt":"Get the details of a recipient, like name, account number, etc","version":"554757bb6184460d006fd8b7","isReference":false,"next":{"description":"","pages":[]},"parentDoc":null,"childrenPages":[]}

getGet Recipient Details

Get the details of a recipient, like name, account number, etc

Path Params

id:
required
integer
This is the unique recipient id that is returned when a recipient is added to the customer in Create recipient API
product:
stringindonepal
This parameter needs to be send for a India to Nepal remittance transaction
customer_id_type:
required
stringmobile_number
customer_id:
required
string
id of the customer; currently only mobile number of the customer can be used

Query Params

initiator_id:
required
integer
partner id from where the request has been initiated

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section
**Response parameters description** [block:parameters] { "data": { "0-0": "recipient_id", "1-0": "is_verified", "h-0": "Parameter Name", "h-1": "Description", "h-2": "Use", "0-1": "Unique Id generated for each recipient", "1-1": "If the recipient is verified from the bank or not.\n\nValues and description\n0- Not verified from bank\n1- Verified from bank", "0-2": "You can map this recipient_id against each account as this will be required at the time of transaction", "1-2": "You can use this parameter to know if the recipient is verified from the bank or not." }, "cols": 3, "rows": 2 } [/block] [block:callout] { "type": "success", "title": "GET", "body": "/customers/{customer_id_type}:{customer_id}/recipients/recipient_id:{id}\n\n###### *eg:* /customers/**mobile_number:9876543210/recipients/recipient_id:10002332" } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



**Response parameters description** [block:parameters] { "data": { "0-0": "recipient_id", "1-0": "is_verified", "h-0": "Parameter Name", "h-1": "Description", "h-2": "Use", "0-1": "Unique Id generated for each recipient", "1-1": "If the recipient is verified from the bank or not.\n\nValues and description\n0- Not verified from bank\n1- Verified from bank", "0-2": "You can map this recipient_id against each account as this will be required at the time of transaction", "1-2": "You can use this parameter to know if the recipient is verified from the bank or not." }, "cols": 3, "rows": 2 } [/block] [block:callout] { "type": "success", "title": "GET", "body": "/customers/{customer_id_type}:{customer_id}/recipients/recipient_id:{id}\n\n###### *eg:* /customers/**mobile_number:9876543210/recipients/recipient_id:10002332" } [/block]
{"_id":"5548b0fbb2581a0d009140d4","body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"/customers/:customer_id_type::customer_id/recipients/:recipients_id_type::id\\n\\n###### *eg:*  /customers/**mobile_number:9876543210/recipients/acc_ifsc:61046336411_sbin0000001**\",\n  \"title\": \"PUT\"\n}\n[/block]","createdAt":"2015-05-05T12:00:59.243Z","excerpt":"Add a new recipient or update an existing recipient for a customer","link_external":false,"updates":["5ac7449c92aeaa0003793a93"],"user":"5547561a9a48800d00c6e483","githubsync":"","hidden":false,"link_url":"","order":21,"project":"554757ba6184460d006fd8b4","sync_unique":"","title":"Add Recipient","__v":50,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n\"message\":\"Success!Please transact using Recipientid\",\n\"response_type_id\":43,\n\"response_status_id\":0,\n\"status\":0,\n\"data\":\n\t\t\t{\n        \"initiator_id\": \"9910028267\",\n        \"recipient_mobile\": \"9898989898\",\n        \"recipient_id_type\": \"acc_ifsc\",\n        \"customer_id\": \"8800776655\",\n        \"pipes\": {},\n        \"recipient_id\": 10013230\n\t\t\t}\n}\n","name":""},{"name":"","status":400,"language":"json","code":"{}"}]},"settings":"","url":"/customers/customer_id_type:customer_id/recipients/recipients_id_type:id","auth":"required","params":[{"_id":"5aa8d344b7d085000fdb5937","ref":"","in":"path","required":true,"desc":"Fixed type for remittance","default":"mobile_number","type":"string","name":"customer_id_type"},{"_id":"5aa8d344b7d085000fdb5936","ref":"","in":"path","required":true,"desc":"id of the customer; currently only mobile number of the customer can be used","default":"","type":"int","name":"customer_id"},{"_id":"5a7023d0b0a0140036958132","ref":"","in":"path","required":true,"desc":"recipient_id_type can have the following parameters: a) acc_ifsc b) acc_bankcode (only applicable when IMPS service is available and IFSC is not required)","default":"","type":"string","name":"recipient_id_type"},{"_id":"5aa8d344b7d085000fdb5935","ref":"","in":"path","required":true,"desc":"This should be the value according to the recipient_id_type  format.","default":"","type":"string","name":"id"},{"_id":"5a7023d0b0a0140036958134","ref":"","in":"body","required":true,"desc":"id of the customer; currently only mobile number of the customer can be used","default":"","type":"int","name":"initiator_id"},{"_id":"5a7023d0b0a0140036958133","ref":"","in":"body","required":true,"desc":"a unique id for each bank has been allocated and that has to passed here","default":"","type":"int","name":"bank_id"},{"_id":"5aa8d15dd8e784002042697b","ref":"","in":"body","required":true,"desc":"name of the recipient","default":"","type":"string","name":"recipient_name"},{"_id":"5aa8d15dd8e784002042697a","ref":"","in":"body","required":true,"desc":"","default":"","type":"int","name":"recipient_mobile"},{"_id":"5aa8d15dd8e7840020426979","ref":"","in":"body","required":true,"desc":"","default":"3","type":"int","name":"recipient_type"},{"_id":"5aa8d40bb7d085000fdb593f","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5aa8d40bb7d085000fdb593e","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5aa8d40bb7d085000fdb593d","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"}],"examples":{"codes":[{"code":"curl -i -X PUT -d \"recipient_name=Testing_Pine&initiator_id=9910028267&mobile=8987896897&recipient_type=3&bank_id=56\" https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:8800776655/recipients/acc_ifsc:1711650492_KKBK0000261 -H 'developer_key:becbbce45f79c6f5109f848acd540567'","language":"curl"},{"code":"String myUrl = \"https://staging.eko.in:25004/ekoapi/v1/customers/\";\nmyUrl = myUrl + cust_id_type + \":\" + cust_id + \"/recipients/\" + recipient_id_type + \":\" + id ;\n\nURL url = new URL(myUrl);\nHttpURLConnection conn = (HttpURLConnection) url.openConnection();\nconn.setDoOutput(true);\nconn.setRequestMethod(\"PUT\");\nconn.setRequestProperty(\"Accept\", \"application/json\");\nconn.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\" );\nconn.setRequestProperty( \"developer_key\" , dev_key ); // Add developer's key in the header\n\n\nString bodyParam = \"recipient_type=\" + recipient_type \n+ \"&\" + \"recipient_name=\" + recipient_name + \"&\" + \"recipient_mobile=\" + recipient_mobile + \"&\" + \"initiator_id=\" + init_id + \"bank_id=\" + bank_id;\nconn.getOutputStream().write(bodyParam.getBytes());\n\nif (conn.getResponseCode() != 200) {\n\tthrow new RuntimeException(\"Failed : HTTP error code : \"\n\t+ conn.getResponseCode());\n}\n\nBufferedReader br = new BufferedReader(new InputStreamReader(\n\t(conn.getInputStream())));\n\nString output;\noutput = br.readLine(); // It contains the response from server after API call","language":"java"},{"code":"conn = http.client.HTTPSConnection(\"staging.eko.in:25004\")\n\npayload = \"customer_id_type=\" + customer_id_type + \"&customer_id=\" + cust_id + \"&recipient_type=\" + recipient_type + \"&recipient_id_type=\" + recipient_id_type\npayload = payload + \"&id=\" + id + \"&recipient_name=\" + recipient_name + \"&recipient_mobile=\" + recipient_mobile + \"&initiator_id=\" + init_id + \"&bank_id=\" + bank_id\n\nurl=\"/ekoapi/v1/customers/\"\nurl = url + customer_id_type + \":\" + cust_id + \"/recipients/\" + recipient_id_type + \":\" + id\n\nheaders = {\n    'developer_key': dev_key,\n    'cache-control': \"no-cache\",\n    'content-type': \"application/x-www-form-urlencoded\"\n    }\n\nconn.request(\"PUT\", url, payload, headers)\n\nres = conn.getresponse()\ndata = res.read() # Contains the response","language":"python"},{"code":"string url = \"https://staging.eko.in:25004/ekoapi/v1/customers/\";\nurl = url + cust_id_type + \":\" + cust_id + \"/recipients/\" + recipient_id_type + \":%7Bid%7D\";\n\nbody = \"recipient_type=\" + recipient_type +\n          \"&recipient_name=\" + recipient_name +\n             \"&recipient_mobile=\" + recipient_mobile + \"&initiator_id=\" + init_id + \"&bank_id=\" + bank_id;\n\n\nvar client = new RestClient(url);\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"content-type\", \"application/x-www-form-urlencoded\");\nrequest.AddHeader(\"cache-control\", \"no-cache\");\n\n/*Adding developer key in header*/\nrequest.AddHeader(\"developer_key\", dev_key);\n\nrequest.AddParameter(\"application/x-www-form-urlencoded\", body, ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);\nvar content = response.Content; /// Contains response from the server","language":"csharp"},{"code":"<?php\n$url = \"https://staging.eko.in:25004/ekoapi/v1/customers/\";\n$url = $url . $customer_id_type . \":\" . $cust_id . \"/recipients/\" . $recipient_id_type . \":\" . $id;\n\n$bodyParam = \"customer_id_type=\" . $customer_id_type . \"&customer_id= \" . $cust_id . \"&recipient_type=\" . $recipient_type;\n\t$bodyParam = $bodyParam . \"&recipient_id_type=\" . $recipient_id_type .\"&id=\" . $id . \"&recipient_name=\" . $recipient_name;\n\t$bodyParam = $bodyParam . \"&recipient_mobile=\" . $recipient_mobile . \"&initiator_id=\" . $init_id . \"&bank_id=\" . bank_id;\n\t\n\t\n$curl = curl_init();\ncurl_setopt_array($curl, array(\n\tCURLOPT_PORT => \"25004\",\n\tCURLOPT_URL => $url,\n\tCURLOPT_RETURNTRANSFER => true,\n\tCURLOPT_ENCODING => \"\",\n\tCURLOPT_MAXREDIRS => 10,\n\tCURLOPT_TIMEOUT => 30,\n\tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\tCURLOPT_CUSTOMREQUEST => \"PUT\",\n\tCURLOPT_POSTFIELDS => $bodyParam,\n\tCURLOPT_HTTPHEADER => array(\n\t\t\"cache-control: no-cache\",\n\t\t\"content-type: application/x-www-form-urlencoded\",\n\t\t\"developer_key:\" . $dev_key\n\t),\n\t));\n\n$response = curl_exec($curl); // Contains the response from server","language":"php"}]},"method":"put"},"category":"556d914e42dd610d00a3cfc2","slug":"add-recipient","type":"put","version":"554757bb6184460d006fd8b7","isReference":false,"next":{"description":"","pages":[]},"parentDoc":null,"childrenPages":[]}

putAdd Recipient

Add a new recipient or update an existing recipient for a customer

Path Params

customer_id_type:
required
stringmobile_number
Fixed type for remittance
customer_id:
required
integer
id of the customer; currently only mobile number of the customer can be used
recipient_id_type:
required
string
recipient_id_type can have the following parameters: a) acc_ifsc b) acc_bankcode (only applicable when IMPS service is available and IFSC is not required)
id:
required
string
This should be the value according to the recipient_id_type format.

Body Params

initiator_id:
required
integer
id of the customer; currently only mobile number of the customer can be used
bank_id:
required
integer
a unique id for each bank has been allocated and that has to passed here
recipient_name:
required
string
name of the recipient
recipient_mobile:
required
integer
recipient_type:
required
integer3

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section
[block:callout] { "type": "success", "body": "/customers/:customer_id_type::customer_id/recipients/:recipients_id_type::id\n\n###### *eg:* /customers/**mobile_number:9876543210/recipients/acc_ifsc:61046336411_sbin0000001**", "title": "PUT" } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "success", "body": "/customers/:customer_id_type::customer_id/recipients/:recipients_id_type::id\n\n###### *eg:* /customers/**mobile_number:9876543210/recipients/acc_ifsc:61046336411_sbin0000001**", "title": "PUT" } [/block]
{"_id":"5a7301d4f3ea60005ffd4387","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-02-01T12:02:28.284Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":22,"body":"Transaction APIs enable fund transfer from one customer to another.The destination could be a wallet, a credit card, a bank account, merchant account or a supported utility account.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"A transaction is identified by\",\n  \"body\": \"**/transactions/{transaction_id}** \"\n}\n[/block]\n\nTransaction APIs enable clients to:\n1. Transfer money into a bank account via IMPS or NEFT for a customer\n2. Enquire about a transaction's status using transaction enquiry. Enquiry can be done using Eko TID or client_ref_id (a unique ID that you send with every transaction) \n3. Initiate a refund for the customer in case a *cash to digital* transaction fails. Upon failure, an OTP is automatically sent to the customer that he/she can use to get the refund\n\n\nMoney transfer transaction can be made through two **channels**:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Channel\",\n    \"h-1\": \"Value (to use in API call)\",\n    \"1-0\": \"NEFT\",\n    \"1-1\": \"1\",\n    \"0-0\": \"IMPS\",\n    \"0-1\": \"2\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\n\nEvery transaction response will contain a **tx_status** code with the following possible values:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"tx_status\",\n    \"h-1\": \"txstatus_desc\",\n    \"0-0\": \"0\",\n    \"0-1\": \"Success\",\n    \"1-0\": \"1\",\n    \"1-1\": \"Fail\",\n    \"2-0\": \"2\",\n    \"2-1\": \"Initiated\",\n    \"3-0\": \"3\",\n    \"3-1\": \"Refund Pending\",\n    \"4-0\": \"4\",\n    \"4-1\": \"Refunded\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\n}\n[/block]\nIn case if any other value is returned in **tx_status** parameter then the transaction should be treated as *initiated* and transaction inquiry should be done until final status is received.\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Transaction Timeout\",\n  \"body\": \"A transaction can be timeout due to multiple reasons where partner bank responses could be slow or due to network connectivity, delayed or no response may occur. In such cases transaction should not be treated as declined or failed. Ideally, it should be inquired using Transaction Inquiry API by passing partner reference number i.e. client_ref_id.\"\n}\n[/block]","excerpt":"","slug":"transactions","type":"basic","title":"Transactions","__v":0,"parentDoc":null,"childrenPages":[]}

Transactions


Transaction APIs enable fund transfer from one customer to another.The destination could be a wallet, a credit card, a bank account, merchant account or a supported utility account. [block:callout] { "type": "info", "title": "A transaction is identified by", "body": "**/transactions/{transaction_id}** " } [/block] Transaction APIs enable clients to: 1. Transfer money into a bank account via IMPS or NEFT for a customer 2. Enquire about a transaction's status using transaction enquiry. Enquiry can be done using Eko TID or client_ref_id (a unique ID that you send with every transaction) 3. Initiate a refund for the customer in case a *cash to digital* transaction fails. Upon failure, an OTP is automatically sent to the customer that he/she can use to get the refund Money transfer transaction can be made through two **channels**: [block:parameters] { "data": { "h-0": "Channel", "h-1": "Value (to use in API call)", "1-0": "NEFT", "1-1": "1", "0-0": "IMPS", "0-1": "2" }, "cols": 2, "rows": 2 } [/block] Every transaction response will contain a **tx_status** code with the following possible values: [block:parameters] { "data": { "h-0": "tx_status", "h-1": "txstatus_desc", "0-0": "0", "0-1": "Success", "1-0": "1", "1-1": "Fail", "2-0": "2", "2-1": "Initiated", "3-0": "3", "3-1": "Refund Pending", "4-0": "4", "4-1": "Refunded" }, "cols": 2, "rows": 5 } [/block] In case if any other value is returned in **tx_status** parameter then the transaction should be treated as *initiated* and transaction inquiry should be done until final status is received. [block:callout] { "type": "danger", "title": "Transaction Timeout", "body": "A transaction can be timeout due to multiple reasons where partner bank responses could be slow or due to network connectivity, delayed or no response may occur. In such cases transaction should not be treated as declined or failed. Ideally, it should be inquired using Transaction Inquiry API by passing partner reference number i.e. client_ref_id." } [/block]
Transaction APIs enable fund transfer from one customer to another.The destination could be a wallet, a credit card, a bank account, merchant account or a supported utility account. [block:callout] { "type": "info", "title": "A transaction is identified by", "body": "**/transactions/{transaction_id}** " } [/block] Transaction APIs enable clients to: 1. Transfer money into a bank account via IMPS or NEFT for a customer 2. Enquire about a transaction's status using transaction enquiry. Enquiry can be done using Eko TID or client_ref_id (a unique ID that you send with every transaction) 3. Initiate a refund for the customer in case a *cash to digital* transaction fails. Upon failure, an OTP is automatically sent to the customer that he/she can use to get the refund Money transfer transaction can be made through two **channels**: [block:parameters] { "data": { "h-0": "Channel", "h-1": "Value (to use in API call)", "1-0": "NEFT", "1-1": "1", "0-0": "IMPS", "0-1": "2" }, "cols": 2, "rows": 2 } [/block] Every transaction response will contain a **tx_status** code with the following possible values: [block:parameters] { "data": { "h-0": "tx_status", "h-1": "txstatus_desc", "0-0": "0", "0-1": "Success", "1-0": "1", "1-1": "Fail", "2-0": "2", "2-1": "Initiated", "3-0": "3", "3-1": "Refund Pending", "4-0": "4", "4-1": "Refunded" }, "cols": 2, "rows": 5 } [/block] In case if any other value is returned in **tx_status** parameter then the transaction should be treated as *initiated* and transaction inquiry should be done until final status is received. [block:callout] { "type": "danger", "title": "Transaction Timeout", "body": "A transaction can be timeout due to multiple reasons where partner bank responses could be slow or due to network connectivity, delayed or no response may occur. In such cases transaction should not be treated as declined or failed. Ideally, it should be inquired using Transaction Inquiry API by passing partner reference number i.e. client_ref_id." } [/block]
{"_id":"5a6efb9a77035b0026b9e51b","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-01-29T10:46:50.660Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"","code":"{\n\t\"response_status_id\": 0,\n\t\"data\": {\n\t\t\"tx_status\": \"0\",\n\t\t\"debit_user_id\": \"9910028267\",\n\t\t\"tds\": \"7.1\",\n\t\t\"txstatus_desc\": \"Success\",\n\t\t\"fee\": \"50.0\",\n\t\t\"total_sent\": \"\",\n\t\t\"channel\": \"2\",\n\t\t\"collectable_amount\": \"5050.0\",\n\t\t\"txn_wallet\": \"0\",\n\t\t\"utility_acc_no\": \"9999912345\",\n\t\t\"sender_name\": \"Uidai Testing\",\n\t\t\"ekyc_enabled\": \"1\",\n\t\t\"remaining_limit_before_pan_required\": 40000.0,\n\t\t\"tid\": \"13192443\",\n\t\t\"bank\": \"Kotak Mahindra Bank\",\n\t\t\"utrnumber\": \"\",\n\t\t\"balance\": \"2.2226325774E9\",\n\t\t\"totalfee\": \"\",\n\t\t\"next_allowed_limit\": \"\",\n\t\t\"is_otp_required\": \"0\",\n\t\t\"aadhar\": \"\",\n\t\t\"currency\": \"INR\",\n\t\t\"commission\": \"28.38\",\n\t\t\"state\": \"1\",\n\t\t\"bank_ref_num\": \"876220109\",\n\t\t\"recipient_id\": 10012510,\n\t\t\"timestamp\": \"2018-10-30T11:49:54.446Z\",\n\t\t\"amount\": \"5000.00\",\n\t\t\"pan_required\": 2,\n\t\t\"pinNo\": \"\",\n\t\t\"payment_mode_desc\": \"\",\n\t\t\"channel_desc\": \"IMPS\",\n\t\t\"last_used_okekey\": \"0\",\n\t\t\"client_ref_id\": \"EKO20180212134234123\",\n\t\t\"npr\": \"\",\n\t\t\"service_tax\": \"7.63\",\n\t\t\"paymentid\": \"\",\n\t\t\"mdr\": \"\",\n\t\t\"recipient_name\": \"Aditya\",\n\t\t\"customer_id\": \"9999912345\",\n\t\t\"account\": \"1171650492\",\n\t\t\"kyc_state\": \"\",\n    \"gst_benefit\": \"1\"\n\t},\n\t\"response_type_id\": 325,\n\t\"message\": \"Transaction successful\",\n\t\"status\": 0\n}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400},{"code":"{\n    \"response_status_id\": -1,\n    \"data\": {\n        \"batch_id\": \"4194\"\n    },\n    \"response_type_id\": 1397,\n    \"message\": \"OTP has been sent to the customer\",\n    \"status\": 0\n}","language":"json","name":"Response if Transaction is going through wallet pipe","status":200}]},"settings":"","auth":"required","params":[{"_id":"5a705de55420a50012187602","ref":"","in":"body","required":true,"desc":"","default":"","type":"int","name":"recipient_id"},{"_id":"5a705de55420a50012187601","ref":"","in":"body","required":true,"desc":"","default":"","type":"int","name":"amount"},{"_id":"5a705de55420a50012187600","ref":"","in":"body","required":true,"desc":"","default":"","type":"timestamp","name":"timestamp"},{"_id":"5a705de55420a500121875ff","ref":"","in":"body","required":true,"desc":"","default":"INR","type":"string","name":"currency"},{"_id":"5a705de55420a500121875fe","ref":"","in":"body","required":true,"desc":"","default":"","type":"int","name":"customer_id"},{"_id":"5a705de55420a500121875fd","ref":"","in":"body","required":true,"desc":"The unique cell number with which you are on-boarded on Eko's platform","default":"","type":"int","name":"initiator_id"},{"_id":"5a705de55420a500121875fc","ref":"","in":"body","required":true,"desc":"Unique reference number of your system, please make this ID as unique as possible so that it does not match with any other partner unique reference id.","default":"","type":"int","name":"client_ref_id"},{"_id":"5a705de55420a500121875fb","ref":"","in":"body","required":false,"desc":"","default":"","type":"int","name":"hold_timeout"},{"_id":"5a705de55420a500121875fa","ref":"","in":"body","required":true,"desc":"1 - Commit, 2- Hold ( Send the value as 1 if you want to directly commit the transaction)","default":"1","type":"int","name":"state"},{"_id":"5a705de55420a500121875f9","ref":"","in":"body","required":true,"desc":"","default":"","type":"int","name":"channel"},{"_id":"5a705de55420a500121875f8","ref":"","in":"body","required":true,"desc":"1 - PAN, 2 - Aadhaar number","default":"","type":"int","name":"merchant_document_id_type"},{"_id":"5a705de55420a500121875f7","ref":"","in":"body","required":true,"desc":"value of the merchant document id","default":"","type":"string","name":"merchant_document_id"},{"_id":"5a705de55420a500121875f6","ref":"","in":"body","required":false,"desc":"","default":"","type":"string","name":"latlong"},{"_id":"5a705de55420a500121875f5","ref":"","in":"body","required":false,"desc":"","default":"","type":"int","name":"pincode"},{"_id":"5aa8eb7cb7d085000fdb5bdf","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5aa8eb7cb7d085000fdb5bde","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5aa8eb7cb7d085000fdb5bdd","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"},{"_id":"5ad99ec6bb5cf300033dfc21","ref":"","in":"body","required":false,"desc":"captures pan number of the user incase of cash collection services being used","default":"","type":"string","name":"user_pan"}],"url":"/transactions","examples":{"codes":[{"language":"curl","code":"curl -i -X POST -d \"recipient_id=10012510&amount=5000&timestamp=1990-01-01T01:01:01Z&currency=INR&customer_id=9999912345&initiator_id=9910028267&client_ref_id=12345678901234567890&hold_timeout=100&state=1&channel=2&merchant_document_id_type=1&merchant_document_id=BAPM3499H9&latlong=26.45427547,79.0747037,818&pincode=302021\" \nhttps://staging.eko.in:25004/ekoapi/v1/transactions -H 'developer_key:becbbce45f79c6f5109f848acd540567' -H 'secret-key:MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' -H 'secret-key-timestamp:1516705204593'"},{"language":"java","code":"String myUrl=\"https://staging.eko.in:25004/ekoapi/v1/transactions\";\n\nURL url = new URL(myUrl);\nHttpURLConnection conn = (HttpURLConnection) url.openConnection();\nconn.setDoOutput(true);\nconn.setRequestMethod(\"POST\");\nconn.setRequestProperty(\"Accept\", \"application/json\");\nconn.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\" );\nconn.setRequestProperty( \"developer_key\" , dev_key ); // Add developer's key in the header\n\nString bodyParam = \"&recipient_id=\" + recipient_id + \"&amount=\" + amount + \"&initiator_id=\" + init_id + \"&timestamp=\" + timestamp \n+ \"&currency=\" + currency + \"&customer_id=\" + cust_id + \"&client_ref_id=\" + client_ref_id + \"&hold_timeout=\" + hold_timeout \n+ \"&state=\" + state + \"&channel=\" + channel;\nconn.getOutputStream().write(bodyParam.getBytes());\n\nif (conn.getResponseCode() != 200) {\n\tthrow new RuntimeException(\"Failed : HTTP error code : \"\n\t+ conn.getResponseCode());\n}\n\nBufferedReader br = new BufferedReader(new InputStreamReader(\n\t(conn.getInputStream())));\n\nString output;\noutput = br.readLine(); // It contains the response from server after API call"},{"language":"python","code":"conn = http.client.HTTPSConnection(\"staging.eko.in:25004\")\n\nurl = \"/ekoapi/v1/transactions\"\n\npayload = \"recipient_id=\" + recep_id + \"&amount=\" + amount + \"&initiator_id=\" + init_id\npayload = payload + \"&currency=\" + currency + \"&customer_id=\" + cust_id + \"&client_ref_id=\" + client_ref_id + \"&hold_timeout=\" + hold_timeout\npayload = payload + \"&state=\" + state+ \"&auth_type=\" + auth_type + \"&auth=\" + auth + \"&channel=\" + channel\n\nheaders = {\n    'developer_key': dev_key,\n    'cache-control': \"no-cache\",\n    'content-type': \"application/x-www-form-urlencoded\"\n    }\n\nconn.request(\"POST\", url , payload, headers)\n\nres = conn.getresponse()\ndata = res.read() # Contains the response"},{"language":"csharp","code":"string url = \"https://staging.eko.in:25004/ekoapi/v1/transactions\";\n\nbody = \"recipient_id=\" + recipient_id + \"&amount=\" + amount + \"&initiator_id=\" + init_id + \"&timestamp=\" + timestamp +\n          \"&currency=\" + currency + \"&customer_id=\" + cust_id + \"&client_ref_id=\" + client_ref_id + \"&hold_timeout=\" + hold_timeout \n              + \"&state=\" + state + \"&channel=\" + channel;\n\nvar client = new RestClient(url);\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"content-type\", \"application/x-www-form-urlencoded\");\nrequest.AddHeader(\"cache-control\", \"no-cache\");\n\n/*Adding developer key in header*/\nrequest.AddHeader(\"developer_key\", dev_key);\n\nrequest.AddParameter(\"application/x-www-form-urlencoded\", body, ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);\nvar content = response.Content; /// Contains response from the server"},{"language":"php","code":"<?php\n$url = \"https://staging.eko.in:25004/ekoapi/v1/transactions\";\n\n$bodyParam = \"recipient_id= \" . $recipient_id . \"&amount=\" . $amount . \"&timestamp=:\" . $timestamp . \"&currency=\" . $currency;\n\t$bodyParam = $bodyParam . \"&customer_id=\" . $customer_id . \"&initiator_id=\" . $init_id . \"&client_ref_id=\" . $client_ref_id;\n\t$bodyParam = $bodyParam . \"&hold_timeout=\" . $hold_timeout . \"&state=\" . $state . \"&\" . $auth_type . \"=\" . $auth . \"&channel=\" . $channel;\n\t\n\t\n$curl = curl_init();\ncurl_setopt_array($curl, array(\n\tCURLOPT_PORT => \"25004\",\n\tCURLOPT_URL => $url,\n\tCURLOPT_RETURNTRANSFER => true,\n\tCURLOPT_ENCODING => \"\",\n\tCURLOPT_MAXREDIRS => 10,\n\tCURLOPT_TIMEOUT => 30,\n\tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\tCURLOPT_CUSTOMREQUEST => \"POST\",\n\tCURLOPT_POSTFIELDS => $bodyParam,\n\tCURLOPT_HTTPHEADER => array(\n\t\t\"cache-control: no-cache\",\n\t\t\"content-type: application/x-www-form-urlencoded\",\n\t\t\"developer_key:\" . $dev_key\n\t),\n\t));\n\n$response = curl_exec($curl); // Contains the response from server\n?>\n"},{"name":"sample request for NEFT","language":"curl","code":"curl -i -X POST -d \"recipient_id=10014614&amount=100&timestamp=1990-01-01T01:01:01Z&currency=INR&customer_id=3000000010&initiator_id=9910028267&client_ref_id=EKO20171117104630123&hold_timeout=100&state=1&channel=1&ifsc=SBIN0017445&merchant_document_id_type=1&merchant_document_id=BPM3499HA&latlong=30.4548148,79.0734057,818&pincode=302021\" \nhttps://staging.eko.in:25004/ekoapi/v1/transactions -H 'developer_key:becbbce45f79c6f5109f848acd540567' -H 'secret-key:MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' -H 'secret-key-timestamp:1516705204593'"}]},"method":"post"},"isReference":false,"order":23,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"**Note**: Parameters passed in request body should be **application/x-www-form-urlencoded**\\n\\nNew parameters added:\\ncommission : Cashback given on the transaction.(Total (Commission + TDS deducted))\\ntds : TDS deducted on the total cashback\\ntxn_wallet : Is the transaction gone through wallet or BC pipe (1- Wallet ,0- BC pipe)\\ngst_benefit : To know whether the gst benefit has been pass on to you or not (1- Yes, 0-No)\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Wallet Pipe Transaction\",\n  \"body\": \"If the transaction is going through the wallet pipe then in the Initiate Transaction API, OTP will be sent to the customer mobile number there will be a batch_id parameter in the response of the Initiate Transaction API\\nThis OTP and batch_id need to be sent in the Validate Transaction API.\\nOnce the OTP is verified in the Validate Transaction API then only the money will be sent to the recipient account and the debit of the partner account will take place.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"\\\"user_pan\\\" needs to send incase client is using cash collection services.\\n\\nThis parameter will capture distributor/retailer/user PAN number\"\n}\n[/block]","excerpt":"Initiate a Money Transfer transaction to a bank account via NEFT/IMPS","slug":"initiate-transaction","type":"post","title":"Initiate Transaction","__v":39,"parentDoc":null,"childrenPages":[]}

postInitiate Transaction

Initiate a Money Transfer transaction to a bank account via NEFT/IMPS

Body Params

recipient_id:
required
integer
amount:
required
integer
timestamp:
required
timestamp
currency:
required
stringINR
customer_id:
required
integer
initiator_id:
required
integer
The unique cell number with which you are on-boarded on Eko's platform
client_ref_id:
required
integer
Unique reference number of your system, please make this ID as unique as possible so that it does not match with any other partner unique reference id.
hold_timeout:
integer
state:
required
integer1
1 - Commit, 2- Hold ( Send the value as 1 if you want to directly commit the transaction)
channel:
required
integer
merchant_document_id_type:
required
integer
1 - PAN, 2 - Aadhaar number
merchant_document_id:
required
string
value of the merchant document id
latlong:
string
pincode:
integer
user_pan:
string
captures pan number of the user incase of cash collection services being used

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section
[block:callout] { "type": "warning", "body": "**Note**: Parameters passed in request body should be **application/x-www-form-urlencoded**\n\nNew parameters added:\ncommission : Cashback given on the transaction.(Total (Commission + TDS deducted))\ntds : TDS deducted on the total cashback\ntxn_wallet : Is the transaction gone through wallet or BC pipe (1- Wallet ,0- BC pipe)\ngst_benefit : To know whether the gst benefit has been pass on to you or not (1- Yes, 0-No)" } [/block] [block:callout] { "type": "warning", "title": "Wallet Pipe Transaction", "body": "If the transaction is going through the wallet pipe then in the Initiate Transaction API, OTP will be sent to the customer mobile number there will be a batch_id parameter in the response of the Initiate Transaction API\nThis OTP and batch_id need to be sent in the Validate Transaction API.\nOnce the OTP is verified in the Validate Transaction API then only the money will be sent to the recipient account and the debit of the partner account will take place." } [/block] [block:callout] { "type": "info", "body": "\"user_pan\" needs to send incase client is using cash collection services.\n\nThis parameter will capture distributor/retailer/user PAN number" } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "warning", "body": "**Note**: Parameters passed in request body should be **application/x-www-form-urlencoded**\n\nNew parameters added:\ncommission : Cashback given on the transaction.(Total (Commission + TDS deducted))\ntds : TDS deducted on the total cashback\ntxn_wallet : Is the transaction gone through wallet or BC pipe (1- Wallet ,0- BC pipe)\ngst_benefit : To know whether the gst benefit has been pass on to you or not (1- Yes, 0-No)" } [/block] [block:callout] { "type": "warning", "title": "Wallet Pipe Transaction", "body": "If the transaction is going through the wallet pipe then in the Initiate Transaction API, OTP will be sent to the customer mobile number there will be a batch_id parameter in the response of the Initiate Transaction API\nThis OTP and batch_id need to be sent in the Validate Transaction API.\nOnce the OTP is verified in the Validate Transaction API then only the money will be sent to the recipient account and the debit of the partner account will take place." } [/block] [block:callout] { "type": "info", "body": "\"user_pan\" needs to send incase client is using cash collection services.\n\nThis parameter will capture distributor/retailer/user PAN number" } [/block]
{"_id":"5c7783ac0787ee005df71e68","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"592cf5ea5dfd230f00b85453","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-02-28T06:46:04.345Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"","code":"{\n    \"response_status_id\": 0,\n    \"data\": {\n        \"tx_status\": \"0\",\n        \"debit_user_id\": \"9999912796\",\n        \"tds\": \"0.0\",\n        \"txstatus_desc\": \"Success\",\n        \"fee\": \"10.0\",\n        \"total_sent\": \"\",\n        \"channel\": \"2\",\n        \"collectable_amount\": \"110.0\",\n        \"txn_wallet\": \"1\",\n        \"utility_acc_no\": \"9901473435\",\n        \"sender_name\": \"Nafrat\",\n        \"ekyc_enabled\": \"0\",\n        \"remaining_limit_before_pan_required\": 49800,\n        \"tid\": \"12931968\",\n        \"bank\": \"State Bank of India\",\n        \"utrnumber\": \"\",\n        \"balance\": \"9964672.65\",\n        \"totalfee\": \"\",\n        \"next_allowed_limit\": \"\",\n        \"is_otp_required\": \"0\",\n        \"aadhar\": \"\",\n        \"currency\": \"INR\",\n        \"commission\": \"0.0\",\n        \"pipe\": 2,\n        \"state\": \"1\",\n        \"bank_ref_num\": \"876261408\",\n        \"recipient_id\": 10009710,\n        \"timestamp\": \"2019-02-28T06:51:08.884Z\",\n        \"amount\": \"100.00\",\n        \"pan_required\": 2,\n        \"pinNo\": \"\",\n        \"gst_benefit\": \"0\",\n        \"payment_mode_desc\": \"\",\n        \"channel_desc\": \"IMPS\",\n        \"last_used_okekey\": \"0\",\n        \"npr\": \"\",\n        \"service_tax\": \"1.53\",\n        \"paymentid\": \"\",\n        \"mdr\": \"\",\n        \"recipient_name\": \"Rohit MR\",\n        \"customer_id\": \"9901473435\",\n        \"account\": \"22435435654\",\n        \"kyc_state\": \"\"\n    },\n    \"response_type_id\": 325,\n    \"message\": \"Transaction successful\",\n    \"status\": 0\n}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","auth":"required","params":[{"_id":"5c7784acf469580062376166","ref":"","in":"path","required":true,"desc":"This is the batch id received in the response of Initiate Transaction API when the transaction is going through wallet pipe","default":"","type":"int","name":"batch_id"},{"_id":"5c7784acf469580062376165","ref":"","in":"body","required":true,"desc":"This should be the OTP received on the customer mobile number.","default":"","type":"int","name":"otp"},{"_id":"5c77850c2f5072000eb87097","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5c77854a72e6780034e1e070","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5c7785607031180063321237","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"},{"_id":"5c77860d723f950014c2d4ac","ref":"","in":"body","required":true,"desc":"","default":"","type":"int","name":"initiator_id"}],"url":"/transactions/{batch_id}/verify","examples":{"codes":[{"language":"curl","code":"curl -X PUT \\\n  https://staging.eko.in:25004/ekoapi/v1/transactions/4194/verify \\\n  -H 'Cache-Control: no-cache' \\\n  -H 'Content-Type: application/x-www-form-urlencoded' \\\n  -H 'Postman-Token: 4557c649-957c-4b8f-b775-eff285e1ff3c' \\\n  -d 'initiator_id=9999912796&otp=5032'"}]},"method":"put"},"isReference":false,"order":24,"body":"The response will be same as Initiate Transaction API response and the parameter description in response also remain same.","excerpt":"This API is used to validate the Wallet Pipe transaction through OTP.","slug":"validate-transaction-api","type":"put","title":"Validate Transaction API","__v":18,"parentDoc":null,"childrenPages":[]}

putValidate Transaction API

This API is used to validate the Wallet Pipe transaction through OTP.

Path Params

batch_id:
required
integer
This is the batch id received in the response of Initiate Transaction API when the transaction is going through wallet pipe

Body Params

otp:
required
integer
This should be the OTP received on the customer mobile number.
initiator_id:
required
integer

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section
The response will be same as Initiate Transaction API response and the parameter description in response also remain same.

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



The response will be same as Initiate Transaction API response and the parameter description in response also remain same.
{"_id":"5c77869ba128480039335e4a","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"592cf5ea5dfd230f00b85453","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-02-28T06:58:35.367Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"response_status_id\": -1,\n    \"data\": {\n        \"batch_id\": \"4174\"\n    },\n    \"response_type_id\": 1397,\n    \"message\": \"OTP has been sent to the customer\",\n    \"status\": 0\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[{"_id":"5c778714a64d9e001441734a","ref":"","in":"path","required":true,"desc":"This is the batch id received in the response of Initiate Transaction API when the transaction is going through wallet pipe","default":"","type":"int","name":"batch_id"},{"_id":"5c77874f0c6c40000e541bf2","ref":"","in":"body","required":true,"desc":"The unique cell number with which you are on-boarded on Eko's platform","default":"","type":"int","name":"initiator_id"},{"_id":"5c77a807a1284800393389a4","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5c77a807a1284800393389a3","ref":"","in":"header","required":true,"desc":"refer to authentication section [https://developers.eko.in/docs/authentication]","default":"","type":"string","name":"secret-key"},{"_id":"5c77a807a1284800393389a2","ref":"","in":"header","required":true,"desc":"refer to authentication section [https://developers.eko.in/docs/authentication]","default":"","type":"string","name":"secret-key-timestamp"}],"url":"/transactions/{batch_id}/otp","examples":{"codes":[{"language":"curl","code":"curl -X POST \\\n  https://staging.eko.in:25004/ekoapi/v1/transactions/4174/otp \\\n  -H 'Cache-Control: no-cache' \\\n  -H 'Content-Type: application/x-www-form-urlencoded' \\\n  -H 'Postman-Token: 20e728af-bec9-4a8f-bc9a-1ade7d806b9b' \\\n  -d 'initiator_id=9910028267'"}]},"method":"post"},"isReference":false,"order":25,"body":"","excerpt":"This is to resent the transaction OTP to the customer mobile number in case the transaction is going through wallet pipe","slug":"resend-transaction-otp-api","type":"post","title":"Resend Transaction OTP API","__v":8,"parentDoc":null,"childrenPages":[]}

postResend Transaction OTP API

This is to resent the transaction OTP to the customer mobile number in case the transaction is going through wallet pipe

Path Params

batch_id:
required
integer
This is the batch id received in the response of Initiate Transaction API when the transaction is going through wallet pipe

Body Params

initiator_id:
required
integer
The unique cell number with which you are on-boarded on Eko's platform

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section [https://developers.eko.in/docs/authentication]
secret-key-timestamp:
required
string
refer to authentication section [https://developers.eko.in/docs/authentication]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"5a6efbbf0a6481004e6f8fd8","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-01-29T10:47:27.259Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"","code":"{\n\"message\":\"Success! trxn.status.enq.successful\",\n\"response_type_id\":70,\n\"response_status_id\":0,\n\"status\":0,\n\"data\":\n\t\t\t{\n\t\t\t \"tx_status\": \"4\",\n        \"amount\": \"200.00\",\n        \"tds\": \"\",\n        \"txstatus_desc\": \"Refunded\",\n        \"fee\": \"2.0\",\n        \"channel\": \"2\",\n        \"txn_wallet\": \"1\",\n        \"branch\": \"\",\n        \"tid\": \"12212118\",\n        \"tx_desc\": \"IMPS Remittance\",\n        \"allow_retry\": \"1\",\n        \"client_ref_id\": \"7674\",\n        \"service_tax\": \"0.22\",\n        \"currency\": \"INR\",\n        \"commission\": \"\",\n        \"customer_id\": \"8900434545\",\n        \"bank_ref_num\": \"528711212118\",\n        \"recipient_id\": 10002826,\n        \"timestamp\": \"2018-11-11T17:35:12.058Z\",\n        \"gst_benefit\":1\n\t\t\t}\n}\n","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"settings":"","auth":"required","params":[{"_id":"5a706aac5420a5001218771d","ref":"","in":"query","required":false,"desc":"This can be Eko tid or partner's unique id","default":"","type":"string","name":"tid"},{"_id":"5a706aac5420a5001218771c","ref":"","in":"query","required":true,"desc":"","default":"","type":"int","name":"initiator_id"},{"_id":"5aa8ec17d8e7840020426c37","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5aa8ec17d8e7840020426c36","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5aa8ec17d8e7840020426c35","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"},{"_id":"5aa8ef3da71dbd0034aa0550","ref":"","in":"query","required":false,"desc":"","default":"","type":"string","name":"client_ref_id"}],"url":"/transactions/:id","examples":{"codes":[{"language":"curl","code":"curl -i -X GET  https://staging.eko.in:25004/ekoapi/v1/transactions/12212118?initiator_id=9910028267 -H 'developer_key:becbbce45f79c6f5109f848acd540567'"},{"language":"java","code":"tring myUrl=\"https://staging.eko.in:25004/ekoapi/v1/transactions/\";\nmyUrl = myUrl + tid + \"?initiator_id=\" + init_id;\nURL url = new URL(myUrl);\nHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\nconn.setRequestMethod(\"GET\");\nconn.setRequestProperty(\"Accept\", \"application/json\");\nconn.setRequestProperty( \"developer_key\" , dev_key ); // Add developer's key in the header\n\nif (conn.getResponseCode() != 200) {\n\tthrow new RuntimeException(\"Failed : HTTP error code : \"\n\t+ conn.getResponseCode());\n}\n\nBufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));\n\nString output; // This string contains the output from the server\noutput = br.readLine();"},{"language":"python","code":"conn = http.client.HTTPSConnection(\"staging.eko.in:25004\")\n\nurl = \"/ekoapi/v1/transactions\"\nurl = url + customer_id_type + \":\" + customer_id + \"?initiator_id=\" + init_id\n\nheaders = {\n    'developer_key': dev_key,\n    'cache-control': \"no-cache\"\n    }\n\nconn.request(\"GET\", url, headers=headers)\n\nres = conn.getresponse()\ndata = res.read() # Contains the response"},{"language":"csharp","code":"string url = \"https://staging.eko.in:25004/ekoapi/v1/transactions/\";\nurl = url + t_id + \"?initiator_id=\" + init_id;\n\nvar client = new RestClient(url);\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"cache-control\", \"no-cache\");\n\n/*Adding developer key in header*/\nrequest.AddHeader(\"developer_key\", dev_key);\n\nIRestResponse response = client.Execute(request);\nvar content = response.Content; /// Contains response from the server"},{"language":"php","code":"<?php\n$url = \"https://staging.eko.in:25004/ekoapi/v1/transactions/\";\n$url = $url . $tid . \"?initiator_id=\" . $init_id;\n\t\n\t\n$curl = curl_init();\ncurl_setopt_array($curl, array(\n\tCURLOPT_PORT => \"25004\",\n\tCURLOPT_URL => $url,\n\tCURLOPT_RETURNTRANSFER => true,\n\tCURLOPT_ENCODING => \"\",\n\tCURLOPT_MAXREDIRS => 10,\n\tCURLOPT_TIMEOUT => 30,\n\tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\tCURLOPT_CUSTOMREQUEST => \"GET\",\n\tCURLOPT_HTTPHEADER => array(\n    \"cache-control: no-cache\",\n    \"developer_key: \".$dev_key\n    ),\n\t));\n\n$response = curl_exec($curl); // Contains the response from server\n?>"}]},"method":"get"},"isReference":false,"order":26,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"GET\",\n  \"body\": \"/transactions/{id}\\n\\n###### *eg:*   /transactions/12212118\"\n}\n[/block]","excerpt":"Get the status of a Money Transfer transaction basis Eko TID or client-reference-ID","slug":"transaction-inquiry","type":"get","title":"Get Transaction Status","__v":14,"parentDoc":null,"childrenPages":[]}

getGet Transaction Status

Get the status of a Money Transfer transaction basis Eko TID or client-reference-ID

Query Params

tid:
string
This can be Eko tid or partner's unique id
initiator_id:
required
integer
client_ref_id:
string

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section
[block:callout] { "type": "success", "title": "GET", "body": "/transactions/{id}\n\n###### *eg:* /transactions/12212118" } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "success", "title": "GET", "body": "/transactions/{id}\n\n###### *eg:* /transactions/12212118" } [/block]
{"_id":"5a70569ac3cfa000542fbbbd","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-01-30T11:27:22.936Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"\n{\n   \"response_status_id\": 0,\n   \"data\": {\n       \"refund_tid\": \"13192705\",\n       \"amount\": \"5000.00\",\n       \"tds\": \"7.1\",\n       \"balance\": \"2.22263731286E9\",\n       \"fee\": \"50.0\",\n       \"currency\": \"INR\",\n       \"commission_reverse\": \"28.38\",\n       \"tid\": \"13192443\",\n       \"timestamp\": \"2018-10-30T12:00:14.058Z\",\n       \"refunded_amount\": \"5050.00\"\n   },\n   \"response_type_id\": 74,\n   \"message\": \"Refund done\",\n   \"status\": 0\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[{"_id":"5a70736cc3cfa000542fbd5e","ref":"","in":"body","required":true,"desc":"","default":"","type":"int","name":"initiator_id"},{"_id":"5a70736cc3cfa000542fbd5d","ref":"","in":"body","required":true,"desc":"OTP shared with customer on the registered mobile number","default":"","type":"int","name":"otp"},{"_id":"5a70736cc3cfa000542fbd5c","ref":"","in":"path","required":true,"desc":"can be Eko tid or partner's unique reference id","default":"","type":"string","name":"tid"},{"_id":"5a70736cc3cfa000542fbd5b","ref":"","in":"body","required":true,"desc":"current status of the transaction; 1 denotes \"commit\"","default":"1","type":"int","name":"state"},{"_id":"5ab7e8329b6f3f003ae92f7a","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5ab7e87bf9cd05002e5df359","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5ab7e87bf9cd05002e5df358","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"},{"_id":"5bb1f2fc8c0ab100034ba7ff","ref":"","in":"body","required":false,"desc":"","default":"Unique Id for request from partner","type":"string","name":"client_ref_id"}],"url":"/transactions/:id/refund","examples":{"codes":[{"language":"curl","code":"curl -i -X POST -d \"otp=1754627962&initiator_id=9910028267&state=1&client_ref_id=9076868\" https://staging.eko.in:25004/ekoapi/v1/transactions/13192443/refund -H 'developer_key:becbbce45f79c6f5109f848acd540567'"}]},"method":"post"},"isReference":false,"order":27,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"/transactions/:id/refund\\n\\n###### *eg:*   /transactions/**12208775/refund**\\n\\n**Note**: Parameters passed in request body should be **application/x-www-form-urlencoded**\",\n  \"title\": \"POST\"\n}\n[/block]\nThis API is used to safely refund cash to a customer in case his/her transaction fails.\n \n * When the transaction fails, we automatically send an OTP to the customer\n * Ask for that OTP from the customer and call this API with the OTP.\n * This will act as a consent that you have actually refunded back the cash to the customer. After this API call, we will refund the eValue into your account.","excerpt":"Initiate refund to the customer for a failed cash to digital transaction","slug":"refund","type":"post","title":"Refund","__v":20,"parentDoc":null,"childrenPages":[]}

postRefund

Initiate refund to the customer for a failed cash to digital transaction

Path Params

tid:
required
string
can be Eko tid or partner's unique reference id

Body Params

initiator_id:
required
integer
otp:
required
integer
OTP shared with customer on the registered mobile number
state:
required
integer1
current status of the transaction; 1 denotes "commit"
client_ref_id:
stringUnique Id for request from partner

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section
[block:callout] { "type": "success", "body": "/transactions/:id/refund\n\n###### *eg:* /transactions/**12208775/refund**\n\n**Note**: Parameters passed in request body should be **application/x-www-form-urlencoded**", "title": "POST" } [/block] This API is used to safely refund cash to a customer in case his/her transaction fails. * When the transaction fails, we automatically send an OTP to the customer * Ask for that OTP from the customer and call this API with the OTP. * This will act as a consent that you have actually refunded back the cash to the customer. After this API call, we will refund the eValue into your account.

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "success", "body": "/transactions/:id/refund\n\n###### *eg:* /transactions/**12208775/refund**\n\n**Note**: Parameters passed in request body should be **application/x-www-form-urlencoded**", "title": "POST" } [/block] This API is used to safely refund cash to a customer in case his/her transaction fails. * When the transaction fails, we automatically send an OTP to the customer * Ask for that OTP from the customer and call this API with the OTP. * This will act as a consent that you have actually refunded back the cash to the customer. After this API call, we will refund the eValue into your account.
{"_id":"5a6efc8a77035b0026b9e51e","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-01-29T10:50:50.292Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[{"status":200,"language":"json","code":"{\n\t\"message\":\"success! OTP has been sent\",\n\t\"response_type_id\":169,\n\t\"response_status_id\":-1,\n\t\"status\":0,\n\t\"data\":\n\t\t\t\t{\n\t\t\t\t\t\"tid\":\"12212118\",\n\t\t\t\t\t\"otp\":\"4878925010\"\n\t\t\t\t}\n}\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[{"_id":"5aae4bf5db321a00125525b8","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5aae4bf5db321a00125525b7","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5aae4bf5db321a00125525b6","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"},{"_id":"5aae4bf5db321a00125525b5","ref":"","in":"path","required":true,"desc":"tid of the transaction for which refund needs to be initiated","default":"","type":"int","name":"id"},{"_id":"5aae4bf5db321a00125525b4","ref":"","in":"body","required":true,"desc":"partner id from where the request has been initiated","default":"","type":"int","name":"initiator_id"}],"url":"/transactions/:id/refund/otp","examples":{"codes":[{"language":"curl","code":"curl -X POST \\\n  https://staging.eko.in:25004/ekoapi/v1/transactions/16150840/refund/otp \\\n  -H 'cache-control: no-cache' \\\n  -H 'content-type: application/x-www-form-urlencoded' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'postman-token: 4c0450fd-4f3c-9166-d572-857e8b651aec' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593' \\\n  -d initiator_id=9910028267"},{"language":"java","code":"OkHttpClient client = new OkHttpClient();\n\nMediaType mediaType = MediaType.parse(\"application/x-www-form-urlencoded\");\nRequestBody body = RequestBody.create(mediaType, \"initiator_id=9910028267\");\nRequest request = new Request.Builder()\n  .url(\"https://staging.eko.in:25004/ekoapi/v1/transactions/16150840/refund/otp\")\n  .post(body)\n  .addHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\")\n  .addHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\")\n  .addHeader(\"secret-key-timestamp\", \"1516705204593\")\n  .addHeader(\"content-type\", \"application/x-www-form-urlencoded\")\n  .addHeader(\"cache-control\", \"no-cache\")\n  .addHeader(\"postman-token\", \"fb241ab1-d233-74e7-fc40-52268b0a588b\")\n  .build();\n\nResponse response = client.newCall(request).execute();"},{"language":"python","code":"import http.client\n\nconn = http.client.HTTPSConnection(\"staging.eko.in:25004\")\n\npayload = \"initiator_id=9910028267\"\n\nheaders = {\n    'developer_key': \"becbbce45f79c6f5109f848acd540567\",\n    'secret-key': \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    'secret-key-timestamp': \"1516705204593\",\n    'content-type': \"application/x-www-form-urlencoded\",\n    'cache-control': \"no-cache\",\n    'postman-token': \"31cb3f05-d2b4-7e60-7709-f9694457830c\"\n    }\n\nconn.request(\"POST\", \"/ekoapi/v1/transactions/16150840/refund/otp\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"},{"language":"csharp","code":"var client = new RestClient(\"https://staging.eko.in:25004/ekoapi/v1/transactions/16150840/refund/otp\");\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"postman-token\", \"420980a2-75c7-e9ac-aeac-d87a21a179f7\");\nrequest.AddHeader(\"cache-control\", \"no-cache\");\nrequest.AddHeader(\"content-type\", \"application/x-www-form-urlencoded\");\nrequest.AddHeader(\"secret-key-timestamp\", \"1516705204593\");\nrequest.AddHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\");\nrequest.AddHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\");\nrequest.AddParameter(\"application/x-www-form-urlencoded\", \"initiator_id=9910028267\", ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);"},{"language":"php","code":"<?php\n\n$request = new HttpRequest();\n$request->setUrl('https://staging.eko.in:25004/ekoapi/v1/transactions/16150840/refund/otp');\n$request->setMethod(HTTP_METH_POST);\n\n$request->setHeaders(array(\n  'postman-token' => '0e8d2884-b5db-aae8-435f-f23249d04647',\n  'cache-control' => 'no-cache',\n  'content-type' => 'application/x-www-form-urlencoded',\n  'secret-key-timestamp' => '1516705204593',\n  'secret-key' => 'MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=',\n  'developer_key' => 'becbbce45f79c6f5109f848acd540567'\n));\n\n$request->setContentType('application/x-www-form-urlencoded');\n$request->setPostFields(array(\n  'initiator_id' => '9910028267'\n));\n\ntry {\n  $response = $request->send();\n\n  echo $response->getBody();\n} catch (HttpException $ex) {\n  echo $ex;\n}"}]},"method":"post"},"isReference":false,"order":28,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"POST\",\n  \"body\": \"/transactions/:id/refund/otp\\n\\n###### *eg:*   /transactions/**12212118/refund/otp**\\n\\n**Note**: Parameters passed in request body should be **application/x-www-form-urlencoded**\"\n}\n[/block]","excerpt":"Resend  the OTP to the customer to initiate the refund process","slug":"resend-refund-otp","type":"post","title":"Resend Refund OTP","__v":8,"parentDoc":null,"childrenPages":[]}

postResend Refund OTP

Resend the OTP to the customer to initiate the refund process

Path Params

id:
required
integer
tid of the transaction for which refund needs to be initiated

Body Params

initiator_id:
required
integer
partner id from where the request has been initiated

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section
[block:callout] { "type": "success", "title": "POST", "body": "/transactions/:id/refund/otp\n\n###### *eg:* /transactions/**12212118/refund/otp**\n\n**Note**: Parameters passed in request body should be **application/x-www-form-urlencoded**" } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "success", "title": "POST", "body": "/transactions/:id/refund/otp\n\n###### *eg:* /transactions/**12212118/refund/otp**\n\n**Note**: Parameters passed in request body should be **application/x-www-form-urlencoded**" } [/block]
{"_id":"5a730219777ed200316173ff","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-02-01T12:03:37.901Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"isReference":false,"order":29,"body":"These APIs can be used to get bank-specific information.\n\nBank Information is required:\n1. for adding a recipient:\n    a. to know whether IFSC code is required for that bank or not\n    b. to know whether verification of bank account is available for that bank or not\n2. for transferring money: to know whether IMPS channel is available for that bank or not.","excerpt":"","slug":"bank","type":"basic","title":"Banks","__v":0,"parentDoc":null,"childrenPages":[]}

Banks


These APIs can be used to get bank-specific information. Bank Information is required: 1. for adding a recipient: a. to know whether IFSC code is required for that bank or not b. to know whether verification of bank account is available for that bank or not 2. for transferring money: to know whether IMPS channel is available for that bank or not.
These APIs can be used to get bank-specific information. Bank Information is required: 1. for adding a recipient: a. to know whether IFSC code is required for that bank or not b. to know whether verification of bank account is available for that bank or not 2. for transferring money: to know whether IMPS channel is available for that bank or not.
{"_id":"5a73044a777ed20031617445","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-02-01T12:12:58.762Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"get","examples":{"codes":[{"name":"Curl","language":"curl","code":"curl -i -X GET \"https://staging.eko.in:25004/ekoapi/v1/banks?bank_code=KKBK&initiator_id=mobile_number:9910028267\" -H 'developer_key:becbbce45f79c6f5109f848acd540567'"},{"language":"java","code":"String myUrl=\"https://staging.eko.in:25004/ekoapi/v1/banks?bank_code=\";\nmyUrl = myUrl + bank_code + \"&initiator_id=\" + init_id;\n\nURL url = new URL(myUrl);\nHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\nconn.setRequestMethod(\"GET\");\nconn.setRequestProperty(\"Accept\", \"application/json\");\nconn.setRequestProperty( \"developer_key\" , dev_key );\n\nif (conn.getResponseCode() != 200) \n{\n\tthrow new RuntimeException(\"Failed : HTTP error code : \"+ conn.getResponseCode());\n}\n\nBufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));\n\nString output;\t//Contains the response\noutput = br.readLine();"},{"language":"python","code":"conn = http.client.HTTPSConnection(\"staging.eko.in:25004\")\n\nurl = \"/ekoapi/v1/banks?ifsc=\" + ifsc_code + \"&initiator_id=\" + init_id\n\nheaders = {\n    'developer_key': dev_key,\n    'cache-control': \"no-cache\"\n    }\n\nconn.request(\"GET\", url , headers=headers)\n\nres = conn.getresponse()\ndata = res.read() #Contains the response from server"},{"language":"csharp","code":"string url = \"https://staging.eko.in:25004/ekoapi/v1/banks?ifsc=\";\nurl = url + ifsc + \"&initiator_id=\" + init_id;\n\nvar client = new RestClient(url);\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"cache-control\", \"no-cache\");\n\n/*Adding developer key in header*/\nrequest.AddHeader(\"developer_key\", dev_key);\n\nIRestResponse response = client.Execute(request);\nvar content = response.Content; /// Contains response from the server"},{"language":"php","code":"<?php\n$url = \"https://staging.eko.in:25004/ekoapi/v1/banks?ifsc=\";\n$url = $url . $ifsc_code . \"&initiator_id=\" . $init_id;\n\t\n\t\n$curl = curl_init();\n\tcurl_setopt_array($curl, array(\n\tCURLOPT_PORT => \"25004\",\n\tCURLOPT_URL => $url,\n\tCURLOPT_RETURNTRANSFER => true,\n\tCURLOPT_ENCODING => \"\",\n\tCURLOPT_MAXREDIRS => 10,\n\tCURLOPT_TIMEOUT => 30,\n\tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\tCURLOPT_CUSTOMREQUEST => \"GET\",\n\tCURLOPT_HTTPHEADER => array(\n    \"cache-control: no-cache\",\n    \"developer_key: \".$dev_key\n    ),\n\t));\n\n$response = curl_exec($curl); // Contains the response from server\n?>"},{"name":"Retrieve bank details via ifsc","language":"text","code":"curl -X GET \\\n  'https://staging.eko.in:25004/ekoapi/v1/banks?ifsc=CORP0002927&initiator_id=9910028267' \\\n  -H 'Postman-Token: baf8dcb5-2b96-4dc5-b5aa-04248abb5e88' \\\n  -H 'cache-control: no-cache' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593'"}]},"results":{"codes":[{"name":"For Bank Details Found","code":"{\n\"message\":\"Bank Detials Found\",\n\"response_type_id\":466,\n\"response_status_id\":0,\n\"status\":0,\n\"data\":\n\t\t\t{\n\t\t\t \"isverificationavailable\": \"1\",\n        \"code\": \"KKBK\",\n        \"ifsc_status\": 1,\n        \"name\": \"Kotak Mahindra Bank\",\n        \"available_channels\": 0\n\t\t\t}\n}\n","language":"json","status":200},{"name":"For Bank Details not Found","status":200,"language":"text","code":"{\n    \"response_status_id\": 1,\n    \"response_type_id\": 467,\n    \"message\": \"Please provide valid bank details\",\n    \"status\": 467\n}"},{"name":"Bank details Via ifsc","status":200,"language":"text","code":"{\n    \"response_status_id\": -1,\n    \"data\": {\n        \"bank\": \"Corporation Bank\",\n        \"isverificationavailable\": \"1\",\n        \"ifsc_status\": 3,\n        \"available_channels\": 0,\n        \"ifsc\": \"CORP0002927\",\n        \"branch\": \"BADELIA\"\n    },\n    \"response_type_id\": 414,\n    \"message\": \"Success ! Found bank Details for given Ifsc\",\n    \"status\": 0\n}"}]},"settings":"","auth":"required","params":[{"_id":"5a73044a777ed20031617448","ref":"","in":"query","required":true,"desc":"","default":"","type":"string","name":"bank_code"},{"_id":"5a73044a777ed20031617447","ref":"","in":"query","required":false,"desc":"","default":"","type":"string","name":"ifsc"},{"_id":"5a73044a777ed20031617446","ref":"","in":"query","required":true,"desc":"","default":"","type":"int","name":"initiator_id"},{"_id":"5aa8fb82d8e7840020426d8a","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5aa8fb82d8e7840020426d89","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5aa8fb82d8e7840020426d88","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"}],"url":"/banks"},"isReference":false,"order":30,"body":"This API fetches details of a bank detail like bank name, available channels, ifsc required or not basis bank code.\n\nParameter ***available_channel*** can have the following values:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"0\",\n    \"0-1\": \"all\",\n    \"1-0\": \"1\",\n    \"1-1\": \"neft\",\n    \"2-0\": \"2\",\n    \"2-1\": \"imps\",\n    \"0-2\": \"both channels IMPS and NEFT are available for the bank\",\n    \"1-2\": \"only NEFT mode is available\",\n    \"2-2\": \"only IMPS mode is available\",\n    \"h-0\": \"value\",\n    \"h-2\": \"description\",\n    \"h-1\": \"name\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\nParameter ***ifsc_status*** can have the following values:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"value\",\n    \"h-1\": \"description\",\n    \"h-2\": \"description\",\n    \"0-0\": \"1\",\n    \"1-0\": \"2\",\n    \"2-0\": \"3\",\n    \"3-0\": \"4\",\n    \"0-1\": \"Bank short-code (e.g. SBIN) works for both IMPS and NEFT\",\n    \"1-1\": \"Bank short-code works for IMPS only\",\n    \"2-1\": \"System can generate logical IFSC for both IMPS and NEFT\",\n    \"3-1\": \"IFSC is required\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\nParameter ***isVerificationAvailable*** can have the following values:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"0\",\n    \"1-0\": \"1\",\n    \"0-1\": \"Bank is not available for account verification\",\n    \"1-1\": \"Bank is available for account verification\",\n    \"h-0\": \"value\",\n    \"h-1\": \"description\"\n  },\n  \"cols\": 2,\n  \"rows\": 2\n}\n[/block]\nList of banks available with bank ids and shortcode is available in the following google excel sheet:\n[block:embed]\n{\n  \"html\": false,\n  \"url\": \"https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https://docs.google.com/spreadsheets/d/1VSvnGERhHeZntKNRrAHjCVur0hr_jxTwr8Sb2-7u60c/edit&followup=https://docs.google.com/spreadsheets/d/1VSvnGERhHeZntKNRrAHjCVur0hr_jxTwr8Sb2-7u60c/edit&ltmpl=sheets\",\n  \"title\": \"Google Sheets - create and edit spreadsheets online, for free.\",\n  \"favicon\": \"https://accounts.google.com/favicon.ico\",\n  \"image\": \"https://ssl.gstatic.com/accounts/ui/avatar_2x.png\"\n}\n[/block]","excerpt":"Get the details of a bank like name, bank code, available channels, is IFSC required, is verification available, etc.","slug":"get-bank-details","type":"get","title":"Get Bank Details","__v":17,"parentDoc":null,"childrenPages":[]}

getGet Bank Details

Get the details of a bank like name, bank code, available channels, is IFSC required, is verification available, etc.

Query Params

bank_code:
required
string
ifsc:
string
initiator_id:
required
integer

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section
This API fetches details of a bank detail like bank name, available channels, ifsc required or not basis bank code. Parameter ***available_channel*** can have the following values: [block:parameters] { "data": { "0-0": "0", "0-1": "all", "1-0": "1", "1-1": "neft", "2-0": "2", "2-1": "imps", "0-2": "both channels IMPS and NEFT are available for the bank", "1-2": "only NEFT mode is available", "2-2": "only IMPS mode is available", "h-0": "value", "h-2": "description", "h-1": "name" }, "cols": 3, "rows": 3 } [/block] Parameter ***ifsc_status*** can have the following values: [block:parameters] { "data": { "h-0": "value", "h-1": "description", "h-2": "description", "0-0": "1", "1-0": "2", "2-0": "3", "3-0": "4", "0-1": "Bank short-code (e.g. SBIN) works for both IMPS and NEFT", "1-1": "Bank short-code works for IMPS only", "2-1": "System can generate logical IFSC for both IMPS and NEFT", "3-1": "IFSC is required" }, "cols": 2, "rows": 4 } [/block] Parameter ***isVerificationAvailable*** can have the following values: [block:parameters] { "data": { "0-0": "0", "1-0": "1", "0-1": "Bank is not available for account verification", "1-1": "Bank is available for account verification", "h-0": "value", "h-1": "description" }, "cols": 2, "rows": 2 } [/block] List of banks available with bank ids and shortcode is available in the following google excel sheet: [block:embed] { "html": false, "url": "https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https://docs.google.com/spreadsheets/d/1VSvnGERhHeZntKNRrAHjCVur0hr_jxTwr8Sb2-7u60c/edit&followup=https://docs.google.com/spreadsheets/d/1VSvnGERhHeZntKNRrAHjCVur0hr_jxTwr8Sb2-7u60c/edit&ltmpl=sheets", "title": "Google Sheets - create and edit spreadsheets online, for free.", "favicon": "https://accounts.google.com/favicon.ico", "image": "https://ssl.gstatic.com/accounts/ui/avatar_2x.png" } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



This API fetches details of a bank detail like bank name, available channels, ifsc required or not basis bank code. Parameter ***available_channel*** can have the following values: [block:parameters] { "data": { "0-0": "0", "0-1": "all", "1-0": "1", "1-1": "neft", "2-0": "2", "2-1": "imps", "0-2": "both channels IMPS and NEFT are available for the bank", "1-2": "only NEFT mode is available", "2-2": "only IMPS mode is available", "h-0": "value", "h-2": "description", "h-1": "name" }, "cols": 3, "rows": 3 } [/block] Parameter ***ifsc_status*** can have the following values: [block:parameters] { "data": { "h-0": "value", "h-1": "description", "h-2": "description", "0-0": "1", "1-0": "2", "2-0": "3", "3-0": "4", "0-1": "Bank short-code (e.g. SBIN) works for both IMPS and NEFT", "1-1": "Bank short-code works for IMPS only", "2-1": "System can generate logical IFSC for both IMPS and NEFT", "3-1": "IFSC is required" }, "cols": 2, "rows": 4 } [/block] Parameter ***isVerificationAvailable*** can have the following values: [block:parameters] { "data": { "0-0": "0", "1-0": "1", "0-1": "Bank is not available for account verification", "1-1": "Bank is available for account verification", "h-0": "value", "h-1": "description" }, "cols": 2, "rows": 2 } [/block] List of banks available with bank ids and shortcode is available in the following google excel sheet: [block:embed] { "html": false, "url": "https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&continue=https://docs.google.com/spreadsheets/d/1VSvnGERhHeZntKNRrAHjCVur0hr_jxTwr8Sb2-7u60c/edit&followup=https://docs.google.com/spreadsheets/d/1VSvnGERhHeZntKNRrAHjCVur0hr_jxTwr8Sb2-7u60c/edit&ltmpl=sheets", "title": "Google Sheets - create and edit spreadsheets online, for free.", "favicon": "https://accounts.google.com/favicon.ico", "image": "https://ssl.gstatic.com/accounts/ui/avatar_2x.png" } [/block]
{"_id":"5548b108b2581a0d009140d6","body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Only applicable for banks for whom account verification feature is available\",\n  \"title\": \"Not applicable for all banks\"\n}\n[/block]","sync_unique":"","order":31,"slug":"verify-bank-account","updates":[],"user":"5547561a9a48800d00c6e483","version":"554757bb6184460d006fd8b7","excerpt":"Enables customers to verify bank account number by returning the name of the account holder","githubsync":"","api":{"results":{"codes":[{"status":200,"language":"json","code":"{\n\"message\":\"Success! Account details found\",\n\"response_type_id\":61,\n\"response_status_id\":-1,\n\"status\":0,\n\"data\":\n\t\t\t{\n\t\t\t\t\"account\":\"61046336411\",\n\t\t\t\t\"bank\":\"STATE BANK OF INDIA\",\n\t\t\t\t\"recipient_name\":\"Nirmal Maheshwari\",\n\t\t\t\t\"is_name_editable\":\"0\",\n\t\t\t\t\"tid\":\"12516566\",\n\t\t\t\t\"amount\":1.00,\n\t\t\t\t\"fee\":3.00,\n\t\t\t\t\"is_ifsc_required\":\"0\",\n\t\t\t\t\"ifsc\":\"SBIN0000001\",\n\t\t\t\t\"aadhar\":\"\"\n\t\t\t}\n}\n","name":""},{"language":"json","code":"{}","name":"","status":400}]},"settings":"","url":"/banks/id_type::id/accounts/:id","auth":"required","params":[{"_id":"5a70599e32d133001289d38f","ref":"","in":"path","required":true,"desc":"can have 2 values: ifsc or bank_code","default":"bank_code","type":"string","name":"id_type"},{"_id":"5a70599e32d133001289d38e","ref":"","in":"path","required":true,"desc":"need to mention account number which needs to be verified","default":"","type":"int","name":"id"},{"_id":"5a70599e32d133001289d38d","ref":"","in":"body","required":true,"desc":"","default":"","type":"int","name":"initiator_id"},{"_id":"5a70599e32d133001289d38c","ref":"","in":"body","required":true,"desc":"","default":"","type":"int","name":"customer_id"},{"_id":"5aa8f9de2a1896004ba781b1","ref":"","in":"header","required":true,"desc":"","default":"","type":"string","name":"developer_key"},{"_id":"5aa8f9de2a1896004ba781b0","ref":"","in":"header","required":true,"desc":"","default":"","type":"string","name":"secret-key"},{"_id":"5aa8f9de2a1896004ba781af","ref":"","in":"header","required":true,"desc":"","default":"","type":"string","name":"secret-key-timestamp"}],"examples":{"codes":[{"language":"curl","code":"curl -i -X POST -d \"initiator_id=9910028267&customer_id=9962817283\" https://staging.eko.in:25004/ekoapi/v1/banks/ifsc:sbin0000001/accounts/61046336411 -H 'developer_key:becbbce45f79c6f5109f848acd540567'"},{"language":"java","code":"String myUrl=\"https://staging.eko.in:25004/ekoapi/v1/banks\";\nmyUrl = myUrl + type + \":\" +  bank_code +  \"/accounts/\" +  account;\n\nURL url = new URL(myUrl);\nHttpURLConnection conn = (HttpURLConnection) url.openConnection();\nconn.setDoOutput(true);\nconn.setRequestMethod(\"POST\");\nconn.setRequestProperty(\"Accept\", \"application/json\");\nconn.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\" );\nconn.setRequestProperty( \"developer_key\" , dev_key ); // Add developer's key in the header\n\nString bodyParam = \"customer_id=\" + cust_id + \"&\" + \"initiator_id=\" + init_id;\nconn.getOutputStream().write(bodyParam.getBytes());\n\nif (conn.getResponseCode() != 200) {\n\tthrow new RuntimeException(\"Failed : HTTP error code : \"\n\t\t\t+ conn.getResponseCode());\n}\n\nBufferedReader br = new BufferedReader(new InputStreamReader((conn.getInputStream())));\n\nString output; // Contains the response from server"},{"language":"python","code":"conn = http.client.HTTPSConnection(\"staging.eko.in:25004\")\n\nurl = \"/ekoapi/v1/banks/\"\nurl = url + customer_id_type + \":\" + customer_id + \"?initiator_id=\" + init_id\nparameters = type + \":\" +  bank_code +  \"/accounts/\" +  account\n\nheaders = {\n    'content-type': \"application/x-www-form-urlencoded\"\n    'developer_key': dev_key,\n    'cache-control': \"no-cache\"\n    }\n\nconn.request(\"POST\", url, parameters,headers)\n\nres = conn.getresponse()\ndata = res.read() # Contains the response"},{"language":"csharp","code":"string url = \"https://staging.eko.in:25004/ekoapi/v1/banks\";\nstring body = \"id=\" + cust_id + \"&id_type=\" + cust_id_type + + \"&initiator_id=\" + init_id;\n\nurl = url + type + \":\" +  bank_code +  \"/accounts/\" +  account;\n\nvar client = new RestClient(url);\nvar request = new RestRequest(Method.POST);\nrequest.AddHeader(\"content-type\", \"application/x-www-form-urlencoded\");\nrequest.AddHeader(\"cache-control\", \"no-cache\");\n\n/*Adding developer key in header*/\nrequest.AddHeader(\"developer_key\", dev_key);\n\nrequest.AddParameter(\"application/x-www-form-urlencoded\", body, ParameterType.RequestBody);\nIRestResponse response = client.Execute(request);\nvar content = response.Content; /// Contains response from the server"},{"language":"php","code":"<?php\n$url = \"https://staging.eko.in:25004/ekoapi/v1/banks\";\n$url = $url . $type .\":\" . $bank_code . \"/accounts/\" . $account\n\n\n$curl = curl_init();\ncurl_setopt_array($curl, array(\n\tCURLOPT_PORT => \"25004\",\n\tCURLOPT_URL => $url,\n\tCURLOPT_RETURNTRANSFER => true,\n\tCURLOPT_ENCODING => \"\",\n\tCURLOPT_MAXREDIRS => 10,\n\tCURLOPT_TIMEOUT => 30,\n\tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\tCURLOPT_CUSTOMREQUEST => \"POST\",\n\tCURLOPT_POSTFIELDS => $bodyParam,\n\tCURLOPT_HTTPHEADER => array(\n\t\t\"cache-control: no-cache\",\n\t\t\"content-type: application/x-www-form-urlencoded\",\n\t\t\"developer_key:\" . $dev_key\n\t),\n));\n\n$response = curl_exec($curl); // Contains the response from server\n?>\n"}]},"method":"post"},"category":"556d914e42dd610d00a3cfc2","createdAt":"2015-05-05T12:01:12.080Z","link_url":"","type":"post","__v":23,"project":"554757ba6184460d006fd8b4","title":"Verify Bank Account Details","hidden":false,"link_external":false,"isReference":false,"next":{"description":"","pages":[]},"parentDoc":null,"childrenPages":[]}

postVerify Bank Account Details

Enables customers to verify bank account number by returning the name of the account holder

Path Params

id_type:
required
stringbank_code
can have 2 values: ifsc or bank_code
id:
required
integer
need to mention account number which needs to be verified

Body Params

initiator_id:
required
integer
customer_id:
required
integer

Headers

developer_key:
required
string
secret-key:
required
string
secret-key-timestamp:
required
string
[block:callout] { "type": "warning", "body": "Only applicable for banks for whom account verification feature is available", "title": "Not applicable for all banks" } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



[block:callout] { "type": "warning", "body": "Only applicable for banks for whom account verification feature is available", "title": "Not applicable for all banks" } [/block]
{"_id":"5b1e2ce2d3da190003327e93","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-06-11T08:03:46.533Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"method":"post","examples":{"codes":[{"language":"curl","code":"curl -i -X POST -d \"pan_number=AMDPT3605R&purpose=1&initiator_id=9971771929&purpose_desc=onboarding&customer_mobile=8654547658\" https://staging.eko.in:25004/ekoapi/v1/pan/verify -H 'developer_key: becbbce45f79c6f5109f848acd540567' -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' -H 'secret-key-timestamp: 1516705204593' "}]},"results":{"codes":[{"status":200,"language":"json","code":"{  \n   \"response_status_id\":-1,\n   \"data\":{  \n      \"pan_number\":\"...XXX\",\n      \"last_name\":\"Foo\",\n      \"middle_name\":\"\",\n      \"title\":\"Shri\",\n      \"first_name\":\"Bar\"\n   },\n   \"response_type_id\":1255,\n   \"message\":\"PAN verification successful\",\n   \"status\":0\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[{"_id":"5b1e2ce2d3da190003327e98","ref":"","in":"path","required":true,"desc":"This is the pan number that needs to be verified","default":"","type":"string","name":"pan_number"},{"_id":"5b1e2ce2d3da190003327e97","ref":"","in":"path","required":true,"desc":"","default":"","type":"int","name":"purpose"},{"_id":"5b1e2ce2d3da190003327e96","ref":"","in":"path","required":true,"desc":"","default":"","type":"string","name":"purpose_desc"},{"_id":"5b1e2ce2d3da190003327e95","ref":"","in":"path","required":true,"desc":"","default":"","type":"int","name":"customer_mobile"},{"_id":"5b1e2ce2d3da190003327e94","ref":"","in":"path","required":true,"desc":"partner id from where the request has been initiated","default":"","type":"int","name":"initiator_id"},{"_id":"5b273f926814190003f63253","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5b273f926814190003f63252","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key"},{"_id":"5b273f926814190003f63251","ref":"","in":"header","required":true,"desc":"refer to authentication section","default":"","type":"string","name":"secret-key-timestamp"}],"url":"/pan/verify"},"isReference":false,"order":43,"body":"","excerpt":"","slug":"pan-verification","type":"post","title":"PAN verification","__v":7,"parentDoc":null,"childrenPages":[]}

postPAN verification


Path Params

pan_number:
required
string
This is the pan number that needs to be verified
purpose:
required
integer
purpose_desc:
required
string
customer_mobile:
required
integer
initiator_id:
required
integer
partner id from where the request has been initiated

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
refer to authentication section
secret-key-timestamp:
required
string
refer to authentication section

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"5cbec39b7ac202005c89908d","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5b878104b176670003e622e4","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-04-23T07:49:47.466Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"get","examples":{"codes":[{"language":"curl","code":"curl -X GET \\\n  'https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:9910028267/balance?initiator_id=9910028267' \\\n  -H 'Postman-Token: 34cf7def-81fc-4bc4-b406-aad723cb546b' \\\n  -H 'cache-control: no-cache' \\\n  -H 'developer_key: becbbce45f79c6f5109f848acd540567' \\\n  -H 'secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=' \\\n  -H 'secret-key-timestamp: 1516705204593'"},{"language":"php","code":"<?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, array(\n  CURLOPT_PORT => \"25004\",\n  CURLOPT_URL => \"https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:9910028267/balance?initiator_id=9910028267\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_ENCODING => \"\",\n  CURLOPT_MAXREDIRS => 10,\n  CURLOPT_TIMEOUT => 30,\n  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n  CURLOPT_POSTFIELDS => \"\",\n  CURLOPT_HTTPHEADER => array(\n    \"Postman-Token: 97896669-b593-4949-ace7-347c226c6806\",\n    \"cache-control: no-cache\",\n    \"developer_key: becbbce45f79c6f5109f848acd540567\",\n    \"secret-key: MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    \"secret-key-timestamp: 1516705204593\"\n  ),\n));\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n  echo \"cURL Error #:\" . $err;\n} else {\n  echo $response;\n}"},{"language":"csharp","code":"var client = new RestClient(\"https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:9910028267/balance?initiator_id=9910028267\");\nvar request = new RestRequest(Method.GET);\nrequest.AddHeader(\"Postman-Token\", \"db8fca45-045a-4062-85a3-9e4c5f0271e0\");\nrequest.AddHeader(\"cache-control\", \"no-cache\");\nrequest.AddHeader(\"secret-key-timestamp\", \"1516705204593\");\nrequest.AddHeader(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\");\nrequest.AddHeader(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\");\nIRestResponse response = client.Execute(request);"},{"language":"java","code":"HttpResponse<String> response = Unirest.get(\"https://staging.eko.in:25004/ekoapi/v1/customers/mobile_number:9910028267/balance?initiator_id=9910028267\")\n  .header(\"developer_key\", \"becbbce45f79c6f5109f848acd540567\")\n  .header(\"secret-key\", \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\")\n  .header(\"secret-key-timestamp\", \"1516705204593\")\n  .header(\"cache-control\", \"no-cache\")\n  .header(\"Postman-Token\", \"e96b1092-d6d5-4de5-8e20-525506bf3d96\")\n  .asString();"},{"language":"python","code":"import http.client\n\nconn = http.client.HTTPConnection(\"staging,eko,in\")\n\npayload = \"\"\n\nheaders = {\n    'developer_key': \"becbbce45f79c6f5109f848acd540567\",\n    'secret-key': \"MC6dKW278tBef+AuqL/5rW2K3WgOegF0ZHLW/FriZQw=\",\n    'secret-key-timestamp': \"1516705204593\",\n    'cache-control': \"no-cache\",\n    'Postman-Token': \"6f4f6ba1-f6a0-4ace-b0f5-8eebb22f454e\"\n    }\n\nconn.request(\"GET\", \"ekoapi,v1,customers,mobile_number:9910028267,balance\", payload, headers)\n\nres = conn.getresponse()\ndata = res.read()\n\nprint(data.decode(\"utf-8\"))"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"response_status_id\": -1,\n    \"data\": {\n        \"last_used_okekey\": \"0\",\n        \"balance\": \"2.20834002375E9\",\n        \"currency\": \"INR\",\n        \"customer_id\": \"9910028267\"\n    },\n    \"response_type_id\": 1,\n    \"message\": \"SUCCESS\",\n    \"status\": 0\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[{"_id":"5cbec39b7ac202005c899091","ref":"","in":"path","required":true,"desc":"The value of this is fixed as mobile_number","default":"","type":"string","name":"customer_id_type"},{"_id":"5cbec39b7ac202005c899090","ref":"","in":"path","required":true,"desc":"Value of mobile number with which wallet is registered with Eko(initiator id value)","default":"","type":"int","name":"customer_id"},{"_id":"5cbec39b7ac202005c89908e","ref":"","in":"header","required":true,"desc":"Your unique API key that will authenticate your request","default":"","type":"string","name":"developer_key"},{"_id":"5cbec40a5ace86002a1fa81d","ref":"","in":"header","required":true,"desc":"[refer to authentication section](https://developers.eko.in/docs/authentication)","default":"","type":"string","name":"secret-key"},{"_id":"5cbec40a5ace86002a1fa81c","ref":"","in":"header","required":true,"desc":"[refer to authentication section](https://developers.eko.in/docs/authentication)","default":"","type":"string","name":"secret-key-timestamp"},{"_id":"5cbec5d3c3b28a0045953f6a","ref":"","in":"query","required":true,"desc":"The unique cell number with which you are on-boarded on Eko's platform.","default":"","type":"int","name":"initiator_id"}],"url":"/customers/customer_id_type:customer_id/balance?initiator_id=9910028267"},"isReference":false,"order":44,"body":"","excerpt":"This API gives the remaining balance of the wallet of the partner which is registered with Eko","slug":"wallet-balance-inquiry","type":"get","title":"Wallet Balance Inquiry","__v":5,"parentDoc":null,"childrenPages":[]}

getWallet Balance Inquiry

This API gives the remaining balance of the wallet of the partner which is registered with Eko

Path Params

customer_id_type:
required
string
The value of this is fixed as mobile_number
customer_id:
required
integer
Value of mobile number with which wallet is registered with Eko(initiator id value)

Query Params

initiator_id:
required
integer
The unique cell number with which you are on-boarded on Eko's platform.

Headers

developer_key:
required
string
Your unique API key that will authenticate your request
secret-key:
required
string
[refer to authentication section](https://developers.eko.in/docs/authentication)
secret-key-timestamp:
required
string
[refer to authentication section](https://developers.eko.in/docs/authentication)

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format



{"_id":"5bc0679ee752030003c5d164","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-10-12T09:21:34.115Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":45,"body":"","excerpt":"","slug":"cash-collection-services","type":"basic","title":"Cash Collection Services","__v":0,"parentDoc":null,"childrenPages":[]}

Cash Collection Services


{"_id":"5bc06804e752030003c5d167","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-10-12T09:23:16.009Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":46,"body":"For activating your users and organization for KVB services, you would need to do the following:\n\n1. Cash Deposit in KVB branch \n1.1 [Activate service](https://developers.eko.in/docs/activate-service) (**service_code = 3**) with your user code\n1.2 Bank slip would be mailed to the user's email id on activating the service\n1.3 Use the bank slip generated to do bank deposit; eValue will be credited to your Eko account \n\n2. Cash Deposit via CDM Cards\n1.1 [Activate service](https://developers.eko.in/docs/activate-service) (**service_code = 2**) with your user code\n1.2 Eko will send CDM cards to your registered office \n1.3 Use CDM card to deposit cash; eValue will be credited to your Eko account","excerpt":"You can activate your users for bank cash deposit services and CDM services","slug":"kvb-karur-vysya-bankservices","type":"basic","title":"KVB (Karur Vysya Bank) Services","__v":0,"parentDoc":null,"childrenPages":[]}

KVB (Karur Vysya Bank) Services

You can activate your users for bank cash deposit services and CDM services

For activating your users and organization for KVB services, you would need to do the following: 1. Cash Deposit in KVB branch 1.1 [Activate service](https://developers.eko.in/docs/activate-service) (**service_code = 3**) with your user code 1.2 Bank slip would be mailed to the user's email id on activating the service 1.3 Use the bank slip generated to do bank deposit; eValue will be credited to your Eko account 2. Cash Deposit via CDM Cards 1.1 [Activate service](https://developers.eko.in/docs/activate-service) (**service_code = 2**) with your user code 1.2 Eko will send CDM cards to your registered office 1.3 Use CDM card to deposit cash; eValue will be credited to your Eko account
For activating your users and organization for KVB services, you would need to do the following: 1. Cash Deposit in KVB branch 1.1 [Activate service](https://developers.eko.in/docs/activate-service) (**service_code = 3**) with your user code 1.2 Bank slip would be mailed to the user's email id on activating the service 1.3 Use the bank slip generated to do bank deposit; eValue will be credited to your Eko account 2. Cash Deposit via CDM Cards 1.1 [Activate service](https://developers.eko.in/docs/activate-service) (**service_code = 2**) with your user code 1.2 Eko will send CDM cards to your registered office 1.3 Use CDM card to deposit cash; eValue will be credited to your Eko account
{"_id":"5c123350d184e800c0a9844a","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"556d914e42dd610d00a3cfc2","user":"5547561a9a48800d00c6e483","updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-12-13T10:24:16.331Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"auth":"required","params":[],"url":""},"isReference":false,"order":47,"body":"For activating your users and organization for Axis Bank services, you would need to do the following:\n\n1. Cash Deposit in Axis Bank Branch \n1.1 [Activate service](https://developers.eko.in/docs/activate-service) (**service_code = 4**) with your user code\n1.2 Bank slip would be mailed to the user's email id on activating the service\n1.3 Use the bank slip generated to do bank deposit; electronic value will be credited to your Eko account \n\n2. Cash Deposit via Axis Bank CDM Cards\n1.1 [Activate service](https://developers.eko.in/docs/activate-service) (**service_code = 5**) with your user code\n1.2 Eko will send CDM cards to your registered office \n1.3 Use CDM card to deposit cash; electronic value will be credited to your Eko account","excerpt":"You can activate your users for Axis Bank bank cash deposit services and CDM services","slug":"axis-bank-services","type":"basic","title":"Axis Bank Services","__v":0,"parentDoc":null,"childrenPages":[]}

Axis Bank Services

You can activate your users for Axis Bank bank cash deposit services and CDM services

For activating your users and organization for Axis Bank services, you would need to do the following: 1. Cash Deposit in Axis Bank Branch 1.1 [Activate service](https://developers.eko.in/docs/activate-service) (**service_code = 4**) with your user code 1.2 Bank slip would be mailed to the user's email id on activating the service 1.3 Use the bank slip generated to do bank deposit; electronic value will be credited to your Eko account 2. Cash Deposit via Axis Bank CDM Cards 1.1 [Activate service](https://developers.eko.in/docs/activate-service) (**service_code = 5**) with your user code 1.2 Eko will send CDM cards to your registered office 1.3 Use CDM card to deposit cash; electronic value will be credited to your Eko account
For activating your users and organization for Axis Bank services, you would need to do the following: 1. Cash Deposit in Axis Bank Branch 1.1 [Activate service](https://developers.eko.in/docs/activate-service) (**service_code = 4**) with your user code 1.2 Bank slip would be mailed to the user's email id on activating the service 1.3 Use the bank slip generated to do bank deposit; electronic value will be credited to your Eko account 2. Cash Deposit via Axis Bank CDM Cards 1.1 [Activate service](https://developers.eko.in/docs/activate-service) (**service_code = 5**) with your user code 1.2 Eko will send CDM cards to your registered office 1.3 Use CDM card to deposit cash; electronic value will be credited to your Eko account
{"_id":"5cbdb4988c3e230020b9ae86","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","category":"5c8ca86e9b3cdd00381de3ec","user":"5b878104b176670003e622e4","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-04-22T12:33:28.329Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"Please refer to the link \"https://docs.google.com/document/d/1x3p8FEaCioWHRwXpMqGOfbOHUPMvKrfRObYleieWEnk/edit?usp=sharing\" for the document for the integration on the API 2.0","excerpt":"","slug":"api-20-documentation","type":"basic","title":"API 2.0 Documentation","__v":0,"parentDoc":null,"childrenPages":[]}

API 2.0 Documentation


Please refer to the link "https://docs.google.com/document/d/1x3p8FEaCioWHRwXpMqGOfbOHUPMvKrfRObYleieWEnk/edit?usp=sharing" for the document for the integration on the API 2.0
Please refer to the link "https://docs.google.com/document/d/1x3p8FEaCioWHRwXpMqGOfbOHUPMvKrfRObYleieWEnk/edit?usp=sharing" for the document for the integration on the API 2.0