#Barba-cancel-subscription

1 messages ยท Page 1 of 1 (latest)

sterile lodge
whole stirrup
#

let me double check that ๐Ÿ˜‰

sterile lodge
#

I was going to say you should use default_incomplete but I actually think the trial may mean it wouldn't cancel until the end of the trial

whole stirrup
#

ok, the front-end is using my endpoint and im using to create the susbcription a default_incomplete payment_behavior

#

right...

sterile lodge
#

Apologies, I was a bit wrong there. Not the right thing to use with the trial

whole stirrup
#

np

sterile lodge
#

Is there a reason you start the subscription before you have the details? How long do you want to give them to pay before cancelling?

#

If you are going to do the webhook solution I would listen for the customer.subscription.created event

#

invoice.created will happen every billing cycle

whole stirrup
#

well.. the thing is ... I provide a list of prices to the user.. based on some stuffs.. and when the user pick a price we redirect to pay by using stripe js .. and in the case where the user doesnt pay and go back:

  • I already have the subscription created with the free trial
    and the user can do this multiple times..

so the scenario where the user has 3 or 4 subscriptions with no payment method will be charged with the default_payment method for all of them ... so I need to check thoes susbcriptions before user is charged .. the only solution I found is what I mention before.. the invoice.created

#

does it make sense to you? not sure If Ive explained it to you properly ๐Ÿ˜–

#

invoice.created will provide me enough time to cancel the subscription isnt it?

but customer.subscription.created will be called automatically after the subscription is created.. so no time to allow to the user to pay, isnt it?

next parrot
#

@whole stirrup yeah that makes sense, we don't really have a solution for this if you start with a trial. The correct option here is to change the price on the existing subscription every time they go back, since it's a trial period there's no proration

#

basically you need to track when a subscription is already created and remember that versus creating a new one

whole stirrup
#

oki thanks!

#

btw I saw I have a cancel at period end flag I could use to cover what I need

next parrot
#

yep that works too but then you have to remember to undo it

whole stirrup
#

thanks! ๐Ÿ™‚

#

all sorted