{"id":15010150,"url":"https://github.com/ingresse/card-bin-ex","last_synced_at":"2025-10-21T17:51:55.453Z","repository":{"id":57482140,"uuid":"187089795","full_name":"ingresse/card-bin-ex","owner":"ingresse","description":":credit_card: Elixir module to get the CreditCard brand based in the first digits","archived":true,"fork":false,"pushed_at":"2020-07-20T21:43:54.000Z","size":126,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-12-29T12:23:14.498Z","etag":null,"topics":["backend","cardbin","credit-card","elixir"],"latest_commit_sha":null,"homepage":"https://ingresse.github.io/card-bin-ex/","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/ingresse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-16T19:33:13.000Z","updated_at":"2024-02-26T21:19:43.000Z","dependencies_parsed_at":"2022-09-02T04:20:26.923Z","dependency_job_id":null,"html_url":"https://github.com/ingresse/card-bin-ex","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingresse%2Fcard-bin-ex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingresse%2Fcard-bin-ex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingresse%2Fcard-bin-ex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingresse%2Fcard-bin-ex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ingresse","download_url":"https://codeload.github.com/ingresse/card-bin-ex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235173209,"owners_count":18947457,"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":["backend","cardbin","credit-card","elixir"],"created_at":"2024-09-24T19:30:50.914Z","updated_at":"2025-10-03T19:30:31.795Z","avatar_url":"https://github.com/ingresse.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :credit_card: CardBinEX\n\n[Elixir](https://elixir-lang.org/) module to discover the CreditCard brand based in the first digits.\n\n\n## Valid CreditCard brands\n\n | brand            | alias       |\n |------------------|-------------|\n | Visa             | `visa`      |\n | Elo              | `elo`       |\n | JCB              | `jcb`       |\n | Diners           | `diners`    |\n | Discover         | `discover`  |\n | MasterCard       | `master`    |\n | Hipercard        | `hipercard` |\n | American Express | `amex`      |\n\n\n## Install\n\n```elixir\ndef deps do\n  [\n    {:card_bin_ex, \"~\u003e 1.0\"}\n  ]\nend\n```\n\n\n## Usage\n\nGet the creditcard brand base in the first digits.\n\n```elixir\niex\u003e CardBinEx.brand_from_number(\"4716892\")\n{:ok, \"visa\"}\n\niex\u003e CardBinEx.brand_from_number(\"9716892\")\n{:error, :card_brand, \"9716892\"}\n```\n\nGet the creditcard brand base in the first digits and return only the brand.\n\nIt will raise `CardBinEx.Error` if is an invalid bin.\n\n```elixir\niex\u003e CardBinEx.brand_from_number!(\"4716892\")\n\"visa\"\n\niex\u003e try do\n...\u003e   CardBinEx.brand_from_number!(\"9716892\")\n...\u003e rescue\n...\u003e   e in CardBinEx.Error -\u003e IO.puts(e.message)\n..\u003e end\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fingresse%2Fcard-bin-ex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fingresse%2Fcard-bin-ex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fingresse%2Fcard-bin-ex/lists"}