aiarmada / chip
Modern Laravel integration for CHIP payment gateway - Collect & Send APIs
v1.0.0
2026-03-21 04:17 UTC
Requires
- php: ^8.4
- composer-runtime-api: ^2.1
- ext-intl: *
Requires (Dev)
- akaunting/laravel-money: ^6.0
- anourvalar/eloquent-serialize: ^1.2
- chillerlan/php-qrcode: ^5.0
- filament/blueprint: ^2.0
- filament/filament: ^5.0
- filament/spatie-laravel-media-library-plugin: ^5.0
- filament/support: *
- guzzlehttp/guzzle: ^7.0
- larastan/larastan: ^3.0
- laravel/boost: ^2.0
- laravel/cashier: ^16.0
- laravel/framework: ^12.0|^13.0
- laravel/pint: ^1.0
- laravel/prompts: ^0.3.5
- league/csv: ^9.27
- league/flysystem-aws-s3-v3: ^3.0
- lorisleiva/laravel-actions: ^2.9
- nunomaduro/essentials: ^1.0
- nunomaduro/termwind: ^2.0
- openspout/openspout: ^4.23
- orchestra/testbench: ^10.0|^11.0
- owen-it/laravel-auditing: ^14.0
- pestphp/pest: ^4.0
- pestphp/pest-plugin-laravel: ^4.0
- phiki/phiki: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan: ^2.1
- pragmarx/google2fa: ^8.0
- pragmarx/google2fa-qrcode: ^3.0
- rector/rector: ^2.0
- spatie/browsershot: ^5.0
- spatie/laravel-activitylog: ^4.10
- spatie/laravel-data: ^4.18
- spatie/laravel-health: ^1.34
- spatie/laravel-medialibrary: ^11.0
- spatie/laravel-model-states: ^2.8
- spatie/laravel-package-tools: ^1.92
- spatie/laravel-pdf: ^2.4
- spatie/laravel-permission: ^7.2
- spatie/laravel-ray: ^1.29
- spatie/laravel-settings: ^3.6
- spatie/laravel-sluggable: ^3.7
- spatie/laravel-tags: ^4.2
- spatie/laravel-webhook-client: ^3.4
- staudenmeir/belongs-to-through: ^2.5
- staudenmeir/eloquent-has-many-deep: ^1.7
- symplify/monorepo-builder: ^12.5
README
Laravel 12 integration for CHIP payment platform – CHIP Collect (payments) and CHIP Send (disbursements).
Features
- Fully independent – works standalone without requiring other commerce packages
- Seamless integration – auto-integrates with Cart when installed together
- Universal Gateway – implements
PaymentGatewayInterfacefor provider switching - Complete API coverage – purchases, refunds, subscriptions, payouts, webhooks
- Laravel DX – facades, fluent builders, typed data objects, events
- Production ready – PHP 8.4, PHPStan level 6, Pest test suite
- Secure – webhook signature verification, sensitive data masking
Installation
composer require aiarmada/chip
Publish config and migrations:
php artisan vendor:publish --tag="chip-config" php artisan vendor:publish --tag="chip-migrations" php artisan migrate
Configuration
# CHIP Collect CHIP_COLLECT_API_KEY=your-api-key CHIP_COLLECT_BRAND_ID=your-brand-id # CHIP Send CHIP_SEND_API_KEY=your-send-api-key CHIP_SEND_API_SECRET=your-send-api-secret # Environment CHIP_ENVIRONMENT=sandbox # Webhooks CHIP_COMPANY_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----..." CHIP_WEBHOOK_VERIFY_SIGNATURE=true
Quick Start
Payment Gateway (Recommended)
Works with any CheckoutableInterface – Cart, Order, or custom implementations:
use AIArmada\Chip\Gateways\ChipGateway; $gateway = app(ChipGateway::class); $payment = $gateway->createPayment($checkoutable, $customer, [ 'success_url' => route('checkout.success'), 'failure_url' => route('checkout.failed'), ]); return redirect($payment->getCheckoutUrl());
When aiarmada/cart is installed, Cart automatically implements CheckoutableInterface:
$cart = app(\AIArmada\Cart\Cart::class); $payment = $gateway->createPayment($cart, $customer, $options);
CHIP Collect
use AIArmada\Chip\Facades\Chip; // Create purchase $purchase = Chip::createPurchase([ 'client' => ['email' => 'customer@example.com'], 'purchase' => [ 'currency' => 'MYR', 'products' => [['name' => 'Product', 'price' => 9900]], ], ]); // Fluent builder $purchase = Chip::purchase() ->customer('customer@example.com', 'John Doe') ->addProductCents('Product', 9900) ->successUrl(route('success')) ->create();
CHIP Send
use AIArmada\Chip\Facades\ChipSend; $instruction = ChipSend::createSendInstruction( amountInCents: 10000, currency: 'MYR', recipientBankAccountId: 'bank_123', description: 'Payout', reference: 'PAY-001', email: 'recipient@example.com', );
Webhooks
Route::post('/chip/webhook', function (Request $request) { $handler = app(ChipGateway::class)->getWebhookHandler(); $payload = $handler->verify($request); if ($payload->event === 'purchase.paid') { // Handle payment } return response('OK'); });
Health Check
php artisan chip:health
Documentation
- Payment Gateway – Universal gateway interface
- CHIP Collect – Payments and purchases
- CHIP Send – Disbursements and payouts
- Webhooks – Event handling
- API Reference – Complete method reference
License
MIT License. See LICENSE for details.