{"_id":"60ca6842be2e9400483ca525","project":"56a1c9c13845200d0066d6fe","version":"60ca6842be2e9400483ca546","category":"60ca6842be2e9400483ca4f8","user":"5c768f83cc5f9f004390f962","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-10-03T11:49:28.262Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"Mojo developers program (MDP) is a developer platform created by Instamojo to collaborate with application developers across the globe. At Instamojo, we aspire to solve problems faced by MSMEs in our country along with other like-minded solution providers. The application developers can build applications and publish them on the Instamojo development platform. Instamojo sellers will be able to view the application from the Instamojo app store (Android and web) and will be able to subscribe to the app.\n\nThis is a unique one-of-a-kind opportunity for a developer/solution provider to work closely with Instamojo, get access to over 2 Million MSMEs on the platform, and create a new revenue stream.","excerpt":"","slug":"mojo-developers-program","type":"basic","title":"Mojo Developers Program (MDP)","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Mojo Developers Program (MDP)


Mojo developers program (MDP) is a developer platform created by Instamojo to collaborate with application developers across the globe. At Instamojo, we aspire to solve problems faced by MSMEs in our country along with other like-minded solution providers. The application developers can build applications and publish them on the Instamojo development platform. Instamojo sellers will be able to view the application from the Instamojo app store (Android and web) and will be able to subscribe to the app. This is a unique one-of-a-kind opportunity for a developer/solution provider to work closely with Instamojo, get access to over 2 Million MSMEs on the platform, and create a new revenue stream.
Mojo developers program (MDP) is a developer platform created by Instamojo to collaborate with application developers across the globe. At Instamojo, we aspire to solve problems faced by MSMEs in our country along with other like-minded solution providers. The application developers can build applications and publish them on the Instamojo development platform. Instamojo sellers will be able to view the application from the Instamojo app store (Android and web) and will be able to subscribe to the app. This is a unique one-of-a-kind opportunity for a developer/solution provider to work closely with Instamojo, get access to over 2 Million MSMEs on the platform, and create a new revenue stream.
{"_id":"60ca6842be2e9400483ca526","project":"56a1c9c13845200d0066d6fe","version":"60ca6842be2e9400483ca546","category":"60ca6842be2e9400483ca4f8","user":"5c768f83cc5f9f004390f962","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-10-03T11:52:52.970Z","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":1,"body":"[block:api-header]\n{\n  \"title\": \"Application programming interfaces (APIs)\"\n}\n[/block]\nInstamojo developer platform will allow developers to access merchant's data to create a solution. Following are the basic APIs Instamojo will expose in the first version:\n\n  * Online Store API (Store detail and store contact details)\n  * Online Store Orders API (read Orders, list Orders, write Order details) \n  * Online Store Products API (read Products, list Products, write Products details)","excerpt":"","slug":"features-of-mdp","type":"basic","title":"Features of MDP","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Features of MDP


[block:api-header] { "title": "Application programming interfaces (APIs)" } [/block] Instamojo developer platform will allow developers to access merchant's data to create a solution. Following are the basic APIs Instamojo will expose in the first version: * Online Store API (Store detail and store contact details) * Online Store Orders API (read Orders, list Orders, write Order details) * Online Store Products API (read Products, list Products, write Products details)
[block:api-header] { "title": "Application programming interfaces (APIs)" } [/block] Instamojo developer platform will allow developers to access merchant's data to create a solution. Following are the basic APIs Instamojo will expose in the first version: * Online Store API (Store detail and store contact details) * Online Store Orders API (read Orders, list Orders, write Order details) * Online Store Products API (read Products, list Products, write Products details)
{"_id":"60ca6842be2e9400483ca528","project":"56a1c9c13845200d0066d6fe","version":"60ca6842be2e9400483ca546","category":"60ca6842be2e9400483ca4f8","user":"5ce26a9d4c3d820056874747","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-10-03T12:18:48.201Z","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":2,"body":"Instamojo developer platform will enable developers to publish an application that should be hosted by the developer on their end and will have the following information points shown on the Instamojo App store \n\n  * Application Logo\n  * Application Name\n  * Application Description\n  * Application Category\n  * Application Images (Up to 5 high-quality images)\n  * Application Video (Youtube video link - How to use the App)\n  * App URL (App to be hosted by the developer and a URL needs to be provided, this URL should \n     open in an iframe on Instamojo Appstore)\n  * Redirect URI (For OAuth redirection)\n  * Data Access Permissions requirement from the merchants\n\n\n\nApp URL will be the URL to which the merchant from Instamojo will be taken to, once they click on the 'Subscribe' button on the App page. The App URL will be a URL pointing to the App developers domain, where the AUTH API endpoints will be triggered for obtaining the consent from the merchant as well as the access token corresponding to the merchant. \n\n\n\n\n**To set up a Backend App:**\n\nFill in the details for the above-mentioned parameters and go ahead with the setup. Select the permissions for which you will be making the API calls. For eg: Orders read, Orders write, Products read. \n\nOnce the permissions are selected and submitted, you are ready to run our API endpoints and test ahead. \n\n\n\n\n**To set up a Frontend App:** \n\nThings to configure while you are submitting an App for utilizing script:\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/fb76d5b-Screenshot_2021-07-20_at_20.01.45.png\",\n        \"Screenshot 2021-07-20 at 20.01.45.png\",\n        702,\n        655,\n        \"#333\"\n      ]\n    }\n  ]\n}\n[/block]\n\n1. If you are submitting an app that does not require the merchant to be redirected to your platform for the script to run, then both the URL params (Redirect and Hosted app - ref above screenshot) can be skipped. \n\nNOTE: \n\nA use-case for your app to not require the redirection and hosted app URL would be when your script has no variables or that there are variables, but the merchant is manually updating the value for the variables on the Instamojo interface. \n\nA use-case for your app to require the redirection and hosted app URL would be where you, as the developer, are the ones updating the value for the variables once the merchant authorizes you to perform this action. \n\nFor this, the authorization code will be shared with you via the redirection URL that is provided. The merchant will be able to access your interface, if you require so, via the hosted app URL. You need only the authorization to hit our API endpoint and facilitate the script update action.\n\n​​Also, you cannot add or remove the redirect or hosted app URLs while editing the app. You can only modify the values of already added URLs. Adding or removing these URLs is not permitted once the app is created irrespective of the app status (eg, even when the app is not live yet). \n\n\nDifferent types of Page types are: \n\na) Product page - the script will be applied to all product pages \nb) Category page - the script will be applied to all category pages \nc) Custom page - the script will be applied to all custom pages created by the merchant\nd) Store pages (Home/FAQ, etc) - These are pages that do not belong to the Product, Category or Custom pages. A few examples would be the Home page and FAQ page \n[d = e - (a+b+c)]\ne) Store wide (All) - the script will be applied on all pages of the store \n[e = a+b+c+d]\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/ec9fb34-Screenshot_2021-07-20_at_20.26.49.png\",\n        \"Screenshot 2021-07-20 at 20.26.49.png\",\n        693,\n        281,\n        \"#333\"\n      ]\n    }\n  ]\n}\n[/block]\n\n2. When you add the script, ensure that the variables are provided in curly brackets (ref above \n     screenshot). \n\n3. These variables need to be declared in the (+ Add Variable) section. \n\n\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/6716dd3-Screenshot_2021-07-20_at_20.26.28.png\",\n        \"Screenshot 2021-07-20 at 20.26.28.png\",\n        402,\n        458,\n        \"#333\"\n      ]\n    }\n  ]\n}\n[/block]\n4. When adding a variable, ensure that a description is given for the variable so that the user \n    experience is smooth. \n\n5. Once submitted, if you have provided a redirection URL, the permission page will be shown, \n    where you can tick the ‘Script Values’ permission. If a redirection URL is not provided, the \n    permission page will not be shown.","excerpt":"","slug":"publish-application","type":"basic","title":"Create/Publish Application","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Create/Publish Application


Instamojo developer platform will enable developers to publish an application that should be hosted by the developer on their end and will have the following information points shown on the Instamojo App store * Application Logo * Application Name * Application Description * Application Category * Application Images (Up to 5 high-quality images) * Application Video (Youtube video link - How to use the App) * App URL (App to be hosted by the developer and a URL needs to be provided, this URL should open in an iframe on Instamojo Appstore) * Redirect URI (For OAuth redirection) * Data Access Permissions requirement from the merchants App URL will be the URL to which the merchant from Instamojo will be taken to, once they click on the 'Subscribe' button on the App page. The App URL will be a URL pointing to the App developers domain, where the AUTH API endpoints will be triggered for obtaining the consent from the merchant as well as the access token corresponding to the merchant. **To set up a Backend App:** Fill in the details for the above-mentioned parameters and go ahead with the setup. Select the permissions for which you will be making the API calls. For eg: Orders read, Orders write, Products read. Once the permissions are selected and submitted, you are ready to run our API endpoints and test ahead. **To set up a Frontend App:** Things to configure while you are submitting an App for utilizing script: [block:image] { "images": [ { "image": [ "https://files.readme.io/fb76d5b-Screenshot_2021-07-20_at_20.01.45.png", "Screenshot 2021-07-20 at 20.01.45.png", 702, 655, "#333" ] } ] } [/block] 1. If you are submitting an app that does not require the merchant to be redirected to your platform for the script to run, then both the URL params (Redirect and Hosted app - ref above screenshot) can be skipped. NOTE: A use-case for your app to not require the redirection and hosted app URL would be when your script has no variables or that there are variables, but the merchant is manually updating the value for the variables on the Instamojo interface. A use-case for your app to require the redirection and hosted app URL would be where you, as the developer, are the ones updating the value for the variables once the merchant authorizes you to perform this action. For this, the authorization code will be shared with you via the redirection URL that is provided. The merchant will be able to access your interface, if you require so, via the hosted app URL. You need only the authorization to hit our API endpoint and facilitate the script update action. ​​Also, you cannot add or remove the redirect or hosted app URLs while editing the app. You can only modify the values of already added URLs. Adding or removing these URLs is not permitted once the app is created irrespective of the app status (eg, even when the app is not live yet). Different types of Page types are: a) Product page - the script will be applied to all product pages b) Category page - the script will be applied to all category pages c) Custom page - the script will be applied to all custom pages created by the merchant d) Store pages (Home/FAQ, etc) - These are pages that do not belong to the Product, Category or Custom pages. A few examples would be the Home page and FAQ page [d = e - (a+b+c)] e) Store wide (All) - the script will be applied on all pages of the store [e = a+b+c+d] [block:image] { "images": [ { "image": [ "https://files.readme.io/ec9fb34-Screenshot_2021-07-20_at_20.26.49.png", "Screenshot 2021-07-20 at 20.26.49.png", 693, 281, "#333" ] } ] } [/block] 2. When you add the script, ensure that the variables are provided in curly brackets (ref above screenshot). 3. These variables need to be declared in the (+ Add Variable) section. [block:image] { "images": [ { "image": [ "https://files.readme.io/6716dd3-Screenshot_2021-07-20_at_20.26.28.png", "Screenshot 2021-07-20 at 20.26.28.png", 402, 458, "#333" ] } ] } [/block] 4. When adding a variable, ensure that a description is given for the variable so that the user experience is smooth. 5. Once submitted, if you have provided a redirection URL, the permission page will be shown, where you can tick the ‘Script Values’ permission. If a redirection URL is not provided, the permission page will not be shown.
Instamojo developer platform will enable developers to publish an application that should be hosted by the developer on their end and will have the following information points shown on the Instamojo App store * Application Logo * Application Name * Application Description * Application Category * Application Images (Up to 5 high-quality images) * Application Video (Youtube video link - How to use the App) * App URL (App to be hosted by the developer and a URL needs to be provided, this URL should open in an iframe on Instamojo Appstore) * Redirect URI (For OAuth redirection) * Data Access Permissions requirement from the merchants App URL will be the URL to which the merchant from Instamojo will be taken to, once they click on the 'Subscribe' button on the App page. The App URL will be a URL pointing to the App developers domain, where the AUTH API endpoints will be triggered for obtaining the consent from the merchant as well as the access token corresponding to the merchant. **To set up a Backend App:** Fill in the details for the above-mentioned parameters and go ahead with the setup. Select the permissions for which you will be making the API calls. For eg: Orders read, Orders write, Products read. Once the permissions are selected and submitted, you are ready to run our API endpoints and test ahead. **To set up a Frontend App:** Things to configure while you are submitting an App for utilizing script: [block:image] { "images": [ { "image": [ "https://files.readme.io/fb76d5b-Screenshot_2021-07-20_at_20.01.45.png", "Screenshot 2021-07-20 at 20.01.45.png", 702, 655, "#333" ] } ] } [/block] 1. If you are submitting an app that does not require the merchant to be redirected to your platform for the script to run, then both the URL params (Redirect and Hosted app - ref above screenshot) can be skipped. NOTE: A use-case for your app to not require the redirection and hosted app URL would be when your script has no variables or that there are variables, but the merchant is manually updating the value for the variables on the Instamojo interface. A use-case for your app to require the redirection and hosted app URL would be where you, as the developer, are the ones updating the value for the variables once the merchant authorizes you to perform this action. For this, the authorization code will be shared with you via the redirection URL that is provided. The merchant will be able to access your interface, if you require so, via the hosted app URL. You need only the authorization to hit our API endpoint and facilitate the script update action. ​​Also, you cannot add or remove the redirect or hosted app URLs while editing the app. You can only modify the values of already added URLs. Adding or removing these URLs is not permitted once the app is created irrespective of the app status (eg, even when the app is not live yet). Different types of Page types are: a) Product page - the script will be applied to all product pages b) Category page - the script will be applied to all category pages c) Custom page - the script will be applied to all custom pages created by the merchant d) Store pages (Home/FAQ, etc) - These are pages that do not belong to the Product, Category or Custom pages. A few examples would be the Home page and FAQ page [d = e - (a+b+c)] e) Store wide (All) - the script will be applied on all pages of the store [e = a+b+c+d] [block:image] { "images": [ { "image": [ "https://files.readme.io/ec9fb34-Screenshot_2021-07-20_at_20.26.49.png", "Screenshot 2021-07-20 at 20.26.49.png", 693, 281, "#333" ] } ] } [/block] 2. When you add the script, ensure that the variables are provided in curly brackets (ref above screenshot). 3. These variables need to be declared in the (+ Add Variable) section. [block:image] { "images": [ { "image": [ "https://files.readme.io/6716dd3-Screenshot_2021-07-20_at_20.26.28.png", "Screenshot 2021-07-20 at 20.26.28.png", 402, 458, "#333" ] } ] } [/block] 4. When adding a variable, ensure that a description is given for the variable so that the user experience is smooth. 5. Once submitted, if you have provided a redirection URL, the permission page will be shown, where you can tick the ‘Script Values’ permission. If a redirection URL is not provided, the permission page will not be shown.
{"_id":"60ca6842be2e9400483ca529","project":"56a1c9c13845200d0066d6fe","version":"60ca6842be2e9400483ca546","category":"60ca6842be2e9400483ca4f8","user":"5ce26a9d4c3d820056874747","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-10-03T12:20:17.458Z","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":3,"body":"The application developers can build apps where the Instamojo merchant will be able to make payment for the services they provide. The application developer should use the Instamojo payment gateway to accept payments. Instamojo will credit the amount to the application developer bank account in 3 days from the day the merchant pays for the service.","excerpt":"","slug":"in-app-purchases","type":"basic","title":"In-App Purchases","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

In-App Purchases


The application developers can build apps where the Instamojo merchant will be able to make payment for the services they provide. The application developer should use the Instamojo payment gateway to accept payments. Instamojo will credit the amount to the application developer bank account in 3 days from the day the merchant pays for the service.
The application developers can build apps where the Instamojo merchant will be able to make payment for the services they provide. The application developer should use the Instamojo payment gateway to accept payments. Instamojo will credit the amount to the application developer bank account in 3 days from the day the merchant pays for the service.
{"_id":"60ca6842be2e9400483ca52a","project":"56a1c9c13845200d0066d6fe","version":"60ca6842be2e9400483ca546","category":"60ca6842be2e9400483ca4f8","user":"5ce26a9d4c3d820056874747","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-10-03T12:21:20.812Z","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":4,"body":"Merchants can view all the App details (Name, description, etc) when they click on the App in the Instamojo App store. Once they subscribe to the App, the App opens on the Instamojo platform and merchants can access all the App features. \n\nThe merchant needs to be validated by Instamojo before they can get access to all the App features in case they open the App URL directly on the developer's App/website. Once the merchant is authenticated by Instamojo and authorizes the data access, the developer can access merchant data from Instamojo on their website/App.\n\nDetailed view of Merchant/Developer Experience \n[block:embed]\n{\n  \"html\": \"<iframe class=\\\"embedly-embed\\\" src=\\\"//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdocs.google.com%2Fpresentation%2Fembed%3Fid%3D1-E_BWGOERbjLTnR9fnp_bzQmuY9D9FJDqud0--PWR7A%26size%3Dl&url=https%3A%2F%2Fdocs.google.com%2Fpresentation%2Fd%2F1-E_BWGOERbjLTnR9fnp_bzQmuY9D9FJDqud0--PWR7A%2Fedit%3Fusp%3Dsharing&image=https%3A%2F%2Flh6.googleusercontent.com%2F5TeXkHH2M4z0JmmkHnZir_w1AJGPUagdupI0feDCLZNbMlhza6EbUBREQQJSaUhReygwQQ%3Dw1200-h630-p&key=f2aa6fc3595946d0afc3d76cbbd25dc3&type=text%2Fhtml&schema=google\\\" width=\\\"700\\\" height=\\\"559\\\" scrolling=\\\"no\\\" frameborder=\\\"0\\\" allow=\\\"autoplay; fullscreen\\\" allowfullscreen=\\\"true\\\"></iframe>\",\n  \"url\": \"https://docs.google.com/presentation/d/1-E_BWGOERbjLTnR9fnp_bzQmuY9D9FJDqud0--PWR7A/edit?usp=sharing\",\n  \"title\": \"Merchant/Developer Experience\",\n  \"favicon\": \"https://ssl.gstatic.com/docs/presentations/images/favicon5.ico\",\n  \"image\": \"https://lh6.googleusercontent.com/5TeXkHH2M4z0JmmkHnZir_w1AJGPUagdupI0feDCLZNbMlhza6EbUBREQQJSaUhReygwQQ=w1200-h630-p\"\n}\n[/block]","excerpt":"","slug":"merchant-experience","type":"basic","title":"Merchant Experience","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Merchant Experience


Merchants can view all the App details (Name, description, etc) when they click on the App in the Instamojo App store. Once they subscribe to the App, the App opens on the Instamojo platform and merchants can access all the App features. The merchant needs to be validated by Instamojo before they can get access to all the App features in case they open the App URL directly on the developer's App/website. Once the merchant is authenticated by Instamojo and authorizes the data access, the developer can access merchant data from Instamojo on their website/App. Detailed view of Merchant/Developer Experience [block:embed] { "html": "<iframe class=\"embedly-embed\" src=\"//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdocs.google.com%2Fpresentation%2Fembed%3Fid%3D1-E_BWGOERbjLTnR9fnp_bzQmuY9D9FJDqud0--PWR7A%26size%3Dl&url=https%3A%2F%2Fdocs.google.com%2Fpresentation%2Fd%2F1-E_BWGOERbjLTnR9fnp_bzQmuY9D9FJDqud0--PWR7A%2Fedit%3Fusp%3Dsharing&image=https%3A%2F%2Flh6.googleusercontent.com%2F5TeXkHH2M4z0JmmkHnZir_w1AJGPUagdupI0feDCLZNbMlhza6EbUBREQQJSaUhReygwQQ%3Dw1200-h630-p&key=f2aa6fc3595946d0afc3d76cbbd25dc3&type=text%2Fhtml&schema=google\" width=\"700\" height=\"559\" scrolling=\"no\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen=\"true\"></iframe>", "url": "https://docs.google.com/presentation/d/1-E_BWGOERbjLTnR9fnp_bzQmuY9D9FJDqud0--PWR7A/edit?usp=sharing", "title": "Merchant/Developer Experience", "favicon": "https://ssl.gstatic.com/docs/presentations/images/favicon5.ico", "image": "https://lh6.googleusercontent.com/5TeXkHH2M4z0JmmkHnZir_w1AJGPUagdupI0feDCLZNbMlhza6EbUBREQQJSaUhReygwQQ=w1200-h630-p" } [/block]
Merchants can view all the App details (Name, description, etc) when they click on the App in the Instamojo App store. Once they subscribe to the App, the App opens on the Instamojo platform and merchants can access all the App features. The merchant needs to be validated by Instamojo before they can get access to all the App features in case they open the App URL directly on the developer's App/website. Once the merchant is authenticated by Instamojo and authorizes the data access, the developer can access merchant data from Instamojo on their website/App. Detailed view of Merchant/Developer Experience [block:embed] { "html": "<iframe class=\"embedly-embed\" src=\"//cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdocs.google.com%2Fpresentation%2Fembed%3Fid%3D1-E_BWGOERbjLTnR9fnp_bzQmuY9D9FJDqud0--PWR7A%26size%3Dl&url=https%3A%2F%2Fdocs.google.com%2Fpresentation%2Fd%2F1-E_BWGOERbjLTnR9fnp_bzQmuY9D9FJDqud0--PWR7A%2Fedit%3Fusp%3Dsharing&image=https%3A%2F%2Flh6.googleusercontent.com%2F5TeXkHH2M4z0JmmkHnZir_w1AJGPUagdupI0feDCLZNbMlhza6EbUBREQQJSaUhReygwQQ%3Dw1200-h630-p&key=f2aa6fc3595946d0afc3d76cbbd25dc3&type=text%2Fhtml&schema=google\" width=\"700\" height=\"559\" scrolling=\"no\" frameborder=\"0\" allow=\"autoplay; fullscreen\" allowfullscreen=\"true\"></iframe>", "url": "https://docs.google.com/presentation/d/1-E_BWGOERbjLTnR9fnp_bzQmuY9D9FJDqud0--PWR7A/edit?usp=sharing", "title": "Merchant/Developer Experience", "favicon": "https://ssl.gstatic.com/docs/presentations/images/favicon5.ico", "image": "https://lh6.googleusercontent.com/5TeXkHH2M4z0JmmkHnZir_w1AJGPUagdupI0feDCLZNbMlhza6EbUBREQQJSaUhReygwQQ=w1200-h630-p" } [/block]
{"_id":"628b5742c5db36008f880798","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Import API Collection to Postman","type":"basic","slug":"import-api-collection-to-postman","excerpt":"","body":"Postman is an API platform for building, using, and testing APIs. You can use Postman to run the API endpoints given in this documentation without coding and also export the API to a ready-to-run code snippet of the programming language of your choice. \n\nThe Postman collection containing all the API endpoints mentioned in this documentation (v2-mdp) can be imported using the link: \n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Live/Production API collection: https://www.getpostman.com/collections/f68b1c778715ed70288d\"\n}\n[/block]\nThe key details like [Client ID and Client Secret](https://docs.instamojo.com/v2-mdp/docs/setup1), along with other relevant data for running the API endpoint should be provided from your end. \n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"Facing trouble importing the collection? Click [here](https://learning.postman.com/docs/getting-started/importing-and-exporting-data/) for the guide.\"\n}\n[/block]","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-05-23T09:43:30.965Z","user":"5c45a4f06cf9350c77afa79c","category":"628b541c76c33300a309d867","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":0,"childrenPages":[]}

Import API Collection to Postman


Postman is an API platform for building, using, and testing APIs. You can use Postman to run the API endpoints given in this documentation without coding and also export the API to a ready-to-run code snippet of the programming language of your choice. The Postman collection containing all the API endpoints mentioned in this documentation (v2-mdp) can be imported using the link: [block:callout] { "type": "info", "body": "Live/Production API collection: https://www.getpostman.com/collections/f68b1c778715ed70288d" } [/block] The key details like [Client ID and Client Secret](https://docs.instamojo.com/v2-mdp/docs/setup1), along with other relevant data for running the API endpoint should be provided from your end. [block:callout] { "type": "warning", "body": "Facing trouble importing the collection? Click [here](https://learning.postman.com/docs/getting-started/importing-and-exporting-data/) for the guide." } [/block]
Postman is an API platform for building, using, and testing APIs. You can use Postman to run the API endpoints given in this documentation without coding and also export the API to a ready-to-run code snippet of the programming language of your choice. The Postman collection containing all the API endpoints mentioned in this documentation (v2-mdp) can be imported using the link: [block:callout] { "type": "info", "body": "Live/Production API collection: https://www.getpostman.com/collections/f68b1c778715ed70288d" } [/block] The key details like [Client ID and Client Secret](https://docs.instamojo.com/v2-mdp/docs/setup1), along with other relevant data for running the API endpoint should be provided from your end. [block:callout] { "type": "warning", "body": "Facing trouble importing the collection? Click [here](https://learning.postman.com/docs/getting-started/importing-and-exporting-data/) for the guide." } [/block]
{"_id":"61ffbfe1b04b0501e1e2f7eb","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","params":[],"examples":{"codes":[]}},"next":{"description":"","pages":[]},"title":"SETUP","type":"basic","slug":"setup1","excerpt":"","body":"Please note :\n  *  The live platform can be used for sandbox testing\n  *  The developer Sign-In/Dashboard URL is developers.instamojo.com\n  *  The base API endpoint for the production environment is https://api.instamojo.com/ \n  *  Base OAuth endpoint for the production environment is https://www.instamojo.com/ \n\nSteps to set up the environment: \n\n  * Sign up on https://developers.instamojo.com/\n  * Post sign up, go to the URL (https://developers.instamojo.com/)\n  * Click on the “Add New App” CTA\n  * Add all the required App details and click on “submit”\n  * Once the App is successfully submitted, you can view the App on the dashboard \n     (https://developers.instamojo.com/dashboard/)\n  * Click on the App to view the App details, on the App details page click on the three dots in the \n     right-hand side to view the options \n  * Among the options click on “View Credentials” to view the Client ID and Client Secret \n     (Example is shown below)\n  *  Save the Client ID and Client Secret with you as we will require these for the next steps.\n  \n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/ed1dc77-Screenshot_2019-10-03_17.54.02.png\",\n        \"Screenshot 2019-10-03 17.54.02.png\",\n        688,\n        576,\n        \"#43445a\"\n      ]\n    }\n  ]\n}\n[/block]","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-02-06T12:32:33.575Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffbf7eb10a940139565ece","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":0,"parentDoc":null,"childrenPages":[]}

SETUP


Please note : * The live platform can be used for sandbox testing * The developer Sign-In/Dashboard URL is developers.instamojo.com * The base API endpoint for the production environment is https://api.instamojo.com/ * Base OAuth endpoint for the production environment is https://www.instamojo.com/ Steps to set up the environment: * Sign up on https://developers.instamojo.com/ * Post sign up, go to the URL (https://developers.instamojo.com/) * Click on the “Add New App” CTA * Add all the required App details and click on “submit” * Once the App is successfully submitted, you can view the App on the dashboard (https://developers.instamojo.com/dashboard/) * Click on the App to view the App details, on the App details page click on the three dots in the right-hand side to view the options * Among the options click on “View Credentials” to view the Client ID and Client Secret (Example is shown below) * Save the Client ID and Client Secret with you as we will require these for the next steps. [block:image] { "images": [ { "image": [ "https://files.readme.io/ed1dc77-Screenshot_2019-10-03_17.54.02.png", "Screenshot 2019-10-03 17.54.02.png", 688, 576, "#43445a" ] } ] } [/block]
Please note : * The live platform can be used for sandbox testing * The developer Sign-In/Dashboard URL is developers.instamojo.com * The base API endpoint for the production environment is https://api.instamojo.com/ * Base OAuth endpoint for the production environment is https://www.instamojo.com/ Steps to set up the environment: * Sign up on https://developers.instamojo.com/ * Post sign up, go to the URL (https://developers.instamojo.com/) * Click on the “Add New App” CTA * Add all the required App details and click on “submit” * Once the App is successfully submitted, you can view the App on the dashboard (https://developers.instamojo.com/dashboard/) * Click on the App to view the App details, on the App details page click on the three dots in the right-hand side to view the options * Among the options click on “View Credentials” to view the Client ID and Client Secret (Example is shown below) * Save the Client ID and Client Secret with you as we will require these for the next steps. [block:image] { "images": [ { "image": [ "https://files.readme.io/ed1dc77-Screenshot_2019-10-03_17.54.02.png", "Screenshot 2019-10-03 17.54.02.png", 688, 576, "#43445a" ] } ] } [/block]
{"_id":"60ca6842be2e9400483ca52c","project":"56a1c9c13845200d0066d6fe","version":"60ca6842be2e9400483ca546","category":"61ffbf7eb10a940139565ece","user":"5ce26a9d4c3d820056874747","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-10-03T13:01:47.323Z","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":1,"body":"All API interactions require you to have authentication credentials. Use the client_id and client_secret obtained while creating an app to authenticate yourself against the API. We provide an access_token/refresh_token Oauth2 authentication.\n\nThe application can ask the following 10 scopes explicitly:\n\n  * store-inventory:read \n  * store-orders:read \n  * store-settings:read \n  * store-inventory:write \n  * store-orders:write \n  * store-settings:write\n  * user-contact:read \n  * user-info:read\n  * payments:read \n  * payouts:read \n  \n**  Steps to generate an access token for the app user\n**\n\n The oauth2 flow will work as described below  \n\nWe have taken some example values for all the data points like Client ID, Client Secret, Redirect URI and State. Please use the actual values.\n\n  * From the Frontend Make GET request on /oauth2/authorize\n\nExamples :\n\nSample Request 1 (one scope - payments:read):\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://www.instamojo.com/oauth2/authorize?scope=payments:read &redirect_uri=https://app.example.com/oauth2/callback \\n&response_type=code&client_id=812741506391&state=af0ifjsldkj\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nSample Request 2\n(multiple scopes - all (space delimited)):\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"https://www.instamojo.com/oauth2/authorize?scope=payments:read payouts:read orders:read user-info:read user-contact:read &redirect_uri=https://app.example.com/oauth2/callback \\n&response_type=code&client_id=812741506391&state=af0ifjsldkj\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n  * Above we have shown a couple of sample GET requests, with one and multiple scopes (In case of multiple scopes, scopes need to be separated by a space)\n  * The redirect_uri is the URL of the client application that the authorization grant should be returned to. \n  * The value of redirect_uri should match the value from the App registration process (at Instamojo). We need to make sure that the authorization is not being bounced back to a foreign application.\n  * Client ID can be accessed as shown in 7th step of the Setup process (Page 6)\n  * State is a security flag, similar to CSRF\n\n2. If the above request is valid then the user is redirected to an authorize page, shown below\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/a6512be-Screenshot_2019-10-03_18.18.04.png\",\n        \"Screenshot 2019-10-03 18.18.04.png\",\n        1016,\n        660,\n        \"#e4e4e5\"\n      ]\n    }\n  ]\n}\n[/block]\nIf the user authorizes the app, the user is redirected to the application.\nResponse:\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"HTTP/1.1 302 Found\\nLocation: https://app.example.com/oauth2/callback?\\ncode=MsCeLvIaQm6bTrgtp7&state=af0ifjsldkj\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nThe code returned is the authorization grant and state is to ensure it's not forged and it's from the same request. The authorization code is valid for 60 seconds.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/78f9702-Screenshot_2019-10-03_18.24.48.png\",\n        \"Screenshot 2019-10-03 18.24.48.png\",\n        1134,\n        590,\n        \"#c5d3d7\"\n      ]\n    }\n  ]\n}\n[/block]\n  * After the Frontend process is done, a Backend flow needs to be triggered, exchanging the authorization code for an access token. The Developers (clients) application sends an access token request to the token endpoint on the Authorization Server with the client id and client secret. This process exchanges an Authorization Code for an Access Token and (optionally) a Refresh Token. The client can now access a protected resource with an Access Token.\n\nBelow is how this looks in raw HTTP (example).\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Request:\\n\\nPOST /oauth2/token/ HTTP/1.1\\nHost: www.instamojo.com\\nContent-Type: application/x-www-form-urlencoded\\ncode=MsCeLvIaQm6bTrgtp7&client_id=812741506391&client_secret={client_secret} &redirect_uri=https://app.example.com/oauth2/callback&grant_type=authorization_code\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nThe grant_type is the extensibility part of OAuth. It's an authorization code from a precomputed perspective. \n\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Response:\\n\\n{\\n  \\\"access_token\\\": \\\"2YotnFZFEjr1zCsicMWpAA\\\",\\n  \\\"token_type\\\": \\\"Bearer\\\",\\n  \\\"expires_in\\\": 36000,\\n  \\\"refresh_token\\\": \\\"tGzv3JOkF0XG5Qx2TlKWIA\\\"\\n}\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nAccess Token is valid for 36000 sec i.e. 10 hours. The application needs to store access token and refresh token, also expire time for an access token which is creation time + 36000 sec.\n\n  * Once the application has an access token, applications need to use the access token in an Authentication header (using the token_type as a prefix) to make protected resource requests.\n \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"  curl -H \\\"Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA\\\" \\\\\\n  https://api.instamojo.com/v2/user-info/\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n**Note: Access token will get expired after 10 hours from the date of creation. The application should track for the expired access token and generate new access token by exchanging refresh token**\n\nTo exchange the Refresh Token you received during authorization for a new Access Token, make a POST request to the /OAuth/token endpoint in the Authentication API, using grant_type=refresh_token.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"curl --request POST \\\\\\n  --url 'https://www.instamojo.com/oauth2/token/' \\\\\\n  --header 'content-type: application/x-www-form-urlencoded' \\\\\\n  --data grant_type=refresh_token \\\\\\n  --data 'client_id=YOUR_CLIENT_ID' \\\\\\n  --data client_secret=YOUR_CLIENT_SECRET \\\\\\n  --data refresh_token=YOUR_REFRESH_TOKEN\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n \n**Skip authorization form\n**\n\nDepending on the OAuth2 flow in use and the access token policy, users might be prompted for the same authorization multiple times, sometimes this is acceptable or even desirable but in some use cases, it isn’t. To control that behavior you can use the approval_prompt parameter when hitting the authorization (/authorize) endpoint. Possible values are:\n\n  * force - users are always prompted for authorization.\n  * auto - users are prompted only for the first time, subsequent authorizations for the same application and scopes will be automatically accepted.\n  \nAccess token or Refresh token revocation\n\nTo revoke the access token or refresh token for the application user, please use the below post request:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /o/revoke_token/ HTTP/1.1\\nContent-Type: application/x-www-form-urlencoded\\ntoken=XXXX&client_id=XXXX&client_secret=XXXX\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"authentication-flow","type":"basic","title":"Authentication Flow","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

Authentication Flow


All API interactions require you to have authentication credentials. Use the client_id and client_secret obtained while creating an app to authenticate yourself against the API. We provide an access_token/refresh_token Oauth2 authentication. The application can ask the following 10 scopes explicitly: * store-inventory:read * store-orders:read * store-settings:read * store-inventory:write * store-orders:write * store-settings:write * user-contact:read * user-info:read * payments:read * payouts:read ** Steps to generate an access token for the app user ** The oauth2 flow will work as described below We have taken some example values for all the data points like Client ID, Client Secret, Redirect URI and State. Please use the actual values. * From the Frontend Make GET request on /oauth2/authorize Examples : Sample Request 1 (one scope - payments:read): [block:code] { "codes": [ { "code": "https://www.instamojo.com/oauth2/authorize?scope=payments:read &redirect_uri=https://app.example.com/oauth2/callback \n&response_type=code&client_id=812741506391&state=af0ifjsldkj", "language": "text" } ] } [/block] Sample Request 2 (multiple scopes - all (space delimited)): [block:code] { "codes": [ { "code": "https://www.instamojo.com/oauth2/authorize?scope=payments:read payouts:read orders:read user-info:read user-contact:read &redirect_uri=https://app.example.com/oauth2/callback \n&response_type=code&client_id=812741506391&state=af0ifjsldkj", "language": "text" } ] } [/block] * Above we have shown a couple of sample GET requests, with one and multiple scopes (In case of multiple scopes, scopes need to be separated by a space) * The redirect_uri is the URL of the client application that the authorization grant should be returned to. * The value of redirect_uri should match the value from the App registration process (at Instamojo). We need to make sure that the authorization is not being bounced back to a foreign application. * Client ID can be accessed as shown in 7th step of the Setup process (Page 6) * State is a security flag, similar to CSRF 2. If the above request is valid then the user is redirected to an authorize page, shown below [block:image] { "images": [ { "image": [ "https://files.readme.io/a6512be-Screenshot_2019-10-03_18.18.04.png", "Screenshot 2019-10-03 18.18.04.png", 1016, 660, "#e4e4e5" ] } ] } [/block] If the user authorizes the app, the user is redirected to the application. Response: [block:code] { "codes": [ { "code": "HTTP/1.1 302 Found\nLocation: https://app.example.com/oauth2/callback?\ncode=MsCeLvIaQm6bTrgtp7&state=af0ifjsldkj", "language": "text" } ] } [/block] The code returned is the authorization grant and state is to ensure it's not forged and it's from the same request. The authorization code is valid for 60 seconds. [block:image] { "images": [ { "image": [ "https://files.readme.io/78f9702-Screenshot_2019-10-03_18.24.48.png", "Screenshot 2019-10-03 18.24.48.png", 1134, 590, "#c5d3d7" ] } ] } [/block] * After the Frontend process is done, a Backend flow needs to be triggered, exchanging the authorization code for an access token. The Developers (clients) application sends an access token request to the token endpoint on the Authorization Server with the client id and client secret. This process exchanges an Authorization Code for an Access Token and (optionally) a Refresh Token. The client can now access a protected resource with an Access Token. Below is how this looks in raw HTTP (example). [block:code] { "codes": [ { "code": "Request:\n\nPOST /oauth2/token/ HTTP/1.1\nHost: www.instamojo.com\nContent-Type: application/x-www-form-urlencoded\ncode=MsCeLvIaQm6bTrgtp7&client_id=812741506391&client_secret={client_secret} &redirect_uri=https://app.example.com/oauth2/callback&grant_type=authorization_code", "language": "text" } ] } [/block] The grant_type is the extensibility part of OAuth. It's an authorization code from a precomputed perspective. [block:code] { "codes": [ { "code": "Response:\n\n{\n \"access_token\": \"2YotnFZFEjr1zCsicMWpAA\",\n \"token_type\": \"Bearer\",\n \"expires_in\": 36000,\n \"refresh_token\": \"tGzv3JOkF0XG5Qx2TlKWIA\"\n}", "language": "text" } ] } [/block] Access Token is valid for 36000 sec i.e. 10 hours. The application needs to store access token and refresh token, also expire time for an access token which is creation time + 36000 sec. * Once the application has an access token, applications need to use the access token in an Authentication header (using the token_type as a prefix) to make protected resource requests. [block:code] { "codes": [ { "code": " curl -H \"Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA\" \\\n https://api.instamojo.com/v2/user-info/", "language": "text" } ] } [/block] **Note: Access token will get expired after 10 hours from the date of creation. The application should track for the expired access token and generate new access token by exchanging refresh token** To exchange the Refresh Token you received during authorization for a new Access Token, make a POST request to the /OAuth/token endpoint in the Authentication API, using grant_type=refresh_token. [block:code] { "codes": [ { "code": "curl --request POST \\\n --url 'https://www.instamojo.com/oauth2/token/' \\\n --header 'content-type: application/x-www-form-urlencoded' \\\n --data grant_type=refresh_token \\\n --data 'client_id=YOUR_CLIENT_ID' \\\n --data client_secret=YOUR_CLIENT_SECRET \\\n --data refresh_token=YOUR_REFRESH_TOKEN", "language": "text" } ] } [/block] **Skip authorization form ** Depending on the OAuth2 flow in use and the access token policy, users might be prompted for the same authorization multiple times, sometimes this is acceptable or even desirable but in some use cases, it isn’t. To control that behavior you can use the approval_prompt parameter when hitting the authorization (/authorize) endpoint. Possible values are: * force - users are always prompted for authorization. * auto - users are prompted only for the first time, subsequent authorizations for the same application and scopes will be automatically accepted. Access token or Refresh token revocation To revoke the access token or refresh token for the application user, please use the below post request: [block:code] { "codes": [ { "code": "POST /o/revoke_token/ HTTP/1.1\nContent-Type: application/x-www-form-urlencoded\ntoken=XXXX&client_id=XXXX&client_secret=XXXX", "language": "text" } ] } [/block]
All API interactions require you to have authentication credentials. Use the client_id and client_secret obtained while creating an app to authenticate yourself against the API. We provide an access_token/refresh_token Oauth2 authentication. The application can ask the following 10 scopes explicitly: * store-inventory:read * store-orders:read * store-settings:read * store-inventory:write * store-orders:write * store-settings:write * user-contact:read * user-info:read * payments:read * payouts:read ** Steps to generate an access token for the app user ** The oauth2 flow will work as described below We have taken some example values for all the data points like Client ID, Client Secret, Redirect URI and State. Please use the actual values. * From the Frontend Make GET request on /oauth2/authorize Examples : Sample Request 1 (one scope - payments:read): [block:code] { "codes": [ { "code": "https://www.instamojo.com/oauth2/authorize?scope=payments:read &redirect_uri=https://app.example.com/oauth2/callback \n&response_type=code&client_id=812741506391&state=af0ifjsldkj", "language": "text" } ] } [/block] Sample Request 2 (multiple scopes - all (space delimited)): [block:code] { "codes": [ { "code": "https://www.instamojo.com/oauth2/authorize?scope=payments:read payouts:read orders:read user-info:read user-contact:read &redirect_uri=https://app.example.com/oauth2/callback \n&response_type=code&client_id=812741506391&state=af0ifjsldkj", "language": "text" } ] } [/block] * Above we have shown a couple of sample GET requests, with one and multiple scopes (In case of multiple scopes, scopes need to be separated by a space) * The redirect_uri is the URL of the client application that the authorization grant should be returned to. * The value of redirect_uri should match the value from the App registration process (at Instamojo). We need to make sure that the authorization is not being bounced back to a foreign application. * Client ID can be accessed as shown in 7th step of the Setup process (Page 6) * State is a security flag, similar to CSRF 2. If the above request is valid then the user is redirected to an authorize page, shown below [block:image] { "images": [ { "image": [ "https://files.readme.io/a6512be-Screenshot_2019-10-03_18.18.04.png", "Screenshot 2019-10-03 18.18.04.png", 1016, 660, "#e4e4e5" ] } ] } [/block] If the user authorizes the app, the user is redirected to the application. Response: [block:code] { "codes": [ { "code": "HTTP/1.1 302 Found\nLocation: https://app.example.com/oauth2/callback?\ncode=MsCeLvIaQm6bTrgtp7&state=af0ifjsldkj", "language": "text" } ] } [/block] The code returned is the authorization grant and state is to ensure it's not forged and it's from the same request. The authorization code is valid for 60 seconds. [block:image] { "images": [ { "image": [ "https://files.readme.io/78f9702-Screenshot_2019-10-03_18.24.48.png", "Screenshot 2019-10-03 18.24.48.png", 1134, 590, "#c5d3d7" ] } ] } [/block] * After the Frontend process is done, a Backend flow needs to be triggered, exchanging the authorization code for an access token. The Developers (clients) application sends an access token request to the token endpoint on the Authorization Server with the client id and client secret. This process exchanges an Authorization Code for an Access Token and (optionally) a Refresh Token. The client can now access a protected resource with an Access Token. Below is how this looks in raw HTTP (example). [block:code] { "codes": [ { "code": "Request:\n\nPOST /oauth2/token/ HTTP/1.1\nHost: www.instamojo.com\nContent-Type: application/x-www-form-urlencoded\ncode=MsCeLvIaQm6bTrgtp7&client_id=812741506391&client_secret={client_secret} &redirect_uri=https://app.example.com/oauth2/callback&grant_type=authorization_code", "language": "text" } ] } [/block] The grant_type is the extensibility part of OAuth. It's an authorization code from a precomputed perspective. [block:code] { "codes": [ { "code": "Response:\n\n{\n \"access_token\": \"2YotnFZFEjr1zCsicMWpAA\",\n \"token_type\": \"Bearer\",\n \"expires_in\": 36000,\n \"refresh_token\": \"tGzv3JOkF0XG5Qx2TlKWIA\"\n}", "language": "text" } ] } [/block] Access Token is valid for 36000 sec i.e. 10 hours. The application needs to store access token and refresh token, also expire time for an access token which is creation time + 36000 sec. * Once the application has an access token, applications need to use the access token in an Authentication header (using the token_type as a prefix) to make protected resource requests. [block:code] { "codes": [ { "code": " curl -H \"Authorization: Bearer 2YotnFZFEjr1zCsicMWpAA\" \\\n https://api.instamojo.com/v2/user-info/", "language": "text" } ] } [/block] **Note: Access token will get expired after 10 hours from the date of creation. The application should track for the expired access token and generate new access token by exchanging refresh token** To exchange the Refresh Token you received during authorization for a new Access Token, make a POST request to the /OAuth/token endpoint in the Authentication API, using grant_type=refresh_token. [block:code] { "codes": [ { "code": "curl --request POST \\\n --url 'https://www.instamojo.com/oauth2/token/' \\\n --header 'content-type: application/x-www-form-urlencoded' \\\n --data grant_type=refresh_token \\\n --data 'client_id=YOUR_CLIENT_ID' \\\n --data client_secret=YOUR_CLIENT_SECRET \\\n --data refresh_token=YOUR_REFRESH_TOKEN", "language": "text" } ] } [/block] **Skip authorization form ** Depending on the OAuth2 flow in use and the access token policy, users might be prompted for the same authorization multiple times, sometimes this is acceptable or even desirable but in some use cases, it isn’t. To control that behavior you can use the approval_prompt parameter when hitting the authorization (/authorize) endpoint. Possible values are: * force - users are always prompted for authorization. * auto - users are prompted only for the first time, subsequent authorizations for the same application and scopes will be automatically accepted. Access token or Refresh token revocation To revoke the access token or refresh token for the application user, please use the below post request: [block:code] { "codes": [ { "code": "POST /o/revoke_token/ HTTP/1.1\nContent-Type: application/x-www-form-urlencoded\ntoken=XXXX&client_id=XXXX&client_secret=XXXX", "language": "text" } ] } [/block]
{"_id":"60ec48c5ce3ad9003d83d6db","metadata":{"image":[],"title":"","description":""},"api":{"url":"/oauth2/authorize","auth":"required","method":"get","examples":{"codes":[{"code":"https://www.instamojo.com/oauth2/authorize?scope=payments:read payouts:read orders:read user-info:read user-contact:read &redirect_uri=https://app.example.com/oauth2/callback \n&response_type=code&client_id=812741506391&state=af0ifjsldkj","language":"text"}]},"results":{"codes":[{"status":200,"language":"json","code":"HTTP/1.1 302 Found\nLocation: https://app.example.com/oauth2/callback?\ncode=MsCeLvIaQm6bTrgtp7&state=af0ifjsldkj","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"60ec4a4b92f896001ca71a2c","params":[{"name":"scope","type":"string","default":"user-contact:read","desc":"Available scopes are - user-contact:read user-info:read store-inventory:read store-orders:read store-settings:read store-inventory:write store-orders:write store-settings:write","required":false,"in":"body","ref":"","_id":"60ec4c3f105270001c25455f"},{"name":"redirect_uri","type":"string","default":"https://app.example.com/oauth2/callback","desc":"Your apps redirect URL","required":false,"in":"body","ref":"","_id":"60ec4c3f105270001c254560"},{"name":"response_type","type":"string","default":"code","desc":"This is the default value","required":false,"in":"body","ref":"","_id":"60ec4c3f105270001c254561"},{"name":"client_id","type":"string","default":"812741506391","desc":"Your apps Client ID","required":false,"in":"body","ref":"","_id":"60ec4c3f105270001c254562"},{"name":"state","type":"string","default":"af0ifjsldkj","desc":"Random value, to identify if the response is originating from Instamojo","required":false,"in":"body","ref":"","_id":"60ec4c3f105270001c254563"}]},"next":{"description":"","pages":[]},"title":"Authorize API -  Frontend GET request","type":"get","slug":"authorize","excerpt":"","body":"","updates":[],"order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-07-12T13:51:01.920Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffbf7eb10a940139565ece","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":7,"parentDoc":null,"childrenPages":[]}

getAuthorize API - Frontend GET request


Body Params

scope:
stringuser-contact:read
Available scopes are - user-contact:read user-info:read store-inventory:read store-orders:read store-settings:read store-inventory:write store-orders:write store-settings:write
redirect_uri:
stringhttps://app.example.com/oauth2/callback
Your apps redirect URL
response_type:
stringcode
This is the default value
client_id:
string812741506391
Your apps Client ID
state:
stringaf0ifjsldkj
Random value, to identify if the response is originating from Instamojo

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":"60ec4e2cc5a402006c47c041","metadata":{"image":[],"title":"","description":""},"api":{"url":"/oauth2/token/","auth":"required","method":"post","examples":{"codes":[{"code":"curl --location --request POST 'https://www.instamojo.com/oauth2/token/' \\\n--header 'Content-Type: application/x-www-form-urlencoded' \\\n--data-urlencode 'code=MsCeLvIaQm6bTrgtp7' \\\n--data-urlencode 'client_id=812741506391' \\\n--data-urlencode 'client_secret=enter_your_client_secret' \\\n--data-urlencode 'redirect_uri=https://app.example.com/oauth2/callback' \\\n--data-urlencode 'grant_type=authorization_code'","language":"curl"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"access_token\": \"2YotnFZFEjr1zCsicMWpAA\",\n  \"token_type\": \"Bearer\",\n  \"expires_in\": 36000,\n  \"refresh_token\": \"tGzv3JOkF0XG5Qx2TlKWIA\"\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"60ec4a4b92f896001ca71a2c","params":[{"name":"code","type":"string","default":"MsCeLvIaQm6bTrgtp7","desc":"The code that is obtained from Authorize API response","required":false,"in":"body","ref":"","_id":"60ec4c3f105270001c25455f"},{"name":"redirect_uri","type":"string","default":"https://app.example.com/oauth2/callback","desc":"Your apps redirect URL","required":false,"in":"body","ref":"","_id":"60ec4c3f105270001c254560"},{"name":"grant_type","type":"string","default":"authorization_code","desc":"This is the default value","required":false,"in":"body","ref":"","_id":"60ec4c3f105270001c254561"},{"name":"client_id","type":"string","default":"812741506391","desc":"Your apps Client ID","required":false,"in":"body","ref":"","_id":"60ec4c3f105270001c254562"},{"name":"client_secret","type":"string","default":"","desc":"Your apps Client ID","required":false,"in":"body","ref":"","_id":"60ec4c3f105270001c254563"}]},"next":{"description":"","pages":[]},"title":"Authorization Code API - For Access token","type":"post","slug":"authorization-code-api-for-access-token","excerpt":"","body":"","updates":[],"order":3,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-07-12T14:14:04.635Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffbf7eb10a940139565ece","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":4,"parentDoc":null,"childrenPages":[]}

postAuthorization Code API - For Access token


Body Params

code:
stringMsCeLvIaQm6bTrgtp7
The code that is obtained from Authorize API response
redirect_uri:
stringhttps://app.example.com/oauth2/callback
Your apps redirect URL
grant_type:
stringauthorization_code
This is the default value
client_id:
string812741506391
Your apps Client ID
client_secret:
string
Your apps Client ID

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":"622983895701c0037762c87c","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","settings":"","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"title":"Webhooks Setup","type":"basic","slug":"setup","excerpt":"","body":"**Steps to follow to register a webhook service:**\n\n  * Get the list of applicable events\n  * Subscribe to the particular event, with the webhook URL and event name.\n  * Start receiving the webhook payloads on the occurrence of events.\n  * Verify the authenticity of the payload.\n  * Can Unsubscribe from the event if needed.\n  * All the events subscribed are unsubscribed when the merchant unsubscribes the App.\n  * API is authenticated as per the existing flow.\n\n## **Events: **##\n\nCurrently available events: \n\nEvent -> Corresponding scope \n\nstore.Products -> store-inventory:read \nstore.Orders -> store-orders:read\nstore.Store -> store-settings:read\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"NOTE:\",\n  \"body\": \"You can only subscribe to a particular event if you have an access token with the corresponding scope.\\n\\nFor example, you can subscribe to the event 'store.Products' only if you have the access token with the scope 'store-inventory:read'.\"\n}\n[/block]\n\n## **Webhook Payload:**##\n\nYou will receive the webhook payloads on the occurrence of events.\n\nThe payload will be a JSON that follows the existing structure of [MDP APIs: MDP Commerce APIs · Instamojo](https://docs.instamojo.com/v2-mdp/docs).\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Events and their corresponding Payloads\",\n  \"body\": \"store.Products -> [List Products API](https://docs.instamojo.com/v2-mdp/docs/list-products)\\nstore.Orders -> [List Orders API](https://docs.instamojo.com/v2-mdp/docs/list-orders)\\nstore.Store -> [Store Profile details](https://docs.instamojo.com/v2-mdp/docs/store-profile-detail)\"\n}\n[/block]\nIn addition, the following headers are added for payload verification:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Svix-Id: msg_25oerVGxY1Mg79glr6jU0jAn99J\\nSvix-Timestamp: 1646198065\\nSvix-Signature: v1,Mt1YnAFM8holfGEhEuVSD5YGbGLnEKvskJ8KUhYd0xY= //unique signature for each webhook \",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n## **Webhook verification: **##\n\nEach webhook call includes three headers with additional information that are used for verification:\n\nSvix-Id: the unique message identifier for the webhook message. This identifier is unique across all messages, but will be the same when the same webhook is being resent (e.g. due to a previous failure).\n\nSvix-Timestamp: timestamp in seconds since epoch.\n\nSvix-Signature: the Base64 encoded list of signatures (space-delimited).\n\n\n## **Constructing the signed content: **##\n\nThe content to sign is composed by concatenating the id, timestamp, and payload, separated by the full-stop character (.). In code, it will look something like this:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"signed_content = \\\"${svix_id}.${svix_timestamp}.${body}\\\"\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nWhere body is the raw body of the request. The signature is sensitive to any changes, so even a small change in the body will cause the signature to be completely different. This means that you should not change the body in any way before verifying.\n\n\n## **Determining the expected signature: **##\n\nThe service uses an [HMAC](https://en.wikipedia.org/wiki/Hash-based_message_authentication_code) with [SHA-256](https://en.wikipedia.org/wiki/SHA-2) to sign its webhooks.\n\nSo to calculate the expected signature, you should HMAC the signed_content from above using the base64 portion of your signing secret (this is the part after the whsec_ prefix) as the key. For example, given the secret whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw you will want to use MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw.\n\nThis generated signature should match one of the ones sent in the Svix-Signature header.\n\nThe Svix-Signature header is composed of a list of space-delimited signatures and their corresponding version identifiers. The signature list is most commonly of length one. Though there could be any number of signatures. For example:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE= v1,bm9ldHUjKzFob2VudXRob2VodWUzMjRvdWVvdW9ldQo= v2,MzJsNDk4MzI0K2VvdSMjMTEjQEBAQDEyMzMzMzEyMwo=\\n\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nMake sure to remove the version prefix and delimiter (e.g. v1,) before verifying the signature.\n\nPlease note that to compare the signatures it's recommended to use a constant-time string comparison method in order to prevent timing attacks.\n\n## **Verify timestamp:**##\n\nAs mentioned above, the service also sends the timestamp of the attempt in the Svix-Timestamp header. You should compare this timestamp against your system timestamp and make sure it's within your tolerance in order to prevent timestamp attacks.","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-03-10T04:50:17.775Z","user":"5c45a4f06cf9350c77afa79c","category":"622982632ac19b008c67f9f8","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":0,"parentDoc":null,"childrenPages":[]}

Webhooks Setup


**Steps to follow to register a webhook service:** * Get the list of applicable events * Subscribe to the particular event, with the webhook URL and event name. * Start receiving the webhook payloads on the occurrence of events. * Verify the authenticity of the payload. * Can Unsubscribe from the event if needed. * All the events subscribed are unsubscribed when the merchant unsubscribes the App. * API is authenticated as per the existing flow. ## **Events: **## Currently available events: Event -> Corresponding scope store.Products -> store-inventory:read store.Orders -> store-orders:read store.Store -> store-settings:read [block:callout] { "type": "success", "title": "NOTE:", "body": "You can only subscribe to a particular event if you have an access token with the corresponding scope.\n\nFor example, you can subscribe to the event 'store.Products' only if you have the access token with the scope 'store-inventory:read'." } [/block] ## **Webhook Payload:**## You will receive the webhook payloads on the occurrence of events. The payload will be a JSON that follows the existing structure of [MDP APIs: MDP Commerce APIs · Instamojo](https://docs.instamojo.com/v2-mdp/docs). [block:callout] { "type": "success", "title": "Events and their corresponding Payloads", "body": "store.Products -> [List Products API](https://docs.instamojo.com/v2-mdp/docs/list-products)\nstore.Orders -> [List Orders API](https://docs.instamojo.com/v2-mdp/docs/list-orders)\nstore.Store -> [Store Profile details](https://docs.instamojo.com/v2-mdp/docs/store-profile-detail)" } [/block] In addition, the following headers are added for payload verification: [block:code] { "codes": [ { "code": "Svix-Id: msg_25oerVGxY1Mg79glr6jU0jAn99J\nSvix-Timestamp: 1646198065\nSvix-Signature: v1,Mt1YnAFM8holfGEhEuVSD5YGbGLnEKvskJ8KUhYd0xY= //unique signature for each webhook ", "language": "text" } ] } [/block] ## **Webhook verification: **## Each webhook call includes three headers with additional information that are used for verification: Svix-Id: the unique message identifier for the webhook message. This identifier is unique across all messages, but will be the same when the same webhook is being resent (e.g. due to a previous failure). Svix-Timestamp: timestamp in seconds since epoch. Svix-Signature: the Base64 encoded list of signatures (space-delimited). ## **Constructing the signed content: **## The content to sign is composed by concatenating the id, timestamp, and payload, separated by the full-stop character (.). In code, it will look something like this: [block:code] { "codes": [ { "code": "signed_content = \"${svix_id}.${svix_timestamp}.${body}\"", "language": "text" } ] } [/block] Where body is the raw body of the request. The signature is sensitive to any changes, so even a small change in the body will cause the signature to be completely different. This means that you should not change the body in any way before verifying. ## **Determining the expected signature: **## The service uses an [HMAC](https://en.wikipedia.org/wiki/Hash-based_message_authentication_code) with [SHA-256](https://en.wikipedia.org/wiki/SHA-2) to sign its webhooks. So to calculate the expected signature, you should HMAC the signed_content from above using the base64 portion of your signing secret (this is the part after the whsec_ prefix) as the key. For example, given the secret whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw you will want to use MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw. This generated signature should match one of the ones sent in the Svix-Signature header. The Svix-Signature header is composed of a list of space-delimited signatures and their corresponding version identifiers. The signature list is most commonly of length one. Though there could be any number of signatures. For example: [block:code] { "codes": [ { "code": "v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE= v1,bm9ldHUjKzFob2VudXRob2VodWUzMjRvdWVvdW9ldQo= v2,MzJsNDk4MzI0K2VvdSMjMTEjQEBAQDEyMzMzMzEyMwo=\n", "language": "text" } ] } [/block] Make sure to remove the version prefix and delimiter (e.g. v1,) before verifying the signature. Please note that to compare the signatures it's recommended to use a constant-time string comparison method in order to prevent timing attacks. ## **Verify timestamp:**## As mentioned above, the service also sends the timestamp of the attempt in the Svix-Timestamp header. You should compare this timestamp against your system timestamp and make sure it's within your tolerance in order to prevent timestamp attacks.
**Steps to follow to register a webhook service:** * Get the list of applicable events * Subscribe to the particular event, with the webhook URL and event name. * Start receiving the webhook payloads on the occurrence of events. * Verify the authenticity of the payload. * Can Unsubscribe from the event if needed. * All the events subscribed are unsubscribed when the merchant unsubscribes the App. * API is authenticated as per the existing flow. ## **Events: **## Currently available events: Event -> Corresponding scope store.Products -> store-inventory:read store.Orders -> store-orders:read store.Store -> store-settings:read [block:callout] { "type": "success", "title": "NOTE:", "body": "You can only subscribe to a particular event if you have an access token with the corresponding scope.\n\nFor example, you can subscribe to the event 'store.Products' only if you have the access token with the scope 'store-inventory:read'." } [/block] ## **Webhook Payload:**## You will receive the webhook payloads on the occurrence of events. The payload will be a JSON that follows the existing structure of [MDP APIs: MDP Commerce APIs · Instamojo](https://docs.instamojo.com/v2-mdp/docs). [block:callout] { "type": "success", "title": "Events and their corresponding Payloads", "body": "store.Products -> [List Products API](https://docs.instamojo.com/v2-mdp/docs/list-products)\nstore.Orders -> [List Orders API](https://docs.instamojo.com/v2-mdp/docs/list-orders)\nstore.Store -> [Store Profile details](https://docs.instamojo.com/v2-mdp/docs/store-profile-detail)" } [/block] In addition, the following headers are added for payload verification: [block:code] { "codes": [ { "code": "Svix-Id: msg_25oerVGxY1Mg79glr6jU0jAn99J\nSvix-Timestamp: 1646198065\nSvix-Signature: v1,Mt1YnAFM8holfGEhEuVSD5YGbGLnEKvskJ8KUhYd0xY= //unique signature for each webhook ", "language": "text" } ] } [/block] ## **Webhook verification: **## Each webhook call includes three headers with additional information that are used for verification: Svix-Id: the unique message identifier for the webhook message. This identifier is unique across all messages, but will be the same when the same webhook is being resent (e.g. due to a previous failure). Svix-Timestamp: timestamp in seconds since epoch. Svix-Signature: the Base64 encoded list of signatures (space-delimited). ## **Constructing the signed content: **## The content to sign is composed by concatenating the id, timestamp, and payload, separated by the full-stop character (.). In code, it will look something like this: [block:code] { "codes": [ { "code": "signed_content = \"${svix_id}.${svix_timestamp}.${body}\"", "language": "text" } ] } [/block] Where body is the raw body of the request. The signature is sensitive to any changes, so even a small change in the body will cause the signature to be completely different. This means that you should not change the body in any way before verifying. ## **Determining the expected signature: **## The service uses an [HMAC](https://en.wikipedia.org/wiki/Hash-based_message_authentication_code) with [SHA-256](https://en.wikipedia.org/wiki/SHA-2) to sign its webhooks. So to calculate the expected signature, you should HMAC the signed_content from above using the base64 portion of your signing secret (this is the part after the whsec_ prefix) as the key. For example, given the secret whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw you will want to use MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw. This generated signature should match one of the ones sent in the Svix-Signature header. The Svix-Signature header is composed of a list of space-delimited signatures and their corresponding version identifiers. The signature list is most commonly of length one. Though there could be any number of signatures. For example: [block:code] { "codes": [ { "code": "v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE= v1,bm9ldHUjKzFob2VudXRob2VodWUzMjRvdWVvdW9ldQo= v2,MzJsNDk4MzI0K2VvdSMjMTEjQEBAQDEyMzMzMzEyMwo=\n", "language": "text" } ] } [/block] Make sure to remove the version prefix and delimiter (e.g. v1,) before verifying the signature. Please note that to compare the signatures it's recommended to use a constant-time string comparison method in order to prevent timing attacks. ## **Verify timestamp:**## As mentioned above, the service also sends the timestamp of the attempt in the Svix-Timestamp header. You should compare this timestamp against your system timestamp and make sure it's within your tolerance in order to prevent timestamp attacks.
{"_id":"622983a04e7ba900af9b43cf","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/webhook/event/","auth":"required","method":"get","examples":{"codes":[]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"count\": 2,\n    \"next\": null,\n    \"previous\": null,\n    \"results\": [\n        {\n            \"id\": 1,\n            \"name\": \"store.Products\",\n            \"scope\": \"store-inventory:read\",\n            \"created\": \"2022-02-23T15:59:29.472220+05:30\"\n        },\n        {\n            \"id\": 2,\n            \"name\": \"store.Products\",\n            \"scope\": \"store-inventory:read\",\n            \"created\": \"2022-02-28T14:50:54.096470+05:30\"\n        }\n    ]\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <token>","desc":"","required":false,"in":"header","ref":"","_id":"5d95e4808940d80133243fdb"}]},"next":{"description":"","pages":[]},"title":"List Events","type":"get","slug":"list-events","excerpt":"Fetches a comprehensive list of the existing events that can be subscribed by the MDP Partners","body":"","updates":["624597096347fa008316a856"],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-03-10T04:50:40.162Z","user":"5c45a4f06cf9350c77afa79c","category":"622982632ac19b008c67f9f8","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":3,"parentDoc":null,"childrenPages":[]}

getList Events

Fetches a comprehensive list of the existing events that can be subscribed by the MDP Partners

Headers

Authorization:
stringBearer <token>

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 }}

Result Format



{"_id":"622984325f134c00219caca8","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/webhook/endpoint/","auth":"required","method":"get","examples":{"codes":[]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"count\": 1,\n    \"next\": null,\n    \"previous\": null,\n    \"results\": [\n        {\n            \"url\": \"http://44.196.166.167/dev\",\n            \"event\": \"store.Products\",\n            \"id\": 9\n        }\n    ]\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <token>","desc":"","required":false,"in":"header","ref":"","_id":"5d95e4808940d80133243fdb"}]},"next":{"description":"","pages":[]},"title":"List Endpoint","type":"get","slug":"list-endpoint","excerpt":"Fetches a comprehensive list of the registered webhook endpoints for a given merchant","body":"","updates":[],"order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-03-10T04:53:06.130Z","user":"5c45a4f06cf9350c77afa79c","category":"622982632ac19b008c67f9f8","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":2,"parentDoc":null,"childrenPages":[]}

getList Endpoint

Fetches a comprehensive list of the registered webhook endpoints for a given merchant

Headers

Authorization:
stringBearer <token>

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 }}

Result Format



{"_id":"623c448bda33af00f6ba3084","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/webhook/endpoint/","auth":"required","method":"post","examples":{"codes":[]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"success\": true,\n    \"message\": \"Webhook creation initiated, wait for sometime\"\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <token>","desc":"","required":false,"in":"header","ref":"","_id":"5d95e4808940d80133243fdb"},{"name":"url","type":"string","default":"","desc":"the url on which the webhook will be sent","required":false,"in":"body","ref":"","_id":"623c448bda33af00f6ba3086"},{"name":"event","type":"string","default":"","desc":"the event for which the developer subscribes the webhook for","required":false,"in":"body","ref":"","_id":"623c448bda33af00f6ba3087"},{"name":"secret","type":"string","default":"","desc":"secret for webhook message validation - provided by the app creator","required":false,"in":"body","ref":"","_id":"623c448bda33af00f6ba3088"}]},"next":{"description":"","pages":[]},"title":"Create Endpoint","type":"post","slug":"create-endpoint","excerpt":"Create a webhook endpoint for a specific event","body":"","updates":[],"order":3,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-03-24T10:14:35.796Z","user":"5c45a4f06cf9350c77afa79c","category":"622982632ac19b008c67f9f8","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":1,"parentDoc":null,"childrenPages":[]}

postCreate Endpoint

Create a webhook endpoint for a specific event

Body Params

url:
string
the url on which the webhook will be sent
event:
string
the event for which the developer subscribes the webhook for
secret:
string
secret for webhook message validation - provided by the app creator

Headers

Authorization:
stringBearer <token>

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 }}

