{"id":15601383,"url":"https://github.com/loqimean/monopay-ruby","last_synced_at":"2025-04-28T10:49:33.713Z","repository":{"id":176272876,"uuid":"654203696","full_name":"loqimean/monopay-ruby","owner":"loqimean","description":"The easiest way to make payments with Monobank acquiring API","archived":false,"fork":false,"pushed_at":"2024-08-15T10:28:15.000Z","size":43,"stargazers_count":8,"open_issues_count":6,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-18T15:16:45.976Z","etag":null,"topics":["easy-to-use","gem","monobank","monobank-acquiring","monobank-api","monobank-sdk","payments","ruby","ruby-on-rails"],"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/loqimean.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-06-15T15:49:07.000Z","updated_at":"2024-10-16T20:04:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"f3e8e14c-5906-46f7-9eae-387a6649c930","html_url":"https://github.com/loqimean/monopay-ruby","commit_stats":null,"previous_names":["loqimean/monopay-ruby"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loqimean%2Fmonopay-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loqimean%2Fmonopay-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loqimean%2Fmonopay-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loqimean%2Fmonopay-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loqimean","download_url":"https://codeload.github.com/loqimean/monopay-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251299385,"owners_count":21567212,"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":["easy-to-use","gem","monobank","monobank-acquiring","monobank-api","monobank-sdk","payments","ruby","ruby-on-rails"],"created_at":"2024-10-03T02:21:10.637Z","updated_at":"2025-04-28T10:49:33.688Z","avatar_url":"https://github.com/loqimean.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Actions Status](https://github.com/loqimean/monopay-ruby/actions/workflows/ci.yml/badge.svg)](https://github.com/loqimean/monopay-ruby/actions)\n[![Listed on OpenSource-Heroes.com](https://opensource-heroes.com/badge-v1.svg)](https://opensource-heroes.com/r/loqimean/fake_picture)\n\n# MonopayRuby\n\nThe \"monopay-ruby\" gem simplifies Monobank payment integration in Ruby and Rails applications. It provides an intuitive interface and essential functionalities for generating payment requests, verifying transactions, handling callbacks, and ensuring data integrity. With this gem, you can quickly and securely implement Monobank payments, saving development time and delivering a seamless payment experience to your users.\n\nThis gem was developed for Monobank API [https://api.monobank.ua/docs/acquiring.html](https://api.monobank.ua/docs/acquiring.html)\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n\n```bash\nbundle add \"monopay-ruby\"\n```\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n\n```ruby\ngem install \"monopay-ruby\"\n```\n\n## Usage\n\nAdd API token. There are two ways:\nFirst - add to the initializer file:\n\n```ruby\n# config/initializers/monopay-ruby.rb\nMonopayRuby.configure do |config|\n  config.api_token = \"your_api_token\"\nend\n```\n\nThe second one - add to the environment variable:\n\n```bash\n# .env\nMONOPAY_API_TOKEN=your_api_token\n```\n\n#### You can get the API token depending on the environment:\n\nDevelopment: [https://api.monobank.ua/](https://api.monobank.ua/)\n\nProduction: [https://fop.monobank.ua/](https://fop.monobank.ua/)\n\nJust get the token and go to earn moneys! 🚀\n\n### Generate payment request\n\n```ruby\n# app/controllers/payments_controller.rb\nclass PaymentsController \u003c ApplicationController\n  def create\n    payment = MonopayRuby::Invoices::SimpleInvoice.new(\n      \"https://example.com\",\n      \"https://example.com/payments/webhook\"\n    )\n\n    if payment.create(amount: 100, destination: \"Payment description\",)\n      # your success code processing\n    else\n      # your error code processing\n      # flash[:error] = payment.error_messages\n    end\n  end\nend\n```\n\n### Verify transaction\n\n```ruby\n# app/controllers/payments_controller.rb\nclass PaymentsController \u003c ApplicationController\n  skip_before_action :verify_authenticity_token, only: :webhook\n\n  def webhook\n    webhook_validator = MonopayRuby::Webhooks::Validator.new(request)\n\n    if webhook_validator.valid?\n      # your success code processing\n    else\n      # your error code processing\n      # flash[:error] = webhook_validator.error_messages\n    end\n  end\nend\n```\n\n## Useful\n[Test cards](https://na-gateway.mastercard.com/api/documentation/integrationGuidelines/supportedFeatures/testAndGoLive.html?locale=en_US)\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/loqimean/monopay-ruby.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Thanks for your support!\n[\u003cimg width=\"100\" alt=\"RailsJazz\" src=\"https://avatars.githubusercontent.com/u/104008706?s=200\"\u003e](https://github.com/railsjazz)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floqimean%2Fmonopay-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floqimean%2Fmonopay-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floqimean%2Fmonopay-ruby/lists"}