{"_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":[]},"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 1 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 1 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 1 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","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
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
{"_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":"60ca6842be2e9400483ca52b","project":"56a1c9c13845200d0066d6fe","version":"60ca6842be2e9400483ca546","category":"60ca6842be2e9400483ca4f8","user":"5ce26a9d4c3d820056874747","updates":[],"next":{"pages":[],"description":""},"createdAt":"2019-10-03T12:31:17.663Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"status":200,"language":"json","code":"{}","name":""},{"status":400,"language":"json","code":"{}","name":""}]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"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]","excerpt":"","slug":"setup","type":"basic","title":"SETUP","__v":0,"parentDoc":null,"metadata":{"title":"","description":"","image":[]},"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":"60ca6842be2e9400483ca4f8","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":6,"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":7,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-07-12T13:51:01.920Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","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":8,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-07-12T14:14:04.635Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","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":"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":9,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-07-20T16:11:12.854Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","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":"60ca6842be2e9400483ca4f8","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":[{"_id":"5d95e4808940d80133243fdb","ref":"","in":"header","required":false,"desc":"","default":"Bearer <token>","type":"string","name":"Authorization"}],"url":"/v2/user-info"},"isReference":false,"order":10,"body":"","excerpt":"","slug":"user-info","type":"get","title":"User-info","__v":2,"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":"60ca6842be2e9400483ca4f8","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\": \"gav[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":[{"_id":"5d95f40a3d45d5001c7f3226","ref":"","in":"header","required":false,"desc":"","default":"Bearer <your-token>","type":"string","name":"Authorization"}],"url":"/v2/user-contact"},"isReference":false,"order":11,"body":"","excerpt":"","slug":"user-contact","type":"get","title":"User-contact","__v":5,"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":16,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T15:37:37.931Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","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":17,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:01:32.771Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","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":18,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:10:56.725Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","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\": \"[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":19,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:13:55.647Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","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.","updates":[],"order":20,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:15:57.848Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":8,"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.

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.
{"_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.","updates":[],"order":21,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:20:50.411Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":8,"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.

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.
{"_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.","updates":[],"order":22,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:25:14.646Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":7,"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.

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.
{"_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.","updates":[],"order":23,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:30:39.560Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","version":"60ca6842be2e9400483ca546","project":"56a1c9c13845200d0066d6fe","__v":5,"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.

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.
{"_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":24,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:57:30.550Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","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":25,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T16:58:46.719Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","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":26,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-04-15T17:03:54.848Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","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":27,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-08-29T10:48:32.499Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","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":28,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-08-29T10:59:29.565Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","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":29,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-08-29T11:03:02.454Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","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":"60ca6842be2e9400483ca4f8","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":30,"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":"60ca6842be2e9400483ca4f8","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":31,"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":32,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"createdAt":"2021-08-29T11:06:48.288Z","user":"5c45a4f06cf9350c77afa79c","category":"60ca6842be2e9400483ca4f8","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