{"id":13509454,"url":"https://github.com/altyaper/conekta-elixir","last_synced_at":"2025-12-11T23:54:17.874Z","repository":{"id":47407582,"uuid":"90400966","full_name":"altyaper/conekta-elixir","owner":"altyaper","description":"Elixir library for Conekta api calls","archived":false,"fork":false,"pushed_at":"2024-04-03T07:25:57.000Z","size":85,"stargazers_count":16,"open_issues_count":2,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-21T19:19:53.545Z","etag":null,"topics":["api-client","api-wrapper","elixir"],"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/altyaper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-05T17:31:02.000Z","updated_at":"2023-11-10T04:57:57.000Z","dependencies_parsed_at":"2024-01-05T21:59:28.725Z","dependency_job_id":"9eddff9b-0288-4cb6-832b-e21314d8a926","html_url":"https://github.com/altyaper/conekta-elixir","commit_stats":null,"previous_names":["echavezns/conekta-elixir"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altyaper%2Fconekta-elixir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altyaper%2Fconekta-elixir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altyaper%2Fconekta-elixir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/altyaper%2Fconekta-elixir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/altyaper","download_url":"https://codeload.github.com/altyaper/conekta-elixir/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222552871,"owners_count":17002160,"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":["api-client","api-wrapper","elixir"],"created_at":"2024-08-01T02:01:07.997Z","updated_at":"2025-10-21T16:37:14.147Z","avatar_url":"https://github.com/altyaper.png","language":"Elixir","funding_links":[],"categories":["Third Party APIs"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/echavezNS/conekta-elixir.svg?branch=master)](https://travis-ci.org/echavezNS/conekta-elixir)\n\n# Conekta Library\n\n\nWrapper to connect with https://api.conekta.io.\n\n[conekta-elixir documentation](https://hexdocs.pm/conekta/api-reference.html)\n\n## Setup\n\n### Installation\n\nAdd Conekta to your `mix.exs` dependencies:\n\n```elixir\n#mix.exs\ndefp deps do\n  [\n    #If you have trouble with poison add\n    #{:poison, \"~\u003e 3.1\", override: true}\n    {:conekta, \"~\u003e 1.0\"}\n  ]\nend\n```\n\n### Configuration\nAdd your keys in your `config.exs` file\n\n```elixir\n# config.exs\nconfig :conekta,\n  publickey: \"YOUR-PUBLIC-KEY\",\n  privatekey: \"YOUR-PRIVATE-KEY\"\n\n```\n\n## Customers\n\n### Get\nGet all current customers\n```elixir\n#Get the last\nConekta.Customers.customers()\n```\n\n### Create\nCreate a customer by passing a `%Conekta.Customer{}` struct\n\n```elixir\n#Create a new customer map\nnew_customer = %Customer{\n  name: \"Fake Name\",\n  email: \"fake@email.com\",\n  corporate: true,\n  payment_sources: [%{\n      token_id: \"tok_test_visa_4242\",\n      type: \"card\"\n  }]\n}\n\n#Create a new customer\nConekta.Customers.create(new_customer)\n\n```\n\n### Find\nFind a customer by passing the unique ID\n```elixir\nConekta.Customers.find(id)\n```\n\n### Delete\nDelete a customer by passing the unique ID\n```elixir\nConekta.Customers.delete(id)\n```\n\n\n## Orders\n\n### Get\n\n```elixir\nConekta.Orders.orders()\n```\n\n### Create\n\n```elixir\n#Create a new order map\nnew_order = %Order{currency: \"MXN\",\ncustomer_info: %{\n    customer_id: content.id\n}, line_items: [%{\n    name: \"Product 1\",\n    unit_price: 35000,\n    quantity: 1\n}], charges: [%{\n    payment_method: %{\n        type: \"default\"\n    }\n}]}\n\n#Create an order\nresponse = Conekta.Orders.create(new_order)\n```\n\n\n## WebHooks\n\nHelper function for webhook handling. [check possible events](https://developers.conekta.com/resources/webhooks)\n\n```elixir\ncase Conekta.WebHook.received(params) do\n  {:charge_created, struct} -\u003e ...\n  {:charge_paid, struct} -\u003e ...\n  {:plan_created, struct} -\u003e ...\n  {:customer_created, struct} -\u003e ...\n  {:subscription_created, struct} -\u003e ...\n  {:subscription_paid, struct} -\u003e ...\n  {:subscription_canceled, struct} -\u003e ...\n  {:chargeback_created, struct} -\u003e ...\n  {:chargeback_lost, struct} -\u003e ...\nend\n```\n\n## Test\nIf you want to add something new, make sure all the tests pass before making a PR\n```elixir\nmix test\n```\n\n### Send pull request\nI would love to check new contributions to this repository.\nFork from **dev** and do a PR into **dev** again.  \n\n### License\n\nAvailable with [MIT License](https://github.com/echavezNS/conekta-elixir/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltyaper%2Fconekta-elixir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faltyaper%2Fconekta-elixir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faltyaper%2Fconekta-elixir/lists"}