Markup is the input. Margin is the test.
A 50% markup over a $10 cost gives you a $15 list price and a 33% gross margin — not 50%. After Stripe's 2.9% + $0.30, the $15 keeps $4.26 and the margin drops to 28.4%. Use the markup to draft a price, then check it against the margin you actually want.