Flow by John Michael Rivera Gonzalez
CommunityIntegrate Flow (Chile) payments into Filament with a credentials UI, HMAC signing helpers, and checkout redirects.
Author:
John Michael Rivera Gonzalez
Package health
Automated checks of this plugin's Composer package
15 checks
- Skipped: GitHub Actions pinned to SHA
- Skipped: GitLab CI includes pinned to SHA
- Passed: Open security advisories
- Passed: Dependabot PR responsiveness — No open Dependabot PRs.
- Skipped: Renovate MR responsiveness
- Skipped: Dependabot or Renovate configured
- Skipped: Dependency update cooldown configured
- Passed: Provides a security policy
- Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
- Passed: Commit and release recency — Active: last commit 0 days ago; last release 0 days ago.
-
Passed:
composer.lock not committed by library
—
composer.lockis absent from the released dist archive. - Passed: Dist archive is lean
-
Passed:
Current Laravel version supported
—
Package dependencies resolve together with current Laravel
13.0. -
Passed:
Current PHP version supported
—
Constraint
^8.2supports current PHP8.5. - Skipped: Current Symfony version supported
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
.
Documentation
- Requirements
- Installation
- Gateway usage
- Reusable form schema
- Integration notes
- Testing
- Security
- Changelog
- License
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:^1.0
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: '[email protected]',
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: '[email protected]',
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, thenhash_hmac('sha256', …, secretKey)→ parameters. 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/getStatuswith the receivedtoken. - 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
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.
From the same author
Mía Theme
A warm theme for Filament v5 that looks after the parts other themes leave bare — empty states that say why a list is empty, error and maintenance pages that still feel like your panel, five sign-in layouts and an in-panel appearance page — over cream surfaces and serif headings, shipped pre-compiled with no build step.
Author:
John Michael Rivera Gonzalez
Antivirus
Antivirus for Filament: ClamAV upload scanning, quarantine, incident log and file security dashboard for Laravel.
Author:
John Michael Rivera Gonzalez
Cybersecurity
A read-only security posture dashboard that audits your Laravel environment, routes, Redis, queues, PHP runtime, and risky Composer packages, then scores findings with remediation guidance. Versions: 5.x
Author:
John Michael Rivera Gonzalez
SAML2 Okta
Adds SAML2 single sign-on to your Filament panel with a full admin UI for IdP configuration, certificate management, user provisioning, SAML field mapping, and a customizable login button for Okta, Azure AD, Google Workspace, Auth0, and other standard identity providers.
Author:
John Michael Rivera Gonzalez
Featured Plugins
A selection of plugins curated by the Filament team
Soft Theme
A theme that gives panels a warm, approachable look with rounded shapes, gentle colors, and serif headings.
Filament
Custom Fields
Eliminate custom field migrations forever. Let your users create and manage form fields directly in Filament admin panels with 20+ built-in field types, validation, and zero database changes.
Relaticle
Sharp Theme
A theme that gives panels a precise, technical look with square corners, strong borders, and clear contrast.
Filament