#letscode_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1216704171495919670
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
We are giving our customers to pay amount in installments. EX: for 2000$, customer can pay 500$ every 2 months in 4 intervals
to achive this, we belive Stripe will work and created Subscription with Amount 500, iteration 2 months, and intervals 4
onces all intervals complited, expected to end the subscription (we are doing via our code, to check all installments done, then cancel the subscription)
Now we got an issue with last installment of every subscription: EX: sub_1OspxoFG3Dh3H5V4Y1ehm7G5
the last invoice showing only $8.20 instead of $500
i'm done, please go ahead
@astral blade are you there? Let me know if you need any more information
It seems like the Subscription doesn't go through 4 complete cycles. Why are you setting backdate_start_date, billing_cycle_anchor exactly?
I would recommend listening to invoice.paid webhook event and count when 1 Subscription has 4 of those. After that you can mark the Subscription as cancel_at_period_end: true.
sometimes the payment was initiated what we expected. Lets in this case, the user needs to pay on Mar 1st. But the user paid on 9th. So in our case backdate can help on this and upcomming invoices
means raised first on any date, but next invoice should be Mar 1st + 2 months, May 1st
Okay. In any case, the approach I described above would prevent any prorations.
it's not about subscription cancel, it's about last invoice raising only few cents
I understand that. It's because the Subscription ends before the last month completes, so the customer is only charged for 1 day in the last month.
If you mark it as cancel_at_period_end instead, during the last month, it will charge the customer for the complete month, as expected.
Happy to help.
I set .setCancelAtPeriodEnd(true)
but still showing the subscription sub_1Ot7IvFG3Dh3H5V4vGlQb0MA end date Sep 1st
This Subscription seems to be managed by a SubscriptionSchedule. So you shouldn't be able to update it directly.
For the workflow I suggested, you don't need to use Subscription Schedules.
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
If subscpritonschedule not work, how we can raise invoice? As my knowledge, subscriptions helps to customers do setup onetime payment and upcomming invoices will be pay without worry about customer to enter details
please correct if i'm wrong. We are looking, customer can enter details one time, and as EMI model
would you mind summarizing the context and what are you trying to achieve?
We are giving our customers to pay amount in installments. EX: for 2000$, customer can pay 500$ every 2 months in 4 intervals
to achive this, we belive Stripe will work and created Subscription with Amount 500, iteration 2 months, and intervals 4
onces all intervals complited, expected to end the subscription (we are doing via our code, to check all installments done, then cancel the subscription)
Now we got an issue with last installment of every subscription: EX: sub_1OspxoFG3Dh3H5V4Y1ehm7G5
vanya_stripe suggested add cancel_at_period_end, but it's not working: ID:sub_1Ot7IvFG3Dh3H5V4vGlQb0MA
let me know if you need any more information @sudden heath
iteration 2 months, and intervals 4
it's interval 2 months and iteration 4
my bad.. yes
onces all intervals complited, expected to end the subscription (we are doing via our code, to check all installments done, then cancel the subscription)
you don't need to, you can set the https://docs.stripe.com/api/subscription_schedules/create#create_subscription_schedule-end_behavior to cancel
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Okay.. but what about only portion of amount generated for last invoice?
sub_1Ot7IvFG3Dh3H5V4vGlQb0MA
I'm not sure what do you mean
Please check subscption: sub_1Ot7IvFG3Dh3H5V4vGlQb0MA
it's showing, last invoice amount 8$ instead of $500
can you try to create a new subscription schedule