#a.reit-subscription
1 messages · Page 1 of 1 (latest)
Hi! Are you talking about this setting when creating a "normal" subscription: payment_settings.payment_method_types https://stripe.com/docs/api/subscriptions/object#subscription_object-payment_settings-payment_method_types
yes
Thanks! Give me a few minutes to look into this.
Ok thanks - I also tried it like that:
- Create the scheduled subscription
- (for testing purposes) - release it, as in my understanding once the start date is reached it will be release as well, so the behaviour should be the sme
- Check the response of the release subscription and collect subscription id of created subscription
- Update the payments settings of the created subscription
But the problem is, the response of the release subscription request has value "null" for key "released_subscription".
Its strange because the docs says that it should be set: "The released subscription_schedule object. Its status will be released, released_at will be the current time, and released_subscription will be the ID of the subscription the subscription schedule managed prior to being released." (see https://stripe.com/docs/api/subscription_schedules/release)
So I double checked, and subscription schedule don't have a payment_method_types unfortunately.
So the workaround is to wait for the subscription to be created, and then update its payment_settings.payment_method_types.
So what I described above?
Yes. Can you share the subscription schedule ID?
But then I have two question:
- Which event should I listen to (via Webhooks)?
- How can I map the sub_sched id with the new sub_id ?
Sure: sub_sched_1KRwDKPczayrdDApUuN8piYP
- The invoice is in draft for 1 hour, when I update the payment_settings in the subscription, will the be also updated for the first invoice which is still in draft state?
- I would listen to
customer.subscription.createdto know when the subscription is created - I'm not sure I follow the question
- When using subscription schedule, all invoice for the subscription are in draft for 1 hour
Ok I might missunderstood the release feature.
Does release mean that the scheduled subscription will be started immediately, or does it mean that the scheduled subscription will be removed and not started anymore?
For 1)
In case a customer has multiple scheduled subscriptions:
- The event gets trigged
- The event probably has a subscription ID in the payload
Question: How do I know to which sched_sub the subscription provided in the payload belongs to?
This question would solve also 2) where you did not understand me.
Does release mean that the scheduled subscription will be started immediately, or does it mean that the scheduled subscription will be removed and not started anymore?
If the subscription is created, then releasing means it won't follow the schedule anyone
If the subscription is not created yet, then releasing means it won't be created.
https://stripe.com/docs/api/subscription_schedules/release
Ahh okay sorry then I missunderstood that point, I see
But still open questions, sorry 😄
Ok I tried this, but the first invoice does not have the payment settings I defined in the update subscription request :/
Sorry I need to step out. My colleague @crude nova will help you soon.
Thanks
you probably have to update the invoice itself directly I would guess
Jep was also my guess, I will try that
yeah, because the draft invoice is created immediately, updating the subscription it belongs to won't retroactively update the invoice
Jap make sense
Ok but is there any special reason why this is not provided by the api for scheduled subscription, to set the payment methods?
I mean a big workaround for one setting
no real reason, it just wasn't added