Result Format



{"_id":"622984d0b61bae00936af2ee","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/webhook/endpoint/{id}/","auth":"required","method":"delete","examples":{"codes":[]},"results":{"codes":[{"status":200,"language":"json","code":"204No Content","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <token>","desc":"","required":false,"in":"header","ref":"","_id":"5d95e4808940d80133243fdb"}]},"next":{"description":"","pages":[]},"title":"Delete Endpoint","type":"delete","slug":"delete-endpoint","excerpt":"Fetches a comprehensive list of the registered webhook endpoints for a given merchant","body":"Where {id} is the webhook id on the Instamojo system. The 'id' for a registered webhook can be obtained from the List Endpoint API.","updates":[],"order":4,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-03-10T04:55:44.809Z","user":"5c45a4f06cf9350c77afa79c","category":"622982632ac19b008c67f9f8","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":0,"parentDoc":null,"childrenPages":[]}

deleteDelete Endpoint

Fetches a comprehensive list of the registered webhook endpoints for a given merchant

Headers

Authorization:
stringBearer <token>
Where {id} is the webhook id on the Instamojo system. The 'id' for a registered webhook can be obtained from the List Endpoint API.

User Information

Try It Out

delete
{{ 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 }}

Result Format



Where {id} is the webhook id on the Instamojo system. The 'id' for a registered webhook can be obtained from the List Endpoint API.
{"_id":"60f6f5a040b53b005c5e5c52","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"MDP User APIs","type":"basic","slug":"mdp-user-apis","excerpt":"","body":"The following set of APIs pertains to the Users on the Instamojo Platform. \n\nScopes (for the access token that is used) required to the run the User APIs:\n \nuser-contact:read \nuser-info:read \n\n\n**Error codes and their meanings** :\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"HTTP Codes\",\n    \"h-1\": \"HTTP Codes\",\n    \"0-0\": \"401 Unauthorized\",\n    \"1-0\": \"401 Unauthorized\",\n    \"2-0\": \"403 Forbidden\",\n    \"3-0\": \"404 Not Found\",\n    \"0-1\": \"{\\n  \\\"error\\\": \\\"Invalid Client Id\\\"\\n}\",\n    \"1-1\": \"{\\n  \\\"error\\\": \\\"Invalid or expired Client Id Exp\\\"\\n}\",\n    \"2-1\": \"{\\n  \\\"error\\\": \\\"Invalid scopes\\\"\\n}\",\n    \"3-1\": \"{\\n  \\\"error\\\": \\\"Invalid Account Id\\\"\\n}\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-07-20T16:11:12.854Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc0407069930043c16066","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":0,"parentDoc":null,"childrenPages":[]}

MDP User APIs


The following set of APIs pertains to the Users on the Instamojo Platform. Scopes (for the access token that is used) required to the run the User APIs: user-contact:read user-info:read **Error codes and their meanings** : [block:parameters] { "data": { "h-0": "HTTP Codes", "h-1": "HTTP Codes", "0-0": "401 Unauthorized", "1-0": "401 Unauthorized", "2-0": "403 Forbidden", "3-0": "404 Not Found", "0-1": "{\n \"error\": \"Invalid Client Id\"\n}", "1-1": "{\n \"error\": \"Invalid or expired Client Id Exp\"\n}", "2-1": "{\n \"error\": \"Invalid scopes\"\n}", "3-1": "{\n \"error\": \"Invalid Account Id\"\n}" }, "cols": 2, "rows": 4 } [/block]
The following set of APIs pertains to the Users on the Instamojo Platform. Scopes (for the access token that is used) required to the run the User APIs: user-contact:read user-info:read **Error codes and their meanings** : [block:parameters] { "data": { "h-0": "HTTP Codes", "h-1": "HTTP Codes", "0-0": "401 Unauthorized", "1-0": "401 Unauthorized", "2-0": "403 Forbidden", "3-0": "404 Not Found", "0-1": "{\n \"error\": \"Invalid Client Id\"\n}", "1-1": "{\n \"error\": \"Invalid or expired Client Id Exp\"\n}", "2-1": "{\n \"error\": \"Invalid scopes\"\n}", "3-1": "{\n \"error\": \"Invalid Account Id\"\n}" }, "cols": 2, "rows": 4 } [/block]
{"_id":"60ca6842be2e9400483ca527","project":"56a1c9c13845200d0066d6fe","version":"60ca6842be2e9400483ca546","category":"61ffc0407069930043c16066","user":"5ce26a9d4c3d820056874747","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-10-03T12:07:28.791Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"get","examples":{"codes":[]},"results":{"codes":[{"status":200,"language":"json","code":"[\n    {\n        \"full_name\": \"Gavin Belson\",\n        \"signup_date\": \"2019-06-03\",\n        \"username\": \"gavinbelson17\",\n        \"city\": null,\n        \"website\": \"https://www.hooli.com\"\n    }\n]","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","auth":"required","params":[{"name":"Authorization","type":"string","default":"Bearer <token>","desc":"","required":false,"in":"header","ref":"","_id":"5d95e4808940d80133243fdb"}],"url":"/v2/user-info/"},"isReference":false,"order":1,"body":"","excerpt":"","slug":"user-info","type":"get","title":"User-info","__v":3,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getUser-info


Headers

Authorization:
stringBearer <token>

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 }}

Result Format



{"_id":"60ca6842be2e9400483ca52d","project":"56a1c9c13845200d0066d6fe","version":"60ca6842be2e9400483ca546","category":"61ffc0407069930043c16066","user":"5ce26a9d4c3d820056874747","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-10-03T13:13:46.698Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"get","examples":{"codes":[]},"results":{"codes":[{"status":200,"language":"json","code":"[\n    {\n        \"full_name\": \"Gavin Belson\",\n        \"email\": \"[email protected]\",\n        \"phone\": \"+919876543212\",\n        “username”: “gavin17”,\n        “account_id”: “0f9c251fc4d04765a1ccd246bf81b23b”,\n    }\n]\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","auth":"required","params":[{"name":"Authorization","type":"string","default":"Bearer <your-token>","desc":"","required":false,"in":"header","ref":"","_id":"5d95f40a3d45d5001c7f3226"}],"url":"/v2/user-contact/"},"isReference":false,"order":2,"body":"","excerpt":"","slug":"user-contact","type":"get","title":"User-contact","__v":6,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getUser-contact


Headers

Authorization:
stringBearer <your-token>

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 }}

Result Format



{"_id":"60ca6842be2e9400483ca53b","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"MDP Commerce APIs","type":"basic","slug":"mdp-commerce-apis","excerpt":"","body":"The following set of APIs pertains to the Instamojo Online store. \n\nScopes (for the access token that is used) required to the run the Commerce APIs:\n \nstore-inventory:read \nstore-orders:read \nstore-settings:read \nstore-inventory:write \nstore-orders:write \nstore-settings:write\n\n\n**Error codes and their meanings** :\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"HTTP Codes\",\n    \"h-1\": \"HTTP Codes\",\n    \"0-0\": \"401 Unauthorized\",\n    \"1-0\": \"401 Unauthorized\",\n    \"2-0\": \"403 Forbidden\",\n    \"3-0\": \"404 Not Found\",\n    \"0-1\": \"{\\n  \\\"error\\\": \\\"Invalid Client Id\\\"\\n}\",\n    \"1-1\": \"{\\n  \\\"error\\\": \\\"Invalid or expired Client Id Exp\\\"\\n}\",\n    \"2-1\": \"{\\n  \\\"error\\\": \\\"Invalid scopes\\\"\\n}\",\n    \"3-1\": \"{\\n  \\\"error\\\": \\\"Invalid Account Id\\\"\\n}\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T15:37:37.931Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc0b45724f1000fb1e13b","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":0,"parentDoc":null,"childrenPages":[]}

MDP Commerce APIs


The following set of APIs pertains to the Instamojo Online store. Scopes (for the access token that is used) required to the run the Commerce APIs: store-inventory:read store-orders:read store-settings:read store-inventory:write store-orders:write store-settings:write **Error codes and their meanings** : [block:parameters] { "data": { "h-0": "HTTP Codes", "h-1": "HTTP Codes", "0-0": "401 Unauthorized", "1-0": "401 Unauthorized", "2-0": "403 Forbidden", "3-0": "404 Not Found", "0-1": "{\n \"error\": \"Invalid Client Id\"\n}", "1-1": "{\n \"error\": \"Invalid or expired Client Id Exp\"\n}", "2-1": "{\n \"error\": \"Invalid scopes\"\n}", "3-1": "{\n \"error\": \"Invalid Account Id\"\n}" }, "cols": 2, "rows": 4 } [/block]
The following set of APIs pertains to the Instamojo Online store. Scopes (for the access token that is used) required to the run the Commerce APIs: store-inventory:read store-orders:read store-settings:read store-inventory:write store-orders:write store-settings:write **Error codes and their meanings** : [block:parameters] { "data": { "h-0": "HTTP Codes", "h-1": "HTTP Codes", "0-0": "401 Unauthorized", "1-0": "401 Unauthorized", "2-0": "403 Forbidden", "3-0": "404 Not Found", "0-1": "{\n \"error\": \"Invalid Client Id\"\n}", "1-1": "{\n \"error\": \"Invalid or expired Client Id Exp\"\n}", "2-1": "{\n \"error\": \"Invalid scopes\"\n}", "3-1": "{\n \"error\": \"Invalid Account Id\"\n}" }, "cols": 2, "rows": 4 } [/block]
{"_id":"60ca6842be2e9400483ca53c","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/settings/","auth":"required","method":"get","examples":{"codes":[]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"id\": 15025,\n  \"shop_type\": \"shoppingstore\",\n  \"business_type\": \"\",\n  \"business_category\": \"\",\n  \"business_sub_category\": \"\",\n  \"business_category_info\": \"Jewellery\",\n  \"home_country\": \"IN\",\n  \"shop_name\": \"My Store2\",\n  \"business_name\": \"My Store2\",\n  \"shop_address\": \"Shop No: 124, GT Road, Sanjay Nagar, Lal Kuan, Ghaziabad, Uttar Pradesh 201009\",\n  \"show_google_map\": false,\n  \"shop_contact_info\": \"+919891321372\",\n  \"shop_communication_email\": \"[email protected]\",\n  \"shop_customer_care_email\": \"[email protected]\",\n  \"logo\": \"https://dxnwmre0dv0ln.cloudfront.net/logos/29458/logo_1577061937.PNG\",\n  \"favicon\": \"https://dxnwmre0dv0ln.cloudfront.net/favicons/29458/favicon-16x16_1576642151.png\",\n  \"twitter_handle\": null,\n  \"facebook_page_url\": null,\n  \"youtube_url\": null,\n  \"linked_in_url\": null,\n  \"pinterest_url\": null,\n  \"instagram_url\": null,\n  \"custom_domain\": \"instamojo.com\",\n  \"latitude\": null,\n  \"longitude\": null,\n  \"location_accuracy\": null,\n}\n\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <token>","desc":"","required":false,"in":"header","ref":"","_id":"5d95e4808940d80133243fdb"}]},"next":{"description":"","pages":[]},"title":"Store profile detail","type":"get","slug":"store-profile-detail","excerpt":"Fetches the corresponding merchant's Instamojo Online Store profile details.","body":"","updates":[],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:01:32.771Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc0b45724f1000fb1e13b","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":4,"parentDoc":null,"childrenPages":[]}

