#hassan-schedule-future

1 messages · Page 1 of 1 (latest)

fresh orioleBOT
upbeat gyro
#

Hi 👋 sorry, this is pretty vague, and Subscription Schedules are pretty complex, so I'm not really sure what to suggest without getting more context on what you're trying to do.

Can you elaborate on what you're trying to accomplish, what you've tried so far, and why that didn't meet your needs?

verbal orchid
#

The way i currently was doing subscriptions is to retireve the setup intent or payment intent from a subscription. I updated my code to subscription schedule, adding a phase and other stuff, but dont know how to allow the user to authorise (setup intent or payment intent)

#

and the reason i need schedules is subscription pro-rates the amount at end of period. I dont want that

#

this is what i got now. It does this as soon as user goes to checkout page on my charity website

upbeat gyro
#

Do you have an example of how you're creating the Subscription Schedule? If you want a Subscription to cancel at the end of a specific period, using a Subscription Schedule is likely the right approach.

verbal orchid
#

I dont have an example to hand as i removed what i wrote, but basically what I want is the following:

  1. The code creates a new subscription schedule
  2. Return a payment intent or setup intent (this is based on if the user is already within the timeframe of the event. The event lasts 10 days. So some users sign up before start date, others after start date)
  3. The user now sees a checkout form to complete their card details
  4. Subscription schedule is created. Those who signed up before the event start date will wait until first payment is taken out. Those who signed up after start date will see a payment coming out and the next period it should take it out 9pm GMT)
  5. Subscription schdeule and Subscription is cancelled on the end date
#

I only managed to do number 1 in the above

#

Do you know how I can retrieve a payment intent or setup intent straight away after creating a subscription schedule?

OR alternatively, could you give me a stratgey on how other companies do this? I might be missing something here. The docs do not explain how to actually integrate subscription schedules.

upbeat gyro
#

Depends on how you created the Subscription Schedule, which is why I was hoping to see how you were doing that. If you're setting start_date to something in the future, then that Subscription Schedule won't immediately create a Subscription and therefore won't generate associated intents.
https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-start_date

If they are creating Subscriptions immediately, then you can find the ID of the associated Subscription in the Subscription Schedule's subscription field:
https://stripe.com/docs/api/subscription_schedules/object#subscription_schedule_object-subscription
You can then find the associated intent per usual for that Subscription.

verbal orchid
#

Ah interesting. Il try that. So it seems it's possible to get the intent to process to the stripe JS library. Thank you

#

How do I deal with the case where I want to add a user to a schedule but with a future start date. I also want to capture their payment method at the same time

upbeat gyro
fresh orioleBOT
verbal orchid
#

Create customer > collect PM for future payments> then create subscription schedule and attach the payment method and customer.

Can I create the subscription schedule in advance and then after I collect payment method, update the schedule with it

upbeat gyro
#

Yup, should be able to do that.

dark bobcat
#

hassan-schedule-future

verbal orchid
#

I have some cases where I need to take payment from user as soon as they setup a payment method. Am I able to charge in a server after I process a webhook