PHPackages                             clarkewing/cashier-nightwatch - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. clarkewing/cashier-nightwatch

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

clarkewing/cashier-nightwatch
=============================

Surface Laravel Cashier (Stripe) API requests on Laravel Nightwatch timelines.

v0.2.0(today)01↑2900%MITPHPPHP ^8.2CI passing

Since Jun 22Pushed todayCompare

[ Source](https://github.com/clarkewing/cashier-nightwatch)[ Packagist](https://packagist.org/packages/clarkewing/cashier-nightwatch)[ RSS](/packages/clarkewing-cashier-nightwatch/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (12)Versions (3)Used By (0)

Cashier Nightwatch
==================

[](#cashier-nightwatch)

Surface Stripe API requests — those made by [Laravel Cashier](https://laravel.com/docs/billing) and the Stripe PHP SDK — on your [Laravel Nightwatch](https://nightwatch.laravel.com) timelines, with the request URL redacted by default.

Stripe's PHP SDK uses its own cURL client, so its API calls bypass Nightwatch's Guzzle instrumentation and never show up on your timelines. This package swaps in a Nightwatch-aware cURL client so they do.

Installation
------------

[](#installation)

```
composer require clarkewing/cashier-nightwatch
```

The service provider is auto-discovered. To customise redaction, publish the config:

```
php artisan vendor:publish --tag=cashier-nightwatch-config
```

What is recorded — and redacted
-------------------------------

[](#what-is-recorded--and-redacted)

Nightwatch stores only the **method, URL, byte sizes and status code** for an outgoing request — never request/response **headers or bodies**. Consequently:

- Your Stripe **secret key** (the `Authorization` header) is never captured.
- Request/response **bodies** (card data, customer PII on writes) are never captured — only their byte size.
- The **URL is the only sensitive surface**, because Stripe `list`/`search` calls put filters such as `email` or `customer` in the query string.

By default the package **redacts query-string values while keeping the keys**:

```
GET https://api.stripe.com/v1/customers?email=REDACTED&limit=REDACTED

```

### Configuration

[](#configuration)

KeyDefaultDescription`enabled``true`Master switch. No-ops if Nightwatch is not installed.`redact_query``keys``keys` (redact values, keep names)
`drop` (remove the query string)
`keep` (leave as-is — may log PII).`mask_path_ids``false`Mask Stripe IDs in the path, e.g. `/v1/customers/cus_***`.Each maps to an env var: `CASHIER_NIGHTWATCH_ENABLED`, `CASHIER_NIGHTWATCH_REDACT_QUERY`, `CASHIER_NIGHTWATCH_MASK_PATH_IDS`.

For full control you can also use [Nightwatch's own hook](https://nightwatch.laravel.com/docs/outgoing-requests#redaction) in a service provider (the record's `url` is mutable):

```
use Laravel\Nightwatch\Facades\Nightwatch;

Nightwatch::redactOutgoingRequests(function ($record) {
    $record->url = '...';
});
```

Compatibility
-------------

[](#compatibility)

This integrates at the Stripe SDK level (`Stripe\ApiRequestor::setHttpClient`) and relies on a few Laravel Nightwatch internals (`Core::$clock`, `Core::$config`, `outgoingRequest()`, `paused()`). It targets Nightwatch `1.x` and may need updating across a Nightwatch major version.

Streaming Stripe responses (`requestStream`) are not instrumented.

Testing
-------

[](#testing)

```
composer install
composer test
```

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

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

Total

2

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7689302?v=4)[Hugo Clarke-Wing](/maintainers/clarkewing)[@clarkewing](https://github.com/clarkewing)

---

Top Contributors

[![clarkewing](https://avatars.githubusercontent.com/u/7689302?v=4)](https://github.com/clarkewing "clarkewing (6 commits)")

---

Tags

laravelmonitoringstripeobservabilitycashiernightwatch

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/clarkewing-cashier-nightwatch/health.svg)

```
[![Health](https://phpackages.com/badges/clarkewing-cashier-nightwatch/health.svg)](https://phpackages.com/packages/clarkewing-cashier-nightwatch)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[moonshine/moonshine

Laravel administration panel

1.3k239.9k75](/packages/moonshine-moonshine)[mailerlite/laravel-elasticsearch

An easy way to use the official PHP ElasticSearch client in your Laravel applications.

935572.3k2](/packages/mailerlite-laravel-elasticsearch)[storviaio/vantage

Vantage: Strategic queue monitoring and observability for Laravel applications.

25336.8k](/packages/storviaio-vantage)

PHPackages © 2026

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