PHPackages                             khidirdotid/xendit-laravel - 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. khidirdotid/xendit-laravel

ActiveLibrary[Payment Processing](/categories/payments)

khidirdotid/xendit-laravel
==========================

A Xendit Wrapper for Laravel

v1.0.1(1y ago)023MITPHPPHP ^8.1

Since Sep 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/KhidirDotID/xendit-laravel)[ Packagist](https://packagist.org/packages/khidirdotid/xendit-laravel)[ Fund](https://saweria.co/khidirdotid)[ RSS](/packages/khidirdotid-xendit-laravel/feed)WikiDiscussions main Synced 1mo ago

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

xendit-laravel
==============

[](#xendit-laravel)

A Xendit Wrapper for Laravel

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

[](#installation)

1. Install the package

    ```
    composer require khidirdotid/xendit-laravel
    ```
2. Publish the config file

    ```
    php artisan vendor:publish --provider="KhidirDotID\Xendit\Providers\XenditServiceProvider"
    ```
3. Add the Facade to your `config/app.php` into `aliases` section

    ```
    'Xendit' => KhidirDotID\Xendit\Facades\Xendit::class,
    ```
4. Add ENV data

    ```
    XENDIT_API_KEY=
    ```

    or you can set it through the controller

    ```
    \Xendit::setXenditKey('XENDIT_API_KEY');
    ```

Usage
-----

[](#usage)

### Invoice

[](#invoice)

1. Get Redirection URL of a Payment Page ```
    $data = [
        'external_id' => 'invoice-' . time(),
        'amount' => 10000
    ];

    try {
        // Get Payment Page URL
        $paymentUrl = \Xendit::createInvoice($data);

        // Redirect to Payment Page
        return redirect()->away($paymentUrl['invoice_url']);
    } catch (\Throwable $th) {
        throw $th;
    }
    ```

### Handle HTTP Notification

[](#handle-http-notification)

1. Create route to handle notifications ```
    Route::match(['GET', 'POST'], 'xendit.ipn', [PaymentController::class, 'xenditIpn'])->name('xendit.ipn');
    ```
2. Create method in controller ```
    public function xenditIpn(Request $request)
    {
        try {
            $response = \Xendit::getInvoiceById($request->invoice_id);

            if (in_array(strtolower($response['status']), ['paid', 'settled'])) {
                // TODO: Set payment status in merchant's database to 'success'
            }
        } catch (\Throwable $th) {
            throw $th;
        }
    }
    ```
3. Except verify CSRF token in `app/Http/Middleware/VerifyCsrfToken.php````
    protected $except = [
        'xendit/ipn'
    ];
    ```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance46

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

Total

2

Last Release

420d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/332031ed442543b22293ac4464e66048b723bcc6856ae58940d295bbf57476d4?d=identicon)[KhidirDotID](/maintainers/KhidirDotID)

---

Top Contributors

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

---

Tags

laravelxendit

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/khidirdotid-xendit-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/khidirdotid-xendit-laravel/health.svg)](https://phpackages.com/packages/khidirdotid-xendit-laravel)
```

###  Alternatives

[laraveldaily/laravel-invoices

Missing invoices for Laravel

1.5k1.3M4](/packages/laraveldaily-laravel-invoices)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[glennraya/xendivel

A Laravel package to easily integrate Xendit payment gateway. It supports credit and debit cards, and e-wallet payments and custom invoices, queued notifications, webhook listeners and more.

412.3k](/packages/glennraya-xendivel)[henryejemuta/laravel-monnify

A laravel package to seamlessly integrate monnify api within your laravel application

132.1k](/packages/henryejemuta-laravel-monnify)[asciisd/knet

Knet package is provides an expressive, fluent interface to KNet's payment services.

141.1k](/packages/asciisd-knet)

PHPackages © 2026

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