{"_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}\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]","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" } ] } [/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]
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" } ] } [/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]
{"_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  },\n  \"cols\": 2,\n  \"rows\": 28\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" }, "cols": 2, "rows": 28 } [/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" }, "cols": 2, "rows": 28 } [/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[block:embed]\n{\n  \"html\": false,\n  \"url\": \"https://www.getpostman.com/collections/509fcf553d0aad6c026d\",\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. [block:embed] { "html": false, "url": "https://www.getpostman.com/collections/509fcf553d0aad6c026d", "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. [block:embed] { "html": false, "url": "https://www.getpostman.com/collections/509fcf553d0aad6c026d", "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 and the activation of services, 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 and the activation of services, 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 and the activation of services, 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 an AePS Gateway to allow you to securely process a biometric-based cash-out and balance inquiry services for your customers.\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 3 bio-metric device operators:\n1. Morpho\n2. TMF20\n3. Mantra\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 an AePS Gateway to allow you to securely process a biometric-based cash-out and balance inquiry services for your customers. **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 3 bio-metric device operators: 1. Morpho 2. TMF20 3. Mantra [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 an AePS Gateway to allow you to securely process a biometric-based cash-out and balance inquiry services for your customers. **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 3 bio-metric device operators: 1. Morpho 2. TMF20 3. Mantra [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":"[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\\n**secret_key_timestamp**  (required) - refer to authentication section\\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 will be English - Language on AePS Gateway\\n**callback_url** (optional) - Url for communication with partner application.Callback URL should be of POST type\\n**callback_url_custom_params** (optional) - Additional payload parameters which partner wants to send while callback url is called\\n**callback_url_custom_headers** (optional) -  Additional headers which partner wants to send while callback url is called e.g. Authorization headers\"\n}\n[/block]\n**Sample code to open gateway 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\\\": \\\"20110002\\\",\\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\\\": \\\"20110002\\\",\\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\\t\\\"callback_url\\\": \\\"\\\",\\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    };\",\n      \"language\": \"javascript\",\n      \"name\": \"Sample request sent to callback Url for debit-hook\"\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.detail** \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\\\": \\\"20310001\\\"\\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  * 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\\\": \\\"20310001\\\",\\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 process.\",\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, used to generate request_hash\\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 n 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\\t\\\"eko_gateway_response\\\": {\\n\\t\\t\\\"gateway_url\\\": \\\"https://stagegateway.eko.in/v2/aeps\\\",\\n\\t\\t\\\"action\\\": \\\"response\\\",\\n\\t\\t\\\"transaction\\\": \\\"aeps\\\",\\n\\t\\t\\\"detail\\\": {\\n\\t\\t\\t\\\"client_ref_id\\\": \\\"1538558249688\\\",\\n\\t\\t\\t\\\"http_status\\\": 200,\\n\\t\\t\\t\\\"interaction_type_id\\\": 344,\\n\\t\\t\\t\\\"response\\\": {\\n\\t\\t\\t\\t\\\"status\\\": 0,\\n\\t\\t\\t\\t\\\"response_status_id\\\": 1,\\n\\t\\t\\t\\t\\\"response_type_id\\\": 1306,\\n\\t\\t\\t\\t\\\"message\\\": \\\"Transaction fail\\\",\\n\\t\\t\\t\\t\\\"data\\\": {\\n\\t\\t\\t\\t\\t\\\"tx_status\\\": \\\"1\\\",\\n\\t\\t\\t\\t\\t\\\"transaction_date\\\": \\\"\\\",\\n\\t\\t\\t\\t\\t\\\"reason\\\": \\\"Transaction not completed\\\",\\n\\t\\t\\t\\t\\t\\\"amount\\\": \\\"1000.0\\\",\\n\\t\\t\\t\\t\\t\\\"merchant_code\\\": \\\"\\\",\\n\\t\\t\\t\\t\\t\\\"shop\\\": \\\"\\\",\\n\\t\\t\\t\\t\\t\\\"sender_name\\\": \\\"Gau\\\",\\n\\t\\t\\t\\t\\t\\\"tid\\\": \\\"12950571\\\",\\n\\t\\t\\t\\t\\t\\\"auth_code\\\": \\\"\\\",\\n\\t\\t\\t\\t\\t\\\"shop_address_line1\\\": \\\"Eko India Financial Services, Haryana, Gurgaon,-122002\\\",\\n\\t\\t\\t\\t\\t\\\"user_code\\\": \\\"20810200\\\",\\n\\t\\t\\t\\t\\t\\\"merchantname\\\": \\\"Nirmal Maheshwari\\\",\\n\\t\\t\\t\\t\\t\\\"stan\\\": \\\"\\\",\\n\\t\\t\\t\\t\\t\\\"aadhar\\\": \\\"\\\",\\n\\t\\t\\t\\t\\t\\\"customer_balance\\\": \\\"\\\",\\n\\t\\t\\t\\t\\t\\\"transaction_time\\\": \\\"\\\",\\n\\t\\t\\t\\t\\t\\\"comment\\\": \\\"Decline\\\",\\n\\t\\t\\t\\t\\t\\\"bank_ref_num\\\": \\\"\\\",\\n\\t\\t\\t\\t\\t\\\"terminal_id\\\": \\\"\\\"\\n\\t\\t\\t\\t}\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n}\",\n      \"language\": \"javascript\",\n      \"name\": \"Sample e.data\"\n    }\n  ]\n}\n[/block]\nFor post-transaction confirmation, **action** value will be **response**.\n\nFor a successful transaction **eko_gateway_response.detail.response.data.tx_status** value will be 0 (zero)\n\n1 in  eko_gateway_response.detail.response.data.tx_status field represents failure of transaction\nIf any other value received in the tx_status field should be treated as a suspicious transaction.\nMoney deducted from customer bank account and not received as a Evalue will be reversed to the account in T+4 days.\n\n**If communicating using callback Url, then sample response 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\\\": \\\"1540880719857\\\",\\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\\\": 1,\\n      \\\"response_type_id\\\": 1306,\\n      \\\"message\\\": \\\"Transaction fail\\\",\\n      \\\"data\\\": {\\n        \\\"tx_status\\\": \\\"1\\\",\\n        \\\"transaction_date\\\": \\\"\\\",\\n        \\\"reason\\\": \\\"\\\",\\n        \\\"amount\\\": \\\"102.0\\\",\\n        \\\"merchant_code\\\": \\\"\\\",\\n        \\\"shop\\\": \\\"\\\",\\n        \\\"sender_name\\\": \\\"ss\\\",\\n        \\\"tid\\\": \\\"13185459\\\",\\n        \\\"auth_code\\\": \\\"\\\",\\n        \\\"shop_address_line1\\\": \\\"\\\",\\n        \\\"user_code\\\": \\\"20310001\\\",\\n        \\\"merchantname\\\": \\\"Sneha\\\",\\n        \\\"stan\\\": \\\"\\\",\\n        \\\"aadhar\\\": \\\"\\\",\\n        \\\"customer_balance\\\": \\\"\\\",\\n        \\\"transaction_time\\\": \\\"\\\",\\n        \\\"comment\\\": \\\"\\\",\\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 is **eko-response** and interaction_type_id is **344**, for final transaction\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","excerpt":"","slug":"aeps-gateway","type":"basic","title":"Technical Integration","__v":0,"parentDoc":null,"childrenPages":[]}

Technical Integration


[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\n**secret_key_timestamp** (required) - refer to authentication section\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 will be English - Language on AePS Gateway\n**callback_url** (optional) - Url for communication with partner application.Callback URL should be of POST type\n**callback_url_custom_params** (optional) - Additional payload parameters which partner wants to send while callback url is called\n**callback_url_custom_headers** (optional) - Additional headers which partner wants to send while callback url is called e.g. Authorization headers" } [/block] **Sample code to open gateway 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\": \"20110002\",\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\": \"20110002\",\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\t\"callback_url\": \"\",\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 };", "language": "javascript", "name": "Sample request sent to callback Url for debit-hook" } ] } [/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.detail** [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\": \"20310001\"\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 * 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\": \"20310001\",\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 process.", "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, used to generate request_hash\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 n 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\t\"eko_gateway_response\": {\n\t\t\"gateway_url\": \"https://stagegateway.eko.in/v2/aeps\",\n\t\t\"action\": \"response\",\n\t\t\"transaction\": \"aeps\",\n\t\t\"detail\": {\n\t\t\t\"client_ref_id\": \"1538558249688\",\n\t\t\t\"http_status\": 200,\n\t\t\t\"interaction_type_id\": 344,\n\t\t\t\"response\": {\n\t\t\t\t\"status\": 0,\n\t\t\t\t\"response_status_id\": 1,\n\t\t\t\t\"response_type_id\": 1306,\n\t\t\t\t\"message\": \"Transaction fail\",\n\t\t\t\t\"data\": {\n\t\t\t\t\t\"tx_status\": \"1\",\n\t\t\t\t\t\"transaction_date\": \"\",\n\t\t\t\t\t\"reason\": \"Transaction not completed\",\n\t\t\t\t\t\"amount\": \"1000.0\",\n\t\t\t\t\t\"merchant_code\": \"\",\n\t\t\t\t\t\"shop\": \"\",\n\t\t\t\t\t\"sender_name\": \"Gau\",\n\t\t\t\t\t\"tid\": \"12950571\",\n\t\t\t\t\t\"auth_code\": \"\",\n\t\t\t\t\t\"shop_address_line1\": \"Eko India Financial Services, Haryana, Gurgaon,-122002\",\n\t\t\t\t\t\"user_code\": \"20810200\",\n\t\t\t\t\t\"merchantname\": \"Nirmal Maheshwari\",\n\t\t\t\t\t\"stan\": \"\",\n\t\t\t\t\t\"aadhar\": \"\",\n\t\t\t\t\t\"customer_balance\": \"\",\n\t\t\t\t\t\"transaction_time\": \"\",\n\t\t\t\t\t\"comment\": \"Decline\",\n\t\t\t\t\t\"bank_ref_num\": \"\",\n\t\t\t\t\t\"terminal_id\": \"\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "language": "javascript", "name": "Sample e.data" } ] } [/block] For post-transaction confirmation, **action** value will be **response**. For a successful transaction **eko_gateway_response.detail.response.data.tx_status** value will be 0 (zero) 1 in eko_gateway_response.detail.response.data.tx_status field represents failure of transaction If any other value received in the tx_status field should be treated as a suspicious transaction. Money deducted from customer bank account and not received as a Evalue will be reversed to the account in T+4 days. **If communicating using callback Url, then sample response 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\": \"1540880719857\",\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\": 1,\n \"response_type_id\": 1306,\n \"message\": \"Transaction fail\",\n \"data\": {\n \"tx_status\": \"1\",\n \"transaction_date\": \"\",\n \"reason\": \"\",\n \"amount\": \"102.0\",\n \"merchant_code\": \"\",\n \"shop\": \"\",\n \"sender_name\": \"ss\",\n \"tid\": \"13185459\",\n \"auth_code\": \"\",\n \"shop_address_line1\": \"\",\n \"user_code\": \"20310001\",\n \"merchantname\": \"Sneha\",\n \"stan\": \"\",\n \"aadhar\": \"\",\n \"customer_balance\": \"\",\n \"transaction_time\": \"\",\n \"comment\": \"\",\n \"bank_ref_num\": \"\",\n \"terminal_id\": \"\"\n }\n }\n }\n}", "language": "json", "name": "Final AePS Response" } ] } [/block] In the above check action is **eko-response** and interaction_type_id is **344**, for final transaction 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: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\n**secret_key_timestamp** (required) - refer to authentication section\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 will be English - Language on AePS Gateway\n**callback_url** (optional) - Url for communication with partner application.Callback URL should be of POST type\n**callback_url_custom_params** (optional) - Additional payload parameters which partner wants to send while callback url is called\n**callback_url_custom_headers** (optional) - Additional headers which partner wants to send while callback url is called e.g. Authorization headers" } [/block] **Sample code to open gateway 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\": \"20110002\",\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\": \"20110002\",\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\t\"callback_url\": \"\",\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 };", "language": "javascript", "name": "Sample request sent to callback Url for debit-hook" } ] } [/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.detail** [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\": \"20310001\"\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 * 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\": \"20310001\",\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 process.", "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, used to generate request_hash\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 n 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\t\"eko_gateway_response\": {\n\t\t\"gateway_url\": \"https://stagegateway.eko.in/v2/aeps\",\n\t\t\"action\": \"response\",\n\t\t\"transaction\": \"aeps\",\n\t\t\"detail\": {\n\t\t\t\"client_ref_id\": \"1538558249688\",\n\t\t\t\"http_status\": 200,\n\t\t\t\"interaction_type_id\": 344,\n\t\t\t\"response\": {\n\t\t\t\t\"status\": 0,\n\t\t\t\t\"response_status_id\": 1,\n\t\t\t\t\"response_type_id\": 1306,\n\t\t\t\t\"message\": \"Transaction fail\",\n\t\t\t\t\"data\": {\n\t\t\t\t\t\"tx_status\": \"1\",\n\t\t\t\t\t\"transaction_date\": \"\",\n\t\t\t\t\t\"reason\": \"Transaction not completed\",\n\t\t\t\t\t\"amount\": \"1000.0\",\n\t\t\t\t\t\"merchant_code\": \"\",\n\t\t\t\t\t\"shop\": \"\",\n\t\t\t\t\t\"sender_name\": \"Gau\",\n\t\t\t\t\t\"tid\": \"12950571\",\n\t\t\t\t\t\"auth_code\": \"\",\n\t\t\t\t\t\"shop_address_line1\": \"Eko India Financial Services, Haryana, Gurgaon,-122002\",\n\t\t\t\t\t\"user_code\": \"20810200\",\n\t\t\t\t\t\"merchantname\": \"Nirmal Maheshwari\",\n\t\t\t\t\t\"stan\": \"\",\n\t\t\t\t\t\"aadhar\": \"\",\n\t\t\t\t\t\"customer_balance\": \"\",\n\t\t\t\t\t\"transaction_time\": \"\",\n\t\t\t\t\t\"comment\": \"Decline\",\n\t\t\t\t\t\"bank_ref_num\": \"\",\n\t\t\t\t\t\"terminal_id\": \"\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "language": "javascript", "name": "Sample e.data" } ] } [/block] For post-transaction confirmation, **action** value will be **response**. For a successful transaction **eko_gateway_response.detail.response.data.tx_status** value will be 0 (zero) 1 in eko_gateway_response.detail.response.data.tx_status field represents failure of transaction If any other value received in the tx_status field should be treated as a suspicious transaction. Money deducted from customer bank account and not received as a Evalue will be reversed to the account in T+4 days. **If communicating using callback Url, then sample response 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\": \"1540880719857\",\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\": 1,\n \"response_type_id\": 1306,\n \"message\": \"Transaction fail\",\n \"data\": {\n \"tx_status\": \"1\",\n \"transaction_date\": \"\",\n \"reason\": \"\",\n \"amount\": \"102.0\",\n \"merchant_code\": \"\",\n \"shop\": \"\",\n \"sender_name\": \"ss\",\n \"tid\": \"13185459\",\n \"auth_code\": \"\",\n \"shop_address_line1\": \"\",\n \"user_code\": \"20310001\",\n \"merchantname\": \"Sneha\",\n \"stan\": \"\",\n \"aadhar\": \"\",\n \"customer_balance\": \"\",\n \"transaction_time\": \"\",\n \"comment\": \"\",\n \"bank_ref_num\": \"\",\n \"terminal_id\": \"\"\n }\n }\n }\n}", "language": "json", "name": "Final AePS Response" } ] } [/block] In the above check action is **eko-response** and interaction_type_id is **344**, for final transaction 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
{"_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":"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\": \"Aadhar 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":11,"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/verify\");\nvar request = new RestRequest(Method.PUT);\nrequest.AddHeader(\"postman-token\", \"6c409c64-66fc-f90c-0628-da3fc036a6ed\");\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":"csharp"},{"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\", \"e4f39772-e2ce-c0c3-3170-8d19ed9b9893\")\n  .body(\"initiator_id=9962981729&mobile=8646546454&otp=447\")\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&ekyc_reference_number=12925632&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/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': \"617654e8-75cd-9bad-1aa1-85070f085c73\"\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":16,"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":[{"name":"Sample request for AePS activation","language":"curl","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"},{"name":"Sample request for Cash Collection","language":"curl","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'"}]},"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"}],"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. Incase 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 Aadhar Card is required.\\nIf you are sending voter card send in the parameters voter_card_front and voter_card_back. If you are sending aadhar card send int the parameters aadhar_front and aadhar_back\"\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":21,"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

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. Incase 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 Aadhar Card is required.\nIf you are sending voter card send in the parameters voter_card_front and voter_card_back. If you are sending aadhar card send int the parameters aadhar_front and aadhar_back" } [/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. Incase 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 Aadhar Card is required.\nIf you are sending voter card send in the parameters voter_card_front and voter_card_back. If you are sending aadhar card send int the parameters aadhar_front and aadhar_back" } [/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":80,"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":"","default":"mobile_number","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 id","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        \"available_limit\": 50000,\n        \"balance\": \"0.0\",\n        \"state_desc\": \"Non-Kyc\",\n        \"name\": \"user\",\n        \"mobile\": \"3000000010\",\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\": \"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\": 4,\n                \"remaining\": \"25000.0\",\n                \"status\": \"1\"\n            }\n        ],\n        \"currency\": \"INR\",\n        \"state\": \"2\",\n        \"customer_id\": \"3000000010\",\n        \"used_limit\": 0,\n        \"total_limit\": 50000\n    },\n    \"response_type_id\": 33,\n    \"message\": \"Non-KYC active\",\n    \"status\": 0\n}\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 eKYC - Rs 75k per customer per month\\n2. For non-KYC customer - Rs 50 per customer per month\\n \\nAlso, the parameter /product as an endpoint only needs to be used for a 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    \"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    \"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  },\n  \"cols\": 3,\n  \"rows\": 4\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
stringmobile_number
customer_id:
required
integer
Value of customer id
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 eKYC - Rs 75k per customer per month\n2. For non-KYC customer - Rs 50 per customer per month\n \nAlso, the parameter /product as an endpoint only needs to be used for a 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", "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.", "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" }, "cols": 3, "rows": 4 } [/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 eKYC - Rs 75k per customer per month\n2. For non-KYC customer - Rs 50 per customer per month\n \nAlso, the parameter /product as an endpoint only needs to be used for a 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", "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.", "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" }, "cols": 3, "rows": 4 } [/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","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":42,"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":"","default":"mobile_number","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 mobile number of the customer can be used","default":"","type":"int","name":"customer_id"},{"_id":"5a7041a1b0a01400369583ef","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":"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

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
product:
stringindonepal
This parameter needs to be send for a India to Nepal remittance transaction

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":"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}]},"settings":"","auth":"required","params":[{"_id":"5bdd6c0eea37cd003e8b231c","ref":"","in":"path","required":true,"desc":"","default":"mobile_number","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":"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","default":"","type":"string","name":"id_proof"},{"_id":"5bdd74f7e05af1003879dd7e","ref":"","in":"body","required":true,"desc":"This needs to be send for doing customer's KYC. This will be front image of the id proof.","default":"","type":"file","name":"file1(front)"},{"_id":"5bdd74f7e05af1003879dd7d","ref":"","in":"body","required":true,"desc":"This needs to be send for doing customer's KYC. This will be back image of the id proof.","default":"","type":"file","name":"file2(back)"},{"_id":"5bdd74f7e05af1003879dd7c","ref":"","in":"body","required":true,"desc":"This needs to be send for doing customer's KYC","default":"","type":"file","name":"customer_photo"},{"_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","default":"","type":"string","name":"secret-key"},{"_id":"5bdd74f6e05af1003879dd79","ref":"","in":"header","required":true,"desc":"refer to authentication section","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/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=6&id_proof=MH0920080003552&name=Viru&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","language":"curl"}]},"method":"put"},"isReference":false,"order":11,"body":"Parameter id_proof_type_id can have the following values:\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Id\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"2\",\n    \"0-1\": \"Passport\",\n    \"1-0\": \"3\",\n    \"1-1\": \"Voter ID\",\n    \"2-0\": \"4\",\n    \"2-1\": \"PAN + PASSBOOK\",\n    \"3-0\": \"6\",\n    \"3-1\": \"Driving License\",\n    \"4-0\": \"13\",\n    \"4-1\": \"Aadhaar Card\"\n  },\n  \"cols\": 2,\n  \"rows\": 5\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]","excerpt":"Onboard a new customer with KYC done to enable him/her to transact","slug":"create-customer-for-kyc","type":"put","title":"Create Customer for KYC","__v":21,"parentDoc":null,"childrenPages":[]}

