#MrsRumi-subscription

1 messages ยท Page 1 of 1 (latest)

normal hornet
#

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?

rare ferry
#

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

normal hornet
#

ah i see, my mistake on the pending_setup_intent

tiny arch
#

๐Ÿ‘‹ Stepping in for my colleague since they had to step away

#

just a few minutes to catch up

rare ferry
#

okey! ๐Ÿ‘

tiny arch
#

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

rare ferry
#

but then my front-end have to know what type of client_secret my API is returning, rigth?

tiny arch
#

no not really

#

Oh scratch that

#

it should yes, so you can either call confirmPayment or confirmSetup

#

my bad

rare ferry
#

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

tiny arch
#

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

rare ferry
#

okey

#

thank you very much ๐Ÿ˜„

tiny arch
#

let me know if you need any more help

rare ferry
#

At the moment I think not, if I have another question about that, I can menthion you on the message?

tiny arch
#

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

rare ferry
#

okey