wire docs

Ruby SDK

Official Ruby SDK for the Wire payment API.

The official Ruby SDK for Wire.

Install

gem install wirepayment

First 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"]

Learn more

On this page