Skip to content

Scheduling infrastructure for absolutely everyone.

Remove payment fee from `chargeCard` (#23411)

Joe Au-Yeung84bd4d3d388b
diff --git a/packages/app-store/stripepayment/lib/PaymentService.ts b/packages/app-store/stripepayment/lib/PaymentService.ts
index 02ba3c86d09..eede8896629 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<typeof stripeCredentialKeysSchema> | 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,