Follows Paystack's docs
Each endpoint is checked in CI against Paystack's OpenAPI spec. Where the docs and the spec disagree, the live test API decides.
Keyword arguments, input checked before anything is sent, and responses that say what actually happened.
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")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