Search code examples
stripe-paymentspayment-processingcoupon

Stripe Plan Pricing with Coupon Applied without charging the customer


I am trying to figure out how I can get the final total amount from Stripe for a subscription plan with a coupon applied, without charging the customer to show in the confirmation page before checkout.

I see there is API in Stripe to get Plan info and Coupon info that created in Stripe Dashboard but I want to find out if there is a way to get the Plan pricing info after applying Coupon but without charging the customer. All of the rules for the coupon exist in Stripe Dashboard so wanted to see if there is a way Stripe can give me the pricing info otherwise the rules for Coupon would be duplicated in Stripe and in my application server.


Solution

  • You can use the Upcoming Invoice API [1]. Pass in the Customer or Subscription, Coupon, and any invoice items to see what an upcoming invoice would look like for a Customer.

    [1] https://stripe.com/docs/api/invoices/upcoming