Nexus takes USDC payments on Algorand. Customers pay from any Algorand wallet (Pera, Defly), you are paid directly, and there is no card processor or approval queue. This is the whole Ruby on Rails integration.
Create the session on your server so the price is fixed and the buyer cannot change it. Amounts are integer US cents.
require "net/http"
require "json"
class CheckoutController < ApplicationController
def create
uri = URI("#{ENV['NEXUS_URL']}/v1/sessions")
res = Net::HTTP.post(uri,
{ creatorId: ENV["NEXUS_CREATOR_ID"], amount: 4900 }.to_json,
"content-type" => "application/json", "x-nexus-api-key" => ENV["NEXUS_API_KEY"])
s = JSON.parse(res.body)
redirect_to "#{ENV['NEXUS_URL']}/pay/#{s['sessionId']}?t=#{s['confirmToken']}", allow_other_host: true
end
end
Never trust the browser. Nexus matches the payment on-chain and only marks the session completed when the USDC has actually arrived.
uri = URI("#{ENV['NEXUS_URL']}/v1/sessions/#{id}")
req = Net::HTTP::Get.new(uri); req["x-nexus-api-key"] = ENV["NEXUS_API_KEY"]
s = JSON.parse(Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |h| h.request(req) }.body)
order.mark_paid! if s["status"] == "completed"
npm run dev locally; use NEXUS_NETWORK=testnet to try it free.NEXUS_CREATOR_ID, NEXUS_URL, NEXUS_API_KEY.Using an AI coding agent? Point it at /llms.txt or the OpenAPI spec, or install the Nexus MCP server.