getStore profile detail

Fetches the corresponding merchant's Instamojo Online Store profile details.

Headers

Authorization:
stringBearer <token>

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 }}

Result Format



{"_id":"60ca6842be2e9400483ca53d","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/settings/15025/","auth":"required","method":"patch","examples":{"codes":[{"code":"Payload example:\n\n{\n \"shop_type\": \"shoppingstore\", \n \"shop_name\": \"Shubham Store\", \n \"business_name\": \"Shubham Store\", \n \"shop_address\": \"2, Oasis Apartment, Seven Bunglow Garden, Harminder Singh Rd, Aram Nagar, Versova, Andheri West, Mumbai, Maharashtra 400061, India\", \n \"show_google_map\": false, \n \"shop_contact_info\": \"8765630863\", \n \"shop_communication_email\": \"[email protected]\", \n \"shop_customer_care_email\": \"[email protected]\", \n \"twitter_handle\": \"shubham876563\", \n \"facebook_page_url\": \"https://www.facebook.com/shubham.agrawal.3597789\", \n \"youtube_url\": \"https://www.youtube.com/channel/UCbdHZxa9sD_ixH6mXDLqDjQ\", \n \"linked_in_url\": null, \n \"pinterest_url\": null, \n \"instagram_url\": null, \n \"custom_domain\": null, \n \"latitude\": \"28.560151\", \n \"longitude\": \"77.355685\", \n \"location_accuracy\": null \n}","language":"text"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"id\": 15025,\n  \"shop_type\": \"shoppingstore\",\n  \"business_type\": \"\",\n  \"business_category\": \"\",\n  \"business_sub_category\": \"\",\n  \"business_category_info\": \"Jewellery\",\n  \"home_country\": \"IN\",\n  \"shop_name\": \"Shubham Store\",\n  \"business_name\": \"Shubham Store\",\n  \"shop_address\": \"2, Oasis Apartment, Seven Bunglow Garden, Harminder Singh Rd, Aram Nagar, Versova, Andheri West, Mumbai, Maharashtra 400061, India\",\n  \"show_google_map\": false,\n  \"shop_contact_info\": \"8765630863\",\n  \"shop_communication_email\": \"[email protected]\",\n  \"shop_customer_care_email\": \"[email protected]\",\n  \"logo\": \"https://dxnwmre0dv0ln.cloudfront.net/logos/29458/logo_1577061937.PNG\",\n  \"favicon\": \"https://dxnwmre0dv0ln.cloudfront.net/favicons/29458/favicon-16x16_1576642151.png\",\n  \"twitter_handle\": \"shubham876563\",\n  \"facebook_page_url\": \"https://www.facebook.com/shubham.agrawal.3597789\",\n  \"youtube_url\": \"https://www.youtube.com/channel/UCbdHZxa9sD_ixH6mXDLqDjQ\",\n  \"linked_in_url\": null,\n  \"pinterest_url\": null,\n  \"instagram_url\": null,\n  \"custom_domain\": null,\n  \"latitude\": \"28.560151\",\n  \"longitude\": \"77.355685\",\n  \"location_accuracy\": null,\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <token>","desc":"","required":false,"in":"header","ref":"","_id":"5d95e4808940d80133243fdb"},{"name":"shop_type","type":"string","default":"shoppingstore","desc":"optional: choices - ['shoppingstore']","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9e6"},{"name":"shop_name","type":"string","default":"","desc":"optional: max-200","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9e7"},{"name":"business_name","type":"string","default":"","desc":"optional: max-100","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9e8"},{"name":"shop_address","type":"string","default":"","desc":"optional: max-200","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9e9"},{"name":"show_google_map","type":"boolean","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9ea"},{"name":"shop_contact_info","type":"string","default":"","desc":"optional: phone number","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9eb"},{"name":"shop_communication_email","type":"string","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9ec"},{"name":"shop_customer_care_email","type":"string","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9ed"},{"name":"twitter_handle","type":"string","default":"","desc":"optional: max-15","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9ee"},{"name":"facebook_page_url","type":"string","default":"","desc":"optional: max-100","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9ef"},{"name":"youtube_url","type":"string","default":"","desc":"optional: max-100","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9f0"},{"name":"linked_in_url","type":"string","default":"","desc":"optional: max-100","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9f1"},{"name":"pinterest_url","type":"string","default":"","desc":"optional: max-100","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9f2"},{"name":"instagram_url","type":"string","default":"","desc":"optional: max-100","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9f3"},{"name":"custom_domain","type":"string","default":"","desc":"optional: max-100","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9f4"},{"name":"latitude","type":"string","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9f5"},{"name":"longitude","type":"string","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9f6"},{"name":"location_accuracy","type":"string","default":"","desc":"optional: max-10","required":false,"in":"body","ref":"","_id":"607865909e30d4002d00f9f7"}]},"next":{"description":"","pages":[]},"title":"Update Store details","type":"patch","slug":"store-details-update","excerpt":"Update the corresponding merchant's Instamojo Online Store profile details.","body":"`15025` in the API URL is the Store ID against which you want to update the Store details.\nThe Payload data needs to be passed in `form-data` format.","updates":[],"order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:10:56.725Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc0b45724f1000fb1e13b","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":12,"parentDoc":null,"childrenPages":[]}