putCreate Customer for KYC

Onboard a new customer with KYC done to enable him/her to transact

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

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
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
file1:
required
file
This needs to be send for doing customer's KYC. This will be front image of the id proof.
file2:
required
file
This needs to be send for doing customer's KYC. This will be back image of the id proof.
customer_photo:
required
file
This needs to be send for doing customer's KYC

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
Parameter id_proof_type_id can have the following values: [block:parameters] { "data": { "h-0": "Id", "h-1": "Description", "0-0": "2", "0-1": "Passport", "1-0": "3", "1-1": "Voter ID", "2-0": "4", "2-1": "PAN + PASSBOOK", "3-0": "6", "3-1": "Driving License", "4-0": "13", "4-1": "Aadhaar Card" }, "cols": 2, "rows": 5 } [/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]

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", "h-1": "Description", "0-0": "2", "0-1": "Passport", "1-0": "3", "1-1": "Voter ID", "2-0": "4", "2-1": "PAN + PASSBOOK", "3-0": "6", "3-1": "Driving License", "4-0": "13", "4-1": "Aadhaar Card" }, "cols": 2, "rows": 5 } [/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]
{"_id":"556d92a8e24c5a0d00703457","project":"554757ba6184460d006fd8b4","version":"554757bb6184460d006fd8b7","__v":28,"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":12,"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":13,"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":"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":14,"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":15,"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\": \"available_channel\",\n    \"2-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\": \"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    \"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    \"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 enable disable the IMPS, NEFT option on your UI on the basis of the value of this parameter.\",\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/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":16,"__v":61,"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": "available_channel", "2-0": "is_verified", "h-0": "Parameter Name", "h-1": "Description", "h-2": "Use", "0-1": "Unique Id generated for each recipient", "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.", "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", "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 enable disable the IMPS, NEFT option on your UI on the basis of the value of this parameter.", "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/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": "available_channel", "2-0": "is_verified", "h-0": "Parameter Name", "h-1": "Description", "h-2": "Use", "0-1": "Unique Id generated for each recipient", "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.", "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", "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 enable disable the IMPS, NEFT option on your UI on the basis of the value of this parameter.", "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/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":17,"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":18,"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":[{"status":200,"language":"json","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\t},\n\t\"response_type_id\": 325,\n\t\"message\": \"Transaction successful\",\n\t\"status\": 0\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"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":"","default":"","type":"int","name":"initiator_id"},{"_id":"5a705de55420a500121875fc","ref":"","in":"body","required":true,"desc":"","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":19,"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)\"\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":26,"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
client_ref_id:
required
integer
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)" } [/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)" } [/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":"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\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":20,"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":11,"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":21,"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":22,"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":23,"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":24,"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://docs.google.com/spreadsheets/d/1KrgSwsLWOdN2ejXGhCTlEHrZjZLVvPUyVrQDJdPMEIU/edit?usp=sharing\",\n  \"title\": \"Bank_List\",\n  \"favicon\": \"https://ssl.gstatic.com/docs/spreadsheets/favicon_jfk2.png\",\n  \"image\": \"https://lh6.googleusercontent.com/iieJyALaGqwyTR6-yBZP1Z0aYEA4xUQVDLff9XTJr3tQ3fETB7UT7nckIi0vWSokOgn_Gw=w1200-h630-p\"\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":15,"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://docs.google.com/spreadsheets/d/1KrgSwsLWOdN2ejXGhCTlEHrZjZLVvPUyVrQDJdPMEIU/edit?usp=sharing", "title": "Bank_List", "favicon": "https://ssl.gstatic.com/docs/spreadsheets/favicon_jfk2.png", "image": "https://lh6.googleusercontent.com/iieJyALaGqwyTR6-yBZP1Z0aYEA4xUQVDLff9XTJr3tQ3fETB7UT7nckIi0vWSokOgn_Gw=w1200-h630-p" } [/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://docs.google.com/spreadsheets/d/1KrgSwsLWOdN2ejXGhCTlEHrZjZLVvPUyVrQDJdPMEIU/edit?usp=sharing", "title": "Bank_List", "favicon": "https://ssl.gstatic.com/docs/spreadsheets/favicon_jfk2.png", "image": "https://lh6.googleusercontent.com/iieJyALaGqwyTR6-yBZP1Z0aYEA4xUQVDLff9XTJr3tQ3fETB7UT7nckIi0vWSokOgn_Gw=w1200-h630-p" } [/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":25,"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":38,"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":"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":39,"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":40,"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":999,"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,"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