There are two separate questions hiding here, and Stripe gives you a clean answer to both.

Pay on what Stripe actually charged, not the sticker price

The single rule that keeps you solvent: commission is a percentage of amount_paid, which already has the discount subtracted. Never compute off the plan's list price.

// on invoice.paid

const commission = Math.round(charged * 0.30);