0.0
No commit activity in last 3 years
No release in over 3 years
Fully implements CoinPayments.net API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
>= 0
>= 0
~> 5.0
>= 0
~> 10.0

Runtime

>= 0.14.0
 Project Readme

CoinPayments

Fully Implements the CoinPayments API in Ruby.

CoinPayments is an integrated payment gateway for cryptocurrencies such as Bitcoin and Litecoin. There are Over 1040 Supported Coins available. You can accept all 1040 supported coins or just one.

This gem will make it dead simple to work with CoinPayments API set & integrate it into any Ruby Project.

Installation

Add this line to your application's Gemfile:

gem 'coin_payments'

And then execute:

$ bundle

Or install it yourself as:

$ gem install coin_payments

Usage

You'll first need to create a CoinPayments.net account to get started. If you don't have one, please consider creating one through my affiliate link: https://www.coinpayments.net/index.php?ref=1bf1c996fd6781bd4aabec78dda6250c

Or if you don't want to sign up through my link, feel free to sign up at https://www.coinpayments.net

There are many tools for Merchants available. We are going to focus on the API integrations.

There are two sides we'll need to concern ourselves:

  1. Utilizing the API to manage payments & accounts
  2. Creating a webhook or Instant Payment Notification (IPN)

Utilizing the API

The only setup needed is to go to the API Keys page and generate an API key. You will be given a private and public key used to authenticate your API calls. Make sure you don't share your private key with any 3rd parties!

Note: You must click 'Edit Permissions' to enable most commands

You will need to set the following environment variables in your app, and the rest will work automatically

COIN_PAYMENTS_PUBLIC_KEY: "your-public-api-key"
COIN_PAYMENTS_PRIVATE_KEY: "your-private-api-key"

Once those are set, you are now ready to utilize the API. Available features have been implemented per the Features chart below

Features

Implemented APIs from CoinPayments API Docs

API Docs Implemented? Priority
Informational Commands
Get Basic Account Info πŸ“š βœ… πŸ‘
Get Exchange Rates / Supported Coins πŸ“š βœ… πŸ‘
Get Coin Balances πŸ“š βœ… πŸ‘
Get Deposit Address πŸ“š βœ… πŸ‘
Receiving Payments
Create Transaction πŸ“š βœ… πŸ‘
Callback Addresses πŸ“š βœ… πŸ‘
Get TX Info πŸ“š βœ… πŸ‘
Get TX List πŸ“š βœ… πŸ‘
Withdrawals/Transfers
Create Transfer πŸ“š βœ… πŸ‘Œ
Create Withdrawal / Mass Withdrawal πŸ“š ❌ πŸ‘Œ
Convert Coins πŸ“š ❌ πŸ‘Œ
Conversion Limits πŸ“š ❌ πŸ‘Œ
Get Withdrawal History πŸ“š ❌ πŸ‘Œ
Get Withdrawal Info πŸ“š ❌ πŸ‘Œ
Get Conversion Info πŸ“š ❌ πŸ‘Œ
$PayByName
Get Profile Information πŸ“š ❌ πŸ‘Ž
Get Tag List πŸ“š ❌ πŸ‘Ž
Update Tag Profile πŸ“š ❌ πŸ‘Ž
Claim Tag πŸ“š ❌ πŸ‘Ž

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To 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 tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/beneggett/coin_payments. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the CoinPayments project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.