From 84bd4d3d388bdd69629b146be061e7c99a8e6511 Mon Sep 17 00:00:00 2001 From: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Date: Thu, 28 Aug 2025 04:07:52 -0400 Subject: [PATCH] Remove payment fee from `chargeCard` (#23411) --- .../app-store/stripepayment/lib/PaymentService.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/packages/app-store/stripepayment/lib/PaymentService.ts b/packages/app-store/stripepayment/lib/PaymentService.ts index 02ba3c86d0..eede889662 100644 --- a/packages/app-store/stripepayment/lib/PaymentService.ts +++ b/packages/app-store/stripepayment/lib/PaymentService.ts @@ -27,12 +27,6 @@ export const stripeCredentialKeysSchema = z.object({ stripe_publishable_key: z.string(), }); -const stripeAppKeysSchema = z.object({ - client_id: z.string(), - payment_fee_fixed: z.number(), - payment_fee_percentage: z.number(), -}); - export class PaymentService implements IAbstractPaymentService { private stripe: Stripe; private credentials: z.infer | null; @@ -242,11 +236,6 @@ export class PaymentService implements IAbstractPaymentService { const setupIntent = paymentObject.setupIntent; - // Parse keys with zod - const { payment_fee_fixed, payment_fee_percentage } = stripeAppKeysSchema.parse(stripeAppKeys?.keys); - - const paymentFee = Math.round(payment.amount * payment_fee_percentage + payment_fee_fixed); - // Ensure that the stripe customer & payment method still exists const customer = await this.stripe.customers.retrieve(setupIntent.customer as string, { stripeAccount: this.credentials.stripe_user_id, @@ -266,7 +255,6 @@ export class PaymentService implements IAbstractPaymentService { const params: Stripe.PaymentIntentCreateParams = { amount: payment.amount, currency: payment.currency, - application_fee_amount: paymentFee, customer: setupIntent.customer as string, payment_method: setupIntent.payment_method as string, off_session: true,