{"id":26513759,"url":"https://github.com/intsynko/python_webpay_by","last_synced_at":"2026-05-15T12:35:54.184Z","repository":{"id":190845358,"uuid":"616175253","full_name":"intsynko/python_webpay_by","owner":"intsynko","description":"Python client to webpay.by json api (https://docs.webpay.by/)","archived":false,"fork":false,"pushed_at":"2023-03-24T10:21:34.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-10T17:52:25.498Z","etag":null,"topics":["by","python","webpay"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intsynko.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-03-19T20:22:55.000Z","updated_at":"2023-03-19T21:18:32.000Z","dependencies_parsed_at":"2023-08-26T18:11:25.024Z","dependency_job_id":null,"html_url":"https://github.com/intsynko/python_webpay_by","commit_stats":null,"previous_names":["intsynko/python_webpay_by"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/intsynko/python_webpay_by","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intsynko%2Fpython_webpay_by","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intsynko%2Fpython_webpay_by/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intsynko%2Fpython_webpay_by/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intsynko%2Fpython_webpay_by/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intsynko","download_url":"https://codeload.github.com/intsynko/python_webpay_by/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intsynko%2Fpython_webpay_by/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33067471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["by","python","webpay"],"created_at":"2025-03-21T04:34:13.623Z","updated_at":"2026-05-15T12:35:54.169Z","avatar_url":"https://github.com/intsynko.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Python client for webpay.by json api\n========================\n\nPython client for webpay Belorussia: https://docs.webpay.by/payment-json.html#operation/paymentReq \n\nInstall\n-------\n\n``pip install git+https://github.com/intsynko/python_webpay_by@master``\n\nHow to use\n------------\nGenerate new payment:\n\n.. code:: python\n\n    from webpay_by.client import WebpayClient\n\n    SANBOX = 'https://securesandbox.webpay.by'\n    secret_key = 'secret_key'\n\n    cilent = WebpayClient(is_test=True, option_3ds=\"auto\", store_id=\"123\", store_name=\"Your shop display name\",\n                          version=2, language_id=\"russian\", secret_key=secret_key, url=SANBOX)\n\n    resopnse = client.generate_payment(**{\n        \"return_url\": \"https://example.com/succees_url\",\n        \"cancel_return_url\": \"https://example.com/fail_url\",\n        \"notify_url\": \"https://example.com/webhook/\", # optional\n        \"order_num\": \"123\",\n        \"currency_id\": \"BYN\",\n        \"invoice_itemname\": [\"a\", \"b\"],\n        \"invoice_item_quantity\": [1,2],\n        \"invoice_item_price\": [4.0, 6.0],\n        \"total\": 10.0,\n        \"customer_name\": \"client name (will be displayed in payment form)\", # optional\n        \"email\": \"client@mail.by\",\n        ... # other optional params from documentation\n    })\n\n    redirect_url = resopnse[\"redirectUrl\"]\n\nProcess webhook:\n\n.. code:: python\n\n    def post(self, request, *args, **kwargs):\n        payload = request.body\n        data = {x.split('=')[0]: x.split('=')[1] for x in payload.decode('utf-8').split('\u0026')}\n        end_statuses = [\n            WebpayClient.PaymentType.Completed,\n            WebpayClient.PaymentType.Authorized,\n            WebpayClient.PaymentType.Declined,\n        ]\n        if int(data[\"payment_type\"]) in end_statuses:\n            if self.client.check_webhook_sign(data):\n                # do code to finish payment\n                return HttpResponse(status=200)\n            else:\n                logger.error(f'Calculated signature doesn\\'t match')\n                return HttpResponse(status=400)\n        return HttpResponse(status=400)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintsynko%2Fpython_webpay_by","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintsynko%2Fpython_webpay_by","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintsynko%2Fpython_webpay_by/lists"}