PHPackages                             yacoubalhaidari/laravel-apple-google-wallet-integration - 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. [API Development](/categories/api)
4. /
5. yacoubalhaidari/laravel-apple-google-wallet-integration

ActiveLibrary[API Development](/categories/api)

yacoubalhaidari/laravel-apple-google-wallet-integration
=======================================================

Laravel package for Apple Wallet (.pkpass) and Google Wallet loyalty stamp cards

v1.0.3(1mo ago)45↓50%MITPHP ^8.2

Since Jun 21Compare

[ Source](https://github.com/YacoubAl-hardari/laravel-apple-google-wallet-integration)[ Packagist](https://packagist.org/packages/yacoubalhaidari/laravel-apple-google-wallet-integration)[ RSS](/packages/yacoubalhaidari-laravel-apple-google-wallet-integration/feed)WikiDiscussions Synced 2w ago

READMEChangelogDependencies (16)Versions (5)Used By (0)

Laravel Apple &amp; Google Wallet Integration
=============================================

[](#laravel-apple--google-wallet-integration)

[![Laravel Apple & Google Wallet Integration](image.png)](image.png)

Laravel package for generating **Apple Wallet** loyalty passes in `.pkpass` format and **Google Wallet** save links, with stamp-card support and stamp image generation for both platforms.

**Author:** [Yacoub Alhaidari](https://yacoubalhaidari.com)

Contents
--------

[](#contents)

- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Quick Setup](#quick-setup)
- [Wallet Design Studio](#wallet-design-studio)
- [Usage](#usage)
- [Extensibility](#extensibility)
- [Docs](#docs)
- [Localization](#localization)
- [License](#license)

Features
--------

[](#features)

- Generate **Apple Wallet** passes as `.pkpass` files.
- Create **Google Wallet** save links with JWT.
- Create or update Google Loyalty Class/Object data.
- Stamp-card support with a GD-based image generator.
- DTO-first API without a direct Eloquent dependency.
- Swappable builders for Apple and Google pass definitions.
- Events fired before pass definitions are built.
- English is the default documentation language.
- Local **Wallet Design Studio** for previewing and exporting settings.

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

[](#requirements)

RequirementDetailsPHP8.2 or newerLaravel11 or newerExtensions`openssl`, `zip`, `gd`ApplePass Type ID + `.p12` certificate + WWDR `.pem`GoogleService Account JSON + Issuer IDInstallation
------------

[](#installation)

```
composer require yacoubalhaidari/laravel-apple-google-wallet-integration
```

Publish the config and language files when needed:

```
php artisan vendor:publish --tag=apple-google-wallet-config
php artisan vendor:publish --tag=apple-google-wallet-lang
php artisan storage:link
```

Quick Setup
-----------

[](#quick-setup)

Place the Apple certificates in `storage/app/apple-wallet/` and the Google Service Account file in `storage/app/google-wallet/`, then set the core values in `.env`:

```
APP_URL=https://example.com
WALLET_LOCALE=en

APPLE_WALLET_PASS_TYPE_IDENTIFIER=pass.com.example.yourapp
APPLE_WALLET_TEAM_IDENTIFIER=XXXXXXXXXX
APPLE_WALLET_ORGANIZATION_NAME="Your Brand"
APPLE_WALLET_CERTIFICATE_PATH=storage/app/apple-wallet/pass.p12
APPLE_WALLET_CERTIFICATE_PASS=your-p12-password
APPLE_WALLET_WWDR_CERTIFICATE=storage/app/apple-wallet/AppleWWDRCAG6.pem
APPLE_WALLET_ICON_PATH=public/images/logo.png
APPLE_WALLET_LOGO_PATH=public/images/logo.png

GOOGLE_WALLET_ISSUER_ID=3388000000000000000
GOOGLE_WALLET_SERVICE_ACCOUNT_JSON=storage/app/google-wallet/service-account.json
GOOGLE_WALLET_ISSUER_NAME="Your Brand"
GOOGLE_WALLET_DEFAULT_LOGO=https://example.com/images/logo.png
GOOGLE_WALLET_FALLBACK_LOGO=https://example.com/images/logo.png
GOOGLE_WALLET_PUBLIC_ASSET_BASE_URL=https://example.com
```

Optional stamp settings:

```
APPLE_WALLET_STAMP_COMPLETED_ICON=public/images/stamps/completed.png
APPLE_WALLET_STAMP_EMPTY_ICON=public/images/stamps/empty.png
APPLE_WALLET_STRIP_BG_IMAGE=/images/stamps/STAMP_BG.png

GOOGLE_WALLET_STAMP_COMPLETED_ICON=public/images/stamps/completed.png
GOOGLE_WALLET_STAMP_EMPTY_ICON=public/images/stamps/empty.png
GOOGLE_WALLET_STAMP_STRIP_BG_IMAGE=/images/stamps/STAMP_BG.jpeg
```

Inspect the current setup from Tinker:

```
app(\Yacoubalhaidari\AppleGoogleWallet\Apple\AppleWalletService::class)->configurationReport();
app(\Yacoubalhaidari\AppleGoogleWallet\Google\GoogleWalletService::class)->configurationReport();
```

Wallet Design Studio
--------------------

[](#wallet-design-studio)

The studio runs automatically in `local` and can be opened at:

```
http://your-app.test/wallet-studio

```

You can change the route or enable it from `.env`:

```
WALLET_STUDIO_ENABLED=true
WALLET_STUDIO_ROUTE=wallet-studio
```

It helps preview colors and layout, upload icons, generate previews, export `.env` settings, and test sample card creation.

Usage
-----

[](#usage)

### Prepare DTOs

[](#prepare-dtos)

```
use Yacoubalhaidari\AppleGoogleWallet\DTOs\LoyaltyProgramData;
use Yacoubalhaidari\AppleGoogleWallet\DTOs\MemberCardData;

$program = LoyaltyProgramData::fromArray([
    'id' => $card->id,
    'name' => $card->name,
    'required_stamps' => $card->required_stamps,
    'reward_count' => $card->reward_count,
    'logo_path' => public_path('images/logo.png'),
    'image_url' => asset('images/logo.png'),
]);

$member = MemberCardData::fromArray([
    'id' => $userCard->id,
    'qr_code' => $userCard->qr_code,
    'stamps_progress' => $userCard->stamps_progress,
    'rewards_earned' => $userCard->rewards_earned,
    'is_completed' => $userCard->is_completed,
    'member_name' => trim($user->first_name . ' ' . $user->last_name),
]);
```

### Apple Wallet

[](#apple-wallet)

```
use Yacoubalhaidari\AppleGoogleWallet\Facades\AppleWallet;

$pkpass = AppleWallet::createPass($program, $member);

return response($pkpass, 200, [
    'Content-Type' => 'application/vnd.apple.pkpass',
    'Content-Disposition' => 'attachment; filename="loyalty.pkpass"',
]);
```

### Google Wallet

[](#google-wallet)

```
use Yacoubalhaidari\AppleGoogleWallet\Facades\GoogleWallet;

$saveUrl = GoogleWallet::saveUrl($program, $member);

GoogleWallet::updateLoyaltyCard($program, $member);
```

Extensibility
-------------

[](#extensibility)

You can replace the default builders from the config files:

```
// config/apple-wallet.php
'pass_definition_builder' => App\Wallet\CustomApplePassBuilder::class,

// config/google-wallet.php
'payload_builder' => App\Wallet\CustomGooglePayloadBuilder::class,
```

Available events:

```
Yacoubalhaidari\AppleGoogleWallet\Events\ApplePassDefinitionBuilding::class
Yacoubalhaidari\AppleGoogleWallet\Events\GoogleLoyaltyObjectBuilding::class
```

Docs
----

[](#docs)

FileContent[docs/apple-wallet.md](docs/apple-wallet.md)Apple Wallet setup, certificates, and usage[docs/google-wallet.md](docs/google-wallet.md)Google Wallet setup and Service Account[docs/README.md](docs/README.md)Documentation index[README.ar.md](README.ar.md)Arabic overview for the package[config/apple-wallet.php](config/apple-wallet.php)Apple Wallet options[config/google-wallet.php](config/google-wallet.php)Google Wallet options[config/studio.php](config/studio.php)Wallet Design Studio optionsLocalization
------------

[](#localization)

The default locale can be set with:

```
WALLET_LOCALE=en
```

Use translations like this:

```
wallet_trans('stamps');
```

To publish the language files:

```
php artisan vendor:publish --tag=apple-google-wallet-lang
```

License
-------

[](#license)

MIT - Yacoub Alhaidari

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance93

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

Total

4

Last Release

35d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1fb3960cf6e949bc5401902a09bf597da5bf4aeaf53c382bb55b1843769c0347?d=identicon)[Yacoub\_Al-haidari](/maintainers/Yacoub_Al-haidari)

---

Tags

laravelpkpassloyaltygoogle walletapple walletstamp-card

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yacoubalhaidari-laravel-apple-google-wallet-integration/health.svg)

```
[![Health](https://phpackages.com/badges/yacoubalhaidari-laravel-apple-google-wallet-integration/health.svg)](https://phpackages.com/packages/yacoubalhaidari-laravel-apple-google-wallet-integration)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.4M352](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

78727.1M206](/packages/laravel-mcp)[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k113.1M964](/packages/laravel-socialite)[nuwave/lighthouse

A framework for serving GraphQL from Laravel

3.5k12.2M124](/packages/nuwave-lighthouse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9872.4M142](/packages/roots-acorn)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1239.7k25](/packages/fleetbase-core-api)

PHPackages © 2026

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