PHPackages                             psr18-adapter/stripe-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. psr18-adapter/stripe-php

ActiveLibrary[HTTP &amp; Networking](/categories/http)

psr18-adapter/stripe-php
========================

1.1(3mo ago)0725MITPHPPHP &gt;=7.4

Since Aug 8Pushed 3mo agoCompare

[ Source](https://github.com/psr18-adapter/stripe-php)[ Packagist](https://packagist.org/packages/psr18-adapter/stripe-php)[ Docs](https://github.com/psr18-adapter/stripe-php)[ RSS](/packages/psr18-adapter-stripe-php/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (13)Versions (3)Used By (0)

psr18-adapter/stripe-php
========================

[](#psr18-adapterstripe-php)

Install
-------

[](#install)

Via [Composer](https://getcomposer.org/doc/00-intro.md)

```
composer require psr18-adapter/stripe-php
```

Usage
-----

[](#usage)

`stripe-php` library uses singleton for setting the http client, so you will have to call it at some point before you start calling Stripe itself, like so

```
\Stripe\ApiRequestor::setHttpClient(
    new \Psr18Adapter\Stripe\StripePsr18Client($psr18Client, $psr7UriFactory, $psr7RequestFactory)
);
```

### How to set up for dependency injection containers

[](#how-to-set-up-for-dependency-injection-containers)

Singletons like ApiRequestor cannot really be configured for dependency injection containers like `symfony/dependency-injection` without writing extra layer as well. This is why I'm shipping such layer within this package too, in case you are also finding that you need to write such layer, but don't really want to.

It's used like following, if you use YAML and `symfony/dependency-injection`

```
services:
    Stripe\StripeClient:
      factory: ['Psr18Adapter\Stripe\StripeClientAccessor', 'access']
      arguments:
        - !service
          class: Stripe\StripeClient
          arguments:
              $config:
                api_key: '%stripe_secret_key%'
        - !service
          class: Psr18Adapter\Stripe\StripePsr18Client
          autowire: true
```

This should be a replacement of definition of `Stripe\StripeClient` service itself.

Advantage of this approach is that it ensures http client is set in singleton before retrieving `\Stripe\StripeClient` service. This means you can be confident any time StripeClient is fetched from container, it's already configured with your PSR-18 HTTP client.

Licensing
---------

[](#licensing)

MIT license. Please see [License File](LICENSE) for more information.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance80

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2049 days

Total

2

Last Release

107d ago

PHP version history (2 changes)1.0.0PHP &gt;=7.1

1.1PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f56471f595636876f95264fa5c455d611329a4820193f88d22e83a5bd900292?d=identicon)[ostrolucky](/maintainers/ostrolucky)

---

Top Contributors

[![ostrolucky](https://avatars.githubusercontent.com/u/496233?v=4)](https://github.com/ostrolucky "ostrolucky (11 commits)")

---

Tags

psr-18psr-18stripe

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/psr18-adapter-stripe-php/health.svg)

```
[![Health](https://phpackages.com/badges/psr18-adapter-stripe-php/health.svg)](https://phpackages.com/packages/psr18-adapter-stripe-php)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[laudis/neo4j-php-client

Neo4j-PHP-Client is the most advanced PHP Client for Neo4j

185702.8k44](/packages/laudis-neo4j-php-client)[claude-php/claude-php-sdk

A universal, framework-agnostic PHP SDK for the Anthropic Claude API with PSR compliance

14650.3k2](/packages/claude-php-claude-php-sdk)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28150.5k](/packages/phpro-http-tools)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
