#piq9117
1 messages · Page 1 of 1 (latest)
What integration are you using and where do you intend to apply the discount?
i'm using the APIs. is that the integration you're referring to? I wanna apply the discount on the customer object
The integration here refers to Stripe products such as Checkout Session, Payment Element, Invoicing, Subscription... etc.
Discount can't be applied to the customer object. It can be applied to Checkout Session, Payment Links, Invoices and Subscriptions
i was hoping i could retrieve price(s) and view it as discounted already. I'm using this https://stripe.com/docs/api/prices/retrieve
for the discount, i'm using this field to apply it to the customer https://stripe.com/docs/api/discounts/object#discount_object-customer
oh. sorry. i'm using the coupon field for the customer part https://stripe.com/docs/api/customers/update#update_customer-coupon
Discount refers to actual application of the promotion code or voucher. It can't be added to the customer.
For coupon on customer object, it will only be applied to recurring charges, i.e. subscription.
Could you share how you're going to charge customer with Stripe products, so that I can recommend how a coupon can be applied?
my current flow is i have products, then customers can subscribe to it. Before they subscribe to a product, I apply the discount on the customer so when they subscribe to a product they pay a discounted price. Here's a customer with a discount req_Kphrj1nyl9EEGT
I see! I can see that the coupon has been applied to customer's subscription: https://dashboard.stripe.com/test/subscriptions/sub_1MVzyZGJhtMpdHF8dNRNcxgI
Similarly in the most recent invoice that the coupon has been applied as well: https://dashboard.stripe.com/test/invoices/in_1MVzyZGJhtMpdHF88OmXt4y6
Is there anything that doesn't work as expected?
yeah. everything works with my flow. i was hoping when I apply the discount, and my users fetch the products with prices they'll see a discounted price before they even subscribe. so like a preview
I see! Unfortunately, such preview is not possible before creating subscription. You'd have to implement on your own.
gotcha. unfortunate but good to know. thanks! 