patchUpdate Store details

Update the corresponding merchant's Instamojo Online Store profile details.

Body Params

shop_type:
stringshoppingstore
optional: choices - ['shoppingstore']
shop_name:
string
optional: max-200
business_name:
string
optional: max-100
shop_address:
string
optional: max-200
show_google_map:
boolean
optional
shop_contact_info:
string
optional: phone number
shop_communication_email:
string
optional
shop_customer_care_email:
string
optional
twitter_handle:
string
optional: max-15
facebook_page_url:
string
optional: max-100
youtube_url:
string
optional: max-100
linked_in_url:
string
optional: max-100
pinterest_url:
string
optional: max-100
instagram_url:
string
optional: max-100
custom_domain:
string
optional: max-100
latitude:
string
optional
longitude:
string
optional
location_accuracy:
string
optional: max-10

Headers

Authorization:
stringBearer <token>
`15025` in the API URL is the Store ID against which you want to update the Store details. The Payload data needs to be passed in `form-data` format.

User Information

Try It Out

patch
{{ 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



`15025` in the API URL is the Store ID against which you want to update the Store details. The Payload data needs to be passed in `form-data` format.
{"_id":"60ca6842be2e9400483ca53e","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/orders/","auth":"required","method":"get","examples":{"codes":[{"code":"Following can be used to filter orders for a day: \ncreated__gte=2021-06-04T00:00:00&created__lte=2021-06-04T23:59:59","language":"text"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"count\": 66,\n  \"next\": \"http://www.stores.mjc.instamojo.com/v2/store/orders/?limit=1&page=2\",\n  \"previous\": null,\n  \"orders\": [\n    {\n      \"id\": 32568,\n      \"enduser\": null,\n      \"firstname\": \"lappuk\",\n      \"lastname\": \"ff\",\n      \"email\": \"contac[email protected]\",\n      \"address\": \"Icons didn't load on store and DashboardIcons didn't load on store and Dashboard\", // This is the Shipping Address \n      \"city\": \"Noida, Uttar Pradesh, India\",\n      \"state\": \"IN-UP\",\n      \"country\": \"IN\",\n      \"contact\": \"+911234567890\",\n      \"code\": \"201301\",\n      \"total_order\": \"1680.00\",\n      \"orderid\": \"00888706\",\n      \"payment_method\": \"Cash-On-Delivery\", // For Online or Prepayment, the value is \"InstaMojo\"\n      \"payment_status\": \"initiated\",\n      \"order_status\": \"initiated\",\n      \"source\": \"web\",\n      \"taxes\": {},\n      \"comments\": \"\",\n      \"details\": {\n        \"items\": [\n          {\n            \"id\": 455330,\n            \"quantity\": 1,\n            \"final_price\": \"1680.00\",\n            \"title\": \"Puma product\",\n            \"sku\": null,\n          }\n        ],\n        \"discount\": \"0.00\",\n        \"shipping_charge\": \"0.0000\",\n        \"cod_charge\": \"0.00000\",\n        \"subtotal\": \"1680.00000\",\n        \"net_order\": \"1680.00000\",\n        \"total_order\": \"1680.00000\",\n        \"promo_code\": null,\n        \"promo_data\": {},\n        \"cookie_data\": {}\n      },\n      \"country_display\": \"India\",\n      \"order_prod_type\": null,\n      \"shipping\": {\n        \"waybill\": \"\",\n        \"courier_partner\": \"\",\n        \"tracking_url\": \"\"\n      },\n      \"created\": \"2019-12-06T12:36:14+05:30\",\n      \"modified\": \"2019-12-06T12:36:18+05:30\"\n    }\n  ]\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <token>","desc":"","required":false,"in":"header","ref":"","_id":"5d95e4808940d80133243fdb"},{"name":"created__gte","type":"string","default":"","desc":"gte means greater than or equals to. The response would contain orders created after the specified time.","required":false,"in":"query","ref":"","_id":"60ec4727b88528004e376b27"},{"name":"created__gt","type":"string","default":"","desc":"gt means greater than. The response would contain orders created after the specified time.","required":false,"in":"query","ref":"","_id":"60ec4727b88528004e376b28"},{"name":"created__lt","type":"string","default":"","desc":"lt means lesser than. The response would contain orders created before the specified time.","required":false,"in":"query","ref":"","_id":"60ec4727b88528004e376b29"},{"name":"created__lte","type":"string","default":"","desc":"lte means lesser than or equals to. The response would contain orders created before the specified time.","required":false,"in":"query","ref":"","_id":"60ec4727b88528004e376b2a"}]},"next":{"description":"","pages":[]},"title":"List Orders","type":"get","slug":"list-orders","excerpt":"Fetches a comprehensive list of Orders that were placed in the corresponding merchant's Instamojo Online Store.","body":"","updates":[],"order":3,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:13:55.647Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc0b45724f1000fb1e13b","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":16,"parentDoc":null,"childrenPages":[]}

getList Orders

Fetches a comprehensive list of Orders that were placed in the corresponding merchant's Instamojo Online Store.

Query Params

created__gte:
string
gte means greater than or equals to. The response would contain orders created after the specified time.
created__gt:
string
gt means greater than. The response would contain orders created after the specified time.
created__lt:
string
lt means lesser than. The response would contain orders created before the specified time.
created__lte:
string
lte means lesser than or equals to. The response would contain orders created before the specified time.

Headers

Authorization:
stringBearer <token>

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":"60ca6842be2e9400483ca53f","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/orders/32568/","auth":"required","method":"get","examples":{"codes":[]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"id\": 32568,\n  \"enduser\": null,\n  \"firstname\": \"lappuk\",\n  \"lastname\": \"ff\",\n  \"email\": \"[email protected]\",\n  \"address\": \"Icons didn't load on store and DashboardIcons didn't load on store and Dashboard\", // This is the Shipping Address \n  \"city\": \"Noida, Uttar Pradesh, India\",\n  \"state\": \"IN-UP\",\n  \"country\": \"IN\",\n  \"contact\": \"+911234567890\",\n  \"code\": \"201301\",\n  \"total_order\": \"1680.00\",\n  \"orderid\": \"00888706\",\n  \"payment_method\": \"Cash-On-Delivery\", // For Online or Prepayment, the value is \"InstaMojo\"\n  \"payment_status\": \"initiated\",\n  \"order_status\": \"initiated\",\n  \"is_archived\": false,\n  \"source\": \"web\",\n  \"taxes\": {},\n  \"promo_data\": {},\n  \"comments\": \"\",\n  \"transaction_id\": \"\",\n  \"transaction_date\": null,\n  \"client_ip\": \"172.31.24.118\",\n  \"completed_on\": null,\n  \"order_source\": null,\n  \"source_display\": \"Web\",\n  \"details\": {\n    \"items\": [\n      {\n        \"id\": 455330,\n        \"quantity\": 1,\n        \"final_price\": \"1680.00\",\n        \"title\": \"Puma product\",\n        \"sku\": null,\n      }\n    ],\n    \"discount\": \"0.00\",\n    \"shipping_charge\": \"0.0000\",\n    \"cod_charge\": \"0.00000\",\n    \"subtotal\": \"1680.00000\",\n    \"net_order\": \"1680.00000\",\n    \"total_order\": \"1680.00000\",\n    \"promo_code\": null,\n    \"promo_data\": {},\n    \"cookie_data\": {}\n  },\n  \"country_display\": \"India\",\n  \"state_display\": \"Uttar Pradesh\",\n  \"created\": \"2019-12-06T12:36:14+05:30\",\n  \"modified\": \"2019-12-06T12:36:18+05:30\",\n  \"transaction\": {\n    \"transaction_id\": \"\",\n    \"payment_id\": \"\",\n    \"payment_status\": \"\",\n    \"payout_status\": \"\",\n    \"refund_initiated\": \"\",\n    \"transaction_date\": \"\",\n    \"payment_date\": \"\",\n    \"refund_id\": \"\",\n    \"instrument_type\": \"\",\n    \"payout_id\": \"\"\n  },\n  \"status_updated_manually\": false,\n  \"order_substatus\": \"\",\n  \"order_prod_type\": null,\n  \"case_id\": \"\",\n  \"shipping\": {\n    \"details\": [],\n    \"imojo_shipping\": false,\n    \"waybill\": \"\",\n    \"courier_partner\": \"\",\n    \"tracking_url\": \"\"\n  }\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <token>","desc":"","required":false,"in":"header","ref":"","_id":"5d95e4808940d80133243fdb"}]},"next":{"description":"","pages":[]},"title":"Order Detail","type":"get","slug":"detailed-order","excerpt":"Fetches an extensive set of data on a particular Order that was placed on the corresponding merchant's Instamojo Online Store.","body":"`32568` in the API URL is the Order ID against which you want to fetch the Order details.\n\nThe param \"orderid\" with the value \"00888706\" is an internally generated value. The param that you need to be using for this API endpoint to function is the \"id\" param.","updates":[],"order":4,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:15:57.848Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc0b45724f1000fb1e13b","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":9,"parentDoc":null,"childrenPages":[]}

