PHPackages                             cboxdk/laravel-billing-stripe - 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. [Payment Processing](/categories/payments)
4. /
5. cboxdk/laravel-billing-stripe

ActiveLibrary[Payment Processing](/categories/payments)

cboxdk/laravel-billing-stripe
=============================

Cbox Billing — Stripe payment-gateway adapter: a PaymentGateway implementation backed by Stripe, for cboxdk/laravel-billing.

v0.5.2(1mo ago)0301↓75%MITPHPPHP ^8.4CI passing

Since Jul 15Pushed 4w agoCompare

[ Source](https://github.com/cboxdk/laravel-billing-stripe)[ Packagist](https://packagist.org/packages/cboxdk/laravel-billing-stripe)[ RSS](/packages/cboxdk-laravel-billing-stripe/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (8)Dependencies (18)Versions (11)Used By (0)

Cbox Billing — Stripe
=====================

[](#cbox-billing--stripe)

**`cboxdk/laravel-billing-stripe`** — a Stripe payment-gateway adapter for [`cboxdk/laravel-billing`](https://github.com/cboxdk/laravel-billing). It implements billing's `PaymentGateway` contract backed by Stripe; install it and set a key to route billing's payments through Stripe.

Install
-------

[](#install)

```
composer require cboxdk/laravel-billing-stripe
```

```
// .env
STRIPE_SECRET=sk_live_...
```

With a key set, the provider binds `Cbox\Billing\Payment\Contracts\PaymentGateway`to the Stripe gateway. Without one, billing keeps its default (manual) gateway.

Design
------

[](#design)

- **SDK isolated behind a seam.** `StripePaymentGateway` depends on a small `StripeIntentCreator` interface; the real `StripeApiIntentCreator` wraps the Stripe SDK, and a `FakeStripeIntentCreator` drives the tests — so the gateway's status-mapping and error handling are fully unit-tested without the network.
- **Never throws.** A Stripe API failure becomes a failed `PaymentResult`; Stripe statuses map to `succeeded` / `pending` / `requires_action` / `failed`.
- **Idempotent webhooks on the shared seam.** `StripeApiWebhookVerifier` implements billing's canonical `Cbox\Billing\Payment\Contracts\WebhookVerifier`: it proves the Stripe signature via the SDK (deny-by-default) and normalises the delivery onto the engine's shared `WebhookEvent`. `StripeWebhookHandler` then hands that event to the engine's own `WebhookIngest`, which applies the paid effect to the invoice exactly once per reference — collapsing gateway re-deliveries and crash-retries. The adapter only overrides the shared dedup/settle stores with durable database implementations; it owns no webhook contracts of its own. Charges carry a scoped external idempotency key so a crash-and-retry never double-charges. Set `STRIPE_WEBHOOK_SECRET` to enable it. See [docs/core-concepts/webhooks.md](docs/core-concepts/webhooks.md).

> The SDK wrapper implements Stripe's documented API shape — verify against the live Stripe API (and provision real keys) before relying on it in production.

Running the live integration tests
----------------------------------

[](#running-the-live-integration-tests)

The default suite proves the gateway against an in-memory Stripe fake. A separate `integration` suite (`tests/Integration/StripeLiveTest.php`) drives the **real** Stripe SDK path end-to-end against **Stripe test mode**. It is gated on a dedicated `STRIPE_TEST_SECRET` (never `STRIPE_SECRET`, so it can't collide with a production key): without it the suite **skips cleanly**, so it is excluded from the default run and from CI.

```
STRIPE_TEST_SECRET=sk_test_... vendor/bin/pest --group=integration
```

It hits Stripe test mode only — using Stripe's canned test methods (`pm_card_visa`) and tiny test-currency amounts, never real card data — and creates then removes throwaway test objects (customer, setup/payment intents, refund) as it exercises the full stored-customer and payment-method lifecycle. Nothing is written to the repo and no key is committed.

Requirements
------------

[](#requirements)

PHP `^8.4`; Laravel `^12 || ^13`; `stripe/stripe-php` `^20.3`; `cboxdk/laravel-billing`.

License
-------

[](#license)

MIT.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance94

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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 ~1 days

Total

10

Last Release

35d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b9761a79e61f2d5b9d650510dfb3555da18daf38f027aa84012c937e397e39a7?d=identicon)[cboxdk](/maintainers/cboxdk)

---

Top Contributors

[![sylvesterdamgaard](https://avatars.githubusercontent.com/u/2431914?v=4)](https://github.com/sylvesterdamgaard "sylvesterdamgaard (13 commits)")

---

Tags

billingcboxgatewaylaravelpaymentsstripelaravelstripebillingpaymentsgatewaycbox

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/cboxdk-laravel-billing-stripe/health.svg)

```
[![Health](https://phpackages.com/badges/cboxdk-laravel-billing-stripe/health.svg)](https://phpackages.com/packages/cboxdk-laravel-billing-stripe)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3365.5M359](/packages/psalm-plugin-laravel)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k31.8M166](/packages/laravel-cashier)[laravel/ai

The official AI SDK for Laravel.

1.1k6.4M360](/packages/laravel-ai)[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k59.5M714](/packages/laravel-scout)[spatie/laravel-health

Monitor the health of a Laravel application

89313.5M195](/packages/spatie-laravel-health)[illuminate/queue

The Illuminate Queue package.

20433.5M1.9k](/packages/illuminate-queue)

PHPackages © 2026

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