RubyGems: kkhayv1.0.4Ruby on Rails Ready
Ruby & Rails Gem
The official Ruby gem for K Khay Gateway. Works smoothly with Ruby on Rails, Sinatra, Hanami, or background Sidekiq jobs. Built strictly using Ruby's standard library (net/http, openssl, json).
1. Installation
Ruby Gem
$gem install kkhay
2. Invoice Creation Example
checkout_service.rb
require "kkhay" kkhay = Kkhay::Client.new(api_key: ENV["KKHAY_API_KEY"]) invoice = kkhay.create_invoice( amount: 45.00, currency: "USD", pay_network: "bsc", pay_token: "USDT", order_id: "RAILS-1092", title: "Premium SaaS Membership", customer_email: "user@example.com", redirect_url: "https://myshop.com/orders/success") puts "Invoice ID: #{invoice['id']}"puts "Checkout URL: #{invoice['hosted_url']}"