getOrder Detail

Fetches an extensive set of data on a particular Order that was placed on the corresponding merchant's Instamojo Online Store.

Headers

Authorization:
stringBearer <token>
`32568` in the API URL is the Order ID against which you want to fetch the Order details. The param "orderid" with the value "00888706" is an internally generated value. The param that you need to be using for this API endpoint to function is the "id" param.

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 }}

Result Format



`32568` in the API URL is the Order ID against which you want to fetch the Order details. The param "orderid" with the value "00888706" is an internally generated value. The param that you need to be using for this API endpoint to function is the "id" param.
{"_id":"60ca6842be2e9400483ca540","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/orders/32568/","auth":"required","method":"patch","examples":{"codes":[{"code":"Payload example: \n\n{\n  \"shipping\": {\n    \"tracking_url\": \"https://www.google.co.in/\", \n    \"waybill\": \"WAPY282973726\", \n    \"courier_partner\": \"XYZ Courier partner\" \n  }\n}","language":"json","name":null}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"id\": 32568,\n  \"enduser\": null,\n  \"firstname\": \"lappuk\",\n  \"lastname\": \"ff\",\n  \"email\": \"[email protected]\",\n  \"address\": \"Icons didn't load on store and DashboardIcons didn't load on store and Dashboard\", // This is the Shipping Address \n  \"city\": \"Noida, Uttar Pradesh, India\",\n  \"state\": \"IN-UP\",\n  \"country\": \"IN\",\n  \"contact\": \"+911234567890\",\n  \"code\": \"201301\",\n  \"total_order\": \"1680.00\",\n  \"orderid\": \"00888706\",\n  \"payment_method\": \"Cash-On-Delivery\",\n  \"payment_status\": \"initiated\",\n  \"order_status\": \"initiated\",\n  \"is_archived\": false,\n  \"source\": \"web\",\n  \"taxes\": {},\n  \"promo_data\": {},\n  \"comments\": \"\",\n  \"transaction_id\": \"\",\n  \"transaction_date\": null,\n  \"client_ip\": \"172.31.24.118\",\n  \"completed_on\": null,\n  \"order_source\": null,\n  \"source_display\": \"Web\",\n  \"details\": {\n    \"items\": [\n      {\n        \"id\": 455330,\n        \"quantity\": 1,\n        \"final_price\": \"1680.00\",\n        \"title\": \"Puma product\",\n        \"sku\": null,\n      }\n    ],\n    \"discount\": \"0.00\",\n    \"shipping_charge\": \"0.0000\",\n    \"cod_charge\": \"0.00000\",\n    \"subtotal\": \"1680.00000\",\n    \"net_order\": \"1680.00000\",\n    \"total_order\": \"1680.00000\",\n    \"promo_code\": null,\n    \"promo_data\": {},\n    \"cookie_data\": {}\n  },\n  \"country_display\": \"India\",\n  \"state_display\": \"Uttar Pradesh\",\n  \"created\": \"2019-12-06T12:36:14+05:30\",\n  \"modified\": \"2021-04-09T13:24:04.657126+05:30\",\n  \"transaction\": {\n    \"transaction_id\": \"\",\n    \"payment_id\": \"\",\n    \"payment_status\": \"\",\n    \"payout_status\": \"\",\n    \"refund_initiated\": \"\",\n    \"transaction_date\": \"\",\n    \"payment_date\": \"\",\n    \"refund_id\": \"\",\n    \"instrument_type\": \"\",\n    \"payout_id\": \"\"\n  },\n  \"status_updated_manually\": false,\n  \"order_substatus\": \"\",\n  \"order_prod_type\": null,\n  \"case_id\": \"\",\n  \"shipping\": {\n    \"details\": [],\n    \"imojo_shipping\": false,\n    \"waybill\": \"WAPY282973726\",\n    \"courier_partner\": \"XYZ shipping company\",\n    \"tracking_url\": \"https://www.google.co.in/\"\n  }\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <token>","desc":"","required":false,"in":"header","ref":"","_id":"5d95e4808940d80133243fdb"},{"name":"shipping","type":"array_string","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607867e232befb006b85302d"},{"name":"tracking_url","type":"string","default":"","desc":"optional: max-512","required":false,"in":"body","ref":"","_id":"607867e232befb006b85302e"},{"name":"waybill","type":"string","default":"","desc":"optional: max-100","required":false,"in":"body","ref":"","_id":"607867e232befb006b85302f"},{"name":"courier_partner","type":"string","default":"","desc":"optional: max-100","required":false,"in":"body","ref":"","_id":"607867e232befb006b853030"}]},"next":{"description":"","pages":[]},"title":"Update Order","type":"patch","slug":"order-update","excerpt":"Update the Shipping details of a particular Order that was placed on the merchant's Instamojo Online Store.","body":"`32568` in the API URL is the Order ID against which you want to update the Order details.\nThe Payload data needs to be passed in `JSON` format.\n\nThe param \"orderid\" with the value \"00888706\" is an internally generated value. The param that you need to be using for this API endpoint to function is the \"id\" param.","updates":[],"order":5,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:20:50.411Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc0b45724f1000fb1e13b","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":9,"parentDoc":null,"childrenPages":[]}

patchUpdate Order

Update the Shipping details of a particular Order that was placed on the merchant's Instamojo Online Store.

Body Params

shipping:
array of strings
optional
tracking_url:
string
optional: max-512
waybill:
string
optional: max-100
courier_partner:
string
optional: max-100

Headers

Authorization:
stringBearer <token>
`32568` in the API URL is the Order ID against which you want to update the Order details. The Payload data needs to be passed in `JSON` format. The param "orderid" with the value "00888706" is an internally generated value. The param that you need to be using for this API endpoint to function is the "id" param.

User Information

Try It Out

