Skip to main content

Find a Payment

require 'chargeover_ruby'

# Initialize the client
client = ChargeOver::Client.new("https://your-chargeover-url.com", "your_api_key", "your_api_secret")

# Define the transaction ID
transaction_id = "37" # Replace with the actual transaction ID

# Retrieve the transaction
response = client.find(:transaction, transaction_id)

# Check if successful
if response['status'] == 'success'
puts "Transaction found: #{response['response']}"
else
puts "Error: #{response['error']}"
end