Introducing Open Payments PHP: A New Bridge for Financial Interoperability

Written by Adi Boros

🎯 Why Open Payments Matters

The Open Payments standard is reshaping how applications initiate, manage, and complete digital transactions β€” enabling truly interoperable financial systems across different wallets, services, and financial institutions.

But while the specification has seen growing adoption across JavaScript platforms, there was one massive gap: PHP developers, who still power a huge portion of the web, had no simple, native way to implement Open Payments in their applications.

Today, we’re excited to change that with the release of Open Payments PHP β€” an open-source library that makes it easy for PHP applications to participate in the future of financial interoperability.

πŸ’‘ What We Built: Open Payments PHP

interledger/open-payments-php is a modern, Composer-installable PHP package that provides full client support for the Open Payments API. It includes:

βœ… Full support for Grants, Incoming Payments, Outgoing Payments, Quotes, and Token management.

βœ… Built for PHP 8.3+, using strict typing, PSR-4 autoloading, and Composer dependency management.

βœ… Clean, service-oriented architecture:

βœ… Fully tested with PHPUnit, ready for production use.

Here’s what it looks like to request a grant:

use OpenPayments\AuthClient;
use OpenPayments\Config\Config;
$config = new Config(
$WALLET_ADDRESS, $PRIVATE_KEY, $KEY_ID
);
$opClient = new AuthClient($config);
$wallet = $opClient->walletAddress()->get([
'url' => $config->getWalletAddressUrl()
]);
$grant = $opClient->grant()->request(
[
'url' => $wallet->authServer
],
[
'access_token' => [
'access' => [
[
'type' => 'incoming-payment',
'actions' => ['read', 'complete', 'create', 'list' ]
]
]
],
'client' => $config->getWalletAddressUrl()
]
);

With just a few lines of code, PHP developers can now create grants, request quotes, initiate outgoing payments, or complete incoming payments β€” all fully compliant with Open Payments specifications (including generating HTTP signature headers).

Detailed fully functional code snippets covering all endpoints can be found on the Open Payments PHP Snippets repo.

πŸ› οΈ How It Works: Inside the Library

At its core, Open Payments PHP is designed around simplicity and modularity. The library is structured into clear layers, making it easy for developers to jump in, extend, or contribute:

πŸ“ Project Structure

FolderPurpose
Contracts/Interface definitions (routes) for Services
Services/Interact with Open Payments endpoints like grants, payments, quotes
Models/Data models representing Open Payments resources
Validators/Input validation logic before making API calls
Traits/Helpers like ID parsing and URL extraction
Utils/Utility functions used for the http signature

Each service corresponds directly to parts of the Open Payments API. For example:

All these services are incorporated into the main AuthClient and can be used directly from the client like in the above examples. Developers interact mainly through these service classes, without worrying about low-level HTTP requests or Open Payments internal mechanics, like the http signatures β€” the library abstracts that complexity away.

🌎 Why It Matters for the PHP Community

PHP remains one of the most widely used languages across the web β€” powering platforms like WordPress, Laravel, Drupal, and countless custom-built applications.

By bringing first-class Open Payments support to PHP, we unlock:

πŸ”— Broader ecosystem participation: more web apps, e-commerce platforms, and financial services can integrate Open Payments without switching tech stacks.

πŸš€ Faster innovation: developers can focus on building user-facing products instead of re-implementing complex financial protocols.

πŸ›‘οΈ Secure by default: thanks to strict type enforcement, request validation, and adherence to the Open Payments specification.

🀝 Stronger community collaboration: easier onboarding for teams that already speak PHP.

This marks an important step toward making Open Payments truly universal across different languages and platforms.

πŸš€ What’s Next

We’re just getting started!

Here’s what’s coming soon for Open Payments PHP:

πŸ“š Open Payments official documentation will soon include usage examples (snippets) for the PHP library also.

πŸ”₯ Example projects β€” showcasing integration with popular frameworks like Laravel, Symfony Console apps (Snippets library), and WordPress - ecommerce - plugins.

🀝 Community-driven development β€” pull requests, issues, and feature discussions are welcome!

We encourage developers to test the library, provide feedback, open issues, or submit pull requests. Together, we can grow the Open Payments ecosystem across the entire PHP world.

πŸ”— Resources

GitHub: interledger/open-payments-php

GitHub: interledger/open-payments-php-snippets

Open Payments Specification

Interledger Foundation


As we are open source, you can easily check our work on GitHub. If the work mentioned here inspired you, we welcome your contributions. You can join our community slack or participate in the next community call, which takes place each second Wednesday of the month.

If you want to stay updated with all open opportunities and news from the Interledger Foundation, you can subscribe to our newsletter.