PHPackages                             mprince/pagarme-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. mprince/pagarme-laravel

ActiveLibrary[Payment Processing](/categories/payments)

mprince/pagarme-laravel
=======================

Pagar.me SDK for Laravel applications.

v0.3.0(8y ago)03MITPHPPHP ~5.5||~7.0

Since May 17Pushed 4y agoCompare

[ Source](https://github.com/mprince2k18/pagarme-laravel)[ Packagist](https://packagist.org/packages/mprince/pagarme-laravel)[ RSS](/packages/mprince-pagarme-laravel/feed)WikiDiscussions master Synced 1mo ago

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

Pagar.me PHP SDK for Laravel
============================

[](#pagarme-php-sdk-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/76a060a0946b07b7b338565c123026ac4de03c60e861126837ae55ebc0a68628/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f666c79696e676c75736361732f70616761726d652d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/flyingluscas/pagarme-laravel)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/98dc1b013af3c1db30fc7d8ee9067f88ec7b2cf6c62f19a374e4215aef485cd8/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f666c79696e676c75736361732f70616761726d652d6c61726176656c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/flyingluscas/pagarme-laravel)[![StyleCI](https://camo.githubusercontent.com/4a297ff073f8eecf907070bc4bba9312ebe5f9638cf5e24bd8e7eb599153e4ce/68747470733a2f2f7374796c6563692e696f2f7265706f732f39313239343531342f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/91294514)[![Coverage Status](https://camo.githubusercontent.com/ac72f79453009ca22c764cad6efffc5440ab7cdaa5a85d94b4bcd013237a5f99/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f636f7665726167652f6769746875622f666c79696e676c75736361732f70616761726d652d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://codeclimate.com/github/flyingluscas/pagarme-laravel/coverage)[![Quality Score](https://camo.githubusercontent.com/a3e63b33f782553ea4dfbe16c0789a95cb243d491518df70e6f9dde4bf87214c/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6769746875622f666c79696e676c75736361732f70616761726d652d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://codeclimate.com/github/flyingluscas/pagarme-laravel/code)[![Total Downloads](https://camo.githubusercontent.com/475894e78bd40c649deaab7d84a9b69421a5b7695cb04a523b0a9e230abe47de/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f666c79696e676c75736361732f70616761726d652d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/flyingluscas/pagarme-laravel)

Pagar.me SDK for Laravel applications.

Install
-------

[](#install)

Via Composer

```
$ composer require flyingluscas/pagarme-laravel
```

Usage
-----

[](#usage)

#### Set up

[](#set-up)

Set up the **service provider** and the **facade** in your **config/app.php** file.

> You can skip this step on Laravel 5.5 due to the [self-discovery package feature](https://laravel.com/docs/5.5/packages#package-discovery).

```
'providers' => [
    FlyingLuscas\PagarMeLaravel\PagarMeServiceProvider::class,
],

'aliases' => [
    'PagarMe' => FlyingLuscas\PagarMeLaravel\PagarMeFacade::class,
],
```

#### Configurations

[](#configurations)

Publish the config/pagarme.php file and set your authentication keys, you can get them [here](https://dashboard.pagar.me/#/myaccount/apikeys).

```
$ php artisan vendor:publish --provider="FlyingLuscas\PagarMeLaravel\PagarMeServiceProvider"
```

#### Checkout Directive

[](#checkout-directive)

Use the blade directive `@checkout` to easily set up the checkout form.

```

    @checkout([
        'button-text' => 'Pay',
        'amount' => '1000',
        'customer-data' => 'true',
        'payment-methods' => 'boleto,credit_card',
        'ui-color' => '#bababa',
        'postback-url' => 'requestb.in/1234',
        'create-token' => 'true',
        'interest-rate' => '12',
        'free-installments' => '3',
        'default-installment' => '5',
        'header-text' => 'Title',
    ])

```

More examples on how to use the checkout form please visit the [official documentation](https://docs.pagar.me/v2017-07-17/docs/inserindo-o-formulario).

#### Facade

[](#facade)

You can easily interact with the SDK using the facade class, see a quick example.

```
PagarMe::transaction()
    ->boletoTransaction(
        1000,
        $customer,
        'http://requestb.in/pkt7pgpk',
        ['id_product' => 13933139]
    );
```

More examples on how to use the SDK please visit the official [documentation available here](https://github.com/pagarme/pagarme-php/wiki).

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Lucas Pires](https://github.com/flyingluscas)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% 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 ~49 days

Total

4

Last Release

3134d ago

Major Versions

v0.3.0 → v1.0.0.x-dev2017-10-13

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43857625?v=4)[Mohammad Prince](/maintainers/mprince2k18)[@mprince2k18](https://github.com/mprince2k18)

---

Top Contributors

[![flyingluscas](https://avatars.githubusercontent.com/u/6232791?v=4)](https://github.com/flyingluscas "flyingluscas (66 commits)")[![mprince2k18](https://avatars.githubusercontent.com/u/43857625?v=4)](https://github.com/mprince2k18 "mprince2k18 (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mprince-pagarme-laravel/health.svg)

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

###  Alternatives

[laraveldaily/laravel-invoices

Missing invoices for Laravel

1.5k1.3M4](/packages/laraveldaily-laravel-invoices)[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)[karson/mpesa-php-sdk

172.2k](/packages/karson-mpesa-php-sdk)

PHPackages © 2026

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