Open-source event management and ticket selling platform — perfect for concerts, conferences, and everything in between 🎟️ If you find this project helpful, please consider giving us a star ⭐️
PHP attendize-alternativedoor-managementevent-check-inevent-managementevent-registrationevent-ticketingeventbrite-alternativeeventslaravelopen-sourcephpreactself-hostedsell-ticketssell-tickets-onlineticket-sellingticketing-systemtickettailor-alternativetito-alternative
feature: Allow bypassing application fee (#1002)
Dave Earleya7a955513ed3
diff --git a/backend/app/DomainObjects/Generated/AccountConfigurationDomainObjectAbstract.php b/backend/app/DomainObjects/Generated/AccountConfigurationDomainObjectAbstract.phpindex 257f09c0a..8baf343ba 100644--- a/backend/app/DomainObjects/Generated/AccountConfigurationDomainObjectAbstract.php+++ b/backend/app/DomainObjects/Generated/AccountConfigurationDomainObjectAbstract.php@@ -17,6 +17,7 @@ abstract class AccountConfigurationDomainObjectAbstract extends \HiEvents\Domainfinal public const CREATED_AT = 'created_at';final public const UPDATED_AT = 'updated_at';final public const DELETED_AT = 'deleted_at';+ final public const BYPASS_APPLICATION_FEES = 'bypass_application_fees';protected int $id;protected string $name;@@ -25,6 +26,7 @@ abstract class AccountConfigurationDomainObjectAbstract extends \HiEvents\Domainprotected ?string $created_at = null;protected ?string $updated_at = null;protected ?string $deleted_at = null;+ protected bool $bypass_application_fees = false;public function toArray(): array{@@ -36,6 +38,7 @@ abstract class AccountConfigurationDomainObjectAbstract extends \HiEvents\Domain'created_at' => $this->created_at ?? null,'updated_at' => $this->updated_at ?? null,'deleted_at' => $this->deleted_at ?? null,+ 'bypass_application_fees' => $this->bypass_application_fees ?? null,];}@@ -115,4 +118,15 @@ abstract class AccountConfigurationDomainObjectAbstract extends \HiEvents\Domain{return $this->deleted_at;}++ public function setBypassApplicationFees(bool $bypass_application_fees): self+ {+ $this->bypass_application_fees = $bypass_application_fees;+ return $this;+ }++ public function getBypassApplicationFees(): bool+ {+ return $this->bypass_application_fees;+ }}diff --git a/backend/app/Http/Actions/Admin/Configurations/CreateConfigurationAction.php b/backend/app/Http/Actions/Admin/Configurations/CreateConfigurationAction.phpindex 78d4bcde0..7c4aa208e 100644--- a/backend/app/Http/Actions/Admin/Configurations/CreateConfigurationAction.php+++ b/backend/app/Http/Actions/Admin/Configurations/CreateConfigurationAction.php@@ -28,12 +28,14 @@ class CreateConfigurationAction extends BaseAction'application_fees' => 'required|array','application_fees.fixed' => 'required|numeric|min:0','application_fees.percentage' => 'required|numeric|min:0|max:100',+ 'bypass_application_fees' => 'sometimes|boolean',]);$configuration = $this->repository->create(['name' => $validated['name'],'is_system_default' => false,'application_fees' => $validated['application_fees'],+ 'bypass_application_fees' => $validated['bypass_application_fees'] ?? false,]);return $this->jsonResponse(diff --git a/backend/app/Http/Actions/Admin/Configurations/UpdateConfigurationAction.php b/backend/app/Http/Actions/Admin/Configurations/UpdateConfigurationAction.phpindex c83739ef3..1d5378ddb 100644--- a/backend/app/Http/Actions/Admin/Configurations/UpdateConfigurationAction.php+++ b/backend/app/Http/Actions/Admin/Configurations/UpdateConfigurationAction.php@@ -27,6 +27,7 @@ class UpdateConfigurationAction extends BaseAction'application_fees' => 'required|array','application_fees.fixed' => 'required|numeric|min:0','application_fees.percentage' => 'required|numeric|min:0|max:100',+ 'bypass_application_fees' => 'sometimes|boolean',]);$configuration = $this->repository->updateFromArray(@@ -34,6 +35,7 @@ class UpdateConfigurationAction extends BaseActionattributes: ['name' => $validated['name'],'application_fees' => $validated['application_fees'],+ 'bypass_application_fees' => $validated['bypass_application_fees'] ?? false,]);diff --git a/backend/app/Resources/Account/AccountConfigurationResource.php b/backend/app/Resources/Account/AccountConfigurationResource.phpindex c33869128..c1f2ea784 100644--- a/backend/app/Resources/Account/AccountConfigurationResource.php+++ b/backend/app/Resources/Account/AccountConfigurationResource.php@@ -20,6 +20,7 @@ class AccountConfigurationResource extends JsonResource'percentage' => $this->getPercentageApplicationFee(),'fixed' => $this->getFixedApplicationFee(),],+ 'bypass_application_fees' => $this->getBypassApplicationFees(),];}}diff --git a/backend/app/Services/Domain/Payment/Stripe/StripePaymentIntentCreationService.php b/backend/app/Services/Domain/Payment/Stripe/StripePaymentIntentCreationService.phpindex bd38c4f46..90f835b14 100644--- a/backend/app/Services/Domain/Payment/Stripe/StripePaymentIntentCreationService.php+++ b/backend/app/Services/Domain/Payment/Stripe/StripePaymentIntentCreationService.php@@ -66,8 +66,11 @@ class StripePaymentIntentCreationServicetry {$this->databaseManager->beginTransaction();+ $accountConfiguration = $paymentIntentDTO->account->getConfiguration();+ $bypassApplicationFees = $accountConfiguration?->getBypassApplicationFees() ?? false;+$applicationFee = $this->orderApplicationFeeCalculationService->calculateApplicationFee(- accountConfiguration: $paymentIntentDTO->account->getConfiguration(),+ accountConfiguration: $accountConfiguration,order: $paymentIntentDTO->order,vatSettings: $paymentIntentDTO->vatSettings,);@@ -80,7 +83,7 @@ class StripePaymentIntentCreationService'automatic_payment_methods' => ['enabled' => true,],- ...($applicationFee ? ['application_fee_amount' => $applicationFee->grossApplicationFee->toMinorUnit()] : []),+ ...($applicationFee && !$bypassApplicationFees ? ['application_fee_amount' => $applicationFee->grossApplicationFee->toMinorUnit()] : []),], $this->getStripeAccountData($paymentIntentDTO));$this->logger->debug('Stripe payment intent created', [diff --git a/backend/database/migrations/2026_01_21_000000_add_bypass_application_fees_to_account_configuration.php b/backend/database/migrations/2026_01_21_000000_add_bypass_application_fees_to_account_configuration.phpnew file mode 100644index 000000000..c02b07a7b--- /dev/null+++ b/backend/database/migrations/2026_01_21_000000_add_bypass_application_fees_to_account_configuration.php@@ -0,0 +1,21 @@+<?php++use Illuminate\Database\Migrations\Migration;+use Illuminate\Database\Schema\Blueprint;+use Illuminate\Support\Facades\Schema;++return new class extends Migration {+ public function up(): void+ {+ Schema::table('account_configuration', function (Blueprint $table) {+ $table->boolean('bypass_application_fees')->default(false)->after('application_fees');+ });+ }++ public function down(): void+ {+ Schema::table('account_configuration', function (Blueprint $table) {+ $table->dropColumn('bypass_application_fees');+ });+ }+};diff --git a/frontend/src/api/admin.client.ts b/frontend/src/api/admin.client.tsindex e419b4e4f..6dfaafaad 100644--- a/frontend/src/api/admin.client.ts+++ b/frontend/src/api/admin.client.ts@@ -52,6 +52,7 @@ export interface AccountConfiguration {fixed: number;percentage: number;};+ bypass_application_fees: boolean;}export interface CreateConfigurationData {@@ -60,6 +61,7 @@ export interface CreateConfigurationData {fixed: number;percentage: number;};+ bypass_application_fees?: boolean;}export interface UpdateConfigurationData {@@ -68,6 +70,7 @@ export interface UpdateConfigurationData {fixed: number;percentage: number;};+ bypass_application_fees?: boolean;}export interface AssignConfigurationData {diff --git a/frontend/src/components/routes/admin/Configurations/index.tsx b/frontend/src/components/routes/admin/Configurations/index.tsxindex fffc5ea30..865d36179 100644--- a/frontend/src/components/routes/admin/Configurations/index.tsx+++ b/frontend/src/components/routes/admin/Configurations/index.tsx@@ -1,4 +1,4 @@-import {Container, Title, Stack, Card, Text, Group, Button, Badge, ActionIcon, Alert, NumberInput, TextInput, Skeleton} from "@mantine/core";+import {Container, Title, Stack, Card, Text, Group, Button, Badge, ActionIcon, Alert, NumberInput, TextInput, Skeleton, Switch} from "@mantine/core";import {t} from "@lingui/macro";import {useGetAllConfigurations} from "../../../../queries/useGetAllConfigurations";import {useCreateConfiguration} from "../../../../mutations/useCreateConfiguration";@@ -16,6 +16,7 @@ interface ConfigurationFormValues {name: string;fixed_fee: number;percentage_fee: number;+ bypass_application_fees: boolean;}const Configurations = () => {@@ -80,6 +81,9 @@ const Configurations = () => {{config.is_system_default && (<Badge color="blue" size="sm">{t`System Default`}</Badge>)}+ {config.bypass_application_fees && (+ <Badge color="orange" size="sm">{t`Fees Bypassed`}</Badge>+ )}</Group><Group gap="xl"><div>@@ -150,6 +154,7 @@ const ConfigurationModal = ({configuration, onClose}: ConfigurationModalProps) =name: configuration?.name || '',fixed_fee: configuration?.application_fees?.fixed || 0,percentage_fee: configuration?.application_fees?.percentage || 0,+ bypass_application_fees: configuration?.bypass_application_fees || false,},validate: {name: (value) => {@@ -172,6 +177,7 @@ const ConfigurationModal = ({configuration, onClose}: ConfigurationModalProps) =fixed: values.fixed_fee,percentage: values.percentage_fee,},+ bypass_application_fees: values.bypass_application_fees,};const mutation = isEditing ? updateMutation : createMutation;@@ -232,6 +238,12 @@ const ConfigurationModal = ({configuration, onClose}: ConfigurationModalProps) ={...form.getInputProps('percentage_fee')}/>+ <Switch+ label={t`Bypass Application Fees`}+ description={t`When enabled, no application fees will be charged on Stripe Connect transactions. Use this for countries where application fees are not supported.`}+ {...form.getInputProps('bypass_application_fees', { type: 'checkbox' })}+ />+<ButtonfullWidthloading={createMutation.isPending || updateMutation.isPending}