{"id":20819981,"url":"https://github.com/joeblackwaslike/btcpay-python","last_synced_at":"2025-03-12T06:19:12.407Z","repository":{"id":57416507,"uuid":"124305488","full_name":"joeblackwaslike/btcpay-python","owner":"joeblackwaslike","description":"btcpay python client","archived":false,"fork":false,"pushed_at":"2018-03-08T00:07:21.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T23:11:34.194Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/joeblackwaslike.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":"2018-03-07T23:08:21.000Z","updated_at":"2024-08-24T22:53:39.000Z","dependencies_parsed_at":"2022-09-26T20:11:50.187Z","dependency_job_id":null,"html_url":"https://github.com/joeblackwaslike/btcpay-python","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeblackwaslike%2Fbtcpay-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeblackwaslike%2Fbtcpay-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeblackwaslike%2Fbtcpay-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeblackwaslike%2Fbtcpay-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeblackwaslike","download_url":"https://codeload.github.com/joeblackwaslike/btcpay-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243165937,"owners_count":20246817,"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":"2024-11-17T22:07:58.812Z","updated_at":"2025-03-12T06:19:12.384Z","avatar_url":"https://github.com/joeblackwaslike.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# btcpay-python\n\n## Install\n```shell\npip3 install btcpay\n```\n\n\n## Pairing\n* Generate and save private key:\n```python\nimport btcpay.crypto\nprivkey = btcpay.crypto.generate_privkey()\n```\n* Create client:\n```python\nfrom btcpay import BTCPayClient\nclient = BTCPayClient(host='http://hostname', pem=privkey)\n```\n* On BTCPay server \u003e shop \u003e access tokens \u003e create new token, copy pairing code:\n* Pair client to server and save returned token:\n```python\nclient.pair_client(\u003cpairing-code\u003e)\n\u003e\u003e\u003e {'merchant': \"xdr9vw3v5wc0w90859v45\"}\n```\n* Recreate client:\n```python\nclient = BTCPayClient(\n    host='http://hostname',\n    pem=privkey,\n    tokens={'merchant': \"xdr9vw3v5wc0w90859v45\"}\n)\n```\n\n\n## Creating a client\n```python\nclient = BTCPayClient(\n    host='http://hostname',\n    pem=privkey,\n    tokens={'merchant': \"xdr9vw3v5wc0w90859v45\"}\n)\n```\n\n## Get rates\n```python\nclient.get_rates()\n```\n\n\n## Create specific rate\n```python\nclient.get_rate('USD')\n```\n\n\n## Create invoice\nSee bitpay api documentation: https://bitpay.com/api#resource-Invoices\n```python\nclient.create_invoice({\"price\": 20, \"currency\": \"USD\"})\n```\n\n\n## Get invoice\n```python\nclient.get_invoice(\u003cinvoice-id\u003e)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeblackwaslike%2Fbtcpay-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeblackwaslike%2Fbtcpay-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeblackwaslike%2Fbtcpay-python/lists"}