Skip to content

Paystack SDKA Ruby client for the Paystack API

Keyword arguments, input checked before anything is sent, and responses that say what actually happened.

payments_controller.rb
client = PaystackSdk::Client.new

# 1. start the payment, send the payer to Paystack
res = client.transactions.initiate(
  email: "ama@example.com", amount: 5000,
  currency: "GHS", reference: "pay-8f2c"
)
redirect_to res.authorization_url

# 2. on the callback or webhook: ask Paystack, not the browser
res = client.transactions.verify(reference: "pay-8f2c")
grant_access if res.paid?(amount: 5000, currency: "GHS")
For AI agents

Skills your coding agent can load

Nine skills ship in the gem and teach an agent the conventions, the flows and the money-safety checks. Every page here is also raw markdown, with llms.txt and llms-full.txt. See the skills.

$ bundle exec paystack_sdk skills install
$ bin/rails generate paystack_sdk:skills

Unofficial community SDK. Not affiliated with or endorsed by Paystack. · MIT License · rubygems.org/gems/paystack_sdk