Ruby SDK
Official Ruby SDK for the Wire payment API.
The official Ruby SDK for Wire.
- Repository: github.com/buildry-wire/wire-ruby
- RubyGems: rubygems.org/gems/wirepayment
Install
gem install wirepaymentFirst call
client = Wire::Client.new("sk_live_...")
# Amounts are whole tögrög (15000 = 15,000 ₮). Without allowed_operators every operator switched on for your project is used.
pi = client.payment_intents.create(
amount: 15_000,
currency: "MNT",
description: "Order #1001", # transaction description (optional)
)
puts pi["id"], pi["status"]
# Confirm it.
confirmed = client.payment_intents.confirm(pi["id"], return_url: "https://example.com/return")
puts confirmed["status"]