Charge a credit card through Stripe or Authorize.Net with the same code, and switch providers without rewriting your payment logic.
Add refund, void, and stored-card features to a Ruby on Rails e-commerce app.
Integrate multiple payment gateways in one app to offer regional payment options across North America, Europe, and Asia-Pacific.
Requires API credentials (keys or login/password) for each payment gateway you want to connect to, use sandbox credentials for testing.
Active Merchant is a Ruby library that lets web applications accept payments through dozens of different payment processors using a single consistent programming interface. It was originally built by Shopify to handle their own payment needs and later released as an open-source project. Instead of writing separate integration code for every payment gateway a business might want to accept, Active Merchant provides one common interface and handles the differences between providers internally. The idea behind the library is that charging a credit card, storing a card for later, voiding a transaction, or issuing a refund should look like the same code regardless of whether the underlying processor is Stripe, Authorize.Net, Braintree, Adyen, or any of the more than one hundred other gateways the library supports. Developers write code once and can switch providers or add new ones without rewriting the payment logic throughout their application. The library works with standard Ruby applications and integrates naturally with Ruby on Rails web projects. Installation is done through RubyGems, the standard Ruby package manager, with a single command or by adding a line to a project's dependency file. The README includes a short working example showing how to charge a credit card using test credentials, going from creating a card object with the cardholder details to submitting a purchase and reading back whether it succeeded. Active Merchant has been in continuous production use since 2006. It is currently maintained by teams at Shopify and Spreedly. The list of supported gateways spans processors in North America, Europe, Asia-Pacific, Latin America, and beyond, with each gateway's supported countries listed alongside it. A feature comparison table in the project wiki shows which operations each gateway supports. The library handles amounts as whole integers in the currency's smallest unit, so dollars are passed as cents. Card validation, including automatic card type detection, is built in. The README points to a getting-started guide and full API documentation for deeper reference.
← activemerchant on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.