patch
{{ 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



`32568` in the API URL is the Order ID against which you want to update the Order details. The Payload data needs to be passed in `JSON` format. The param "orderid" with the value "00888706" is an internally generated value. The param that you need to be using for this API endpoint to function is the "id" param.
{"_id":"60ca6842be2e9400483ca541","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/orders/32568/cancel/","auth":"required","method":"patch","examples":{"codes":[{"code":"Payload example: \n\n{\n  \"cancellation_reason\": \"Mark cancel\"\n}","language":"text","name":null}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"order_status\": \"cancelled\"\n}\n\n{\n  \"order_status\": \"cancel-requested\"\n}","name":""},{"status":"4XX","language":"json","code":"{\n  \"non_field_errors\": [\n    \"Cannot cancel order with order status initiated\"\n  ]\n}\n\n{\n  \"non_field_errors\": [\n    \"Cannot cancel order with transaction status success\"\n  ]\n}","name":"Errors"}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <token>","desc":"","required":false,"in":"header","ref":"","_id":"5d95e4808940d80133243fdb"},{"name":"cancellation_reason","type":"string","default":"Mark cancel","desc":"string","required":true,"in":"body","ref":"","_id":"607868ea88c86c00418e5f08"}]},"next":{"description":"","pages":[]},"title":"Cancel Order","type":"patch","slug":"cancel-order","excerpt":"Use to Cancel an Order that was placed on the merchant's Instamojo Online Store.","body":"`32568` in the API URL is the Order ID against which you want to update the Order details.\nThe Payload data needs to be passed in `form-data` format.\n\nThe param that you need to be using for this API endpoint to function is the \"id\" param.","updates":[],"order":6,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:25:14.646Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc0b45724f1000fb1e13b","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":8,"parentDoc":null,"childrenPages":[]}

patchCancel Order

Use to Cancel an Order that was placed on the merchant's Instamojo Online Store.

Body Params

cancellation_reason:
required
stringMark cancel
string

Headers

Authorization:
stringBearer <token>
`32568` in the API URL is the Order ID against which you want to update the Order details. The Payload data needs to be passed in `form-data` format. The param that you need to be using for this API endpoint to function is the "id" param.

User Information

Try It Out

patch
{{ 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



`32568` in the API URL is the Order ID against which you want to update the Order details. The Payload data needs to be passed in `form-data` format. The param that you need to be using for this API endpoint to function is the "id" param.
{"_id":"60ca6842be2e9400483ca542","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/orders/32568/update-order/","auth":"required","method":"patch","examples":{"codes":[{"code":"Payload example: \n\n{\n  \"order_status\": \"processing\", \n  \"comments\": \"Marking as in process\" \n}","language":"text","name":null}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"order_status\": \"processing\"\n}","name":""},{"status":"4XX","language":"json","code":"{\n  \"non_field_errors\": [\n    \"Update order status only for physical order type\"\n  ]\n}\n\n\n{\n  \"non_field_errors\": [\n    \"Cannot update order status from cancelled to processing\"\n  ]\n}","name":"Errors"}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <token>","desc":"","required":false,"in":"header","ref":"","_id":"5d95e4808940d80133243fdb"},{"name":"order_status","type":"string","default":"","desc":"choices - ['initiated', 'abandoned', 'processing', 'dispatched', 'completed']","required":true,"in":"body","ref":"","_id":"607868ea88c86c00418e5f08"},{"name":"comments","type":"string","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"60786a2fc20e1900777e6548"}]},"next":{"description":"","pages":[]},"title":"Update Order status","type":"patch","slug":"update-order-status","excerpt":"Update the Order Status of a particular Order that was placed on the merchant's Instamojo Online Store.","body":"`32568` in the API URL is the Order ID against which you want to update the Order details.\nThe Payload data needs to be passed in `form-data` format.\n\nThe param that you need to be using for this API endpoint to function is the \"id\" param.","updates":[],"order":7,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:30:39.560Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc0b45724f1000fb1e13b","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":6,"parentDoc":null,"childrenPages":[]}

patchUpdate Order status

Update the Order Status of a particular Order that was placed on the merchant's Instamojo Online Store.

Body Params

order_status:
required
string
choices - ['initiated', 'abandoned', 'processing', 'dispatched', 'completed']
comments:
string
optional

Headers

Authorization:
stringBearer <token>
`32568` in the API URL is the Order ID against which you want to update the Order details. The Payload data needs to be passed in `form-data` format. The param that you need to be using for this API endpoint to function is the "id" param.

User Information

Try It Out

patch
{{ 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



`32568` in the API URL is the Order ID against which you want to update the Order details. The Payload data needs to be passed in `form-data` format. The param that you need to be using for this API endpoint to function is the "id" param.
{"_id":"60ca6842be2e9400483ca543","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/inventory/products/","auth":"required","method":"get","examples":{"codes":[{"code":"Following can be used to filter orders for a day: \ncreated__gte=2021-06-04T00:00:00&created__lte=2021-06-04T23:59:59","language":"text"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"count\": 36,\n  \"next\": \"http://www.stores.mjc.instamojo.com/v2/store/inventory/products/?base_product__isnull=true&limit=1&page=2\",\n  \"previous\": null,\n  \"products\": [\n    {\n      \"id\": 455328,\n      \"title\": \"Shirts\",\n      \"stock\": 1032,\n      \"price\": \"2000.00\",\n      \"discounted_price\": \"1000.00\",\n      \"sku\": null,\n      \"images\": [\n        \"https://dxnwmre0dv0ln.cloudfront.net/products/29458/added-green-dress-dog-455328_image_1575598274.jpg\",\n        \"https://dxnwmre0dv0ln.cloudfront.net/store_defaults/products/freemium/Party%20Necklace2.jpg\"\n      ],\n      \"description\": \"Description of the product will be visible here.\",\n      \"short_description\": \"Short Description of the product will be visible here.\",\n      \"is_active\": true,\n      \"is_featured\": true,\n      \"option1_name\": \"\",\n      \"option2_name\": \"\",\n      \"option3_name\": \"\",\n      \"option1_value\": \"\",\n      \"option2_value\": \"\",\n      \"option3_value\": \"\",\n      \"product_type\": \"other\",\n      \"ship_in_days\": null,\n      \"digital_file\": null,\n      \"max_order_qty\": \"200.00\",\n      \"pay_what_you_want\": false,\n      \"event_start_datetime\": null,\n      \"event_end_datetime\": null,\n      \"event_venue\": null,\n      \"shipping_charges\": \"0.00\",\n      \"created\": \"2019-12-06T12:12:48+05:30\",\n      \"modified\": \"2021-04-09T13:45:40+05:30\"\n    }\n  ]\n}\n\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <token>","desc":"","required":false,"in":"header","ref":"","_id":"5d95e4808940d80133243fdb"},{"name":"created__gte","type":"string","default":"","desc":"gte means greater than or equals to. The response would contain products created after the specified time.","required":false,"in":"query","ref":"","_id":"60ec480c0e56ee0023ab8978"},{"name":"created__gt","type":"string","default":"","desc":"gt means greater than. The response would contain products created after the specified time.","required":false,"in":"query","ref":"","_id":"60ec480c0e56ee0023ab8979"},{"name":"created__lt","type":"string","default":"","desc":"lt means lesser than. The response would contain products created before the specified time.","required":false,"in":"query","ref":"","_id":"60ec480c0e56ee0023ab897a"},{"name":"created__lte","type":"string","default":"","desc":"lt means lesser than or equals to. The response would contain products created before the specified time.","required":false,"in":"query","ref":"","_id":"60ec480c0e56ee0023ab897b"}]},"next":{"description":"","pages":[]},"title":"List Products","type":"get","slug":"list-products","excerpt":"Fetches a comprehensive list of Products that were created on the corresponding merchant's Instamojo Online Store.","body":"","updates":[],"order":8,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:57:30.550Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc0b45724f1000fb1e13b","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":6,"parentDoc":null,"childrenPages":[]}

getList Products

Fetches a comprehensive list of Products that were created on the corresponding merchant's Instamojo Online Store.

Query Params

created__gte:
string
gte means greater than or equals to. The response would contain products created after the specified time.
created__gt:
string
gt means greater than. The response would contain products created after the specified time.
created__lt:
string
lt means lesser than. The response would contain products created before the specified time.
created__lte:
string
lt means lesser than or equals to. The response would contain products created before the specified time.

Headers

Authorization:
stringBearer <token>

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":"60ca6842be2e9400483ca544","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/inventory/products/455328/","auth":"required","method":"get","examples":{"codes":[]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"id\": 455328,\n  \"title\": \"Shirts\",\n  \"stock\": 1032,\n  \"price\": \"2000.00\",\n  \"discounted_price\": \"1000.00\",\n  \"category\": [\n    32022\n  ],\n  \"sku\": null,\n  \"images\": [\n    \"https://dxnwmre0dv0ln.cloudfront.net/products/29458/added-green-dress-dog-455328_image_1575598274.jpg\",\n    \"https://dxnwmre0dv0ln.cloudfront.net/store_defaults/products/freemium/Party%20Necklace2.jpg\"\n  ],\n  \"description\": \"Description of the product will be visible here.\",\n  \"short_description\": \"Short Description of the product will be visible here.\",\n  \"is_active\": true,\n  \"is_featured\": true,\n  \"is_free\": false,\n  \"option1_name\": \"\",\n  \"option2_name\": \"\",\n  \"option3_name\": \"\",\n  \"option1_value\": \"\",\n  \"option2_value\": \"\",\n  \"option3_value\": \"\",\n  \"product_type\": \"other\",\n  \"ship_in_days\": null,\n  \"digital_file\": \"\",\n  \"max_order_qty\": \"200.00\",\n  \"pay_what_you_want\": false,\n  \"event_start_datetime\": null,\n  \"event_end_datetime\": null,\n  \"event_venue\": null,\n  \"shipping_charges\": \"0.00\",\n  \"unlimited_qty\": false,\n  \"base_product\": null,\n  \"variants\": [],\n  \"seo_settings\": {\n    \"meta_title\": \"\",\n    \"meta_description\": \"\",\n    \"meta_canonical_url\": \"\",\n    \"meta_keywords\": []\n  },\n  \"note\": null,\n  \"max_digital_download\": null,\n  \"is_limit_on_digital_download\": null,\n  \"commission_fee\": null,\n  \"tags\": \"inventory.Tag.None\",\n  \"reseller_category\": null,\n  \"group_id\": \"455328\",\n  \"slug\": \"shirts-c2299\",\n  \"sort_order\": 1,\n  \"min_order_quantity\": \"1.00\",\n  \"page_title\": \"\",\n  \"webhook_url\": \"\",\n  \"redirect_url\": \"\",\n  \"short_code\": \"2XiLtA\",\n  \"created\": \"2019-12-06T12:12:48+05:30\",\n  \"modified\": \"2021-04-09T13:45:40+05:30\"\n}\n\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <token>","desc":"","required":false,"in":"header","ref":"","_id":"5d95e4808940d80133243fdb"}]},"next":{"description":"","pages":[]},"title":"Product Detail","type":"get","slug":"detailed-product","excerpt":"Fetches an extensive set of data on a particular Product created on the corresponding merchant's Instamojo Online Store.","body":"`455328` in the API URL is the Product ID against which you want to fetch the Product details.","updates":[],"order":9,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:58:46.719Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc0b45724f1000fb1e13b","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":3,"parentDoc":null,"childrenPages":[]}

getProduct Detail

Fetches an extensive set of data on a particular Product created on the corresponding merchant's Instamojo Online Store.

Headers

Authorization:
stringBearer <token>
`455328` in the API URL is the Product ID against which you want to fetch the Product details.

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 }}

Result Format



`455328` in the API URL is the Product ID against which you want to fetch the Product details.
{"_id":"60ca6842be2e9400483ca545","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/inventory/products/455328/","auth":"required","method":"patch","examples":{"codes":[{"code":"Payload example: \n\n{\n  \"sku\": \"KKWE-20\", \n  \"title\": \"Shirts\", \n  \"price\": 2000, \n  \"discounted_price\": 1000, \n  \"stock\": 1032, \n  \"is_featured\": true, \n  \"max_order_qty\": 200, \n  \"min_order_quantity\": 1, \n  \"unlimited_qty\": false, \n  \"sort_order\": 1, \n  \"pay_what_you_want\": false,\n  \"ship_in_days\": 20, \n  \"shipping_charges\": 0.00, \n  \"max_digital_download\": null, \n  \"is_limit_on_digital_download\": false, \n  \"is_active\": true, \n  \"is_free\": false \n}","language":"text","name":null}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"id\": 455328,\n  \"title\": \"Shirts\",\n  \"stock\": 1032,\n  \"price\": \"2000.00\",\n  \"discounted_price\": \"1000.00\",\n  \"category\": [\n    32022\n  ],\n  \"sku\": null,\n  \"images\": [\n    \"https://dxnwmre0dv0ln.cloudfront.net/products/29458/added-green-dress-dog-455328_image_1575598274.jpg\",\n    \"https://dxnwmre0dv0ln.cloudfront.net/store_defaults/products/freemium/Party%20Necklace2.jpg\"\n  ],\n  \"description\": \"Description of the product will be visible here.\",\n  \"short_description\": \"Short Description of the product will be visible here.\",\n  \"is_active\": true,\n  \"is_featured\": true,\n  \"is_free\": false,\n  \"option1_name\": \"\",\n  \"option2_name\": \"\",\n  \"option3_name\": \"\",\n  \"option1_value\": \"\",\n  \"option2_value\": \"\",\n  \"option3_value\": \"\",\n  \"product_type\": \"other\",\n  \"ship_in_days\": null,\n  \"digital_file\": \"\",\n  \"max_order_qty\": \"200.00\",\n  \"pay_what_you_want\": false,\n  \"event_start_datetime\": null,\n  \"event_end_datetime\": null,\n  \"event_venue\": null,\n  \"shipping_charges\": \"0.00\",\n  \"unlimited_qty\": false,\n  \"base_product\": null,\n  \"variants\": [],\n  \"seo_settings\": {\n    \"meta_title\": \"\",\n    \"meta_description\": \"\",\n    \"meta_canonical_url\": \"\",\n    \"meta_keywords\": []\n  },\n  \"note\": null,\n  \"max_digital_download\": null,\n  \"is_limit_on_digital_download\": false,\n  \"commission_fee\": null,\n  \"tags\": \"inventory.Tag.None\",\n  \"reseller_category\": null,\n  \"group_id\": \"455328\",\n  \"slug\": \"shirts-c2299\",\n  \"sort_order\": 1,\n  \"min_order_quantity\": \"1.00\",\n  \"page_title\": \"\",\n  \"webhook_url\": \"\",\n  \"redirect_url\": \"\",\n  \"short_code\": \"2XiLtA\",\n  \"created\": \"2019-12-06T12:12:48+05:30\",\n  \"modified\": \"2021-04-09T15:41:04.480640+05:30\"\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <token>","desc":"","required":false,"in":"header","ref":"","_id":"5d95e4808940d80133243fdb"},{"name":"sku","type":"string","default":"","desc":"optional: max-255","required":false,"in":"body","ref":"","_id":"607867e232befb006b85302e"},{"name":"title","type":"string","default":"","desc":"optional: max-255","required":false,"in":"body","ref":"","_id":"607867e232befb006b85302f"},{"name":"price","type":"long","default":"","desc":"optional: max-100","required":false,"in":"body","ref":"","_id":"607867e232befb006b853030"},{"name":"discounted_price","type":"long","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607871faedf78500160932d9"},{"name":"stock","type":"int","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607871faedf78500160932da"},{"name":"is_featured","type":"boolean","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607871faedf78500160932db"},{"name":"max_order_qty","type":"int","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607871faedf78500160932dc"},{"name":"min_order_quantity","type":"int","default":"","desc":"optional: min-1","required":false,"in":"body","ref":"","_id":"607871faedf78500160932dd"},{"name":"unlimited_qty","type":"boolean","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607871faedf78500160932de"},{"name":"sort_order","type":"int","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607871faedf78500160932df"},{"name":"pay_what_you_want","type":"boolean","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607871faedf78500160932e0"},{"name":"ship_in_days","type":"int","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607871faedf78500160932e1"},{"name":"shipping_charges","type":"long","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607871faedf78500160932e2"},{"name":"max_digital_download","type":"int","default":"","desc":"optional: null-true","required":false,"in":"body","ref":"","_id":"607871faedf78500160932e3"},{"name":"is_limit_on_digital_download","type":"boolean","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607871faedf78500160932e4"},{"name":"is_active","type":"boolean","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607871faedf78500160932e5"},{"name":"is_free","type":"boolean","default":"","desc":"optional","required":false,"in":"body","ref":"","_id":"607871faedf78500160932e6"}]},"next":{"description":"","pages":[]},"title":"Update Product","type":"patch","slug":"order-update-1","excerpt":"Update the Product details of a particular Product that was created on the merchant's Instamojo Online Store.","body":"`455328` in the API URL is the Product ID against which you want to update the Product details.\nThe Payload data needs to be passed in `form-data` format.","updates":[],"order":10,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T17:03:54.848Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc0b45724f1000fb1e13b","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":4,"parentDoc":null,"childrenPages":[]}

patchUpdate Product

Update the Product details of a particular Product that was created on the merchant's Instamojo Online Store.

Body Params

sku:
string
optional: max-255
title:
string
optional: max-255
price:
long
optional: max-100
discounted_price:
long
optional
stock:
integer
optional
is_featured:
boolean
optional
max_order_qty:
integer
optional
min_order_quantity:
integer
optional: min-1
unlimited_qty:
boolean
optional
sort_order:
integer
optional
pay_what_you_want:
boolean
optional
ship_in_days:
integer
optional
shipping_charges:
long
optional
max_digital_download:
integer
optional: null-true
is_limit_on_digital_download:
boolean
optional
is_active:
boolean
optional
is_free:
boolean
optional

Headers

Authorization:
stringBearer <token>
`455328` in the API URL is the Product ID against which you want to update the Product details. The Payload data needs to be passed in `form-data` format.

User Information

Try It Out

patch
{{ 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



`455328` in the API URL is the Product ID against which you want to update the Product details. The Payload data needs to be passed in `form-data` format.
{"_id":"612b66008da02e00541967e7","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"MDP Payments APIs","type":"basic","slug":"mdp-payments-apis","excerpt":"","body":"The following set of APIs pertains to the Payments aspect of Instamojo.\n\nScopes (for the access token that is used) required to run the Payments APIs:\n \npayment-requests:read\npayment-requests:write\npayments:read \npayouts:read \nrefunds:read\npayments:refund\n\n\n**Error codes and their meanings** :\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"HTTP Codes\",\n    \"h-1\": \"HTTP Codes\",\n    \"0-0\": \"401 Unauthorized\",\n    \"1-0\": \"401 Unauthorized\",\n    \"2-0\": \"403 Forbidden\",\n    \"3-0\": \"404 Not Found\",\n    \"0-1\": \"{\\n  \\\"error\\\": \\\"Invalid Client Id\\\"\\n}\",\n    \"1-1\": \"{\\n  \\\"error\\\": \\\"Invalid or expired Client Id Exp\\\"\\n}\",\n    \"2-1\": \"{\\n  \\\"error\\\": \\\"Invalid scopes\\\"\\n}\",\n    \"3-1\": \"{\\n  \\\"error\\\": \\\"Invalid Account Id\\\"\\n}\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-08-29T10:48:32.499Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc12f7cbf20001760d654","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":0,"parentDoc":null,"childrenPages":[]}

MDP Payments APIs


The following set of APIs pertains to the Payments aspect of Instamojo. Scopes (for the access token that is used) required to run the Payments APIs: payment-requests:read payment-requests:write payments:read payouts:read refunds:read payments:refund **Error codes and their meanings** : [block:parameters] { "data": { "h-0": "HTTP Codes", "h-1": "HTTP Codes", "0-0": "401 Unauthorized", "1-0": "401 Unauthorized", "2-0": "403 Forbidden", "3-0": "404 Not Found", "0-1": "{\n \"error\": \"Invalid Client Id\"\n}", "1-1": "{\n \"error\": \"Invalid or expired Client Id Exp\"\n}", "2-1": "{\n \"error\": \"Invalid scopes\"\n}", "3-1": "{\n \"error\": \"Invalid Account Id\"\n}" }, "cols": 2, "rows": 4 } [/block]
The following set of APIs pertains to the Payments aspect of Instamojo. Scopes (for the access token that is used) required to run the Payments APIs: payment-requests:read payment-requests:write payments:read payouts:read refunds:read payments:refund **Error codes and their meanings** : [block:parameters] { "data": { "h-0": "HTTP Codes", "h-1": "HTTP Codes", "0-0": "401 Unauthorized", "1-0": "401 Unauthorized", "2-0": "403 Forbidden", "3-0": "404 Not Found", "0-1": "{\n \"error\": \"Invalid Client Id\"\n}", "1-1": "{\n \"error\": \"Invalid or expired Client Id Exp\"\n}", "2-1": "{\n \"error\": \"Invalid scopes\"\n}", "3-1": "{\n \"error\": \"Invalid Account Id\"\n}" }, "cols": 2, "rows": 4 } [/block]
{"_id":"612b689158f86a001154b57a","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/payment_requests/","auth":"required","method":"post","examples":{"codes":[{"code":"<?php\n\n$ch = curl_init();\n\ncurl_setopt($ch, CURLOPT_URL, 'https://api.instamojo.com/v2/payment_requests/');\ncurl_setopt($ch, CURLOPT_HEADER, FALSE);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\ncurl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\ncurl_setopt($ch, CURLOPT_HTTPHEADER,array('Authorization: Bearer y70kak2K0Rg7J4PAL8sdW0MutnGJEl'));\n\n$payload = Array(\n  'purpose' => 'FIFA 16',\n  'amount' => '2500',\n  'buyer_name' => 'John Doe',\n  'email' => '[email protected]',\n  'phone' => '9999999999',\n  'redirect_url' => 'http://www.example.com/redirect/',\n  'send_email' => 'True',\n  'send_sms' => 'True',\n  'webhook' => 'http://www.example.com/webhook/',\n  'allow_repeated_payments' => 'False',\n}\n\ncurl_setopt($ch, CURLOPT_POST, true);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));\n$response = curl_exec($ch);\ncurl_close($ch); \n\n?>","language":"php"},{"code":"import requests\n\nheaders = { \n\t\"Authorization\": \"Bearer y70kak2K0Rg7J4PAL8sdW0MutnGJEl\"\n}\npayload = {\n  'purpose': 'FIFA 16',\n  'amount': '2500',\n  'buyer_name': 'John Doe',\n  'email': '[email protected]',\n  'phone': '9999999999',\n  'redirect_url': 'http://www.example.com/redirect/',\n  'send_email': 'True',\n  'send_sms': 'True',\n  'webhook': 'http://www.example.com/webhook/',\n  'allow_repeated_payments': 'False',\n}\nresponse = requests.post(\n  \"https://api.instamojo.com/v2/payment_requests/\", \n  data=payload, \n  headers=headers\n)              ","language":"python"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"id\": \"05f317448ad84649aa1a9c7328edb015\",\n  \"user\": \"https://api.instamojo.com/v2/users/90f01dfdacbe4fe7892fc27dbdc30906/\",\n  \"phone\": \"+919999999999\",\n  \"email\": \"[email protected]\",\n  \"buyer_name\": \"John Doe\",\n  \"amount\": \"2500\",\n  \"purpose\": \"FIFA 16\",\n  \"status\": \"Pending\",\n  \"payments\": [],\n  \"send_sms\": true,\n  \"send_email\": true,\n  \"sms_status\": \"Pending\",\n  \"email_status\": \"Pending\",\n  \"shorturl\": null,\n  \"longurl\": \"https://www.instamojo.com/@foo/05f317448ad84649aa1a9c7328edb015\",\n  \"redirect_url\": \"http://www.example.com/redirect/\",\n  \"webhook\": \"http://www.example.com/webhook/\",\n  \"created_at\": \"2016-05-09T16:10:13.786Z\",\n  \"modified_at\": \"2016-05-09T16:10:13.786Z\",\n  \"resource_uri\": \"https://api.instamojo.com/v2/payment_requests/05f317448ad84649aa1a9c7328edb015/\",\n  \"allow_repeated_payments\": false,\n  \"mark_fulfilled\": true\n}","name":""},{"status":400,"language":"json","code":"{\n  \"purpose\": [\n    \"This field is required.\"\n  ],\n  \"amount\": [\n    \"This field is required.\"\n  ]\n}","name":""},{"code":"{\n  \"success\": false,\n  \"message\": \"Authentication credentials were not provided.\"\n}","language":"json","status":401}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <your-token>","desc":"","required":false,"in":"header","ref":"","_id":"5d96e08b585ec20038b410e2"},{"name":"amount","type":"double","default":"","desc":"The amount for the request. The minimum amount is 9. And the maximum is 200000.","required":true,"in":"body","ref":"","_id":"612b689158f86a001154b57c"},{"name":"purpose","type":"string","default":"","desc":"Purpose of the payment request.","required":true,"in":"body","ref":"","_id":"612b689158f86a001154b57d"},{"name":"buyer_name","type":"string","default":"","desc":"Name of payer","required":false,"in":"body","ref":"","_id":"612b689158f86a001154b57e"},{"name":"email","type":"string","default":"","desc":"Email of payer","required":false,"in":"body","ref":"","_id":"612b689158f86a001154b57f"},{"name":"phone","type":"string","default":"","desc":"Phone number of payer","required":false,"in":"body","ref":"","_id":"612b689158f86a001154b580"},{"name":"redirect_url","type":"string","default":"","desc":"URL where we redirect the user after a payment. If provided, we will redirect the user to `redirect_url` immediately after the payment has been processed. Three additional query arguments `payment_request_id`, `payment_status` and `payment_id` are also sent with the redirect URL.","required":false,"in":"body","ref":"","_id":"612b689158f86a001154b581"},{"name":"webhook","type":"string","default":"","desc":"URL where our server do POST request after a payment  If provided, we will do a the POST request to the webhook (url) with full details of the payment","required":false,"in":"body","ref":"","_id":"612b689158f86a001154b582"},{"name":"allow_repeated_payments","type":"boolean","default":"True","desc":"If `allow_repeated_payments` is `false`, only one payment can be paid on a payment request link. `allow_repeated_payments` is `true` by default.","required":false,"in":"body","ref":"","_id":"612b689158f86a001154b583"},{"name":"send_email","type":"boolean","default":"False","desc":"Flag to send request link via email.  If `send_email` is `true`, a request email will be sent to the email supplied. If `send_email` is `true` but no email is supplied, request creation will throw an error.","required":false,"in":"body","ref":"","_id":"612b689158f86a001154b584"},{"name":"send_sms","type":"boolean","default":"False","desc":"Flag to send request link via SMS.  If `send_sms` is `true`, a request SMS will be sent to the phone number supplied. If `send_sms` is `true` but no phone number is supplied, request creation will throw an error.","required":false,"in":"body","ref":"","_id":"612b689158f86a001154b585"},{"name":"expires_at","type":"datetime","default":"","desc":"Time after which the payment request will be expired in UTC timestamp. Max value is 600 seconds. Default is Null","required":false,"in":"body","ref":"","_id":"612b689158f86a001154b586"}]},"next":{"description":"","pages":[]},"title":"Create a Payment Request","type":"post","slug":"create-a-payment-request","excerpt":"This will create a payment request, ie, a payment link on Instamojo, for the specific merchant, whose access token is being used.","body":"","updates":[],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-08-29T10:59:29.565Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc12f7cbf20001760d654","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":0,"parentDoc":null,"childrenPages":[]}

postCreate a Payment Request

This will create a payment request, ie, a payment link on Instamojo, for the specific merchant, whose access token is being used.

Body Params

amount:
required
double
The amount for the request. The minimum amount is 9. And the maximum is 200000.
purpose:
required
string
Purpose of the payment request.
buyer_name:
string
Name of payer
email:
string
Email of payer
phone:
string
Phone number of payer
redirect_url:
string
URL where we redirect the user after a payment. If provided, we will redirect the user to `redirect_url` immediately after the payment has been processed. Three additional query arguments `payment_request_id`, `payment_status` and `payment_id` are also sent with the redirect URL.
webhook:
string
URL where our server do POST request after a payment If provided, we will do a the POST request to the webhook (url) with full details of the payment
allow_repeated_payments:
booleanTrue
If `allow_repeated_payments` is `false`, only one payment can be paid on a payment request link. `allow_repeated_payments` is `true` by default.
send_email:
booleanFalse
Flag to send request link via email. If `send_email` is `true`, a request email will be sent to the email supplied. If `send_email` is `true` but no email is supplied, request creation will throw an error.
send_sms:
booleanFalse
Flag to send request link via SMS. If `send_sms` is `true`, a request SMS will be sent to the phone number supplied. If `send_sms` is `true` but no phone number is supplied, request creation will throw an error.
expires_at:
datetime
Time after which the payment request will be expired in UTC timestamp. Max value is 600 seconds. Default is Null

Headers

Authorization:
stringBearer <your-token>

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":"612b6966aef82b00634b460a","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/payment_requests/:id/","auth":"required","method":"get","examples":{"codes":[{"code":"<?php\n\n$ch = curl_init();\ncurl_setopt($ch, CURLOPT_URL, 'https://api.instamojo.com/v2/payment_requests/9ef9b530ff8e440dbbc29f2157bc69ad/');\ncurl_setopt($ch, CURLOPT_HEADER, FALSE);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\ncurl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n\ncurl_setopt($ch, CURLOPT_HTTPHEADER,array('Authorization: Bearer y70kak2K0Rg7J4PAL8sdW0MutnGJEl'));\n\n$response = curl_exec($ch);\ncurl_close($ch); \n\n?>","language":"php"},{"code":"import requests\n\nheaders = { \n\t\"Authorization\": \"Bearer y70kak2K0Rg7J4PAL8sdW0MutnGJEl\"\n}\n\nresponse = requests.get(\n  \"https://api.instamojo.com/v2/payment_requests/9ef9b530ff8e440dbbc29f2157bc69ad/\", \n  headers=headers\n)              ","language":"python"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n  \"id\": \"05f317448ad84649aa1a9c7328edb015\",\n  \"user\": \"https://api.instamojo.com/v2/users/90f01dfdacbe4fe7892fc27dbdc30906/\",\n  \"phone\": \"+919999999999\",\n  \"email\": \"[email protected]\",\n  \"buyer_name\": \"John Doe\",\n  \"amount\": \"2500\",\n  \"purpose\": \"FIFA 16\",\n  \"status\": \"Pending\",\n  \"payments\": [],\n  \"send_sms\": true,\n  \"send_email\": true,\n  \"sms_status\": \"Pending\",\n  \"email_status\": \"Pending\",\n  \"shorturl\": null,\n  \"longurl\": \"https://www.instamojo.com/@foo/05f317448ad84649aa1a9c7328edb015\",\n  \"redirect_url\": \"http://www.example.com/redirect/\",\n  \"webhook\": \"http://www.example.com/webhook/\",\n  \"created_at\": \"2016-05-09T16:10:13.786Z\",\n  \"modified_at\": \"2016-05-09T16:10:13.786Z\",\n  \"resource_uri\": \"https://api.instamojo.com/v2/payment_requests/05f317448ad84649aa1a9c7328edb015/\",\n  \"allow_repeated_payments\": false,\n  \"mark_fulfilled\": true\n}","name":""},{"status":400,"language":"json","code":"{\n  \"purpose\": [\n    \"This field is required.\"\n  ],\n  \"amount\": [\n    \"This field is required.\"\n  ]\n}","name":""},{"code":"{\n  \"success\": false,\n  \"message\": \"Authentication credentials were not provided.\"\n}","language":"json","status":401}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <your-token>","desc":"","required":false,"in":"header","ref":"","_id":"5d96e08b585ec20038b410e2"},{"name":"id","type":"string","default":"","desc":"","required":false,"in":"path","ref":"","_id":"612b6966aef82b00634b460c"}]},"next":{"description":"","pages":[]},"title":"Get a Payment Request","type":"get","slug":"get-a-payment-request","excerpt":"This will fetch the details of a payment request on Instamojo, for the specific merchant, whose access token is being used.","body":"","updates":[],"order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-08-29T11:03:02.454Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc12f7cbf20001760d654","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":0,"parentDoc":null,"childrenPages":[]}

getGet a Payment Request

This will fetch the details of a payment request on Instamojo, for the specific merchant, whose access token is being used.

Path Params

id:
string

Headers

Authorization:
stringBearer <your-token>

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":"60ca6842be2e9400483ca52e","project":"56a1c9c13845200d0066d6fe","version":"60ca6842be2e9400483ca546","category":"61ffc12f7cbf20001760d654","user":"5ce26a9d4c3d820056874747","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-10-04T04:57:06.777Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"get","examples":{"codes":[]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"count\": 192,\n    \"next\": \"https://test.instamojo.com/v2/payments/?page=2\",\n    \"previous\": null,\n    \"payments\": \n    [\n        {\n            \"id\": \"MOJO9520R12A973123120\",\n            \"title\": \"test payment\",\n          \t“payment_type”: \"instapay\",\n            \"status\": true,\n            \"link\":\"https://test.instamojo.com/v2/links/<value>/\",\n            \"product\": null,\n            \"seller\": \"https://test.instamojo.com/v2/users/<value>/\",\n            \"currency\": \"INR\",\n            \"amount\": \"9494.00\",\n            \"name\": \"buyer\",\n            \"email\": \"[email protected]\",\n            \"phone\": \"+919876543210\",\n            \"payout\": null,\n            \"fees\": \"192.88\",\n            \"total_taxes\": \"34.72\",\n            \"cases\": [],\n            \"instrument_type\": \"CARD\",\n            \"billing_instrument\": \"International Regular Credit Card (Visa/Mastercard)\",\n            \"failure\": null,\n            \"created_at\": \"2019-05-20T09:30:23.808234Z\",\n            \"updated_at\": \"2019-05-24T07:45:04.639332Z\",\n            \"tax_invoice_id\": \"0355221229/000006\",\n            \"resource_uri\": \"https://test.instamojo.com/v2/payments/<value>/\"\n        },\n    ]\n}\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","auth":"required","params":[{"name":"Authorization","type":"string","default":"Bearer <your-token>","desc":"","required":false,"in":"header","ref":"","_id":"5d96d1225d2d2a0073555aaa"},{"name":"id","type":"string","default":"MOJO9618N05A3131214","desc":"","required":false,"in":"query","ref":"","_id":"5d96d1225d2d2a0073555aa9"},{"name":"buyer","type":"string","default":"username","desc":"username or account id","required":false,"in":"query","ref":"","_id":"5d96d1225d2d2a0073555aa8"},{"name":"seller","type":"string","default":"username","desc":"username or account id","required":false,"in":"query","ref":"","_id":"5d96d61f5dff49005091607c"},{"name":"payout","type":"string","default":"MOJO9423001M54251388","desc":"payout id","required":false,"in":"query","ref":"","_id":"5d96d61f5dff49005091607b"},{"name":"product","type":"string","default":"product_slug","desc":"product slug","required":false,"in":"query","ref":"","_id":"5d96d61f5dff49005091607a"},{"name":"min_created_at","type":"datetime","default":"2019-06-18T08:54:39.1127","desc":"","required":false,"in":"query","ref":"","_id":"5d96d61f5dff490050916079"},{"name":"max_created_at","type":"datetime","default":"2019-06-18T08:54:39.1127","desc":"","required":false,"in":"query","ref":"","_id":"5d96d61f5dff490050916078"},{"name":"min_updated_at","type":"datetime","default":"2019-06-18T08:54:39.1127","desc":"","required":false,"in":"query","ref":"","_id":"5d96d61f5dff490050916077"},{"name":"max_updated_at","type":"datetime","default":"2019-06-18T08:54:39.1127","desc":"","required":false,"in":"query","ref":"","_id":"5d96d61f5dff490050916076"},{"name":"order_id","type":"string","default":"f0a3effe-21c1-450c-8bbb-a0066b09","desc":"","required":false,"in":"query","ref":"","_id":"5d96d61f5dff490050916075"}],"url":"/v2/payments/"},"isReference":false,"order":3,"body":"","excerpt":"Get a list of the Payments that a merchant has received on Instamojo.","slug":"payments","type":"get","title":"List Payments","__v":8,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getList Payments

Get a list of the Payments that a merchant has received on Instamojo.

Query Params

id:
stringMOJO9618N05A3131214
buyer:
stringusername
username or account id
seller:
stringusername
username or account id
payout:
stringMOJO9423001M54251388
payout id
product:
stringproduct_slug
product slug
min_created_at:
datetime2019-06-18T08:54:39.1127
max_created_at:
datetime2019-06-18T08:54:39.1127
min_updated_at:
datetime2019-06-18T08:54:39.1127
max_updated_at:
datetime2019-06-18T08:54:39.1127
order_id:
stringf0a3effe-21c1-450c-8bbb-a0066b09

Headers

Authorization:
stringBearer <your-token>

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 }}

Result Format



{"_id":"60ca6842be2e9400483ca52f","project":"56a1c9c13845200d0066d6fe","version":"60ca6842be2e9400483ca546","category":"61ffc12f7cbf20001760d654","user":"5ce26a9d4c3d820056874747","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-10-04T05:30:49.083Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"method":"get","examples":{"codes":[]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"count\": 17,\n    \"next\": null,\n    \"previous\": null,\n    \"payouts\":\n    [\n        {\n            \"id\": \"MOJO9413001M10071018\",\n            \"recipient\": \"https://test.instamojo.com/v2/users/<value>/\",\n            \"status\": true,\n            \"paid_out_at\": \"2019-04-22T12:23:19.239722Z\",\n            \"currency\": \"INR\",\n            \"paid_amount\": \"1570.75\",\n            \"sales_amount\": \"26983.21\",\n            \"fee_amount\": \"1744.92\",\n            \"total_tax_amount\": \"314.24\",\n            \"held_amount\": \"0.00\",\n            \"reversed_amount\": \"3965.00\",\n            \"refunded_amount\": \"0.00\",\n            \"affiliate_commission_amount\": \"0.00\",\n            \"partner_commission_amount\": \"0.00\",\n            \"payout_type\": 0,\n            \"resource_uri\": \"https://test.instamojo.com/v2/payouts/<value>/\",\n            \"shipping_fee\": \"23386.42\"\n        },\n    ]\n}\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","auth":"required","params":[{"name":"Authorization","type":"string","default":"Bearer <your-token>","desc":"","required":false,"in":"header","ref":"","_id":"5d96d9099b619e00112d16ab"},{"name":"id","type":"string","default":"MOJO9423001M54251388","desc":"Payout Id","required":false,"in":"query","ref":"","_id":"5d96d9099b619e00112d16aa"},{"name":"start_time","type":"datetime","default":"2019-06-18T04:59:37.227712Z","desc":"paid out date-time","required":false,"in":"query","ref":"","_id":"5d96d9099b619e00112d16a9"},{"name":"end_time","type":"datetime","default":"2019-06-18T04:59:37.227712Z","desc":"paid out date-time","required":false,"in":"query","ref":"","_id":"5d96d9099b619e00112d16a8"}],"url":"/v2/payouts/"},"isReference":false,"order":4,"body":"","excerpt":"Get a list of the Payouts that a merchant has received on Instamojo.","slug":"payouts","type":"get","title":"List Payouts","__v":6,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"childrenPages":[]}

getList Payouts

Get a list of the Payouts that a merchant has received on Instamojo.

Query Params

id:
stringMOJO9423001M54251388
Payout Id
start_time:
datetime2019-06-18T04:59:37.227712Z
paid out date-time
end_time:
datetime2019-06-18T04:59:37.227712Z
paid out date-time

Headers

Authorization:
stringBearer <your-token>

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 }}

Result Format



{"_id":"612b6a48d46196001073621e","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/payments/:payment_id/refund/","auth":"required","method":"post","examples":{"codes":[{"code":"<?php\n\n$ch = curl_init();\n\ncurl_setopt($ch, CURLOPT_URL, 'https://api.instamojo.com/v2/payments/MOJO5c04000J30502939/refund/');\ncurl_setopt($ch, CURLOPT_HEADER, FALSE);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\ncurl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\ncurl_setopt($ch, CURLOPT_HTTPHEADER,array('Authorization: Bearer y70kak2K0Rg7J4PAL8sdW0MutnGJEl'));\n\n$payload = Array(\n    'transaction_id' => 'partial_refund_1',\n    'type' => 'TNR',\n    'body' => 'Need to refund to the buyer.',\n    'refund_amount' => '100'\n);\n\ncurl_setopt($ch, CURLOPT_POST, true);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));\n$response = curl_exec($ch);\ncurl_close($ch); \n\n?>","language":"php"},{"code":"import requests\n\nheaders = { \n\t\"Authorization\": \"Bearer y70kak2K0Rg7J4PAL8sdW0MutnGJEl\"\n}\n\npayload = {\n  'transaction_id': 'partial_refund_1',\n\t'type': 'TNR',\n  'body': 'Need to refund to the buyer.',\n  'refund_amount': '100'\n}\n\nresponse = requests.post(\n  \"https://api.instamojo.com/v2/payments/MOJO5c04000J30502939/refund/\", \n  headers=headers,\n  data=payload\n)              ","language":"python"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"refund\": {\n        \"id\": \"C5c0751269\",\n        \"payment_id\": \"MOJO5c04000J30502939\",\n        \"status\": \"Refunded\",\n        \"type\": \"QFL\",\n        \"body\": \"Customer isn't satisfied with the quality\",\n        \"refund_amount\": \"100\",\n        \"total_amount\": \"100.00\",\n        \"created_at\": \"2015-12-07T11:01:37.640Z\"\n    },\n    \"success\": true\n}","name":""},{"status":400,"language":"json","code":"{\n  \"purpose\": [\n    \"This field is required.\"\n  ],\n  \"amount\": [\n    \"This field is required.\"\n  ]\n}","name":""},{"code":"{\n  \"success\": false,\n  \"message\": \"Authentication credentials were not provided.\"\n}","language":"json","status":401}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <your-token>","desc":"","required":false,"in":"header","ref":"","_id":"5d96e08b585ec20038b410e2"},{"name":"payment_id","type":"string","default":"","desc":"","required":false,"in":"path","ref":"","_id":"612b6966aef82b00634b460c"},{"name":"type","type":"string","default":"","desc":"A three letter short-code identifying the reason for this case.","required":true,"in":"body","ref":"","_id":"612b6a48d461960010736221"},{"name":"body","type":"string","default":"","desc":"Additonal text explaining the refund.","required":true,"in":"body","ref":"","_id":"612b6a48d461960010736222"},{"name":"refund_amount","type":"string","default":"Paid amount","desc":"This field can be used to specify the refund amount. For instance, you may want to issue a refund for an amount lesser than what was paid. Default is paid amount.","required":true,"in":"body","ref":"","_id":"612b6a48d461960010736223"},{"name":"transaction_id","type":"string","default":"","desc":"Mandatory parameter in the body from the second case creation onwards for the payment to prevent duplicate case creations due to replay of APIs","required":true,"in":"body","ref":"","_id":"612b6a48d461960010736224"}]},"next":{"description":"","pages":[]},"title":"Create a Refund","type":"post","slug":"create-a-refund","excerpt":"This will refund a payment made on Instamojo, for the specific merchant, whose access token is being used.","body":"","updates":[],"order":5,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-08-29T11:06:48.288Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc12f7cbf20001760d654","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":0,"parentDoc":null,"childrenPages":[]}

postCreate a Refund

This will refund a payment made on Instamojo, for the specific merchant, whose access token is being used.

Path Params

payment_id:
string

Body Params

type:
required
string
A three letter short-code identifying the reason for this case.
body:
required
string
Additonal text explaining the refund.
refund_amount:
required
stringPaid amount
This field can be used to specify the refund amount. For instance, you may want to issue a refund for an amount lesser than what was paid. Default is paid amount.
transaction_id:
required
string
Mandatory parameter in the body from the second case creation onwards for the payment to prevent duplicate case creations due to replay of APIs

Headers

Authorization:
stringBearer <your-token>

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":"61ffb324ab704f016dab92d8","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"MDP Script APIs","type":"basic","slug":"mdp-javascript-apis","excerpt":"","body":"The following set of APIs pertains to the Script aspect of the Online Store on Instamojo.\n\nScopes (for the access token that is used) required to run the JS APIs:\n \nscript-values:write \nscript-values:read\n\n**Error codes and their meanings** :\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"HTTP Codes\",\n    \"h-1\": \"HTTP Codes\",\n    \"0-0\": \"401 Unauthorized\",\n    \"1-0\": \"401 Unauthorized\",\n    \"2-0\": \"403 Forbidden\",\n    \"3-0\": \"404 Not Found\",\n    \"0-1\": \"{\\n  \\\"error\\\": \\\"Invalid Client Id\\\"\\n}\",\n    \"1-1\": \"{\\n  \\\"error\\\": \\\"Invalid or expired Client Id Exp\\\"\\n}\",\n    \"2-1\": \"{\\n  \\\"error\\\": \\\"Invalid scopes\\\"\\n}\",\n    \"3-1\": \"{\\n  \\\"error\\\": \\\"Invalid Account Id\\\"\\n}\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]\n**How to get Variable ID:** \n\nPlease drop a mail to [[email protected]](mailto:[email protected]) with your App name and the Email ID with which you have signed up on developers.instamojo.com to obtain the variable ID for your App.","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-02-06T11:38:12.740Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc166cc683f003d758b49","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":0,"parentDoc":null,"childrenPages":[]}

MDP Script APIs


The following set of APIs pertains to the Script aspect of the Online Store on Instamojo. Scopes (for the access token that is used) required to run the JS APIs: script-values:write script-values:read **Error codes and their meanings** : [block:parameters] { "data": { "h-0": "HTTP Codes", "h-1": "HTTP Codes", "0-0": "401 Unauthorized", "1-0": "401 Unauthorized", "2-0": "403 Forbidden", "3-0": "404 Not Found", "0-1": "{\n \"error\": \"Invalid Client Id\"\n}", "1-1": "{\n \"error\": \"Invalid or expired Client Id Exp\"\n}", "2-1": "{\n \"error\": \"Invalid scopes\"\n}", "3-1": "{\n \"error\": \"Invalid Account Id\"\n}" }, "cols": 2, "rows": 4 } [/block] **How to get Variable ID:** Please drop a mail to [[email protected]](mailto:[email protected]) with your App name and the Email ID with which you have signed up on developers.instamojo.com to obtain the variable ID for your App.
The following set of APIs pertains to the Script aspect of the Online Store on Instamojo. Scopes (for the access token that is used) required to run the JS APIs: script-values:write script-values:read **Error codes and their meanings** : [block:parameters] { "data": { "h-0": "HTTP Codes", "h-1": "HTTP Codes", "0-0": "401 Unauthorized", "1-0": "401 Unauthorized", "2-0": "403 Forbidden", "3-0": "404 Not Found", "0-1": "{\n \"error\": \"Invalid Client Id\"\n}", "1-1": "{\n \"error\": \"Invalid or expired Client Id Exp\"\n}", "2-1": "{\n \"error\": \"Invalid scopes\"\n}", "3-1": "{\n \"error\": \"Invalid Account Id\"\n}" }, "cols": 2, "rows": 4 } [/block] **How to get Variable ID:** Please drop a mail to [[email protected]](mailto:[email protected]) with your App name and the Email ID with which you have signed up on developers.instamojo.com to obtain the variable ID for your App.
{"_id":"61ffb8bdf5bcbc01768d3c0a","metadata":{"image":[],"title":"","description":""},"api":{"url":"/}/v2/store/scriptvalues/{app_id}/","auth":"required","method":"get","examples":{"codes":[]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"version\": 1,\n    \"title\": \"Google Script\",\n    \"description\": \"Add Google Analytics to your store\",\n    \"template\": \"<script>console.log('Google Analytics!');</script>\",\n    \"section\": 1,\n    \"tags\": [\"google\", \"analytics\", \"seo\"],\n    \"page_type\": 5,\n    \"app_status\": \"pending\",\n    \"values\": [\n        {\n            \"id\": 1,\n            \"key\": null,\n            \"value\": null,\n            \"variable_id\": null,\n        },\n        {\n            \"id\": 2,\n            \"key\": \"google_id\",\n            \"title\": \"Google ID\",\n            \"description\": \"Your Google ID\",\n            \"value\": \"user1234\",\n            \"variable_id\": 1,\n        },\n        {\n            \"id\": 3,\n            \"key\": \"key4\",\n            \"title\": \"Key 4\",\n            \"description\": \"\",\n            \"value\": \"bengaluru\",\n            \"variable_id\": 4,\n        }\n    ]\n}\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <your-token>","desc":"","required":false,"in":"header","ref":"","_id":"5d96d9099b619e00112d16ab"}]},"next":{"description":"","pages":[]},"title":"Fetch Script Values","type":"get","slug":"fetch-script-values","excerpt":"Get a list of the Scripts that are available on a merchant's Instamojo Online Store","body":"","updates":[],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-02-06T12:02:05.750Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc166cc683f003d758b49","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":1,"parentDoc":null,"childrenPages":[]}

getFetch Script Values

Get a list of the Scripts that are available on a merchant's Instamojo Online Store

Headers

Authorization:
stringBearer <your-token>

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 }}

Result Format



{"_id":"61ffb959f1be16003abf6afa","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/scriptvalues/{app_id}/","auth":"required","method":"patch","examples":{"codes":[{"code":"{\n\t\"values\": [\n    \t     // Updating existing value\n    \t     {\n        \t    \"id\": 2,\n        \t    \"value\": \"pqrs\"\n           },\n    \t     // Adding new value\n    \t     {\n        \t    \"variable_id\": 1,\n        \t    \"value\": \"abcd\",\n    \t     },\n    \t     // Deleting value\n    \t     {\n        \t    \"id\": 3,\n        \t    \"is_active\": false,\n    \t     }\n\t]\n}\n","language":"text","name":null}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"version\": 1,\n    \"title\": \"Google Script\",\n    \"description\": \"Add Google Analytics to your store\",\n    \"template\": \"<script>console.log('Google Analytics!');</script>\",\n    \"section\": 1,\n    \"tags\": [\"google\", \"analytics\", \"seo\"],\n    \"page_type\": 5,\n    \"app_status\": \"pending\",\n    \"values\": [\n        {\n            \"id\": 1,\n            \"key\": null,\n            \"value\": null,\n            \"variable_id\": null,\n        },\n        {\n            \"id\": 2,\n            \"key\": \"google_id\",\n            \"title\": \"Google ID\",\n            \"description\": \"Your Google ID\",\n            \"value\": \"user1234\",\n            \"variable_id\": 1,\n        },\n        {\n            \"id\": 3,\n            \"key\": \"key4\",\n            \"title\": \"Key 4\",\n            \"description\": \"\",\n            \"value\": \"bengaluru\",\n            \"variable_id\": 4,\n        }\n    ]\n}\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <token>","desc":"","required":false,"in":"header","ref":"","_id":"5d95e4808940d80133243fdb"}]},"next":{"description":"","pages":[]},"title":"Update Script Values","type":"patch","slug":"update-script-values","excerpt":"Update the Script value of a specific variable","body":"","updates":[],"order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-02-06T12:04:41.854Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc166cc683f003d758b49","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":1,"parentDoc":null,"childrenPages":[]}

