Installation
Install the package, run one command to publish config and create the tables, add the credentials for the gateway you use, then verify with two Artisan commands. New to Parakit? Start with the Introduction.
composer require froshly/parakit
php artisan parakit:installRequirements
- PHP
^8.2 - Laravel 11, 12, or 13
What parakit:install does
The command runs three steps:
- Publishes
config/parakit.php(tagparakit-config). It will not overwrite an existing file unless you pass--force, so re-running install is safe. - Publishes the migrations (tag
parakit-migrations). - Runs
migrate, creating three tables:payment_transactions— one row per charge, with its current status.payment_webhook_events— received webhooks, with the unique(gateway, event_id)index that makes delivery idempotent.payment_logs— redacted request/response records.
Receipt Blade templates are not published by install. Publish them only if you want to customise the designs:
php artisan vendor:publish --tag=parakit-viewsTranslations (en / ar / ckb) are loaded from the package. Publish them only to override the bundled strings:
php artisan vendor:publish --tag=parakit-langNot yet on Packagist
Until Packagist registration completes, add the VCS repository to your app's composer.json before running composer require:
"repositories": [
{ "type": "vcs", "url": "https://github.com/ShahramMebashar/parakit" }
]Credentials
Pick the default gateway and set it in .env:
PARAKIT_DEFAULT=fibPARAKIT_DEFAULT is the gateway used when you call Payment::charge() without ->driver(). It must match a key under parakit.gateways — the bundled config defines all six (fib, zaincash, nass, nasswallet, fastpay, qicard).
Each gateway needs its own env vars. Rather than list them all here, see the gateway page for the one you are integrating — it has the full credential table and where to obtain the keys:
You only need credentials for the gateways you actually use. For how the gateways block is structured, see Configuration.
Verify the install
Two commands confirm everything is wired:
php artisan parakit:doctor --gateway=fib
php artisan parakit:transactions:test-charge fib --amount=1000parakit:doctor checks that the required config keys are present and, for FIB, fetches a fresh OAuth token to confirm connectivity. It exits non-zero on failure, so it is safe in CI. Drop --gateway to check every configured gateway at once.
parakit:transactions:test-charge performs a real sandbox roundtrip against the given gateway and prints the gateway transaction id plus any redirect URL, readable code, or deep link. Override the amount and currency with --amount and --currency (defaults 1000 and IQD).
WARNING
test-charge calls the gateway's sandbox for real. Point your *_BASE_URL values at staging/UAT hosts, not production, while testing.
Next: Configuration.