{ "info": { "author": "Instamojo Developers", "author_email": "support@instamojo.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Instamojo API\n\n**Note**: If you're using this wrapper with our sandbox environment `https://test.instamojo.com/` then you should pass `'https://test.instamojo.com/api/1.1/'` as third argument to the `Instamojo` class while initializing it. API key and Auth token for the same can be obtained from https://test.instamojo.com/developers/ (Details: [Test Or Sandbox Account](https://instamojo.zendesk.com/hc/en-us/articles/208485675-Test-or-Sandbox-Account)).\n\n api = Instamojo(api_key=API_KEY, auth_token=AUTH_TOKEN, endpoint='https://test.instamojo.com/api/1.1/');\n\n## Installation\n\n`pip install instamojo_wrapper`\n\n## Authentication Keys\n\nYou can find your API_KEY and AUTH_TOKEN at the API Documentation Page.\nCreate an account on Instamojo, log in and visit this link:\nhttps://www.instamojo.com/developers/\n\n## Usage\n\n### Create a new Payment Request\n\n from instamojo_wrapper import Instamojo\n api = Instamojo(api_key=API_KEY,\n auth_token=AUTH_TOKEN)\n\n # Create a new Payment Request\n response = api.payment_request_create(\n amount='3499',\n purpose='FIFA 16',\n send_email=True,\n email=\"foo@example.com\",\n redirect_url=\"http://www.example.com/handle_redirect.py\"\n )\n # print the long URL of the payment request.\n print response['payment_request']['longurl']\n # print the unique ID(or payment request ID)\n print response['payment_request']['id']\n\n### Get the status or details of a Payment Request\n\n from instamojo_wrapper import Instamojo\n api = Instamojo(api_key=API_KEY,\n auth_token=AUTH_TOKEN)\n\n # Create a new Payment Request\n response = api.payment_request_status('[PAYMENT REQUEST ID]')\n\n print response['payment_request']['shorturl'] # Get the short URL\n print response['payment_request']['status'] # Get the current status\n print response['payment_request']['payments'] # List of payments\n\n\n### Get the status of a Payment related to a Payment Request\n\n from instamojo_wrapper import Instamojo\n api = Instamojo(api_key=API_KEY,\n auth_token=AUTH_TOKEN)\n\n # Create a new Payment Request\n response = api.payment_request_payment_status('[PAYMENT REQUEST ID]', '[PAYMENT ID]')\n\n print response['payment_request']['purpose'] # Purpose of Payment Request\n print response['payment_request']['payment']['status'] # Payment status\n\n\n### Get a list of all Payment Requests\n\n from instamojo_wrapper import Instamojo\n api = Instamojo(api_key=API_KEY,\n auth_token=AUTH_TOKEN)\n\n # Create a new Payment Request\n response = api.payment_requests_list()\n\n # Loop over all of the payment requests\n for payment_request in response['payment_requests']:\n print payment_request['status']\n\n`payment_requests_list()` also accepts optional arguments like `max_created_at`, `min_created_at`, `min_modified_at` and `max_modified_at` for filtering the list of Payment Requests. Note that it is not required to pass all of them.\n\n response = api.payment_requests_list(max_created_at=\"2015-11-19T10:12:19Z\",\n min_created_at=\"2015-10-29T12:51:36Z\")\n\nFor details related to supported datetime format supported by these arguments check the documentation: https://www.instamojo.com/developers/request-a-payment-api/#toc-filtering-payment-requests\n\n## Available Request a Payment Functions\n\n * `payment_request_create(purpose, amount)` => Payment Request\n * `payment_request_status(id)` => Payment Request\n * `payment_requests_list()` => List of Payment Requests\n * `payment_request_payment_status(id, payment_id)` => Payment Request with Payment details\n\n## Payment Request Creation Parameters\n\n### Required\n * `purpose`: Purpose of the payment request. (max-characters: 30)\n * `amount`: Amount requested (min-value: 9 ; max-value: 200000)\n\n### Optional\n * `buyer_name`: Name of the payer. (max-characters: 100)\n * `email`: Email of the payer. (max-characters: 75)\n * `phone`: Phone number of the payer.\n * `send_email`: Set this to True if you want to send email to the payer if email is specified. If email is not specified then an error is raised. (default value: `False`)\n * `send_sms`: Set this to True if you want to send SMS to the payer if phone is specified. If phone is not specified then an error is raised. (default value: `False`)\n * `redirect_url`: set this to a thank-you page on your site. Buyers will be redirected here after successful payment.\n * `webhook`: set this to a URL that can accept POST requests made by Instamojo server after successful payment.\n * `allow_repeated_payments`: To disallow multiple successful payments on a Payment Request pass `false` for this field. If this is set to `false` then the link is not accessible publicly after first successful payment, though you can still access it using API(default value: `True`).\n\nFurther documentation is available at https://www.instamojo.com/developers/request-a-payment-api/\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/Instamojo/instamojo-py", "keywords": "instamojo,api,wrapper,1.1", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "instamojo-wrapper", "package_url": "https://pypi.org/project/instamojo-wrapper/", "platform": "", "project_url": "https://pypi.org/project/instamojo-wrapper/", "project_urls": { "Homepage": "http://github.com/Instamojo/instamojo-py" }, "release_url": "https://pypi.org/project/instamojo-wrapper/1.2.0/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "Instamojo API 1.1 Wrapper", "version": "1.2.0" }, "last_serial": 5247196, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "3f3e460f783e8959360b76adad17f797", "sha256": "2268ec5cdac5b8a7cfb2f96d4181c98d3b7f3f418cfbd0b5bcda7719bf71260b" }, "downloads": -1, "filename": "instamojo_wrapper-1.0.tar.gz", "has_sig": false, "md5_digest": "3f3e460f783e8959360b76adad17f797", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7881, "upload_time": "2016-08-04T09:21:46", "url": "https://files.pythonhosted.org/packages/61/00/b5c715d01255cd6b4411a6fb072ef01fce260d72a24aecb2b94acee19798/instamojo_wrapper-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "4d260d27d6d80336c5e14b963c5ff8f5", "sha256": "6f1125b59c01ae03612c4e521976a010e9e355cff5db32d4011a648b468c5f18" }, "downloads": -1, "filename": "instamojo_wrapper-1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4d260d27d6d80336c5e14b963c5ff8f5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8013, "upload_time": "2019-05-09T07:59:09", "url": "https://files.pythonhosted.org/packages/21/8f/889e47a9c7c6edeb165904d4642e2abe33df7cd66af56e234f2ac78f06a5/instamojo_wrapper-1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3be0ca470fdc2ef6c9776a1ead24d286", "sha256": "45b6aeada29c544461811c3b3d0515fa179cfdf7059d9c313fc7c1bd046a6df0" }, "downloads": -1, "filename": "instamojo_wrapper-1.1.tar.gz", "has_sig": false, "md5_digest": "3be0ca470fdc2ef6c9776a1ead24d286", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7559, "upload_time": "2016-08-04T20:35:34", "url": "https://files.pythonhosted.org/packages/1e/f8/df6ab1d37457491fd5dead56289606570090d0e20db6071d80056db4c9d7/instamojo_wrapper-1.1.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "505fe60987c38e7b4487dd24d769fedc", "sha256": "5771567d41fa8db940e367d952abe7ba651c40e23945b298fd4f62c9691dbde8" }, "downloads": -1, "filename": "instamojo_wrapper-1.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "505fe60987c38e7b4487dd24d769fedc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8038, "upload_time": "2019-05-09T12:26:41", "url": "https://files.pythonhosted.org/packages/56/c0/7ea990655c7242d3150699a48277a597b4a8208eee120a8d8af92737b02a/instamojo_wrapper-1.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "115f22a030471792ab83b5c026e72e70", "sha256": "d83eeb0ec712630aa8649b9fb32211638a50643a58f21438dec130767237c4c5" }, "downloads": -1, "filename": "instamojo_wrapper-1.2.0.tar.gz", "has_sig": false, "md5_digest": "115f22a030471792ab83b5c026e72e70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8948, "upload_time": "2019-05-09T12:27:07", "url": "https://files.pythonhosted.org/packages/2d/9f/86bb0e1a2e161f0d6da043ec98d8306e5ff9aa6c99321835635bfbc29c2e/instamojo_wrapper-1.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "505fe60987c38e7b4487dd24d769fedc", "sha256": "5771567d41fa8db940e367d952abe7ba651c40e23945b298fd4f62c9691dbde8" }, "downloads": -1, "filename": "instamojo_wrapper-1.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "505fe60987c38e7b4487dd24d769fedc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8038, "upload_time": "2019-05-09T12:26:41", "url": "https://files.pythonhosted.org/packages/56/c0/7ea990655c7242d3150699a48277a597b4a8208eee120a8d8af92737b02a/instamojo_wrapper-1.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "115f22a030471792ab83b5c026e72e70", "sha256": "d83eeb0ec712630aa8649b9fb32211638a50643a58f21438dec130767237c4c5" }, "downloads": -1, "filename": "instamojo_wrapper-1.2.0.tar.gz", "has_sig": false, "md5_digest": "115f22a030471792ab83b5c026e72e70", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8948, "upload_time": "2019-05-09T12:27:07", "url": "https://files.pythonhosted.org/packages/2d/9f/86bb0e1a2e161f0d6da043ec98d8306e5ff9aa6c99321835635bfbc29c2e/instamojo_wrapper-1.2.0.tar.gz" } ] }