patchUpdate Script Values

Update the Script value of a specific variable

Headers

Authorization:
stringBearer <token>

User Information

Try It Out

patch
{{ 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":"61ffc2081c2f1500635660c5","metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"MDP Coupons and Discounts APIs","type":"basic","slug":"mdp-discountscoupons-apis","excerpt":"","body":"The following set of APIs pertains to the Discounts/Coupons section for the Instamojo Online store. \n\n**Coupons vs Discount link: **\n\nCoupons API allows you to generate coupon codes that any buyer can use on the corresponding merchant's online store. These codes will be available to the buyer at the time of checkout. \n\nDiscount API allows you to generate specific links for a product on the corresponding merchant's online store, which can be shared with the buyer(s). When the link is opened, the buyer will be taken to the product page, where the discounted amount will be shown, ie, the discount is already applied to the product. \n\nScopes (for the access token that is used) required to run these APIs:\n \ncoupons:read\ncoupons:write\ndiscounts:read\ndiscounts:write\n\n**Error codes and their meanings** :\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"HTTP Codes\",\n    \"h-1\": \"HTTP Codes\",\n    \"0-0\": \"401 Unauthorized\",\n    \"1-0\": \"401 Unauthorized\",\n    \"2-0\": \"403 Forbidden\",\n    \"3-0\": \"404 Not Found\",\n    \"0-1\": \"{\\n  \\\"error\\\": \\\"Invalid Client Id\\\"\\n}\",\n    \"1-1\": \"{\\n  \\\"error\\\": \\\"Invalid or expired Client Id Exp\\\"\\n}\",\n    \"2-1\": \"{\\n  \\\"error\\\": \\\"Invalid scopes\\\"\\n}\",\n    \"3-1\": \"{\\n  \\\"error\\\": \\\"Invalid Account Id\\\"\\n}\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-02-06T12:41:44.795Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc1a458462600294a22b7","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":0,"parentDoc":null,"childrenPages":[]}

MDP Coupons and Discounts APIs


The following set of APIs pertains to the Discounts/Coupons section for the Instamojo Online store. **Coupons vs Discount link: ** Coupons API allows you to generate coupon codes that any buyer can use on the corresponding merchant's online store. These codes will be available to the buyer at the time of checkout. Discount API allows you to generate specific links for a product on the corresponding merchant's online store, which can be shared with the buyer(s). When the link is opened, the buyer will be taken to the product page, where the discounted amount will be shown, ie, the discount is already applied to the product. Scopes (for the access token that is used) required to run these APIs: coupons:read coupons:write discounts:read discounts:write **Error codes and their meanings** : [block:parameters] { "data": { "h-0": "HTTP Codes", "h-1": "HTTP Codes", "0-0": "401 Unauthorized", "1-0": "401 Unauthorized", "2-0": "403 Forbidden", "3-0": "404 Not Found", "0-1": "{\n \"error\": \"Invalid Client Id\"\n}", "1-1": "{\n \"error\": \"Invalid or expired Client Id Exp\"\n}", "2-1": "{\n \"error\": \"Invalid scopes\"\n}", "3-1": "{\n \"error\": \"Invalid Account Id\"\n}" }, "cols": 2, "rows": 4 } [/block]
The following set of APIs pertains to the Discounts/Coupons section for the Instamojo Online store. **Coupons vs Discount link: ** Coupons API allows you to generate coupon codes that any buyer can use on the corresponding merchant's online store. These codes will be available to the buyer at the time of checkout. Discount API allows you to generate specific links for a product on the corresponding merchant's online store, which can be shared with the buyer(s). When the link is opened, the buyer will be taken to the product page, where the discounted amount will be shown, ie, the discount is already applied to the product. Scopes (for the access token that is used) required to run these APIs: coupons:read coupons:write discounts:read discounts:write **Error codes and their meanings** : [block:parameters] { "data": { "h-0": "HTTP Codes", "h-1": "HTTP Codes", "0-0": "401 Unauthorized", "1-0": "401 Unauthorized", "2-0": "403 Forbidden", "3-0": "404 Not Found", "0-1": "{\n \"error\": \"Invalid Client Id\"\n}", "1-1": "{\n \"error\": \"Invalid or expired Client Id Exp\"\n}", "2-1": "{\n \"error\": \"Invalid scopes\"\n}", "3-1": "{\n \"error\": \"Invalid Account Id\"\n}" }, "cols": 2, "rows": 4 } [/block]
{"_id":"61ffc24cfb3d8b003474e326","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/coupons/","auth":"required","method":"get","examples":{"codes":[]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"count\": 2,\n    \"next\": null,\n    \"previous\": null,\n    \"results\": [\n        {\n            \"id\": 127,\n            \"name\": \"25% Off\",\n            \"tagline\": \"Tagline\",\n            \"promo_code\": \"DISCOUNT25\",\n            \"promo_type\": 2,\n            \"is_active\": true,\n            \"flat_discount\": \"0.00\",\n            \"discount_percentage\": \"25.00\"\n        },\n        {\n            \"id\": 126,\n            \"name\": \"Flat Rs. 200 off\",\n            \"tagline\": \"Tagline\",\n            \"promo_code\": \"FLAT200\",\n            \"promo_type\": 1,\n            \"is_active\": true,\n            \"flat_discount\": \"200.00\",\n            \"discount_percentage\": \"0.00\"\n        }\n    ]\n}\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <your-token>","desc":"","required":false,"in":"header","ref":"","_id":"5d96d9099b619e00112d16ab"}]},"next":{"description":"","pages":[]},"title":"List Coupons","type":"get","slug":"list-coupons","excerpt":"Get a list of the Coupons that are available on a merchant's Instamojo Online Store","body":"","updates":[],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-02-06T12:42:52.169Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc1a458462600294a22b7","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":1,"parentDoc":null,"childrenPages":[]}

