#hexiaolong

1 messages · Page 1 of 1 (latest)

gloomy trailBOT
sleek valve
#

If you're using Payment Intents directly, you can't apply Coupons/Promotion Codes

brittle adder
sleek valve
#

Are you using Subscriptions, or one-time payments with a Payment Intent? The React/Elements part is irrelevant

brittle adder
#

1.Why is this not supported?2.How do I use coupons or special discounts

sleek valve
#

It's just not something we've built unfortunately. You can use coupons for one-time payments with Checkout

sleek valve
#

Otherwise you'll need to manually handle the discount calculations yourself

sleek valve
brittle adder
sleek valve
#

Yes, it's a hosted payment page

sleek valve
#

What do you mean?

brittle adder
sleek valve
#

The same way in what regard?

brittle adder
#

const session = await stripe.checkout.sessions.create({
line_items: [
{
// Provide the exact Price ID (for example, pr_1234) of the product you want to sell
price: '{{PRICE_ID}}',
quantity: 1,
},
],
mode: 'payment',
success_url: ${YOUR_DOMAIN}?success=true,
cancel_url: ${YOUR_DOMAIN}?canceled=true,
}); in this demo,i can just change mode to specify whether it's a one-time or a subscription, right?

sleek valve
#

Correct yes

brittle adder
sleek valve
brittle adder
#

I can manually create create a coupon in management background, but if I don't use stripe.checkout.sessions.create, instead of their coupons and commodity prices, to calculate the real pay, so I can see in management background information such as the use of coupons? I think no, because no information about the coupon was sent to stripe at the time of payment, so it cannot be associated with Stripe. Is my understanding correct?

sleek valve
#

Yes, you can't manually increment the 'redemption' count of a Coupon