Hook: payment.gateway.config_schema
Last updated on May 17, 2026 21:21
Overview
Type: Filter
Location: app/Http/Controllers/Api/V1/PaymentGatewayController.php
Extends or modifies a payment gateway configuration form schema. Use to add custom fields to gateway settings in the admin panel.
Parameters
| Param | Type | Description |
|---|---|---|
$schema |
array | Current config schema |
$gateway |
object | Payment gateway instance |
Return
Must return array.
Usage Example
Hook::addFilter('payment.gateway.config_schema', function ($schema, $gateway) {
if ($gateway->code === 'bank_transfer') {
$schema['branch_code'] = [
'type' => 'text',
'label' => 'Branch Code',
'required' => false,
];
}
return $schema;
});