PHPackages                             kaninstein/multi-acquirer-checkout - 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. kaninstein/multi-acquirer-checkout

ActiveLibrary[Payment Processing](/categories/payments)

kaninstein/multi-acquirer-checkout
==================================

Multi-acquirer checkout package with DDD architecture for Laravel

1.1.4(4mo ago)032MITPHPPHP ^8.2CI failing

Since Dec 15Pushed 4mo agoCompare

[ Source](https://github.com/kaninstein/multi-acquirer-checkout)[ Packagist](https://packagist.org/packages/kaninstein/multi-acquirer-checkout)[ RSS](/packages/kaninstein-multi-acquirer-checkout/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (11)Versions (22)Used By (0)

kaninstein/multi-acquirer-checkout
==================================

[](#kaninsteinmulti-acquirer-checkout)

[![CI](https://github.com/kaninstein/multi-acquirer-checkout/actions/workflows/ci.yml/badge.svg)](https://github.com/kaninstein/multi-acquirer-checkout/actions/workflows/ci.yml)[![Latest Version on Packagist](https://camo.githubusercontent.com/7e96e3f89c1dca6936ba43bdca8938e06a770ff57a851877ad781fc7e76bcce6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b616e696e737465696e2f6d756c74692d61637175697265722d636865636b6f75742e737667)](https://packagist.org/packages/kaninstein/multi-acquirer-checkout)[![Total Downloads](https://camo.githubusercontent.com/1e73c20c7b7b851ab706fab4a4034b67068c1951b9acf01a516426588f5feafb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b616e696e737465696e2f6d756c74692d61637175697265722d636865636b6f75742e737667)](https://packagist.org/packages/kaninstein/multi-acquirer-checkout)[![PHP Version](https://camo.githubusercontent.com/9e24b68db64ebc4c1731f5732e20c7b4681e155aba6d66d0b0a413e9c3c4c917/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6b616e696e737465696e2f6d756c74692d61637175697265722d636865636b6f75742e737667)](https://packagist.org/packages/kaninstein/multi-acquirer-checkout)[![License](https://camo.githubusercontent.com/c582f5509d73745dd02aebc2bcc294130ac8aec36d9c1c9f7eb47984f5e5491c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6b616e696e737465696e2f6d756c74692d61637175697265722d636865636b6f75742e737667)](https://packagist.org/packages/kaninstein/multi-acquirer-checkout)

Headless Laravel package for **multi-acquirer payments** with a **fallback gateway pipeline** and **fee calculation**.

- Multiple gateways with priority + optional preferred gateway
- Card / PIX / boleto (per-gateway support)
- Deterministic fee breakdown (platform fee + gateway fee + financing cost)
- Optional published HTTP routes (API-first)
- Optional package migrations (or pure-config/in-memory mode)

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

[](#requirements)

- PHP `^8.2`
- Laravel `^10|^11|^12`

Installation (Packagist)
------------------------

[](#installation-packagist)

```
composer require kaninstein/multi-acquirer-checkout:^1.0
```

Configuration
-------------

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag=multi-acquirer-config
```

Enable routes (optional):

```
MULTI_ACQUIRER_ROUTES_ENABLED=true
MULTI_ACQUIRER_ROUTES_PREFIX=api/multi-acquirer
```

Enable package migrations (optional):

```
MULTI_ACQUIRER_DATABASE_USE_PACKAGE_MIGRATIONS=true
```

Then publish and run:

```
php artisan vendor:publish --tag=multi-acquirer-migrations
php artisan migrate
```

API routes (optional)
---------------------

[](#api-routes-optional)

When `MULTI_ACQUIRER_ROUTES_ENABLED=true`, these routes are available under `MULTI_ACQUIRER_ROUTES_PREFIX` (default: `api/multi-acquirer`):

- `POST /api/multi-acquirer/checkout`
- `POST /api/multi-acquirer/fees`
- `GET /api/multi-acquirer/boleto/barcode`

### `POST /checkout`

[](#post-checkout)

Creates a payment attempt using the gateway pipeline and returns:

- payment snapshot (status + metadata)
- fee breakdown
- gateway response payload (normalized)

Request body:

```
{
  "amount_cents": 10000,
  "currency": "BRL",
  "payment_method": "pix",
  "installments": 1,
  "customer": { "name": "John Doe", "email": "john@example.com", "document": "123.456.789-00" },
  "gateway": "pagarme",
  "platform_fee_rate": 0.06,
  "merchant_absorbs_financing": false,
  "fee_responsibility": "buyer",
  "metadata": { "order_id": 123, "description": "Product X", "item_code": "product_123" }
}
```

Notes:

- `platform_fee_rate` is optional. If omitted, the package uses `multi-acquirer.fees.platform.default_rate`.
- `merchant_absorbs_financing` controls who pays installment financing.
- `fee_responsibility` controls gross-up behavior (`buyer` vs `merchant`).

### `POST /fees`

[](#post-fees)

Computes the fee breakdown without creating a gateway payment (useful for checkout previews).

Request body:

```
{
  "amount_cents": 10000,
  "payment_method": "card",
  "installments": 3,
  "gateway": "pagarme",
  "platform_fee_rate": 0.06,
  "merchant_absorbs_financing": false,
  "fee_responsibility": "buyer"
}
```

Response contains `fees` with fields like:

- `platform_fee_amount_cents`
- `gateway_fee_cents`
- `financing_cost_cents`
- `amount_paid_by_customer_cents`
- `merchant_net_amount_cents`

Using the package services (no routes)
--------------------------------------

[](#using-the-package-services-no-routes)

If you prefer, call the services directly:

- `Kaninstein\MultiAcquirerCheckout\Application\Services\CheckoutService`
- `Kaninstein\MultiAcquirerCheckout\Domain\Fee\Services\FeeCalculator`

The main input DTO is:

- `Kaninstein\MultiAcquirerCheckout\Application\DTOs\PaymentRequest`

Multi-tenant / SaaS setup
-------------------------

[](#multi-tenant--saas-setup)

This package reads gateway and fee settings from `config('multi-acquirer')`. In a SaaS, you typically store a JSON blob per tenant/producer in your own database and hydrate Laravel config at runtime (middleware/service provider) before calling the package.

Recommended approach:

- Store tenant payload under one key (e.g. `multi_acquirer`) in your app settings table.
- On each request, set `config(['multi-acquirer' => $payload])` (or merge the relevant portions).
- Keep the payment domain inside this package; keep only project-specific mapping in your app.

Development
-----------

[](#development)

```
composer test
composer phpstan
composer format
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance75

Regular maintenance activity

Popularity7

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity56

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

Total

21

Last Release

135d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fcac76a940d26d775a054b9e6dce4fc8525894c22cb888879f3c59d78ee3f60b?d=identicon)[kaninstein](/maintainers/kaninstein)

---

Tags

appmaxcheckoutcomposer-packageddd-architecturefee-calculationlaravellaravel-packagemercadopagomulti-acquirer-payment-processingpagarmepayment-gatewaypayment-gateway-integrationphpstripelaravelstripepaymentdddmercadopagocheckoutpagar.meappmaxmulti-acquirer

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kaninstein-multi-acquirer-checkout/health.svg)

```
[![Health](https://phpackages.com/badges/kaninstein-multi-acquirer-checkout/health.svg)](https://phpackages.com/packages/kaninstein-multi-acquirer-checkout)
```

###  Alternatives

[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[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)
