{"id":21942175,"url":"https://github.com/screenstaring/recharge-api","last_synced_at":"2025-04-22T18:11:52.742Z","repository":{"id":27294583,"uuid":"112291752","full_name":"ScreenStaring/recharge-api","owner":"ScreenStaring","description":"Ruby client for ReCharge Payments' recurring payments API for Shopify","archived":false,"fork":false,"pushed_at":"2023-05-27T20:39:22.000Z","size":42,"stargazers_count":11,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T18:11:46.485Z","etag":null,"topics":["recharge","recharge-payments","ruby-client","shopify","shopify-app-development"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/ScreenStaring.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE.txt","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-11-28T05:47:26.000Z","updated_at":"2024-03-25T23:43:01.000Z","dependencies_parsed_at":"2024-11-30T08:31:36.829Z","dependency_job_id":null,"html_url":"https://github.com/ScreenStaring/recharge-api","commit_stats":{"total_commits":25,"total_committers":2,"mean_commits":12.5,"dds":"0.040000000000000036","last_synced_commit":"e144af154abffc6951a34dc95736784e80eb8505"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreenStaring%2Frecharge-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreenStaring%2Frecharge-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreenStaring%2Frecharge-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ScreenStaring%2Frecharge-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ScreenStaring","download_url":"https://codeload.github.com/ScreenStaring/recharge-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250296173,"owners_count":21407037,"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":["recharge","recharge-payments","ruby-client","shopify","shopify-app-development"],"created_at":"2024-11-29T03:17:03.180Z","updated_at":"2025-04-22T18:11:52.717Z","avatar_url":"https://github.com/ScreenStaring.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ReCharge API Client\n\n[![Build Status](https://github.com/ScreenStaring/recharge-api/workflows/CI/badge.svg)](https://github.com/ScreenStaring/recharge-api/actions/workflows/ci.yml)\n\nRuby client for [ReCharge Payments'](https://rechargepayments.com/developers)\nrecurring payments API for Shopify.\n\n## Installation\n\nRuby gems:\n\n    gem install recharge-api\n\nBundler:\n\n    gem \"recharge-api\", :require =\u003e \"recharge\"\n\n## Usage\n\nAn API key is required. The key can be set via `ReCharge.api_key` or via the `RECHARGE_API_KEY`\nenvironment variable.\n\n```rb\nrequire \"recharge\"\n\nReCharge.api_key = \"YOUR_KEY\"  # Can also use Recharge\ndata = {\n  :address_id =\u003e 123234321,\n  :customer_id =\u003e 565728,\n  # ... more stuff\n  :next_charge_scheduled_at =\u003e Time.new,\n  :properties =\u003e {\n    :name =\u003e \"size\",\n    :value =\u003e \"medium\"\n  }\n}\n\nsubscription = ReCharge::Subscription.create(data)\nsubscription.address_id = 454343\nsubscription.save\n\n# Or\nReCharge::Subscription.update(id, data)\n\nsubscription = ReCharge::Subscription.new(data)\nsubscription.save\n\norder1 = ReCharge::Order.get(123123)\norder1.line_items.each do |li|\n  p li.title\n  p li.quantity\nend\n\norder2 = ReCharge::Order.get(453321)\np \"Different\" if order1 != order2\n\nJSON.dump(order2.to_h)\n\ncustomers = ReCharge::Customer.list(:page =\u003e 10, :limit =\u003e 50)\ncustomers.each do |customer|\n  addresses = ReCharge::Customer.addresses(customer.id)\n  # ...\nend\n```\n\nFor complete documentation refer to the API docs: http://rdoc.info/gems/recharge-api\n\n### Setting the ReCharge API Version\n\nDefaults to your account's API settings but can be overridden via:\n\n```rb\nReCharge.api_version = \"2021-01\"\n```\n\n## Rake Tasks for Webhook Management\n\nAdd the following to your `Rakefile`:\n\n```rb\nrequire \"recharge/tasks\"\n```\n\nThis will add the following tasks:\n\n  * `recharge:hook:create` - create webhook `HOOK` to be sent to `CALLBACK`\n  * `recharge:hooks:delete` - delete the webhook(s) given by `ID`\n  * `recharge:hooks:delete_all` - delete all webhooks\n  * `recharge:hooks:list` - list webhooks\n\nAll tasks require `RECHARGE_API_KEY` be set.\n\nFor example, to create a hook run the following:\n\n```\nrake recharge:hooks:create RECHARGE_API_KEY=YOURKEY HOOK=subscription/created CALLBACK=https://example.com/callback\n```\n\nYou can set the API version via `RECHARGE_API_VERSION`.\n\n## See Also\n\n- [Shopify Development Tools](https://github.com/ScreenStaring/shopify-dev-tools) - Assists with the development and/or maintenance of Shopify apps and stores\n- [Shopify ID Export](https://github.com/ScreenStaring/shopify_id_export/) - Dump Shopify product and variant IDs —along with other identifiers— to a CSV or JSON file\n- [`ShopifyAPI::GraphQL::Tiny`](https://github.com/ScreenStaring/shopify_api-graphql-tiny) - Lightweight, no-nonsense, Shopify GraphQL Admin API client with built-in retry\n- [Shopify API Retry](https://github.com/ScreenStaring/shopify_api_retry) -  retry requests if rate-limited or other errors occur. Works with the REST and GraphQL APIs.\n\n## License\n\nReleased under the MIT License: www.opensource.org/licenses/MIT\n\n---\n\nMade by [ScreenStaring](http://screenstaring.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscreenstaring%2Frecharge-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscreenstaring%2Frecharge-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscreenstaring%2Frecharge-api/lists"}