#MrsRumi-subscription
1 messages ยท Page 1 of 1 (latest)
hi there! you'll need to create a subscription with a trial (instead of using a 100% discount) to have a pending_setup_intent
can you use a trial instead of a discount?
I have pending_setup_intent when I use the 100%discount (using stripe subscription coupon code),
it is null in the current case, when the subscription has to be paid the first period
ah i see, my mistake on the pending_setup_intent
๐ Stepping in for my colleague since they had to step away
just a few minutes to catch up
okey! ๐
basically when you create the subscription you have to expand on both latest_invoice.payment_intent and pending_setup_intent and get the client_secret from the one that is not null
but then my front-end have to know what type of client_secret my API is returning, rigth?
no not really
Oh scratch that
it should yes, so you can either call confirmPayment or confirmSetup
my bad
And what do you think?
It could be better de 1st solution I proposed or the second one?
Or maybe, another one that I have no take in account
I think you should take both into consideration
latest_invoice.payment and pending_setup_intent should be expanded and depending on which one is null you can send a flag to your front-end to determine whether you should use confirmPayment or confirmSetup
let me know if you need any more help
At the moment I think not, if I have another question about that, I can menthion you on the message?
I keep the thread open for about an hour
if you see the thread getting archived you could ask your question on the main #dev-help channel
okey