{"id":13509443,"url":"https://github.com/bitpay/elixir-client","last_synced_at":"2025-08-01T17:07:45.938Z","repository":{"id":24908659,"uuid":"28325375","full_name":"bitpay/elixir-client","owner":"bitpay","description":"Elixir core library for connecting to bitpay.com","archived":false,"fork":false,"pushed_at":"2015-09-22T19:04:35.000Z","size":382,"stargazers_count":31,"open_issues_count":1,"forks_count":10,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-07-23T17:04:53.794Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","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/bitpay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-22T05:12:43.000Z","updated_at":"2024-08-29T16:59:08.000Z","dependencies_parsed_at":"2022-08-23T12:02:41.142Z","dependency_job_id":null,"html_url":"https://github.com/bitpay/elixir-client","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/bitpay/elixir-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitpay%2Felixir-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitpay%2Felixir-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitpay%2Felixir-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitpay%2Felixir-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitpay","download_url":"https://codeload.github.com/bitpay/elixir-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitpay%2Felixir-client/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268265826,"owners_count":24222524,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-08-01T02:01:07.827Z","updated_at":"2025-08-01T17:07:45.898Z","avatar_url":"https://github.com/bitpay.png","language":"Elixir","funding_links":[],"categories":["Third Party APIs"],"sub_categories":[],"readme":"[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://raw.githubusercontent.com/bitpay/elixir-client/master/LICENSE.md)\n[![Travis](https://img.shields.io/travis/bitpay/elixir-client.svg?style=flat-square)](https://travis-ci.org/bitpay/elixir-client)\n[![Hex.pm](https://img.shields.io/hexpm/v/bitpay.svg?style=flat-square)](https://hex.pm/packages/bitpay)\n[![Coveralls](https://img.shields.io/coveralls/bitpay/elixir-client.svg?style=flat-square)](https://coveralls.io/r/bitpay/elixir-client)\n\n# BitPay Library for Elixir or Erlang\nPowerful, flexible, lightweight interface to the BitPay Bitcoin Payment Gateway API. Can be used in an Elixir project or directly in an Erlang project as described in the [Elixir Crash Course](http://elixir-lang.org/crash-course.html). This document assumes that you are using Elixir.\n\n## Installation\n\nusing hex, add to mixfile:\n { :bitpay, \"~\u003e 0.2.4\" }\n\notherwise:\n { :bitpay, github: \"bitpay/elixir-client\", tag: \"v0.2.4\" }\n\n## Basic Usage\n\nThe bitpay library allows authenticating with BitPay, creating invoices, and retrieving invoices.\n\n### Pairing with Bitpay.com\n\nBefore pairing with BitPay.com, you'll need to log in to your BitPay account and navigate to /api-tokens. Generate a new pairing code and use it in the next step. If you want to test against\n\n    \u003e pem = BitPay.KeyUtils.generate_pem\n    \u003e webclient = %BitPay.WebClient{pem: pem} #or %BitPay.WebClient{pem: pem, uri: \"https://test.bitpay.com\"}\n    \u003e token = BitPay.WebClient.pair_pos_client(pairingcode, webclient)\n\nYou'll need to know the pem file and the token in order to create invoices.\n\n### To create an invoice with a paired client:\n\nAssuming that you have both a token object and a webclient as shown in the last step:\n\n    \u003e webclient = %BitPay.WebClient{pem: pem, uri: \"https://test.bitpay.com\"}\n    \u003e params = %{price: 100, currency: \"USD\", token: token.pos}\n    \u003e invoice = BitPay.WebClient.create_invoice(params, webclient)\n\nThat will return a map representing the invoice, and create an invoice on BitPays servers. Other parameters can be sent, see the [BitPay REST API documentation](https://bitpay.com/api#resource-Invoices) for details.\n\n## Testnet Usage\n\n  To use testnet, add a uri parameter when creating the webclient struct `%BitPay.WebClient{uri: \"https://test.bitpay.com\"}`\n\n\n## API Documentation\n\nAPI Documentation is available on the [BitPay site](https://bitpay.com/api).\n\n## Running the Tests\n\nThe tests depend on a custom fork of elixir-webdriver and require that you have phantomjs installed.\n\nBefore running the tests, get a test.bitpay.com account. After this, you'll need to use the shell to approve a merchant token. Using `iex -S mix`:\n```iex\n(iex 1)\u003e pem = BitPay.KeyUtils.generate_pem\n(iex 2)\u003e api = \"https://test.bitpay.com\"\n(iex 3)\u003e client = %BitPay.WebClient{pem: pem, uri: api}\n(iex 4)\u003e {:ok, pairingCode} = BitPay.WebClient.get_pairing_code(client)\n```\n\nThen log in to your dashboard and use the pairing code to create a \"merchant\" token. Once this is set, you'll need to create two environment variables, BITPAYPEM and BITPAYAPI, set to the values you used in the shell session. It's a good idea to save the pem to a file so that you can retrieve it later, the tests don't take care of that for you.\n\nOnce that's done you should be able to run: `mix test` and see the tests run.\n\n## Found a bug?\nLet us know! Send a pull request or a patch. Questions? Ask! We're here to help. We will respond to all filed issues.\n\n## Contributors\n[Click here](https://github.com/philosodad/bitpay-elixir/graphs/contributors) to see a list of the contributors to this library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitpay%2Felixir-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitpay%2Felixir-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitpay%2Felixir-client/lists"}