PayZephyr: One Laravel API for Stripe, Paystack &amp; PayPal | Mohamed Said       [Skip to content](#main)  [ ![](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png) Mohamed SaidLaravel Backend Engineer ](https://www.msaied.com/public) - [Home](https://www.msaied.com/public)
- [Projects](https://www.msaied.com/public/projects)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/certificates)
- [About](https://www.msaied.com/public#about)

           [  Contact](https://www.msaied.com/public#contact) Menu 

Menu
----

Close 

 - [HomeStart here](https://www.msaied.com/public)
- [ProjectsCase studies](https://www.msaied.com/public/projects)
- [ArticlesEngineering notes](https://www.msaied.com/public/articles)
- [CertificatesCredentials](https://www.msaied.com/public/certificates)
- [AboutHow I work](https://www.msaied.com/public#about)
- [ContactGet in touch](https://www.msaied.com/public#contact)

  [Start a conversation](https://www.msaied.com/public#contact) [WhatsApp](https://wa.me/201094619204) [Email](mailto:hello@msaied.com) 

 1. [Home](https://www.msaied.com/public)
2. /
3. [Articles](https://www.msaied.com/public/articles)
4. /
5. [Laravel](https://www.msaied.com/public/articles?category=laravel)
6. /
7. PayZephyr: One Payment API for Stripe, Paystack, and PayPal in Laravel

   [Laravel](https://www.msaied.com/public/articles?category=laravel) [Composer Pacakge](https://www.msaied.com/public/articles?category=composer-pacakge) 

 PayZephyr: One Payment API for Stripe, Paystack, and PayPal in Laravel
=======================================================================

 PayZephyr is a Laravel package that wraps eight payment providers—Stripe, Paystack, PayPal, Flutterwave, and more—behind a single fluent Payment facade, with built-in failover, double-charge protection, subscriptions, and refunds.

 ![](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp) [Mohamed Said](https://www.msaied.com/public#person) Published 11 Sep 2026 · Updated 11 Sep 2026 · 3 min read

ShareCopy linkCopied

 ![PayZephyr: One Payment API for Stripe, Paystack, and PayPal in Laravel](https://cdn.msaied.com/657/2cc520b20de249b38bc52120605ff447.png) 

  On this page +1. [PayZephyr: One Payment API for Stripe, Paystack, and PayPal](#payzephyr-one-payment-api-for-stripe-paystack-and-paypal)
2. [Supported Providers](#supported-providers)
3. [Taking a Payment](#taking-a-payment)
4. [Automatic Failover](#automatic-failover)
5. [Subscriptions](#subscriptions)
6. [Refunds](#refunds)
7. [Additional Features](#additional-features)
8. [Installation](#installation)
9. [Key Takeaways](#key-takeaways)

 PayZephyr: One Payment API for Stripe, Paystack, and PayPal
-----------------------------------------------------------

Managing multiple payment gateways in a Laravel application usually means juggling separate SDKs, inconsistent response shapes, and duplicated integration logic. **PayZephyr**, a package by Nwaneri Chukwunyere Kenneth, solves this by placing eight payment providers behind a single, fluent `Payment` facade.

### Supported Providers

Out of the box, PayZephyr ships drivers for:

- Paystack
- Stripe
- PayPal
- Flutterwave
- Square
- Monnify
- OPay
- Mollie

All eight providers share the same API surface, so switching or adding a provider requires minimal code changes.

### Taking a Payment

Initiating a checkout is straightforward. Chain the amount, customer email, a unique reference, and a callback URL onto the `Payment` facade, then call `redirect()`:

```php
use KenDeNigerian\PayZephyr\Facades\Payment;

Route::get('/checkout', function (Order $order) {
    return Payment::amount(500.00)
        ->email($order->user->email)
        ->reference('order_'.$order->id)
        ->callback(route('payment.callback'))
        ->redirect();
});

```

When the customer returns, verify the transaction reference on your callback route:

```php
Route::get('/payment/callback', function (Request $request) {
    $verification = Payment::verify($request->query('reference'));

    if ($verification->isSuccessful()) {
        // Mark the order paid.
    }
})->name('payment.callback');

```

### Automatic Failover

PayZephyr supports a primary and a fallback provider configured via environment variables. If the default provider fails, the package automatically retries with the fallback:

```env
PAYMENTS_DEFAULT_PROVIDER=paystack
PAYMENTS_FALLBACK_PROVIDER=stripe

```

This is particularly useful for applications serving markets where provider availability can vary.

### Subscriptions

For SaaS products, PayZephyr exposes a subscription API. Create a plan with `planData()` and a `SubscriptionPlanDTO`, then subscribe a customer to it:

```php
$plan = Payment::subscription()
    ->planData(new SubscriptionPlanDTO(
        name: 'Pro Monthly',
        amount: 20.00,
        interval: 'monthly',
        currency: 'USD',
    ))
    ->with('stripe')
    ->createPlan();

Payment::subscription()
    ->customer($user->email)
    ->plan($plan->planCode)
    ->idempotency()
    ->with('stripe')
    ->subscribe();

```

Subscription support depends on the underlying provider's capabilities.

### Refunds

Full and partial refunds are supported. Pass an `amount()` for a partial refund, or omit it for a full refund:

```php
$refund = Payment::refund('txn_ref_123')
    ->amount(25.00)
    ->reason('customer requested partial refund')
    ->with('paystack')
    ->refund();

```

Because some providers settle refunds asynchronously, check `$refund->isPending()` and handle the final status via a signed webhook.

### Additional Features

- **Double-charge protection** — prevents a customer from being billed twice for the same transaction
- **Signed webhooks** — signature verification and replay prevention built in
- **Custom drivers** — extend the package with your own provider implementation
- **Queue integration** — documented in the official docs for async payment flows

### Installation

Install via Composer and run the provided Artisan command:

```bash
composer require kendenigerian/payzephyr
php artisan payzephyr:install

```

The [official documentation](https://payzephyr.dev/docs) covers custom drivers, queue integration, and a production checklist. A [playground](https://payzephyr.dev/playground) is also available for testing the API without a local install.

### Key Takeaways

- One `Payment` facade covers eight providers: Paystack, Stripe, PayPal, Flutterwave, Square, Monnify, OPay, and Mollie
- Automatic failover is configured with two environment variables
- Subscriptions, full refunds, and partial refunds are first-class features
- Double-charge protection and signed webhook verification are built in
- A playground lets you explore the API before installing anything

---

*Source: [PayZephyr: One Payment API for Stripe, Paystack, and PayPal — Laravel News](https://laravel-news.com/payzephyr)*

- [Laravel](https://www.msaied.com/public/articles?search=Laravel)
- [Payments](https://www.msaied.com/public/articles?search=Payments)
- [Stripe](https://www.msaied.com/public/articles?search=Stripe)
- [Paystack](https://www.msaied.com/public/articles?search=Paystack)
- [Laravel Package](https://www.msaied.com/public/articles?search=Laravel%20Package)
- [PHP](https://www.msaied.com/public/articles?search=PHP)

 Frequently asked questions 
---------------------------

  Which payment providers does PayZephyr support?PayZephyr ships with eight built-in drivers: Paystack, Stripe, PayPal, Flutterwave, Square, Monnify, OPay, and Mollie. All share the same fluent API surface.

   How does PayZephyr handle payment provider failover?You set PAYMENTS\_DEFAULT\_PROVIDER and PAYMENTS\_FALLBACK\_PROVIDER in your .env file. If the default provider fails, PayZephyr automatically retries the transaction with the configured fallback provider.

   Does PayZephyr support partial refunds?Yes. Call Payment::refund() with an amount() value for a partial refund, or omit it for a full refund. Because some providers process refunds asynchronously, you can check $refund-&gt;isPending() and handle the final status via a signed webhook.

   ![Mohamed Said](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp)About the author
----------------

[Mohamed Said](https://www.msaied.com/public#person)Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

[About](https://www.msaied.com/public#about) [GitHub ↗](https://github.com/EG-Mohamed) [LinkedIn ↗](https://www.linkedin.com/in/msaiedm/) [WhatsApp ↗](https://wa.me/201094619204) [Email Address ↗](mailto:hello@msaied.com) [My CV ↗](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)  

   [Previous articleReferenceable: Generate Clean and Customizable Reference Numbers in Laravel](https://www.msaied.com/public/articles/referenceable-generate-clean-and-customizable-reference-numbers-in-laravel) [Next articleTesting Filament Resources, Actions, and Form Assertions with Pest](https://www.msaied.com/public/articles/testing-filament-resources-actions-and-form-assertions-with-pest-4)  

   On this page
-------------

1. [PayZephyr: One Payment API for Stripe, Paystack, and PayPal](#payzephyr-one-payment-api-for-stripe-paystack-and-paypal)
2. [Supported Providers](#supported-providers)
3. [Taking a Payment](#taking-a-payment)
4. [Automatic Failover](#automatic-failover)
5. [Subscriptions](#subscriptions)
6. [Refunds](#refunds)
7. [Additional Features](#additional-features)
8. [Installation](#installation)
9. [Key Takeaways](#key-takeaways)

 ###  Have a technical challenge?

 Tell me what you’re building. I reply within two working days.

[Start a conversation](https://www.msaied.com/public#contact) 

   Related articles
-----------------

 [ ![](https://cdn.msaied.com/740/cce86edc21eddcbdd2f2454fadaf9c70.png)  · 3 min read### The Pipeline Pattern in Laravel: Custom Pipelines Beyond Middleware

5 Oct 2026 ](https://www.msaied.com/public/articles/the-pipeline-pattern-in-laravel-custom-pipelines-beyond-middleware-1) [ ![](https://cdn.msaied.com/739/2d6897fdcdcf090613f96f72a64b8a78.png)  · 4 min read### MySQL Full-Text Search in Laravel: Indexes, Relevance Scoring, and Boolean Mode

4 Oct 2026 ](https://www.msaied.com/public/articles/mysql-full-text-search-in-laravel-indexes-relevance-scoring-and-boolean-mode) [ ![](https://cdn.msaied.com/738/073696a3fefe18bec825beec5ac658f5.png)  · 4 min read### Laravel Queue Rate-Limited Middleware: Throttling Jobs Without Losing Work

4 Oct 2026 ](https://www.msaied.com/public/articles/laravel-queue-rate-limited-middleware-throttling-jobs-without-losing-work) 

  Have a technical challenge?
----------------------------

Tell me what you’re building. I reply within two working days.

 [Discuss your project ↗](https://www.msaied.com/public#contact) 

  © 2026 Mohamed Said · Built with Laravel, meant to last.Senior Backend Engineer specializing in Laravel, scalable SaaS platforms, APIs, and cloud infrastructure. I build secure, high-performance web applications that help businesses grow.

 - [Home](https://www.msaied.com/public)
- [Articles](https://www.msaied.com/public/articles)
- [Certificates](https://www.msaied.com/public/certificates)
- [GitHub](https://github.com/EG-Mohamed)
- [LinkedIn](https://www.linkedin.com/in/msaiedm/)
- [WhatsApp](https://wa.me/201094619204)
- [Email Address](mailto:hello@msaied.com)
- [My CV](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
- [Sitemap](https://www.msaied.com/public/sitemap.xml)
