Ruby SDK

Official COINQVEST SDK for Ruby. Accept digital currencies like Bitcoin, Ether, or Stellar Lumens and settle in your national currency.

View SDKs for other programming languages.

README.md


COINQVEST Payments API SDK (Ruby)

Official COINQVEST Payments API SDK for Ruby by www.coinqvest.com

Accepting cryptocurrency payments using the COINQVEST API is fast, secure, and easy. After you've signed up and obtained your API key, all you need to do is create a checkout or blockchain deposit address on Bitcoin, Lightning, Litecoin, Stellar, or other supported networks to get paid. You can also use the API for fiat on- and off-ramping via SWIFT or SEPA.

This SDK implements the REST API documented at https://www.coinqvest.com/en/api-docs

For SDKs in different programming languages, see https://www.coinqvest.com/en/api-docs#sdks

Requirements

  • Ruby >= 2.0.0
  • rest-client >= 2.1.0
  • json >= 2.3.0

Installation with gem

gem install coinqvest_merchant_sdk

Usage Client

require 'coinqvest_merchant_sdk/client'

client = CoinqvestMerchantSDK::Client.new(
    'YOUR-API-KEY',
    'YOUR-API-SECRET',
    '/var/log/coinqvest-ruby.log' # an optional log file location
)

Get your API key and secret here: https://www.coinqvest.com/en/api-settings

Guides

Wallets and Deposits

Your COINQVEST account comes equipped with dedicated deposit addresses for Bitcoin, Lightning, Litecoin, Stellar, SWIFT, SEPA, and other supported networks. You can receive blockchain payments within seconds after registering. The GET /wallets and GET /deposit-address endpoints return your blockchain addresses to start receiving custom deposits.

List Wallets and Deposit Addresses (https://www.coinqvest.com/en/api-docs#get-wallets)

response = client.get('/wallets')

Checkouts

COINQVEST checkouts provide fast and convenient ways for your customers to complete payment. We built a great user experience with hosted checkouts that can be fully branded. If you're not into payment pages, you can take full control over the entire checkout process using our backend checkout APIs. Click here to learn more about building checkouts.

Create a Hosted Checkout (Payment Link) (https://www.coinqvest.com/en/api-docs#post-checkout-hosted)

response = client.post('/checkout/hosted', {
    :charge => {
        :billingCurrency => 'EUR', # a billing currency as given by GET /currencies
        :lineItems => [{ # a list of line items included in this charge
            :description => 'PCI Graphics Card',
            :netAmount => 169.99, # denominated in the currency specified above
            :quantity => 1
        }],
        :discountItems => [] # an optional list of discounts
        :shippingCostItems => [] # an optional list of shipping and handling costs
        :taxItems => [] # an optional list of taxes
    },
    :settlementAsset => 'USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN' # your settlement asset as given by GET /assets (or ORIGIN to omit conversion)
})

Swaps And Transfers

Once funds arrive in your account, either via completed checkouts or custom deposits, you have instant access to them and the ability to swap them into other assets or transfer them to your bank account or other blockchain accounts (we recommend to always forward funds into self-custody on cold storage). The POST /swap and POST /transfer endpoints will get you started on swaps and transfers.

Swap Bitcoin to USDC (https://www.coinqvest.com/en/api-docs#post-swap)

response = client.post('/swap', {
    :sourceAsset => 'BTC:GCQVEST7KIWV3KOSNDDUJKEPZLBFWKM7DUS4TCLW2VNVPCBGTDRVTEIT',
    :targetAsset => 'USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN',
    :targetAmount => 100
})

Transfer USDC to your SEPA Bank (https://www.coinqvest.com/en/api-docs#post-transfer)

response = client.post('/transfer', {
    :network => 'SEPA',
    :asset => 'USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN',
    :amount => 100,
    :targetAccount => 'A unique SEPA account label as previously specified in POST /target-account'
})

Supported Assets, Currencies, and Networks

List all available Networks (https://www.coinqvest.com/en/api-docs#get-networks)

response = client.get('/networks')

List all available Assets (https://www.coinqvest.com/en/api-docs#get-assets)

response = client.get('/assets')

List all available Billing Currencies (https://www.coinqvest.com/en/api-docs#get-currencies)

response = client.get('/currencies')

Financial Reports and Accounting

We don't leave you hanging with an obscure and complicated blockchain payment trail to figure out by yourself. All transactions on COINQVEST are aggregated into the Financial Reports section of your account and can even be associated with counter-parties, such as customers and beneficiaries. We provide CSV reports, charts, and beautiful analytics for all your in-house accounting needs.

Please inspect https://www.coinqvest.com/en/api-docs for detailed API documentation or email us at service [at] coinqvest.com if you have questions.

Support and Feedback

We'd love to hear your feedback. If you have specific problems or bugs with this SDK, please file an issue on GitHub. For general feedback and support requests please email service@coinqvest.com.

Contributing

  1. Fork it ( https://github.com/COINQVEST/ruby-merchant-sdk/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request
View on GitHub View API Docs
© COINQVEST LLC 2018-2023 · Terms of Service · Privacy Policy · KYC/AML Policy · Anti-Fraud Policy · Data Processing · License COINQVEST LLC (Company Number 0000970546) is a limited liability company incorporated at 54 Jedności Street, 65-018 Zielona Góra, Poland. COINQVEST LLC reports to the General Inspector of Financial Information and is authorized by the Polish Ministry of Finance to provide virtual currency exchange and custody services under Virtual Asset Service Provider number RDWW-311. Licensed and Regulated in the EU © COINQVEST LLC 2018-2023 · Terms of Service · Privacy Policy · KYC/AML Policy · Anti-Fraud Policy · Data Processing · License
Space cat likes space and he surfs on a space ship.