#zelda.zonk

1 messages ยท Page 1 of 1 (latest)

dapper ridgeBOT
limber storm
#

hello! Stripe coupons don't work with the Payment Element. It only works with Stripe Checkout or Invoices

tame summit
#

ok, so if im using payment intents with payment element for single charges, i would need to handle coupon code / logic within my app? So discount amount (apply coudon code) before creating payment intent with amount?

limber storm
#

yep, that's correct

tame summit
#

ok, makes sense, what about stripe coupons and susbcriptions using payment element with setup intents?

limber storm
#

you can apply the coupon when creating a Subscription, so the final amount will include the coupon applied

dapper ridgeBOT
tame summit
#

ok so i can have stripe coupons for susbcriptions but i'll also need app level coupons for payment intents. could I have stripe coupons for both, but when using payment intents i query stripe api to validate coupon and then manually discount the amount when creating payment intent? I would then need to (using stripe webhook) on successful checkout, query they stripe api again though to mark coupon off as used right?

#

i want all coupons in one spot either locally or in stripe

topaz onyx
#

Yeah I understand you want them in one spot, but unfortunately we don't support coupon on PaymentIntent as an one-off transaction

#

For it yes you would need to calculate the discounted amount and pass in

tame summit
#

so i cant query stripe api to validate coupon and then manually discount the amount when creating payment intent?

#

and then manually mark it off as used i guess because theres NO charge id associated with it?

#

is there any plans to introduce coupons into payment element? This is a big downside to using it then

topaz onyx
#

How would you "manually mark" a Coupon off? I don't think there is such an option

#

It's a common ask btw and I will also forward your feedback. Thank you!

tame summit
#

ok so, thats means i will have to manage coupons locally (payment intent and setup intent checkouts), which will mean having to change subscription amount on the fly, can I do this? As i know you have to setup a price on a subscription product in stripe. When creating setup intent can i change amount or price of subscription ?

topaz onyx
tame summit
#

thanks but i dont want to use stripe coupons if i cant use them with payment intents, as i said i want all coupons either in app or in stripe, in one spot.

#

so i need to know can i change susbcription price when creating setup intent?

topaz onyx
#

Ah I see, like build a complete Coupon system yourself

tame summit
#

yeah im going to have to ๐Ÿ˜ฆ

#

unless i move from payment element to checkout

topaz onyx
#

When creating SetupIntent yes you can specify the amount. If you already created a SetupIntent with full amount, you may want to recreate another one with the discounted amount

tame summit
#

couldnt i just update the setup intent (if already created) with discounted amount? I update payment intent amount during checkout, if user adds more to cart then comes back to checkout.

topaz onyx
#

Oh wait sorry

#

SetupIntent doesn't have an amount

#

SetupIntent meant to not charge, so it's $0 anyway

tame summit
#

so how would i discount the subscription price / amount on the fly?

limber storm
tame summit
#

like i said earlier i dont want to use stripe coupons if i cant use them with payment intents.

#

i need to manually discount the subscription price and when creating subscription use that price not the Price ID, is this possible?

limber storm
tame summit
#

yes

limber storm
#

what i mentioned is to pass in the coupon when creating the Subscription. The corresponding PaymentIntent genereated by the Invoice will already be the discounted amount

#

have you tried that?

tame summit
#

where do i create this coupon?

limber storm
tame summit
#

but as i said earlier i dont want to use stripe coupons

limber storm
#

why not?

tame summit
#

because i cant use them with payment element when user checkouts with payment intent.

#

i want all my coupons in one place

limber storm
#

so if i understand correctly, you want a way to manually specify how much or edit the amount a customer should pay for each Invoice on a Subscription?

tame summit
#

if they use a coupon yes, and that coupon wouldnt be a stripe coupon it would be an app level coupon

limber storm
#

and how would your coupons work? is it only going to apply a discount for the lifetime of the subscription?

#

or there's many possible variations?

tame summit
#

there could be many variations, but for now lets say the lifetime of sub, say its priced at $99 in stripe products, but i want user to have it for $50 for lifetime of subscription.

limber storm
#

then you can just create a Price for $50 / interval

tame summit
#

so for every coupon i make i would need to make a subscription product to match it?

limber storm
#

pretty much

#

or create a new Price

tame summit
#

thats not a good solution, cant i just pass in new price when creating subscription that overrides the price id?

#

wait can you explain, or create a new Price

limber storm
#

one of those APIs depending on what you're trying to do specifically

tame summit
#

and that price would only affect that customers subscription?

limber storm
#

that parameter essentially creates a new Price inline, yes, it will only affect that customers subscription

#

i suggest you test it out to make sure it works as per what you expect

tame summit
#

perfect, thats what i was after

#

man, not having coupons in payment element is maddening

#

i think the easiest approach would be to chnage my checkout flow from using payment element to Stripe Checkout, that way i can use stripe coupons and i wouldnt have to build coupon logic. Then hopefully in future stripe implements coupons into payment element and i can switch back.

limber storm
#

that makes sense. Checkout is a lot easier to implement and you can use it for both Subscriptions and one-time payments

tame summit
#

yeah, i think thats the best way to go. I apprechiate all your help, thanks for answering all my questions. ๐Ÿ™‚

limber storm
tame summit
#

thanks

#

one last question, with Checkout, do you i have to create all my products in stripe? Products that are not subscription so one-time payments? Currently using payment intent i dont need to do this

limber storm
tame summit
#

ok great thanks again

#

oh sorry one more thing, at the moment i prepopulate address element, can i send over address info to Stripe Checkout to prepopulate?

limber storm
#

you won't be able to prepopulate that information in Checkout. I'd just leave it to Stripe Checkout to collect that information really

tame summit
#

ok thanks

#

can i make sure phone number is collected though as i need that

limber storm
tame summit
#

thanks again, i think im all set now.

limber storm
#

yes, it's possible, just a bit more complicated. The way i would go about it is after the first payment for the subscription is completed and you receive a webhook event for that, create a Subscription Schedule for that Subscription

tame summit
#

my clients wants to basically create there own pay later type thing, so lets say user adds 3 products to cart, total is $90 for this example lets say there are no subscription products in cart. and client wants user to be able to split the $90 into lets say 10 monthly payments of $10, is this achievable with Subscription Schedules ?

limber storm
#

you're going to need to create a Subscription for that use case essentially. Following your example : you would need to create a Subscription for $10/month first and the customer will pay for that

#

then you can create a Subscription Schedule to schedule when the Subscription ends

tame summit
#

ok great, since total cart amount could be $90 or $200 for example, the monthly payment could vary, so $90 over 10 monthly payments would be $9/month but $200 over 10 monthly payments would be $20/month so could I can generate a new Price inline for subscription like you mentioned earlier?

limber storm
tame summit
#

great thanks

#

is there a way to save this thread for future reference?

#

so i can come back and read

limber storm
#

it'll always be here

tame summit
#

thanks