{"id":28409270,"url":"https://github.com/paymentwall/paymentwall-python","last_synced_at":"2025-06-25T00:31:25.466Z","repository":{"id":12942827,"uuid":"15620771","full_name":"paymentwall/paymentwall-python","owner":"paymentwall","description":"Paymentwall Python Library","archived":false,"fork":false,"pushed_at":"2021-04-07T01:45:02.000Z","size":41,"stargazers_count":22,"open_issues_count":3,"forks_count":22,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-06-02T15:16:23.027Z","etag":null,"topics":[],"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/paymentwall.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-03T22:03:35.000Z","updated_at":"2024-08-24T04:25:58.000Z","dependencies_parsed_at":"2022-09-01T10:31:52.573Z","dependency_job_id":null,"html_url":"https://github.com/paymentwall/paymentwall-python","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/paymentwall/paymentwall-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paymentwall%2Fpaymentwall-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paymentwall%2Fpaymentwall-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paymentwall%2Fpaymentwall-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paymentwall%2Fpaymentwall-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paymentwall","download_url":"https://codeload.github.com/paymentwall/paymentwall-python/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paymentwall%2Fpaymentwall-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261782245,"owners_count":23208901,"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":[],"created_at":"2025-06-02T06:18:05.140Z","updated_at":"2025-06-25T00:31:25.424Z","avatar_url":"https://github.com/paymentwall.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About Paymentwall\n[Paymentwall](http://paymentwall.com/?source=gh-py) is the leading digital payments platform for globally monetizing digital goods and services. Paymentwall assists game publishers, dating sites, rewards sites, SaaS companies and many other verticals to monetize their digital content and services. \nMerchants can plugin Paymentwall's API to accept payments from over 100 different methods including credit cards, debit cards, bank transfers, SMS/Mobile payments, prepaid cards, eWallets, landline payments and others. \n\nTo sign up for a Paymentwall Merchant Account, [click here](http://paymentwall.com/signup/merchant?source=gh-py).\n\n# Paymentwall Python Library\nThis library allows developers to use [Paymentwall APIs](http://paymentwall.com/en/documentation/API-Documentation/722?source=gh-py) (Virtual Currency, Digital Goods featuring recurring billing, and Virtual Cart).\n\nTo use Paymentwall, all you need to do is to sign up for a Paymentwall Merchant Account so you can setup an Application designed for your site.\nTo open your merchant account and set up an application, you can [sign up here](http://paymentwall.com/signup/merchant?source=gh-py).\n\n# Installation\nTo install using \u003ccode\u003epip\u003c/code\u003e run:\n\n  \u003ccode\u003epip install paymentwall-python\u003c/code\u003e\n\n\u003cb\u003eNotice:\u003c/b\u003e If you are using \u003cem\u003ePython 2.6\u003c/em\u003e please run the following command, too:\n\n  \u003ccode\u003epip install ordereddict\u003c/code\u003e\n\nTo install from source run:\n\n  \u003ccode\u003epython setup.py install\u003c/code\u003e\n\nThen use a code sample below.\n\n# Code Samples\n\n## Digital Goods API\n\n#### Initializing Paymentwall\n\u003cpre\u003e\u003ccode\u003efrom paymentwall import *\nPaymentwall.set_api_type(Paymentwall.API_GOODS)\nPaymentwall.set_app_key('APPLICATION_KEY') # available in your merchant area\nPaymentwall.set_secret_key('SECRET_KEY') # available in your merchant area\n\u003c/code\u003e\u003c/pre\u003e\n\n#### Widget Call\n[Web API details](http://www.paymentwall.com/en/documentation/Digital-Goods-API/710#paymentwall_widget_call_flexible_widget_call)\n\nThe widget is a payment page hosted by Paymentwall that embeds the entire payment flow: selecting the payment method, completing the billing details, and providing customer support via the Help section. You can redirect the users to this page or embed it via iframe. Below is an example that renders an iframe with Paymentwall Widget.\n\n\u003cpre\u003e\u003ccode\u003eproduct = Product(\n    'product301',              # id of the product in your system \n    12.12,                     # price\n    'USD',                     # currency code\n    'test',                    # product name\n    Product.TYPE_SUBSCRIPTION, # this is a time-based product\n    1,                         # duration is 1\n    Product.PERIOD_TYPE_WEEK,  #               week\n    True                       # recurring\n)\n\nwidget = Widget(\n    'user4522',   # id of the end-user who's making the payment\n    'pw',       # widget code, e.g. pw; can be picked inside of your merchant account\n    [product],    # product details for Flexible Widget Call. To let users select the product on Paymentwall's end, leave this array empty\n    {'email': 'user@hostname.com'}    # additional parameters\n)\nprint(widget.get_html_code())\n\u003c/code\u003e\u003c/pre\u003e\n\n#### Pingback Processing\n\nThe Pingback is a webhook notifying about a payment being made. Pingbacks are sent via HTTP/HTTPS to your servers. To process pingbacks use the following code:\n\u003cpre\u003e\u003ccode\u003epingback = Pingback({x:y for x, y in request.args.iteritems()}, request.remote_addr)\n\nif pingback.validate():\n    product_id = pingback.get_product().get_id()\n    if pingback.is_deliverable():\n        # deliver the product\n        pass\n    elif pingback.is_cancelable():\n        # withdraw the product\n        pass\n\n    print('OK') # Paymentwall expects response to be OK, otherwise the pingback will be resent\n\nelse:\n    print(pingback.get_error_summary())\u003c/code\u003e\u003c/pre\u003e\n\n## Virtual Currency API\n\n#### Initializing Paymentwall\n\u003cpre\u003e\u003ccode\u003efrom paymentwall import *\nPaymentwall.set_api_type(Paymentwall.API_VC)\nPaymentwall.set_app_key('APPLICATION_KEY')\nPaymentwall.set_secret_key('SECRET_KEY')\n\u003c/code\u003e\u003c/pre\u003e\n\n#### Widget Call\n\u003cpre\u003e\u003ccode\u003ewidget = Widget(\n\t'user40012', # id of the end-user who's making the payment\n\t'p1_1',      # widget code, e.g. p1; can be picked inside of your merchant account\n\t[],          # array of products - leave blank for Virtual Currency API\n\t{'email': 'user@hostname.com'} # additional parameters\n)\nprint(widget.get_html_code())\n\u003c/code\u003e\u003c/pre\u003e\n\n#### Pingback Processing\n\u003cpre\u003e\u003ccode\u003epingback = Pingback({x:y for x, y in request.args.iteritems()}, request.remote_addr)\nif pingback.validate():\n    virtual_currency = pingback.get_vc_amount()\n    if pingback.is_deliverable():\n        # deliver the virtual currency\n        pass\n    elif pingback.is_cancelable():\n        # withdraw the virtual currency\n        pass \n  print('OK') # Paymentwall expects response to be OK, otherwise the pingback will be resent\nelse:\n  print(pingback.get_error_summary())\nend\u003c/code\u003e\u003c/pre\u003e\n\n## Cart API\n\n#### Initializing Paymentwall\n\u003cpre\u003e\u003ccode\u003efrom paymentwall import *\nPaymentwall.set_api_type(Paymentwall.API_CART)\nPaymentwall.set_app_key('APPLICATION_KEY')\nPaymentwall.set_secret_key('SECRET_KEY')\n\u003c/code\u003e\u003c/pre\u003e\n\n#### Widget Call\n\u003cpre\u003e\u003ccode\u003ewidget = Widget(\n\t'user40012', # id of the end-user who's making the payment\n\t'p1_1',      # widget code, e.g. p1; can be picked inside of your merchant account\n\t[\n\t\tProduct('product301', 3.33, 'EUR'), # first product in cart\n\t\tProduct('product607', 7.77, 'EUR')  # second product in cart\n\t],\n\t{'email': 'user@hostname.com'} # additional params\n)\nprint(widget.get_html_code())\u003c/code\u003e\u003c/pre\u003e\n\n#### Pingback Processing\n\u003cpre\u003e\u003ccode\u003epingback = Pingback({x:y for x, y in request.args.iteritems()}, request.remote_addr)\nif pingback.validate():\n    products = pingback.get_products()\n    if pingback.is_deliverable():\n        # deliver the virtual currency\n        pass\n    elif pingback.is_cancelable():\n        # withdraw the virtual currency\n        pass \n  print('OK') # Paymentwall expects response to be OK, otherwise the pingback will be resent\nelse:\n  print(pingback.get_error_summary())\nend\u003c/code\u003e\u003c/pre\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaymentwall%2Fpaymentwall-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaymentwall%2Fpaymentwall-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaymentwall%2Fpaymentwall-python/lists"}