{"id":18188763,"url":"https://github.com/gearnode/stripe_eventex","last_synced_at":"2025-04-02T04:31:44.450Z","repository":{"id":57553961,"uuid":"60928377","full_name":"gearnode/stripe_eventex","owner":"gearnode","description":"Stripe webhook integration for Plug.","archived":false,"fork":false,"pushed_at":"2018-05-19T16:22:44.000Z","size":30,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T18:05:54.622Z","etag":null,"topics":["stripe","stripe-event","webhook"],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/stripe_eventex","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/gearnode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-06-11T21:23:56.000Z","updated_at":"2020-10-14T15:18:45.000Z","dependencies_parsed_at":"2022-08-29T22:30:31.899Z","dependency_job_id":null,"html_url":"https://github.com/gearnode/stripe_eventex","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gearnode%2Fstripe_eventex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gearnode%2Fstripe_eventex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gearnode%2Fstripe_eventex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gearnode%2Fstripe_eventex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gearnode","download_url":"https://codeload.github.com/gearnode/stripe_eventex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246757439,"owners_count":20828900,"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":["stripe","stripe-event","webhook"],"created_at":"2024-11-03T03:04:14.008Z","updated_at":"2025-04-02T04:31:39.428Z","avatar_url":"https://github.com/gearnode.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":":warning: master branch is currently on active development, [last stable version](https://github.com/gearnode/stripe_eventex/tree/1.0.0)\n\n[![Build Status](https://travis-ci.org/gearnode/stripe_eventex.svg?branch=master)](https://travis-ci.org/gearnode/stripe_eventex)\n# StripeEventex\n\n## Installation\n\nAdd `stripe_eventex` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [{:stripe_eventex, \"~\u003e 2.0.0\"}]\nend\n```\n\nThen run `mix do deps.get, deps.compile`, inside your project's directory.\n\n## Usage\n```elixir\ndefmodule StripeEventApplication do\n  import Plug.Conn\n  use Plug.Router\n\n  plug StripeEventex, path: \"/stripe_hooks\", validation: \u0026StripeEventApplication.valid!/1\n  plug :match\n  plug :dispatch\n\n  get \"/super_app\" do\n    conn\n    |\u003e put_resp_content_type(\"text/plain\")\n    |\u003e send_resp(200, \"Hello, World\")\n  end\n\n  def valid!(conn), do: true\nend\n```\n\nIn your `config.exs` file, you must subscribe to event like this\n\n```elixir\nconfig :stripe_eventex, subscibed_events: [{\"customer.created\", Stripe.CustomerCreated},\n                                           {\"customer.updated\", Stripe.CustomerUpdated}]\n```\n\nYour module must implement perform/1 function, the arguments is stripe event paylaod.\ne.g.\n\n```elixir\ndefmodule Stripe.CustomerCreated do\n  def perform(event) do\n    IO.inspect event\n  end\nend\n```\n\n### The validation callback\n\nThe validation callback will be called to decide if the stripe event is authorized or not.\n\n- It has to be defined in the format \u0026Mod.fun/1.\n- It receives `%Plug.Conn.__struct__`, and must return true or false\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgearnode%2Fstripe_eventex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgearnode%2Fstripe_eventex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgearnode%2Fstripe_eventex/lists"}