PayZephyr: One Laravel API for Stripe, Paystack &amp; PayPal | Mohamed Said        [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://msaied.com) [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles  ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

       [  ](https://github.com/EG-Mohamed)       

 [ Home ](https://msaied.com) [ Projects ](https://msaied.com/projects) [ Articles ](https://msaied.com/articles) [ Certificates ](https://msaied.com/certificates) [ Contact ](https://msaied.com#contact-section) 

  [ home ](https://msaied.com)    [ articles ](https://msaied.com/articles)    PayZephyr: One Payment API for Stripe, Paystack, and PayPal in Laravel        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 in Laravel](https://cdn.msaied.com/657/2cc520b20de249b38bc52120605ff447.png)

 [  Laravel ](https://msaied.com/articles?category=laravel) [  Composer Pacakge ](https://msaied.com/articles?category=composer-pacakge)  #Laravel   #Payments   #Stripe   #Paystack   #Laravel Package   #PHP  

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

     11 Sep 2026      3 min read    ![Mohamed Said](https://cdn.msaied.com/01M22N44A70A5MC2S599JP0MPH.webp)  Mohamed Said  

       Table of contents

  9 sections  

1. [  01   PayZephyr: One Payment API for Stripe, Paystack, and PayPal  ](#payzephyr-one-payment-api-for-stripe-paystack-and-paypal)
2. [  02   Supported Providers  ](#supported-providers)
3. [  03   Taking a Payment  ](#taking-a-payment)
4. [  04   Automatic Failover  ](#automatic-failover)
5. [  05   Subscriptions  ](#subscriptions)
6. [  06   Refunds  ](#refunds)
7. [  07   Additional Features  ](#additional-features)
8. [  08   Installation  ](#installation)
9. [  09   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)*

 Found this useful?

          [  ](https://twitter.com/intent/tweet?url=https%3A%2F%2Fmsaied.com%2Farticles%2Fpayzephyr-one-payment-api-for-stripe-paystack-and-paypal-in-laravel&text=PayZephyr%3A+One+Payment+API+for+Stripe%2C+Paystack%2C+and+PayPal+in+Laravel) [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fmsaied.com%2Farticles%2Fpayzephyr-one-payment-api-for-stripe-paystack-and-paypal-in-laravel) 

 Frequently Asked Questions 
----------------------------

  3 questions  

     Q01  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. 

      Q02  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. 

      Q03  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. 

  Continue reading

 More Articles 
---------------

 [ View all    ](https://msaied.com/articles) 

 [ ![Testing Filament Resources, Actions, and Form Assertions with Pest](https://cdn.msaied.com/655/efd33245cffa553c1dffba29721e0139.png) filament pest testing 

### Testing Filament Resources, Actions, and Form Assertions with Pest

A practical guide to writing reliable Pest tests for Filament v3 resources — covering table actions, form subm...

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

 11 Sep 2026     4 min read  

  Read    

 ](https://msaied.com/articles/testing-filament-resources-actions-and-form-assertions-with-pest-4) [ ![Referenceable: Generate Clean and Customizable Reference Numbers in Laravel](https://cdn.msaied.com/656/01M27ZF9VSQC7BQC96HV2KABSD.png) 

### Referenceable: Generate Clean and Customizable Reference Numbers in Laravel

Referenceable is an open-source Laravel package for generating clean, customizable reference numbers for Eloqu...

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

 11 Sep 2026     8 min read  

  Read    

 ](https://msaied.com/articles/referenceable-generate-clean-and-customizable-reference-numbers-in-laravel) [ ![Bifrost Turns One: AI Builds, MCP Server, and Automated Workflows for NativePHP](https://cdn.msaied.com/653/e105bc3450f63955d42ed8feeb5a60f7.png) NativePHP Bifrost MCP 

### Bifrost Turns One: AI Builds, MCP Server, and Automated Workflows for NativePHP

Bifrost, the NativePHP build and distribution service, celebrates its first anniversary and 10,000 builds with...

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

 10 Sep 2026     4 min read  

  Read    

 ](https://msaied.com/articles/bifrost-turns-one-ai-builds-mcp-server-and-automated-workflows-for-nativephp) 

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

Explore

- [Home](https://msaied.com)
- [Projects](https://msaied.com/projects)
- [Articles](https://msaied.com/articles)
- [Certificates](https://msaied.com/certificates)
- [Contact](https://msaied.com#contact-section)

Connect

- [   hello@msaied.com ](mailto:hello@msaied.com)
- [   +20 109 461 9204 ](tel:+201094619204)

© 2026 Mohamed Said. All rights reserved.

 [  ](https://github.com/EG-Mohamed) [  ](https://www.linkedin.com/in/msaiedm/) [  ](https://wa.me/201094619204) [  ](mailto:hello@msaied.com) [  ](https://drive.google.com/file/u/0/d/1MF20IPRJyzfy32mhEutjL5EpSls0w2Q8/view)
