{"id":22170195,"url":"https://github.com/adyen/adyen-python-api-library","last_synced_at":"2025-05-15T22:12:00.960Z","repository":{"id":37735384,"uuid":"55730153","full_name":"Adyen/adyen-python-api-library","owner":"Adyen","description":"Adyen API Library for Python","archived":false,"fork":false,"pushed_at":"2025-05-01T14:15:03.000Z","size":23719,"stargazers_count":61,"open_issues_count":6,"forks_count":44,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-05-15T22:11:50.393Z","etag":null,"topics":["adyen","api-client","api-library","hacktoberfest","payment","payment-gateway","payment-integration","payment-processing","payments","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Adyen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-04-07T21:42:33.000Z","updated_at":"2025-05-13T14:41:11.000Z","dependencies_parsed_at":"2024-01-30T13:29:18.292Z","dependency_job_id":"6717282b-c2f2-451c-9bee-41f9662abf61","html_url":"https://github.com/Adyen/adyen-python-api-library","commit_stats":{"total_commits":262,"total_committers":44,"mean_commits":5.954545454545454,"dds":0.7786259541984732,"last_synced_commit":"2c7dc28ff72ab4b567a6d9ec0d356240dfb60035"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fadyen-python-api-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fadyen-python-api-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fadyen-python-api-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Adyen%2Fadyen-python-api-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Adyen","download_url":"https://codeload.github.com/Adyen/adyen-python-api-library/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254430335,"owners_count":22069909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adyen","api-client","api-library","hacktoberfest","payment","payment-gateway","payment-integration","payment-processing","payments","python"],"created_at":"2024-12-02T06:39:32.038Z","updated_at":"2025-05-15T22:12:00.953Z","avatar_url":"https://github.com/Adyen.png","language":"Python","readme":"![Python](https://user-images.githubusercontent.com/55943882/212274988-4e58b807-d39b-4274-b712-06008b1ef5fc.png)\n\n# Adyen APIs Library for Python\n\n[![version](https://img.shields.io/pypi/v/Adyen.svg)](https://pypi.org/project/Adyen/)\n\nThis is the officially supported Python library for using Adyen's APIs.\n\n## Supported API versions\n\n| API                                                                                       | Description                                                                                                                                                                                                                                                                                                                             | Service Name          | Supported version |\n|-------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------|-------------------| \n| [BIN lookup API](https://docs.adyen.com/api-explorer/BinLookup/54/overview)               | The BIN Lookup API provides endpoints for retrieving information based on a given BIN.                                                                                                                                                                                                                                                  | binLookup             | **v54**           |\n| [Balance Platform API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview)    | The Balance Platform API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts.                                                                                                                                                                | balancePlatform       | **v2**            |\n| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/71/overview)                  | Our latest integration for accepting online payments.                                                                                                                                                                                                                                                                                   | checkout              | **v71**           |\n| [Data Protection API](https://docs.adyen.com/development-resources/data-protection-api)   | Endpoint for requesting data erasure.                                                                                                                                                                                                                                                                                                   | dataProtection        | **v1**            |\n| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | Endpoint to manage legal entities                                                                                                                                                                                                                                                                                                       | legalEntityManagement | **v3**            |\n| [Management API](https://docs.adyen.com/api-explorer/Management/3/overview)               | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals.                                                                                                                                                                                                                                           | management            | **v3**            |\n| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview)                   | Our classic integration for online payments.                                                                                                                                                                                                                                                                                            | payments              | **v68**           |\n| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview)                     | Endpoints for sending funds to your customers.                                                                                                                                                                                                                                                                                          | payouts               | **v68**           |\n| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview)   | ~~Endpoints for managing your point-of-sale payment terminals.~~ ‼️ **Deprecated**: use instead the [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview) for the management of your terminal fleet.                                                                                                                                                                                                                                                                            | ~~terminal~~              | ~~**v1**~~            |\n| [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview)                | Endpoints for managing saved payment details.                                                                                                                                                                                                                                                                                           | recurring             | **v68**           |\n| [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api)    | Endpoints for managing gift cards.                                                                                                                                                                                                                                                                                                      | storedValue           | **v46**           |\n| [Transfers API](https://docs.adyen.com/api-explorer/transfers/4/overview)                 | Endpoints for managing transfers, getting information about transactions or moving fund                                                                                                                                                                                                                                                 | transfers             | **v4**            |\n| [Disputes API](https://docs.adyen.com/api-explorer/Disputes/30/overview)                  | You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. | disputes              | **v30**                                                                         |\n| [POS Mobile API](https://docs.adyen.com/api-explorer/possdk/68/overview)                   | The POS Mobile API is used in the mutual authentication flow between an Adyen Android or iOS [POS Mobile SDK](https://docs.adyen.com/point-of-sale/ipp-mobile/) and the Adyen payments platform. The POS Mobile SDK for Android or iOS devices enables businesses to accept in-person payments using a commercial off-the-shelf (COTS) device like a phone. For example, Tap to Pay transactions, or transactions on a mobile device in combination with a card reader. | posMobile          | **v68**              |\n| [Payments App API](https://docs.adyen.com/api-explorer/payments-app/1/overview) | The Payments App API is used to Board and manage the Adyen Payments App on your Android mobile devices. | paymentsApp | **v1** |\n\nFor more information, refer to our [documentation](https://docs.adyen.com/) or the [API Explorer](https://docs.adyen.com/api-explorer/).\n\n## Prerequisites\n \n- [Adyen test account](https://docs.adyen.com/get-started-with-adyen)\n- [API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). For testing, your API credential needs to have the [API PCI Payments role](https://docs.adyen.com/development-resources/api-credentials#roles).\n- Python 3.6 or higher\n- Packages (optional): requests or pycurl  \n\n## Installation\n\n### For development purpose\n\nClone this repository and run \n\n~~~~ bash \nmake install\n~~~~\n\n### For usage purpose\n\nUse pip command: \n\n~~~~ bash \npip install Adyen\n~~~~\n\n## Using the library\n \n### General use with API key\n \n~~~~ python\nimport Adyen\n\nadyen = Adyen.Adyen()\n\nadyen.payment.client.xapikey = \"YourXapikey\"\nadyen.payment.client.hmac = \"YourHMACkey\"\nadyen.payment.client.platform = \"test\" # Environment to use the library in.\n~~~~\n\n### Consuming Services\n\nEvery API the library supports is represented by a service object. The name of the service matching the corresponding API is listed in the [Integrations](#supported-api-versions) section of this document.\n\n#### Using all services\n\n~~~~python\nimport Adyen\n\nadyen = Adyen.Adyen()\nadyen.payment.client.xapikey = \"YourXapikey\"\nadyen.payment.client.platform = \"test\"  # change to live for production\nrequest = {\n    \"amount\": {\n        \"currency\": \"USD\",\n        \"value\": 1000  # value in minor units\n    },\n    \"reference\": \"Your order number\",\n    \"paymentMethod\": {\n        \"type\": \"visa\",\n        \"encryptedCardNumber\": \"test_4111111111111111\",\n        \"encryptedExpiryMonth\": \"test_03\",\n        \"encryptedExpiryYear\": \"test_2030\",\n        \"encryptedSecurityCode\": \"test_737\"\n    },\n    \"shopperReference\": \"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\",\n    \"returnUrl\": \"https://your-company.com/...\",\n    \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\"\n}\nresult = adyen.checkout.payments_api.payments(request)\n~~~~\n\n#### Using one of the services\n\n~~~~python\nfrom Adyen import checkout\n\ncheckout.client.xapikey = \"YourXapikey\"\ncheckout.client.platform = \"test\"  # change to live for production\nrequest = {\n    \"amount\": {\n        \"currency\": \"USD\",\n        \"value\": 1000  # value in minor units\n    },\n    \"reference\": \"Your order number\",\n    \"paymentMethod\": {\n        \"type\": \"visa\",\n        \"encryptedCardNumber\": \"test_4111111111111111\",\n        \"encryptedExpiryMonth\": \"test_03\",\n        \"encryptedExpiryYear\": \"test_2030\",\n        \"encryptedSecurityCode\": \"test_737\"\n    },\n    \"shopperReference\": \"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\",\n    \"returnUrl\": \"https://your-company.com/...\",\n    \"merchantAccount\": \"YOUR_MERCHANT_ACCOUNT\"\n}\nresult = checkout.payments_api.payments(request)\n~~~~\n\n#### Force HTTP library\n\n~~~~python\nimport Adyen\n\nadyen = Adyen.Adyen()\nadyen.client.http_force = 'requests' # or 'pycurl'\n~~~~\n\n### Using query parameters (management API only)\n\nDefine a dictionary with query parameters that you want to use.\n\n~~~~ python\nquery_parameters = {\n    'pageSize': 10,\n    'pageNumber': 3\n}\n~~~~\n\npass the dictionary to the method as an additional argument.\n\n~~~~ python\nadyen.management.account_company_level_api.get_companies(query_parameters=query_parameters)\n~~~~\n\n### Using Header Parameters\n\nDefine a dictionary containing the headers you want to include in your request.\n\n~~~~ python    \n    headers = {\n        \"Var1\": \"Var2\",\n        \"Var2\": \"Var1\"\n    }\n~~~~\n\nPass the dictionary as an additional argument to the method where you make the API call.\n\n~~~~ python  \n    adyen.checkout.payments_api.payments(header_parameters=headers)\n~~~~\n\n### Customizing Base URL\n\nInstantiate the service and replace the baseUrl with your own URL\n\n~~~~ python\n    service = adyen.checkout.payments_api\n    service.baseUrl = \"localhost:8080\"\n~~~~\n\n### Handling exceptions\n\nAdyen service exceptions extend the AdyenError class. After you catch this exception, you can access the \nclass arguments for the specifics around this error or use the debug method which prints all the arguments.\n\n~~~~python\ntry:\n    adyen.checkout.payments_api.payments(request)\nexcept Adyen.exceptions.AdyenError as error:\n    print(error.debug())\n~~~~\n\n\u003cdetails\u003e\u003csummary\u003eList of exceptions\u003c/summary\u003e\n\u003cp\u003eAdyenInvalidRequestError\u003c/p\u003e\n\u003cp\u003eAdyenAPIResponseError\u003c/p\u003e\n\u003cp\u003eAdyenAPIAuthenticationError\u003c/p\u003e\n\u003cp\u003eAdyenAPIInvalidPermission\u003c/p\u003e\n\u003cp\u003eAdyenAPICommunicationError\u003c/p\u003e\n\u003cp\u003eAdyenAPIValidationError\u003c/p\u003e\n\u003cp\u003eAdyenAPIUnprocessableEntity\u003c/p\u003e\n\u003cp\u003eAdyenAPIInvalidFormat\u003c/p\u003e\n\u003cp\u003eAdyenEndpointInvalidFormat\u003c/p\u003e\n\u003c/details\u003e\n\n### Example integration\n \nFor a closer look at how our Python library works, clone our [example integration](https://github.com/adyen-examples/adyen-python-online-payments). This includes commented code, highlighting key features and concepts, and examples of API calls that can be made using the library.\n\n## Feedback\n\nWe value your input! Help us enhance our API Libraries and improve the integration experience by providing your feedback. Please take a moment to fill out [our feedback form](https://forms.gle/A4EERrR6CWgKWe5r9) to share your thoughts, suggestions or ideas.\n\n## Contributing\n \nWe encourage you to contribute to this repository, so everyone can benefit from new features, bug fixes, and any other improvements.\n \nHave a look at our [contributing guidelines](CONTRIBUTING.md) to find out how to raise a pull request.\n \n## Support\n\nIf you have a feature request, or spotted a bug or a technical problem, [create an issue here](https://github.com/Adyen/adyen-web/issues/new/choose).\n \nFor other questions, [contact our Support Team](https://www.adyen.help/hc/en-us/requests/new?ticket_form_id=360000705420).\n \n## Licence\n\nThis repository is available under the [MIT license](LICENSE.md).\n \n## See also\n\n* [Example integration](https://github.com/adyen-examples/adyen-python-online-payments)\n* [Adyen docs](https://docs.adyen.com/)\n* [API Explorer](https://docs.adyen.com/api-explorer/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadyen%2Fadyen-python-api-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadyen%2Fadyen-python-api-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadyen%2Fadyen-python-api-library/lists"}