{"id":5004,"library":"paypalrestsdk","title":"PayPal REST SDK for Python","description":"The `paypalrestsdk` library provides Python APIs to integrate with PayPal's REST APIs for creating, processing, and managing payments. This library is officially deprecated and is no longer actively maintained. The last public version is 1.13.3, released in November 2023, and no new features or support are provided.","status":"deprecated","version":"1.13.3","language":"en","source_language":"en","source_url":"https://github.com/paypal/PayPal-Python-SDK","tags":["payments","paypal","rest","sdk","deprecated"],"install":[{"cmd":"pip install paypalrestsdk","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"System library required for SSL/TLS communication.","package":"libssl-dev","optional":false},{"reason":"System library required for foreign function interface, likely for cryptographic operations.","package":"libffi-dev","optional":false}],"imports":[{"symbol":"paypalrestsdk","correct":"import paypalrestsdk"},{"symbol":"Payment","correct":"from paypalrestsdk import Payment"},{"symbol":"Tokeninfo","correct":"from paypalrestsdk.openid_connect import Tokeninfo"}],"quickstart":{"code":"import os\nimport paypalrestsdk\n\npaypalrestsdk.configure({\n    \"mode\": os.environ.get(\"PAYPAL_MODE\", \"sandbox\"), # \"sandbox\" or \"live\"\n    \"client_id\": os.environ.get(\"PAYPAL_CLIENT_ID\", \"\"),\n    \"client_secret\": os.environ.get(\"PAYPAL_CLIENT_SECRET\", \"\")\n})\n\n# Example: Create a simple payment (requires valid client_id and client_secret in sandbox/live)\npayment = paypalrestsdk.Payment({\n    \"intent\": \"sale\",\n    \"payer\": {\n        \"payment_method\": \"paypal\"\n    },\n    \"redirect_urls\": {\n        \"return_url\": \"http://localhost:8000/payment/execute\",\n        \"cancel_url\": \"http://localhost:8000/payment/cancel\"\n    },\n    \"transactions\": [{\n        \"item_list\": {\n            \"items\": [{\n                \"name\": \"item\",\n                \"sku\": \"item\",\n                \"price\": \"1.00\",\n                \"currency\": \"USD\",\n                \"quantity\": 1\n            }]\n        },\n        \"amount\": {\n            \"total\": \"1.00\",\n            \"currency\": \"USD\"\n        },\n        \"description\": \"This is the payment transaction description.\"\n    }]\n})\n\nif payment.create():\n    print(f\"Payment created successfully: {payment.id}\")\n    for link in payment.links:\n        if link.rel == \"approval_url\":\n            print(f\"Approval URL: {link.href}\")\nelse:\n    print(f\"Error creating payment: {payment.error}\")\n","lang":"python","description":"This quickstart demonstrates how to configure the `paypalrestsdk` and create a basic PayPal payment. It assumes `PAYPAL_MODE`, `PAYPAL_CLIENT_ID`, and `PAYPAL_CLIENT_SECRET` are set as environment variables. Note that this SDK is deprecated."},"warnings":[{"fix":"Migrate to newer PayPal API integrations. PayPal recommends using newer SDKs (e.g., v2/Checkout SDKs) or directly integrating with PayPal's REST APIs. For direct credit card payments, Braintree Direct is the preferred solution.","message":"The `paypalrestsdk` Python SDK is officially deprecated. PayPal is transitioning deprecated server-side SDKs to private, restricted access. Public GitHub repository access for this SDK will be restricted after April 29th (likely 2024), making it unavailable for new integrations or easy access to source code and issues.","severity":"breaking","affected_versions":"All versions, specifically from April 29th, 2024 onwards."},{"fix":"Transition to current PayPal API integration methods as outlined in PayPal Developer documentation.","message":"This library is no longer supported or receiving new features/security updates. Using it in new projects is strongly discouraged.","severity":"deprecated","affected_versions":"All versions (since official deprecation)."},{"fix":"Ensure your server environment and Python's underlying SSL/TLS libraries are updated to support TLS 1.2 and HTTP/1.1.","message":"Due to PCI compliance requirements, your server must support TLS 1.2 for all HTTPS connections to PayPal. Older TLS versions will result in connection warnings or failures.","severity":"gotcha","affected_versions":"All versions operating on environments not compliant with TLS 1.2."},{"fix":"For new direct credit card integrations, use Braintree Direct or other recommended PayPal solutions.","message":"PayPal REST API no longer supports *new* direct credit card integrations. If your application requires direct credit card processing, consider using Braintree Direct, a PayPal service.","severity":"gotcha","affected_versions":"New integrations."}],"env_vars":null,"last_verified":"2026-04-12T00:00:00.000Z","next_check":"2026-07-11T00:00:00.000Z"}