PHPackages                             einfacharchiv/laravel-cashier-microdata - 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. einfacharchiv/laravel-cashier-microdata

ActiveLibrary[Payment Processing](/categories/payments)

einfacharchiv/laravel-cashier-microdata
=======================================

Add Microdata to your Laravel Cashier invoices

v2.0.0(4y ago)41.0kMITPHPPHP ^7.2.5|^8.0

Since Feb 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/einfachArchiv/laravel-cashier-microdata)[ Packagist](https://packagist.org/packages/einfacharchiv/laravel-cashier-microdata)[ Docs](https://github.com/einfachArchiv/laravel-cashier-microdata)[ RSS](/packages/einfacharchiv-laravel-cashier-microdata/feed)WikiDiscussions master Synced 1w ago

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

Add Microdata to your Laravel Cashier invoices (supporting JSON-LD)
===================================================================

[](#add-microdata-to-your-laravel-cashier-invoices-supporting-json-ld)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

This package provides an easy way to add Microdata (in JSON-LD format) to your Laravel Cashier invoices.

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

[](#requirements)

PHP 7.0 and later.

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

[](#installation)

You can install this package via [Composer](http://getcomposer.org). Run the following command:

```
composer require einfacharchiv/laravel-cashier-microdata
```

Usage
-----

[](#usage)

Add the following snippet to your invoice notification `toMail` method and adjust the values to your environment. `$this->invoice` is your `\Laravel\Cashier\Invoice` (or alternatively `\Stripe\Invoice`). The methods `setSeller`, `setBuyer`, and `setUrl` are optional.

```
// ...

public function toMail($notifiable)
{
    \einfachArchiv\LaravelCashierMicrodata\Invoice::getInstance()
        ->setInvoice($this->invoice)
        ->setSeller([
            'company' => config('app.vendor.company'),
            'first_name' => config('app.vendor.first_name'),
            'last_name' => config('app.vendor.last_name'),
            'street_address' => config('app.vendor.street_address'),
            'city' => config('app.vendor.city'),
            'zip' => config('app.vendor.zip'),
            'state' => config('app.vendor.state'),
            'country' => config('app.vendor.country'),
            'vat_id' => config('app.vendor.vat_id'),
            'email' => config('app.vendor.email'),
            'website' => config('app.vendor.website'),
        ])
        ->setBuyer([
            'company' => $notifiable->billing_company,
            'first_name' => $notifiable->billing_first_name,
            'last_name' => $notifiable->billing_last_name,
            'street_address' => $notifiable->billing_street_address,
            'city' => $notifiable->billing_city,
            'zip' => $notifiable->billing_zip,
            'state' => $notifiable->billing_state,
            'country' => $notifiable->billing_country,
            'vat_id' => $notifiable->vat_id,
            'email' => $notifiable->email,
            'website' => $notifiable->website,
        ])
        ->setUrl(route('invoices.show', $this->invoice->id));

    // return (new MailMessage())...
}

// ...
```

And add the following snippet to your `resources/views/vendor/mail/html/layout.blade.php` before the `` tag.

```

    {!! \einfachArchiv\LaravelCashierMicrodata\Invoice::getInstance() !!}

```

Contributing
------------

[](#contributing)

Contributions are **welcome**.

We accept contributions via Pull Requests on [Github](https://github.com/einfachArchiv/laravel-cashier-microdata).

Find yourself stuck using the package? Found a bug? Do you have general questions or suggestions for improvement? Feel free to [create an issue on GitHub](https://github.com/einfachArchiv/laravel-cashier-microdata/issues), we'll try to address it as soon as possible.

If you've found a security issue, please email  instead of using the issue tracker.

**Happy coding**!

Credits
-------

[](#credits)

- [Philip Günther](https://github.com/Pag-Man)
- [All Contributors](https://github.com/einfachArchiv/laravel-cashier-microdata/contributors)

License
-------

[](#license)

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

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

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

Total

3

Last Release

1524d ago

Major Versions

v1.0.1 → v2.0.02022-06-08

PHP version history (2 changes)v1.0PHP ~7.0

v2.0.0PHP ^7.2.5|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/7369d061aa626fd1c448315ca5e53d01daf448c6e5f37be95a46946cda406e8e?d=identicon)[Pag-Man](/maintainers/Pag-Man)

---

Top Contributors

[![philipgunther](https://avatars.githubusercontent.com/u/15112900?v=4)](https://github.com/philipgunther "philipgunther (2 commits)")

---

Tags

json-ldlaravellaravel-cashiermicrodataphpstripephplaravelstripeJSON-LDmicrodataLaravel CashiereinfachArchiv

### Embed Badge

![Health badge](/badges/einfacharchiv-laravel-cashier-microdata/health.svg)

```
[![Health](https://phpackages.com/badges/einfacharchiv-laravel-cashier-microdata/health.svg)](https://phpackages.com/packages/einfacharchiv-laravel-cashier-microdata)
```

###  Alternatives

[laravel/cashier

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

2.6k31.8M158](/packages/laravel-cashier)[laravel/octane

Supercharge your Laravel application's performance.

4.0k28.5M256](/packages/laravel-octane)[cartalyst/stripe-laravel

Laravel 11 integration for the Cartalyst Stripe package.

3392.8M9](/packages/cartalyst-stripe-laravel)[mollie/laravel-cashier-mollie

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

179223.2k1](/packages/mollie-laravel-cashier-mollie)[tomatophp/filament-payments

Manage your payments inside FilamentPHP app with multi payment gateway integration

542.5k](/packages/tomatophp-filament-payments)

PHPackages © 2026

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