getList Coupons

Get a list of the Coupons that are available on a merchant's Instamojo Online Store

Headers

Authorization:
stringBearer <your-token>

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 }}

Result Format



{"_id":"61ffc275e52322000f8376f6","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/coupons/","auth":"required","method":"post","examples":{"codes":[{"code":"Flat Discount - Request\n\n\n{\n    \"name\": \"Flat Rs. 200 off\",  // Required\n    \"tagline\": \"Tagline\",\n    \"valid_from\": \"2021-08-19 11:18:18\",  // Required\n    \"valid_until\": \"2021-08-28 11:18:21\",  // Required\n    \"min_eligible_amount\": 100,  // Required\n    \"promo_code\": \"FLAT200\",  // Required\n    \"promo_type\": \"1\",  // Required\n    \"flat_discount\": 200,  // Required\n    \"payment_type\": \"both\",  // Default - both\n    \"eligible_categories\": [  // Default - []\n        269\n    ],\n    \"eligible_products\": [],  // Default - []\n    \"frequency_allowed\": 1,  // Required\n    \"includes_shipping_charges\": true,  // Default - false\n    \"show_on_checkout\": true,  // Default - true\n    \"is_active\": true,  // Default - true\n    \"once_per_user\": true,   // Default - false\n}\n\n\n\nPercentage discount - Request\n\n\n{\n    \"name\": \"25% Off\",  // Required\n    \"tagline\": \"Tagline\",\n    \"valid_from\": \"2021-08-19 11:20:52\",  // Required\n    \"valid_until\": \"2021-08-31 11:20:55\",  // Required\n    \"min_eligible_amount\": 500,  // Required\n    \"promo_code\": \"DISCOUNT25\",  // Required\n    \"promo_type\": \"2\",  // Required\n    \"discount_percentage\": 25,  // Required\n    \"max_discount_amount\": 200,  // Required\n    \"payment_type\": \"both\",  // Default - both\n    \"eligible_categories\": [  // Default - []\n        267,\n        1\n    ],\n    \"eligible_products\": [  // Default - []\n        2609,\n        2658,\n        2134\n    ],\n    \"frequency_allowed\": 10,  // Required\n    \"includes_shipping_charges\": true,  // Default - false\n    \"show_on_checkout\": true,  // Default - true\n    \"is_active\": true,  // Default - true\n    \"once_per_user\": true,  // Default - false\n}\n","language":"text"}]},"results":{"codes":[{"status":200,"language":"json","code":"Flat Discount - Response\n\n\n{\n    \"id\": 126,\n    \"valid_from\": \"2021-08-19T11:18:18+05:30\",\n    \"valid_until\": \"2021-08-28T11:18:21+05:30\",\n    \"name\": \"Flat Rs. 200 off\",\n    \"tagline\": \"Tagline\",\n    \"promo_code\": \"FLAT200\",\n    \"is_active\": true,\n    \"is_valid\": true,\n    \"promo_type\": 1,\n    \"min_eligible_amount\": 100,\n    \"use_frequency\": 0,\n    \"frequency_allowed\": 1,\n    \"discount_percentage\": \"0.00\",\n    \"max_discount_amount\": \"0.00\",\n    \"flat_discount\": \"200.00\",\n    \"includes_shipping_charges\": true,\n    \"payment_type\": \"both\",\n    \"show_on_checkout\": true,\n    \"once_per_user\": true,\n    \"created\": \"2021-08-19T11:19:07.423570+05:30\",\n    \"modified\": \"2021-08-19T11:19:07.423583+05:30\",\n    \"eligible_products\": [],\n    \"eligible_categories\": [\n        269\n    ]\n}\n\n\n\nPercentage Discount - Response\n\n\n{\n    \"id\": 127,\n    \"valid_from\": \"2021-08-19T11:20:52+05:30\",\n    \"valid_until\": \"2021-08-31T11:20:55+05:30\",\n    \"name\": \"25% Off\",\n    \"tagline\": \"Tagline\",\n    \"promo_code\": \"DISCOUNT25\",\n    \"is_active\": true,\n    \"is_valid\": true,\n    \"promo_type\": 2,\n    \"min_eligible_amount\": 500,\n    \"use_frequency\": 0,\n    \"frequency_allowed\": 10,\n    \"discount_percentage\": \"25.00\",\n    \"max_discount_amount\": \"200.00\",\n    \"flat_discount\": \"0.00\",\n    \"includes_shipping_charges\": true,\n    \"payment_type\": \"both\",\n    \"show_on_checkout\": true,\n    \"once_per_user\": true,\n    \"created\": \"2021-08-19T11:22:05.162258+05:30\",\n    \"modified\": \"2021-08-19T11:22:05.162272+05:30\",\n    \"eligible_products\": [\n        2134,\n        2609,\n        2658\n    ],\n    \"eligible_categories\": [\n        1,\n        267\n    ]\n}\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <your-token>","desc":"","required":false,"in":"header","ref":"","_id":"5d96d9099b619e00112d16ab"},{"name":"name","type":"string","default":"","desc":"max length = 100 characters","required":false,"in":"query","ref":"","_id":"61ffc41e980eea0069b07c9a"},{"name":"tagline","type":"string","default":"","desc":"max length = 200 characters","required":false,"in":"query","ref":"","_id":"61ffc41e980eea0069b07c9b"},{"name":"promo_code","type":"string","default":"","desc":"max_length = 100 characters. Must be unique","required":false,"in":"query","ref":"","_id":"61ffc41e980eea0069b07c9c"},{"name":"promo_type","type":"int","default":"","desc":"1 - flat discount  2 - percent discount","required":false,"in":"query","ref":"","_id":"61ffc41e980eea0069b07c9d"},{"name":"min_eligible_amount","type":"int","default":"","desc":"","required":false,"in":"query","ref":"","_id":"61ffc41e980eea0069b07c9e"},{"name":"use_frequency","type":"int","default":"","desc":"must be an integer > 0","required":false,"in":"query","ref":"","_id":"61ffc41e980eea0069b07c9f"},{"name":"frequency_allowed","type":"int","default":"","desc":"","required":false,"in":"query","ref":"","_id":"61ffc41e980eea0069b07ca0"},{"name":"discount_percentage","type":"double","default":"","desc":"Decimal with maximum 10 digits and precision of 2 decimal places. Should be >=0 and <=100","required":false,"in":"query","ref":"","_id":"61ffc41e980eea0069b07ca1"},{"name":"max_discount_amount and flat_discount","type":"double","default":"","desc":"Decimal with maximum 10 digits and precision of 2 decimal places  >= 0","required":false,"in":"query","ref":"","_id":"61ffc41e980eea0069b07ca2"}]},"next":{"description":"","pages":[]},"title":"Create Coupon","type":"post","slug":"create-coupon","excerpt":"Create a Coupon for the merchant's Instamojo Online Store","body":"","updates":[],"order":2,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-02-06T12:43:33.167Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc1a458462600294a22b7","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":3,"parentDoc":null,"childrenPages":[]}

postCreate Coupon

Create a Coupon for the merchant's Instamojo Online Store

Query Params

name:
string
max length = 100 characters
tagline:
string
max length = 200 characters
promo_code:
string
max_length = 100 characters. Must be unique
promo_type:
integer
1 - flat discount 2 - percent discount
min_eligible_amount:
integer
use_frequency:
integer
must be an integer > 0
frequency_allowed:
integer
discount_percentage:
double
Decimal with maximum 10 digits and precision of 2 decimal places. Should be >=0 and <=100
max_discount_amount:
double
Decimal with maximum 10 digits and precision of 2 decimal places >= 0

Headers

Authorization:
stringBearer <your-token>

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":"61ffc628019ea50200fb9dee","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/coupons/<coupon-id>/","auth":"required","method":"get","examples":{"codes":[]},"results":{"codes":[{"status":200,"language":"json","code":"GET v2/store/coupons/126/\n\n{\n    \"id\": 126,\n    \"valid_from\": \"2021-08-19T11:18:18+05:30\",\n    \"valid_until\": \"2021-08-28T11:18:21+05:30\",\n    \"name\": \"Flat Rs. 200 off\",\n    \"tagline\": \"Tagline\",\n    \"promo_code\": \"FLAT200\",\n    \"is_active\": true,\n    \"is_valid\": true,\n    \"promo_type\": 1,\n    \"min_eligible_amount\": 100,\n    \"use_frequency\": 0,\n    \"frequency_allowed\": 1,\n    \"discount_percentage\": \"0.00\",\n    \"max_discount_amount\": \"0.00\",\n    \"flat_discount\": \"200.00\",\n    \"includes_shipping_charges\": true,\n    \"app_only\": false,\n    \"payment_type\": \"both\",\n    \"show_on_checkout\": true,\n    \"once_per_user\": true,\n    \"created\": \"2021-08-19T11:19:07.423570+05:30\",\n    \"modified\": \"2021-08-19T11:19:07.423583+05:30\",\n    \"eligible_products\": [],\n    \"eligible_categories\": [\n        269\n    ]\n}\n\n\nGET v2/store/coupons/127/\n\n\n{\n    \"id\": 127,\n    \"valid_from\": \"2021-08-19T11:20:52+05:30\",\n    \"valid_until\": \"2021-08-31T11:20:55+05:30\",\n    \"name\": \"25% Off\",\n    \"tagline\": \"Tagline\",\n    \"promo_code\": \"DISCOUNT25\",\n    \"is_active\": true,\n    \"is_valid\": true,\n    \"promo_type\": 2,\n    \"min_eligible_amount\": 500,\n    \"use_frequency\": 0,\n    \"frequency_allowed\": 10,\n    \"discount_percentage\": \"25.00\",\n    \"max_discount_amount\": \"200.00\",\n    \"flat_discount\": \"0.00\",\n    \"includes_shipping_charges\": true,\n    \"payment_type\": \"both\",\n    \"show_on_checkout\": true,\n    \"once_per_user\": true,\n    \"created\": \"2021-08-19T11:22:05.162258+05:30\",\n    \"modified\": \"2021-08-19T11:22:05.162272+05:30\",\n    \"eligible_products\": [\n        2134,\n        2609,\n        2658\n    ],\n    \"eligible_categories\": [\n        1,\n        267\n    ]\n}\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <your-token>","desc":"","required":false,"in":"header","ref":"","_id":"5d96d9099b619e00112d16ab"}]},"next":{"description":"","pages":[]},"title":"Retrieve Coupon","type":"get","slug":"retrieve-coupon","excerpt":"Get the details of a specific Coupon that is available on a merchant's Instamojo Online Store","body":"","updates":[],"order":3,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-02-06T12:59:20.983Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc1a458462600294a22b7","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":1,"parentDoc":null,"childrenPages":[]}

getRetrieve Coupon

Get the details of a specific Coupon that is available on a merchant's Instamojo Online Store

Headers

Authorization:
stringBearer <your-token>

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 }}

Result Format



{"_id":"61ffc75ed228bb006a1f1b64","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/coupons/<coupon-id>/","auth":"required","method":"patch","examples":{"codes":[{"code":"PATCH v2/store/coupons/127/\n\nAll fields are optional\n\nOnly the fields that need to be changed are to be sent\n\n\n{\n    \"id\": 127,\n    \"name\": \"25% Off on Food and Footwear\",\n    \"tagline\": \"Tagline\",\n    \"valid_from\": \"2021-08-19 11:20:52\",\n    \"valid_until\": \"2021-08-31 11:20:55\",\n    \"min_eligible_amount\": 500,\n    \"promo_code\": \"DISCOUNT25\",\n    \"promo_type\": 2,\n    \"discount_percentage\": \"25.00\",\n    \"max_discount_amount\": \"200.00\",\n    \"payment_type\": \"both\",\n    \"eligible_categories\": [\n        1,\n        267\n    ],\n    \"eligible_products\": [\n        2658,\n        2609,\n        2134\n    ],\n    \"select_all\": \"false\", {Ironic - Not Required}\n    \"frequency_allowed\": 10,\n    \"includes_shipping_charges\": true,\n    \"show_on_checkout\": true,\n    \"is_active\": true,\n    \"once_per_user\": true\n}","language":"text"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"id\": 127,\n    \"valid_from\": \"2021-08-19T11:20:52+05:30\",\n    \"valid_until\": \"2021-08-31T11:20:55+05:30\",\n    \"name\": \"25% Off on Food and Footwear\",\n    \"tagline\": \"Tagline\",\n    \"promo_code\": \"DISCOUNT25\",\n    \"is_active\": true,\n    \"is_valid\": true,\n    \"promo_type\": 2,\n    \"min_eligible_amount\": 500,\n    \"use_frequency\": 0,\n    \"frequency_allowed\": 10,\n    \"discount_percentage\": \"25.00\",\n    \"max_discount_amount\": \"200.00\",\n    \"flat_discount\": \"0.00\",\n    \"includes_shipping_charges\": true,\n    \"payment_type\": \"both\", \n    \"show_on_checkout\": true,\n    \"once_per_user\": true,\n    \"created\": \"2021-08-19T11:22:05.162258+05:30\",\n    \"modified\": \"2021-08-19T11:27:50.054783+05:30\",\n    \"eligible_products\": [\n        2134,\n        2609,\n        2658\n    ],\n    \"eligible_categories\": [\n        1,\n        267\n    ]\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <your-token>","desc":"","required":false,"in":"header","ref":"","_id":"5d96d9099b619e00112d16ab"}]},"next":{"description":"","pages":[]},"title":"Update Coupon","type":"patch","slug":"update-coupon","excerpt":"Update the details of a specific Coupon that is available on a merchant's Instamojo Online Store","body":"","updates":[],"order":4,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-02-06T13:04:30.175Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc1a458462600294a22b7","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":0,"parentDoc":null,"childrenPages":[]}

patchUpdate Coupon

Update the details of a specific Coupon that is available on a merchant's Instamojo Online Store

Headers

Authorization:
stringBearer <your-token>

User Information

Try It Out

patch
{{ 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":"61ffc7c66e6ebe003a3d47da","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/discounts/","auth":"required","method":"get","examples":{"codes":[]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"count\": 1,\n    \"next\": null,\n    \"previous\": null,\n    \"results\": [\n        {\n            \"id\": 128,\n            \"name\": \"Discount Code for August 9\",\n            \"promo_code\": \"FLAT50\",\n            \"is_active\": true,\n            \"flat_discount\": \"50.00\",\n            \"eligible_products\": \"August 9\",\n            \"frequency_allowed\": 10,\n            \"use_frequency\": 0,\n            \"discount_link\": \"https://chaimjc1.stores.mjc0.instamojo.com/product/2658/august-9/?discount_code=FLAT50\"\n        }\n    ]\n}\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <your-token>","desc":"","required":false,"in":"header","ref":"","_id":"5d96d9099b619e00112d16ab"}]},"next":{"description":"","pages":[]},"title":"List Discounts","type":"get","slug":"list-discounts","excerpt":"Get a list of the Discounts that are available on a merchant's Instamojo Online Store","body":"","updates":[],"order":5,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-02-06T13:06:14.865Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc1a458462600294a22b7","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":0,"parentDoc":null,"childrenPages":[]}

getList Discounts

Get a list of the Discounts that are available on a merchant's Instamojo Online Store

Headers

Authorization:
stringBearer <your-token>

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 }}

Result Format



{"_id":"61ffc8cbf591d8004443761d","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/discounts/","auth":"required","method":"post","examples":{"codes":[{"code":"{\n    \"promo_code\": \"FLAT50\",  // Required\n    \"flat_discount\": \"50\",  // Required\n    \"eligible_products\": [  // Required\n        2658\n    ],\n    \"frequency_allowed\": 5  // Required\n}\n","language":"text"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"promo_code\": \"FLAT50\",\n    \"flat_discount\": \"50\",\n    \"eligible_products\": [\n        2658\n    ],\n    \"frequency_allowed\": 5\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <your-token>","desc":"","required":false,"in":"header","ref":"","_id":"5d96d9099b619e00112d16ab"},{"name":"promo_code","type":"string","default":"","desc":"max_length = 100 characters. min_length = 3 characters. Must be unique. No spaces and special characters allowed","required":true,"in":"query","ref":"","_id":"61ffc41e980eea0069b07c9c"},{"name":"flat_discount","type":"int","default":"","desc":"Final discounted price for the product should be >= 9","required":true,"in":"query","ref":"","_id":"61ffc41e980eea0069b07c9d"},{"name":"frequency_allowed","type":"int","default":"","desc":"","required":true,"in":"query","ref":"","_id":"61ffc41e980eea0069b07ca0"},{"name":"eligible_products","type":"int","default":"","desc":"List of one product","required":true,"in":"query","ref":"","_id":"61ffc41e980eea0069b07ca2"}]},"next":{"description":"","pages":[]},"title":"Create Discount link","type":"post","slug":"create-discount-link","excerpt":"Create a discount code for the merchant's Instamojo Online Store","body":"","updates":[],"order":6,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-02-06T13:10:35.331Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc1a458462600294a22b7","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":2,"parentDoc":null,"childrenPages":[]}

postCreate Discount link

Create a discount code for the merchant's Instamojo Online Store

Query Params

promo_code:
required
string
max_length = 100 characters. min_length = 3 characters. Must be unique. No spaces and special characters allowed
flat_discount:
required
integer
Final discounted price for the product should be >= 9
frequency_allowed:
required
integer
eligible_products:
required
integer
List of one product

Headers

Authorization:
stringBearer <your-token>

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":"61ffc90ccb25e2004fae435a","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/discounts/<discount-id>/","auth":"required","method":"get","examples":{"codes":[]},"results":{"codes":[{"status":200,"language":"json","code":"GET v2/store/discounts/128/\n\n\n{\n    \"id\": 128,\n    \"name\": \"Discount Code for August 9\",\n    \"promo_code\": \"FLAT50\",\n    \"flat_discount\": \"50.00\",\n    \"eligible_products\": [\n        2658\n    ],\n    \"frequency_allowed\": 5,\n    \"discount_link\": \"https://chaimjc1.stores.mjc0.instamojo.com/product/2658/august-9/?discount_code=FLAT50\"\n}\n","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <your-token>","desc":"","required":false,"in":"header","ref":"","_id":"5d96d9099b619e00112d16ab"}]},"next":{"description":"","pages":[]},"title":"Retrieve Discount","type":"get","slug":"retrieve-discount","excerpt":"Get the details of a specific Discount that is available on a merchant's Instamojo Online Store","body":"","updates":[],"order":7,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-02-06T13:11:40.528Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc1a458462600294a22b7","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":0,"parentDoc":null,"childrenPages":[]}

getRetrieve Discount

Get the details of a specific Discount that is available on a merchant's Instamojo Online Store

Headers

Authorization:
stringBearer <your-token>

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 }}

Result Format



{"_id":"61ffc93f2e78060016762d40","metadata":{"image":[],"title":"","description":""},"api":{"url":"/v2/store/coupons/< discount-id>/","auth":"required","method":"put","examples":{"codes":[{"code":"PUT v2/store/discounts/128/\n\n\n{\n    \"flat_discount\":\"50.00\",  // Required\n    \"frequency_allowed\":10\n}\n","language":"text"}]},"results":{"codes":[{"status":200,"language":"json","code":"{\n    \"flat_discount\":\"50.00\",\n    \"frequency_allowed\":10\n}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"5729f56e7f34182900ce9d55","params":[{"name":"Authorization","type":"string","default":"Bearer <your-token>","desc":"","required":false,"in":"header","ref":"","_id":"5d96d9099b619e00112d16ab"}]},"next":{"description":"","pages":[]},"title":"Update Discount","type":"put","slug":"update-discount","excerpt":"Update the details of a specific Discount that is available on a merchant's Instamojo Online Store","body":"","updates":[],"order":8,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2022-02-06T13:12:31.611Z","user":"5c45a4f06cf9350c77afa79c","category":"61ffc1a458462600294a22b7","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":0,"parentDoc":null,"childrenPages":[]}

putUpdate Discount

Update the details of a specific Discount that is available on a merchant's Instamojo Online Store

Headers

Authorization:
stringBearer <your-token>

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