#sreekanth_api
1 messages ¡ Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- sreekanth_api, 18 hours ago, 41 messages
- sreekanth_sub-multi-prod, 21 hours ago, 35 messages
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1245991510139207730
đ Have more to share? Add details, code, screenshots, videos, etc. below.
Hi
hello! how can I help?
If I subscribe for 2 months, will the monthly amount be deducted for each month? What should be the end date I need to pass?
Months have either 30 or 31 days.
do i need to add days to end date ?
if you don't want to worry about the exact timestamp to pass in when cancelling the subscription, i suggest you consider subscription schedules instead : https://docs.stripe.com/billing/subscriptions/subscription-schedules. You can choose to end a subscription after 2 iterations (assuming you're subscribing on a monthly basis). You can use this example as a reference : https://docs.stripe.com/billing/subscriptions/subscription-schedules/use-cases#installment-plans
If you don't want to use Subscription Schedules i.e. use the subscription's cancel_at parameter, you will need to calculate the exact unix timestamp you want to cancel at : https://docs.stripe.com/api/subscriptions/create#create_subscription-cancel_at
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
in case you haven't seen this yet, you can use test clocks to mimic the passing of time : https://stripe.com/docs/billing/testing/test-clocks
We have implemented the use of cancel_at, but due to time differences, prorations were applied automatically
we need to have cancel_at and billing_cycle end date should be exact same ?
yes, it should be. You can test it out
okay
message: 'billing_cycle_anchor cannot be later than next natural billing date (1717227831) for plan',
param: 'billing_cycle_anchor',
request_log_url: 'https://dashboard.stripe.com/test/logs/req_fpSWqR0bsuoBmx?t=1717141431',
type: 'invalid_request_error',
headers: {
server: 'nginx',
date: 'Fri, 31 May 2024 07:43:52 GMT',
'content-type': 'application/json',
'content-length': '299',
connection: 'keep-alive',
'access-control-allow-credentials': 'true',
'access-control-allow-methods': 'GET,HEAD,PUT,PATCH,POST,DELETE',
'access-control-allow-origin': '*',
'access-control-expose-headers': 'Request-Id, Stripe-Manage-Version, Stripe-Should-Retry, X-Stripe-External-Auth-Required, X-Stripe-Privileged-Session-Required',
'access-control-max-age': '300',
'cache-control': 'no-cache, no-store',
'content-security-policy': "report-uri https://q.stripe.com/csp-report?p=v1%2Fsubscriptions; block-all-mixed-content;
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
can you give some infor about this error...
can you share more on why you're setting the billing_cycle_anchor?
its configured to start the subscription from that date
The billing_cycle_anchor is not when the subscription starts. The billing_cycle_anchor is a reference point that aligns future billing cycle dates.
As an example, a monthly subscription with a billing cycle anchor date of September 2 always bills on the 2nd day of the month.
Without setting a billing_cycle_anchor, will it always use the current date and time for future billing cycle dates?
yes
okay
billing_cycle_anchor causing this issue ?
yes, as it mentions, your billing_cycle_anchor cannot be later than the next natural billing date 1717227831 (this is Jun 01 2024 07:43:51 UTC)
okay
we can use billing_cycle_anchor only for weekly, monthly and yearly... can we use it for daily with specific time ?
no, it's not possible - https://docs.stripe.com/api/subscriptions/create#create_subscription-billing_cycle_anchor_config : you can see that day of the month is required which makes it unsuitable for your use case
also our specs explicitly mention only valid with monthly and yearly price intervals
Okay... if we need to add 24 hours to the current date, can we use the trial end date to start the subscription?
Hey! Taking over for my colleague. Let me catch up.
can you check this #1245684233721348096 message
if we need to add 24 hours to the current date, can we use the trial end date to start the subscription?
Could you please share a concrete example?
e.g. Subscription A starts at T1, I want to make X action in order to Subscription A starts at T1....
In our app, the client asked to provide an option where if a user subscribes, they can make a donation but also have the ability to cancel within a certain time period.
Yes, you can use the cancel_at as mentioned in the previous discussion
if we need to add 24 hours to the current date, can we use the trial end date to start the subscription?
Let's focus on this section, can you share a concrete example?
Have you had the chance to use Stripe Test Clock and create simualtions?
Make sure to make you tests and share with us concrete example with the desired next action and expected behavior
we are offering certain type of services... in that period if he like he can choose others
For me, it was showing only 3 days to extend to test functionality.
What you mean exacrtly , can you share a Subscirpiton Id ?