{"id":32165090,"url":"https://github.com/therealsmat/paystack","last_synced_at":"2026-02-19T07:02:45.782Z","repository":{"id":38025830,"uuid":"457585612","full_name":"therealsmat/paystack","owner":"therealsmat","description":"A comprehensive Elixir library for the Paystack api (https://paystack.com)","archived":false,"fork":false,"pushed_at":"2023-07-02T15:35:03.000Z","size":79,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-11T16:09:12.612Z","etag":null,"topics":["api","beam","elixir-lang","elixir-library","fintech","hex","library","nigeria","package","payments","paystack"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/paystack/Paystack.html","language":"Elixir","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/therealsmat.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2022-02-10T01:17:38.000Z","updated_at":"2025-05-18T22:51:22.000Z","dependencies_parsed_at":"2023-02-10T06:01:03.577Z","dependency_job_id":null,"html_url":"https://github.com/therealsmat/paystack","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/therealsmat/paystack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therealsmat%2Fpaystack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therealsmat%2Fpaystack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therealsmat%2Fpaystack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therealsmat%2Fpaystack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/therealsmat","download_url":"https://codeload.github.com/therealsmat/paystack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/therealsmat%2Fpaystack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29548207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T14:33:00.708Z","status":"ssl_error","status_checked_at":"2026-02-17T14:32:58.657Z","response_time":100,"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":["api","beam","elixir-lang","elixir-library","fintech","hex","library","nigeria","package","payments","paystack"],"created_at":"2025-10-21T14:59:08.699Z","updated_at":"2026-02-19T07:02:45.776Z","avatar_url":"https://github.com/therealsmat.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Paystack :dollar::dollar:\n\nA library for working with [Paystack](https://paystack.com/) in Elixir with out of the box support for telemetry events.\n\n[![Elixir CI](https://github.com/therealsmat/paystack/actions/workflows/elixir.yml/badge.svg?branch=master)](https://github.com/therealsmat/paystack/actions/workflows/elixir.yml) [![Coverage Status](https://coveralls.io/repos/github/therealsmat/paystack/badge.svg?branch=master)](https://coveralls.io/github/therealsmat/paystack?branch=master) [![Hex.pm](https://img.shields.io/hexpm/v/paystack.svg?maxAge=2592000)](https://hex.pm/packages/paystack)\n\nComprehensive documentation available on [HexDocs](https://hex.pm/packages/paystack)\n\n### Requirements\nThis package requires Elixir `v1.12+`\n\n### Installation\nAdd the following to your `mix.exs` file\n```elixir\n  {:paystack, \"~\u003e 0.7.0\"}\n```\nThen run `mix deps.get` to pull in the package\n\n### Configuration\nAdd the following to your `config.exs` or `runtime.exs` file\n```elixir\nconfig :paystack, secret_key: System.get_env(\"PAYSTACK_SECRET_KEY\")\n```\nYour environment variable does not have to be `PAYSTACK_SECRET_KEY`, as the package only depends on the config key.\n\n  ### Usage\n  This package returns responses in the format of `{:ok, Paystack.Response{}} | {:error, any}`. This means a successful request would look like this;\n  ```elixir\n  iex\u003e Paystack.Transaction.initialize(%{ email: \"customer@email.com\", amount: \"20000\" })\n  \n  {:ok,\n    %Paystack.Response{\n    data: %{\n      \"access_code\" =\u003e \"0peioxfhpn\",\n      \"authorization_url\" =\u003e \"https://checkout.paystack.com/0peioxfhpn\",\n      \"reference\" =\u003e \"7PVGX8MEk85tgeEpVDtD\"\n    },\n    message: \"Authorization URL created\",\n    meta: nil,\n    status_code: 200,\n    success: true\n  }}\n  ```\n\n  An unsuccessful response would look like this;\n  ```elixir\n  iex\u003e Paystack.Transaction.initialize(%{ email: \"customer@email.com\", amount: \"20000\" })\n  \n  {:ok,\n    %Paystack.Response{\n      data: nil,\n      message: \"Invalid key\",\n      meta: nil,\n      status_code: 401,\n      success: false\n    }}\n  ```\n\n  while an unexpected response would look like this.\n  ```elixir\n  iex\u003e Paystack.Transaction.initialize(%{ email: \"customer@email.com\", amount: \"20000\" })\n  \n  {:error, :nxdomain}\n  ```\n\n  ## Telemetry\n  This library executes the following telemetry events:\n  * `[:paystack, :request, :start]` - Executed before sending a request\n    Measurements\n      * `system_time` - The system time\n\n  * `[:paystack, :request, :stop]` - Executed after sending the final response\n    Measurements\n    * `duration` - The system time in `:native` unit\n  \n    Metadata\n    * `url` - The paystack url requested\n    * `request_type` - The http request type (`:get`, `:post`, `:put` or `:delete`)\n    * `status_code` - The http response status code e.g `201`, `400`, `401`, e.t.c.\n    * `response_type` - The library's response type (`:ok` or `:error`)\n  \n  Happy coding!\n\n### Testing\nAll modules implement a base behaviour. For instance, the `Paystack.Transaction` module implements a `Paystack.Transaction.Base` behaviour which makes it easy to mock with libraries such as https://hex.pm/packages/mox\n\n### License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftherealsmat%2Fpaystack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftherealsmat%2Fpaystack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftherealsmat%2Fpaystack/lists"}