Flow plugin screenshot
Dark mode ready
Multilingual support
Supports v5.x

Flow

Community

Integrate Flow (Chile) payments into Filament with a credentials UI, HMAC signing helpers, and checkout redirects.

Tags: Developer Tool Spatie Integration
Supported versions:
5.x 4.x
Third-party plugin. This is built by the community, not the Filament team. Filament does not review, endorse, or vet the security of plugins outside the filament/ namespace. Review the source and install at your own risk. Found malware or an unresolved security issue the author won't address? Report it .
John Michael Rivera Gonzalez avatar Author: John Michael Rivera Gonzalez

Documentation

Flow Filament plugin

FILAMENT 4.x FILAMENT 5.x

Latest Version on Packagist License GitHub Stars GitHub Issues Latest release PHPUnit tests

PHP 8.2+ Laravel 11+ Livewire 3/4 Filament 4/5 Flow API MIT

A Filament plugin that integrates Flow payments (Chile) into your Laravel application: credentials UI, HMAC-SHA256 signing, checkout redirects (url?token=), and create / status / refund helpers on the Flow REST API.

Open source (MIT). Free on Packagist.

#Requirements

Stack Versions
PHP 8.2+
Laravel 11.28+ / 12+ / 13+
Filament 4.x or 5.x
Livewire 3.x (with Filament 4) / 4.x (with Filament 5)

#Installation

composer require johnrivera7/filament-flow

Optional publishes:

php artisan vendor:publish --tag=filament-flow-config

Register the plugin in your PanelProvider:

use JohnRivera7\FilamentFlow\FilamentFlowPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugin(
            FilamentFlowPlugin::make()
                ->navigationGroup('Pagos')
                ->navigationSort(41)
        );
}

#Multi-tenant (recommended)

use JohnRivera7\FilamentFlow\Support\FlowCredentials;

->plugin(
    FilamentFlowPlugin::make()
        ->credentialsUsing(function (): FlowCredentials {
            $cfg = /* read from your DB */;

            return FlowCredentials::fromArray($cfg);
        })
        ->persistCredentialsUsing(function (FlowCredentials $credentials): void {
            /* persist $credentials->toArray() or $credentials->toLegacyConfig() */
        })
)

#Single-tenant (.env)

FLOW_ENABLED=true
FLOW_API_KEY=...
FLOW_SECRET_KEY=...
FLOW_ENVIRONMENT=sandbox
# Optional override:
# FLOW_API_URL=https://sandbox.flow.cl/api

Without persistCredentialsUsing(), the settings page does not write credentials to disk—wire persistence via the callbacks above (or manage .env yourself).

#Gateway usage

use JohnRivera7\FilamentFlow\FilamentFlowPlugin;

$gateway = FilamentFlowPlugin::get()->gateway();

$payment = $gateway->create(
    commerceOrder: 'ORD-123',
    subject: 'Reserva hotel',
    amount: 15990,
    email: 'guest@example.com',
    urlConfirmation: route('payments.flow.confirm'),
    urlReturn: route('payments.flow.return'),
);

// Redirect the payer (GET url?token=...)
return redirect()->away($payment['redirect_url']);

// Or use the branded interstitial view:
return response()->view('filament-flow::payment-redirect', [
    'url' => $payment['redirect_url'],
]);

On urlConfirmation / urlReturn (Flow POSTs token):

use JohnRivera7\FilamentFlow\Support\FlowPaymentReconciliation;

$result = $gateway->confirm($request->except(['amount', 'total', 'monto']));
// $result['paid'] === true when status === 2
// $result['amount'] comes from Flow — never from the browser

$check = FlowPaymentReconciliation::compare($expectedAmountFromYourDb, $result['amount']);

if ($check['settlement'] === FlowPaymentReconciliation::SETTLEMENT_PARTIAL) {
    // Register as deposit/abono — do NOT mark the order fully paid
}

if ($check['settlement'] === FlowPaymentReconciliation::SETTLEMENT_NONE) {
    // Fail closed (missing/zero amount from Flow)
}

Refund:

$refund = $gateway->refund(
    refundCommerceOrder: 'REF-123',
    receiverEmail: 'guest@example.com',
    amount: 15990,
    urlCallback: route('payments.flow.refund'),
    commerceTrxId: 'ORD-123', // or flowTrxId
);

#Reusable form schema

use JohnRivera7\FilamentFlow\Forms\Components\FlowCredentialsSchema;

$schema->components([
    ...FlowCredentialsSchema::make('payments.flow'),
]);

#Integration notes

  • Every request must be signed: sort params alphabetically, concatenate key.value, then hash_hmac('sha256', …, secretKey) → parameter s. See Flow API.
  • Checkout redirect: concatenate url + "?token=" + token.
  • Sandbox base URL: https://sandbox.flow.cl/api · Production: https://www.flow.cl/api
  • Payment status 2 = paid.
  • After async confirmation, call payment/getStatus with the received token.
  • Amount security: compute and store the charge on the server when creating the payment. On callback, reconcile with FlowPaymentReconciliation. Underpayment must remain a deposit (abono), not a full settlement.

#Testing

composer install
composer test

#Security

See SECURITY.md.

#Changelog

See CHANGELOG.md.

#License

MIT

The author

John Michael Rivera Gonzalez avatar Author: John Michael Rivera Gonzalez

I am a full-stack developer focused on building reliable web platforms for education, enterprise, and business operations. I work mainly with Laravel and Filament, creating admin panels, reusable packages, and integrations that solve real production needs.

I also have a background in cybersecurity as an ethical hacker, which shapes how I design and review software: secure authentication flows, proper access control, hardening production environments, and thinking about real-world attack surfaces before they become problems.

I contribute to the Filament ecosystem by developing open-source panel plugins, with a strong focus on authentication, enterprise SSO, and tools that help teams manage complex workflows from a clean admin interface. I follow official Filament standards and aim to publish practical, well-documented packages that developers can adopt with confidence.

Beyond Filament, I develop Moodle plugins and customizations for e-learning platforms, including integrations, Microsoft Teams modules, learning activities, custom course formats, and automated cloud backup solutions. I also build Laravel applications for insurance, commercial, corporate, and agricultural management systems.

My infrastructure work includes high-availability setups with PostgreSQL clusters, GlusterFS, Nginx, and Consul, as well as Odoo ERP and POS implementations. I enjoy working across the full stack—from backend architecture and DevOps automation to polished admin interfaces and end-user workflows.

I publish open-source packages on Packagist and GitHub, and I plan to keep expanding my contributions to Filament with new panel plugins over time.

Plugins
4
Stars
7

From the same author