Omnipay

A framework-agnostic, multi-gateway payment processing library for PHP with one consistent API.

Library
Composer
vv3.2.1
6,053stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
78/100Good
Development Activity64
Maintenance60
Community88
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
84/100Excellent
Architecture86
Code Quality86
Innovation82
Learning Curve80

Omnipay is an easy-to-use, consistent payment processing library for PHP. Designed around ideas from Active Merchant and years of experience implementing dozens of gateways, it gives you a single clear API that works across many different payment providers.

Because the interface is the same regardless of gateway, you learn one API and reuse it across projects, and you can switch or add payment gateways without rewriting your checkout logic. The league/omnipay package is the recommended starting point, bundling omnipay/common with an HTTP client adapter so you can pull in individual gateway drivers as needed.

What You Get

  • A single consistent API across dozens of payment gateways
  • The league/omnipay metapackage bundling omnipay/common and an HTTP adapter
  • A uniform request/response model for purchase, authorize, capture, and refund
  • Support for redirect (off-site) and direct (on-site) gateway flows
  • A fully unit-tested core with an example application to get started

Common Use Cases

  • Integrating credit-card checkout without locking into one payment provider
  • Supporting multiple payment gateways from a single codebase
  • Switching payment providers without rewriting application checkout logic

Under The Hood

Architecture - The league/omnipay repository is a thin metapackage: its composer.json requires omnipay/common (the gateway abstraction), php-http/discovery, and php-http/guzzle7-adapter, so installing it yields a ready HTTP client plus the common GatewayInterface. Concrete gateways (Stripe, PayPal, etc.) are separate packages implementing that interface; each gateway builds RequestInterface objects that return a normalized ResponseInterface, with redirect responses handled uniformly.

Tech Stack - PHP 7.2+/8.x built on omnipay/common and the PSR-18-style php-http HTTP client abstraction via Guzzle 7. HTTP client decoupling through httplug lets applications supply their own client.

Code Quality - The project is fully unit tested (PHPUnit config and a tests suite are present), a long-standing hallmark of The PHP League’s packages, with active maintenance and strong community engagement.

API Design - The consistent gateway API is the whole point: $gateway->purchase([...])->send() looks the same across providers, so developers learn one model. Excellent documentation and an example app keep onboarding smooth despite the breadth of supported gateways.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search