#idhruv
1 messages ยท Page 1 of 1 (latest)
Hi there, what do you mean by future dated ?
it means if the subscription is set to trigger at some date in the future
In this case the user made the booking on November 10th for a subscription that was scheduled to get active on November 14th, but on that day i.e. 14 nov his payment was unsuccessful, what exactly is the reason?
๐ taking over for my colleague. Let me catch up.
looking into this, please bear with me
sure. ty
hey, any findings so far?
I'm still not sure, sorry, what I was able to find till now is that the customer doesn't have any Payment Methods(PM) attached to them
ok so that explains this, the Subscription Schedule you created for that customer expects to charge_automatically the customer, where in fact they don't have any PM attached to them and you haven't specified how this subscription will be paid
yes the collection method is set to charge automatically, but it is expected that they are making the charge using their credit card so why pm is not getting attached?
or to put this simply, how should i solve this issue entirely?
let subscriptionObj:any = { customer: String(customer.id), end_behavior: 'cancel', metadata: {'data': String(dataId)}, phases: [ { items: [ { price: price.id, quantity: 1, } ], application_fee_percent: percent, collection_method: "charge_automatically", default_payment_method: payload.cardId, transfer_data: { destination: stripeAccountId }, iterations: monthlyIterations, proration_behavior: 'none' }, ] }
if you see in your request https://dashboard.stripe.com/logs/req_qUb9dZTCUMpjnU there wasn't a default_payment_method
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I think the default_payment_method should be set at a higher level https://stripe.com/docs/api/subscription_schedules/create#create_subscription_schedule-default_settings-default_payment_method otherwise it would only work on that phase
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
on an unrelated topic, why are you using Subscription Schedules instead of Subscriptions?
is it because of this iterations: monthlyIterations?
hey, yes
because we are dealing with future payments here and subscription has no option to allot future dates
we want subscription to also be dated to some date in the future.
otherwise it would only work on that phase
can you please elaborate this? in my case i want to assign application_fee_percent for all the phases, so that is why i assigneddefault _payment_method, collection_method and application_fee_percent under phases
Hey! Taking over for my colleague. Let me catch up.
can you please elaborate this? in my case i want to assign application_fee_percent for all the phases, so that is why i assigneddefault _payment_method, collection_method and application_fee_percent under phases
My colleague was talking about thedefault_payment_methodyou need should instead set it at the subcription_schedule level and not the phase level.
Otherwise, you can set it for each phase. Be aware that if a future phase don't has a default_payment_method and its collection method ischarge_automaticallythen the subscription will be incomplet and you need to deal with charging your customer for that phase. At the end, you can set this properties at the phase level, no problem with that
as per what you said i have modified the object to this, so can you please tell me if this application_fee_amount will be charged for each phase? as i have taken out the default payment method related attribute from phases
and secondly, transfer_data will this give out destination charges for every phase as depicted in the figure?
these two params are super imp.
Yes for each billing period/phase, application_fee_percentwill be applied
Yup
I invite you to test this behaviour using Stripe Test Clocks and try to create some simulation and advance the time in order to trigger and test these settings:
https://stripe.com/docs/billing/testing/test-clocks#setup-simulation
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!